How to send periodic notifications to requester(s) about their pending requests and accordingly update their status.

How to send periodic notifications to requester(s) about their pending requests and accordingly update their status.

This post describes the use of a python script to notify requester(s) about their requests through email and move those to a specific status.

Use Case: Let us assume a scenario where the technicians reply to a request and put it in a custom status called 'Waiting for Customer'. We can send reminder notification on 2 and 4 days This is achieved by running a query report in ServiceDesk plus which will return the ids of such requests.These are provided as input to a python script in JSON format. 

Execution steps:
1. Go to Reports--> New Query Report and run the below query and save this report.

select wo.workorderid "workorderid",
max(AaaContactInfo.EMAILID) "emailid",
max(woh.OPERATIONTIME) "last_tech_update" from workorder wo
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID 
LEFT JOIN AaaUserContactInfo ON aau.USER_ID=AaaUserContactInfo.USER_ID 
LEFT JOIN AaaContactInfo ON AaaUserContactInfo.CONTACTINFO_ID=AaaContactInfo.CONTACTINFO_ID 
left join workorderstates wos on wo.workorderid=wos.workorderid
left join statusdefinition sd on wos.statusid=sd.statusid
LEFT JOIN WorkOrderHistory woh ON wo.WORKORDERID = woh.WORKORDERID
LEFT JOIN WorkOrderHistoryDiff wohd ON woh.HISTORYID = wohd.HISTORYID
where wo.isparent='1' and sd.ispending ='1' and  wohd.COLUMNNAME in ('STATUSID') and
sd.statusname = 'Waiting for Customer' and
wos.notificationstatus ='TECH_REPLY' group by wo.workorderid

This will give you the ID of requests that were created in this week and are in "Waiting for User" status.Please update the  STATUSNAME   based on your requirement.

2. Download and place the script file in the ManageEngine/ ServiceDesk/ integration/custom_scripts folder.
3. Update the application URL, Technician Key,  mail server details in configuration.json file
4. Configure the schedule under Admin--> Custom Schedule, like shown below.

A short guide on setting up python is available here.

                New to ADManager Plus?

                  New to ADSelfService Plus?

                    • Related Articles

                    • How to email pending requests list to technician periodically

                      This post describes the use of a python script to email pending requests to each technician in a periodic interval using Custom Schedules.This showcases the use of a feature called 'Custom Schedules' that was released in the build 9300 of ServiceDesk ...
                    • Automatically close request after successive approval reminders.

                      This post describes the use of a python script to close requests after successive approval reminders using Custom Schedules. Use Case: We have an option under the self-service portal in order to send reminders mail for the approvals, what would be ...
                    • How to close associated incident requests of change request automatically

                      This post describes the use of a python script to close change that are in a specific stage using Custom Schedules. Use Case: There may be a scenario where number of Change Requests that have got closed and the associated incident is still in open ...
                    • Pending Request for more than 10 days

                      This report provides a quick view of all Pending incidents which are not closed for more than 10 days. When the incidents start backlogging faster than they can be resolved, the tendency of long incidents pending time can be exposed in this report. ...
                    • Close change requests using custom schedules.

                      This post describes the use of a python script to close change that are in a specific stage using Custom Schedules.   Use Case: There may be a scenario where number of old Change Requests that have gotten lost in the shuffle over the years. Most of ...