Script: Send reminders to technicians when there is no update for 2 hours

Script: Send reminders to technicians when there is no update for 2 hours

Prerequisites:

2. functions.py :  This package consists of all the functions that are used to handle the standard requirements of the customer.  Most repeated requirements are written as separate functions.  Depending on our use case, we can include these functions in our script. 
3. configuration.json : This file maintains the configuration details of the installed server.  

Execution steps:    

1.  Execute the below query and save the report with a title as Reminder_title.

SELECT wo.WORKORDERID "workorderid",
wo.TITLE "subject",
std.STATUSNAME "status",
ti.FIRST_NAME "technician",
wos.last_tech_update "last_tech_update", aci.EMAILID "emailid" FROM WorkOrder wo
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID
LEFT JOIN StatusDefinition std ON wos.STATUSID=std.STATUSID
LEFT JOIN AaaUserContactInfo auci  ON ti.user_id=auci.user_id
LEFT JOIN AaaContactInfo aci ON auci.contactinfo_id=aci.contactinfo_id 
WHERE (std.ispending='1') AND DATE_PART('day',now()-to_timestamp(wos.LAST_TECH_UPDATE/1000))>3 AND wo.ISPARENT='1'

2.  Extract the attached script file in ZIP under ..\ManageEngine\ServicedeskPlus MSP\integration\custom_scripts - folder.

3.  Edit the configuration.json and update the values.

4.  Configure a custom schedule to execute everyday and pass this report as a parameter.

5.  Go to Admin > Custom Schedule > give a schedule name > execute script > py send_reminder.py





                  New to ADSelfService Plus?

                    • Related Articles

                    • Send Auto reminders to Change Approvers after X days

                      Here is the script and kindly follow the steps below to achieve your requirement to send Auto reminders to Change Approvers after X days. For now, the script sends reminder for every 24 and 48 hours. This can be customized in the script. 1.Download ...
                    • Script to add worklog using custom schedule

                      What is a Custom Schedule? Custom Schedules are actions scheduled on a specific date and time with or without repeat frequency. The actions are specified in a customized script file. Any data from ServiceDesk Plus can be sent to the script through ...
                    • Update status using Python script in 11.0

                      Using a Python script via custom trigger, we can update the status invoking an API call. A short guide on setting up python is available here : https://pitstop.manageengine.com/portal/kb/articles/how-to-setup-python-on-the-server Find the attached ...
                    • How to send custom email notifications for a request_NOT IN USE

                      This sample python script is used for sending custom notifications from ServiceDesk Plus MSP when a criteria is met.  You all know that ServiceDesk Plus MSP has notification rules and customisable templates to notify requesters, technicians, and ...
                    • Script to send notification to users on upcoming contracts

                      Please follow the below link to setup python on the server https://pitstop.manageengine.com/portal/en/kb/articles/how-to-setup-python-on-the-server-11-11-2019 Steps to configure 1.  Extract the attached zip file in <Home>/integration/custom_scripts ...