Reminder notification after some time

Victor Monteale
Tera Guru

Hi all, I need to send a notification 6 hours after the last update. I am thinking of a scheduled job but it should run exactly after 6 hours of the last update. Please, could you provide a suggestion?

1 ACCEPTED SOLUTION

Mahendra RC
Mega Sage

Hello @Victor Monteale 

I would suggest to have a scheduled Job for this requirement because if you configure the flow or create an event from BR then there will be 1 flow or event for each record that will be created. So suppose you have created a flow and there are say 5K record so in your instance you will have 5K flow which will have Wait for duration action that is waiting for the time.

It will be better if you create a scheduled jobs at interval of 1 hour and can query the record updated before 6 hours ago and can trigger the notification. Also you can handle the case where if there are 10 records for specific user then you can trigger a single email with the link for all those 10 records instead of sending 10 separate emails.

 

View solution in original post

2 REPLIES 2

Avinash54
Tera Contributor

Rightly said, Schedule Job will an extra load on the system and the time won't match either which is 6 hours in this case.

You can create an event with a scheduled time to trigger at a particular date and time,

 

You can write a server script(Business Rule/Flow ) to trigger an event(scheduled) and the event will take care of the notification (assuming notification is triggered by an event)

Syntax would de :

 

var processTime = new GlideDateTime();
//processTime.addSeconds(60); //To add 1 min
//processTime.addDaysLocalTime(45); //Add 45 days local time,
gs.eventQueueScheduled(eventName,GlideRecord Object,parm1,parm2, processTime);
 
You can check the event being scheduled at a particular duration and will be in a queue until the timer kicks off.

Mahendra RC
Mega Sage

Hello @Victor Monteale 

I would suggest to have a scheduled Job for this requirement because if you configure the flow or create an event from BR then there will be 1 flow or event for each record that will be created. So suppose you have created a flow and there are say 5K record so in your instance you will have 5K flow which will have Wait for duration action that is waiting for the time.

It will be better if you create a scheduled jobs at interval of 1 hour and can query the record updated before 6 hours ago and can trigger the notification. Also you can handle the case where if there are 10 records for specific user then you can trigger a single email with the link for all those 10 records instead of sending 10 separate emails.