Approve for more than 15 days then 3 reminder emails should trigger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 12:00 AM
Hi Team ,
can anyone please help me here with this requirement .
The requirement is when any approval gets triggered for RITM and if approver doesn't approve for more than 15 days then 3 reminder emails should trigger to the approver and after than even if the approver doesn't approver then the RITM should get cancelled .
Please help me here with the steps .
If possible please provide screenshots for better understanding .
Thanks In Advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 12:18 AM
Hi @nameisnani ,
I tried your problem in my PDI and it works for me please create a before BR and add table sysapproval_approver and add below code
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var currentDate = new GlideDateTime();
var futureDate = new GlideDateTime();
futureDate.addDays(15);
if(currentDate == futureDate){
for(i=0; i<=2; i++){
gs.eventQueue('eventName', current, current.number, gs.getUser().getEmail());
}
}
})(current, previous);
Create the event from All<Events<Registry and add that event name in BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 12:45 AM
Hi Sarthak,
I was just wondering what is i in your code? How does the loop work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 12:23 AM
I would add it in the RITM flow. Maybe create a subflow so you can add it where needed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 12:43 AM
Hi @nameisnani ,
It can be done for individual catalog and also for a collective catalogs.
if its single catalog then you need to edit the existing flow and and use wait for conditon and timer activity and roll back to notification reminder. and cancel if the rollback happens more than 3 time.
if your doing for all approvals then you can build a dedicated flow with same logic which check for pending approvals and sends notificaiton. (use the same logic mentioned above in flow too)
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....