Automatically resend approval requests which are still pending

hong_cheung
Kilo Explorer

Hello,

Currently approval requests are emailed to the relevant approvers.   However they sometimes do not respond.   Is there a way to keep resending the email request until a reply has been received?

Many thanks,

Hong

30 REPLIES 30

trevino-d
Kilo Contributor

I solved this problem by splitting my workflow.  


  1. From the start box i connected a timer as well as an approval request (split)
  2. Set the timer for 8 hours
  3. connected a timer to an if box that checks to see if approval has been changed from requested
  4. if no then send a "reminder" notification and loop back to timer
  5. if yes then go to next step (rejoin workflow)


i tested it and it seems to work with no issues


Hope that helps.


harikrish_v
Mega Guru

Hi Hong,



You can create a Scheduled job for this, schedule it to run everyday and send out email reminders to all the approvers. Create an event approval_reminder, then create an email notification in which you specify this event. You can write something like this in the Job:-.



var gr = new GlideRecord('sysapproval_approver');  


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


      gr.addQuery('sysapproval.sys_class_name','<your table name>');   //table name like incident,problem etc


      gr.query();  


      while (gr.next()) {  


          gs.eventQueue("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


Hi Harikrishanan,



I have done as you mentioned above and it is working fine. but my problem here is I want to trigger the notification on the next day   from the date of creation(sys_created) of request.


if the request is not approved within oneday from the day of creation.



Do I need to give anything in the Time of the scheduled script.(or) change in the code itself.Please guide me.



remi.PNG



Regards,


Ajay.


Hi Ajay,



Think the other way around like "everyday, I want to send the records updated/created the day before"


Nana5
Mega Guru

Hi Hong,


I think we can use timer activity to check and wait 20 days 3o days after that once again we can send reminder mail.



Thanks