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.

          • 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 ...
          • How to automatically close requests that are in a specific status.

            This post describes the use of a python script to close requests that are put in a specific status using Custom Schedules.This showcases the use of a feature called 'Custom Schedules' that was released in the build 9300 of ServiceDesk Plus. What is ...
          • 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 ...
          • Report on requests pending approval

            DB Compatibility : PGSQL & MSSQL Build Compatibility : Builds above 10000 SELECT wo.WORKORDERID "Request ID",aau.FIRST_NAME "Requester",dpt.DEPTNAME "Department",wo.TITLE "Subject",ti.FIRST_NAME "Technician", std.STATUSNAME "Request Status", ...