How to send notification when due date reached

chanikya
Tera Guru

Hi,

here i have one typical task that is send notification when Due date and time reached

Ex: in incident table i have 5 incidents

first ---> due date 26-04-2018 16:00:00      send notification exact at      26-04-2018 16:00:00

second--->due date 26-04-2018 13:20:00   send notification exact at   26-04-2018 13:20:00 

third--->due date 26-04-2018 18:00:00

fourth--->due date 26-04-2018 17:40:00

fifth--->due date 26-04-2018 16:10:00      all incidents are 26-04-2018 but time is different so is it possible to send notification based on Date & time   when it match with   current Date & Time......   

1 ACCEPTED SOLUTION

Archana Reddy2
Tera Guru

Hi,

Try creating an insert/update Business Rule as below.

gs.eventQueueScheduled('event.name',current,gs.getUserID(),gs.getUserName(),current.u_due_field_name);

Before this, create an event with name as event.name and create a notification to be sent when this event fires.

In the notification, check Event parm 1 contains recipient and Event parm 2 contains recipient.

Hope this solves your issue.

Thanks,

Archana

 

View solution in original post

13 REPLIES 13

Jace Benson
Mega Sage

This would be a great use of scheduled events.  This isn't documented well but works well.

Here's an example of its use on the docs site: https://docs.servicenow.com/bundle/jakarta-platform-administration/page/integrate/email-integrations...

So you trigger the event with an server side script (insert/update) with the event to trigger(that will trigger the email eventually), the record, two string params and then a GlideDateTime like value.

So on insert or update you could delete any unprocessed events for this record, and then create new ones for the time in the due date field.

However, this might be a great case to just set up SLA's against incident.

while, if we write BRule it will runs when record updated/inserted right?

for example: i have 5 incidents on 26-04-2018 with different timing... so may be if i does n't insert/update any incident records  for 3 days then on 25th, 26th, 27th then how can we trigger notification...... as per Exact time...

So the initial set of due date I'm assume would happen on insert/update.

Then you could have a script action trigger the same event name for teh same record for a day later if the incident is not resolved or closed.

You could have the email have a condition check if the incident is not resolved or closed, then email.  The more you're typing about this thought it sounds much more like the SLA's and SLA notifications.

https://docs.servicenow.com/bundle/jakarta-it-service-management/page/product/service-level-manageme...

Hi,

not only in Incident table same scenario is repeated in another customized application , PPM module(Over due Date)  , change Table(planed end date)

 

so how can i achieve it