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





          • 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 ...
          • How to send custom email notifications for a request.

            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 ...
          • Script to create worklog automatically based on technicians leave

            You need to install Python to achieve the below. You can follow this link to install Python. (A) Create two incident additional fields with Date/time property as below: 1) Start Date  2) End Date Associate these additional fields in your Request ...