Script to send reminder emails to requester when there is no response from them for more than a specified time period

Script to send reminder emails to requester when there is no response from them for more than a specified time period

Use case: 
Reminder emails should be triggered to requester when the request is moved to a custom status and left unattended for more than a said time.
For eg., In this case, three reminder mails will be sent to the requester in different time intervals after the request status change.
First reminder mail will be sent when its 3 day past the request update.  Second mail will be sent when its 5 days, and final reminder will be sent when its 7 days past the last request update.  After which the ticket will be automatically closed.

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 usecase, 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.

 select workorder.helpdeskid "portalid", workorder.workorderid "workorderid", workorder.title "subject", aaacontactinfo.emailid "emailid", workorderstates.last_tech_update "last_tech_update" from workorder
inner join workorderstates on workorder.workorderid=workorderstates.workorderid
inner join statusdefinition on workorderstates.statusid=statusdefinition.statusid
inner join aaauser on workorder.requesterid=aaauser.user_id
inner join aaausercontactinfo on aaauser.user_id=aaausercontactinfo.user_id
inner join aaacontactinfo on aaausercontactinfo.contactinfo_id=aaacontactinfo.contactinfo_id
where statusdefinition.statusname='waiting for user reply'

2.  Extract the ZIP file under ..\ManageEngine\Servicedesk\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

Query Report:



Custom Schedule:

                  New to ADSelfService Plus?