How to send Approval Reminders?

shane_holland
Mega Contributor

Can someone explain how I can set-up approval reminders to automatically be sent out daily? I am mostly interested in reminders for requests in the Service Catalog, but if it cannot be scoped to that, then any approval reminders will do? I can't believe this isn't an OOB scheduled job in ServiceNow...

 

Thank you,

Shane

1 ACCEPTED SOLUTION

Hi Shane,



Since you have written the email notification in the sysapproval table, better you query sysapproval itself in the scheduled job. Please check the code below given by Bhavesh, its checking if the approval is for catalog request and whether the request is still in requested state. Please make sure you change the event name in the below code to the one you already have, it will look like this:-



var gr = new GlideRecord('sysapproval_approver');  


      gr.addQuery('state', 'requested');  


      gr.addQuery('sysapproval.sys_class_name','sc_request');  


      gr.query();  


      while (gr.next()) {  


          gs.eventQueue("catalog_task_approval_reminder",gr, gs.getUserID(), gs.userName());  


      }  



In the email notification,for Who will receive, make Users/Groups in fields as 'Approver', it should work fine. Also make sure that you check the 'Send to event creator', its just for testing you can deactivate later.



Thanks & Regards,


Hari


View solution in original post

10 REPLIES 10

Sanjeev Kumar1
Kilo Sage

Hi Shane,



I have implemented this solution for more details Please see solution.



How to create a reminder notifications for pending request to be approved?