Create Email Notification Between 9h and 18h

Skydev22
Tera Contributor

Hello community i need te create a notification that get triggered only between 9h and 18h when incident record is created is there any solution for this?

Thanks!

1 ACCEPTED SOLUTION

@Skydev22 

not possible directly with notification create/update checkbox

You can use after update business rule and use gs.eventQueueScheduled() and trigger it the next day at 9am.

In that business rule check if the current date/time (france) is between that 9am to 6pm, if yes then use gs.eventQueue(), if not then in eventQueueScheduled() you can inform system when this event should be processed.

so in your business rule determine the next working day and set the start time as 9am and then use that

eventQueueScheduled(String name, Object instance, String parm1, String parm2, Object expiration) 

Find next business day 

Get next business day (date/time - based on schedule) 

"Next business day" calculates two business days if the start time is on weekends, holidays, or befo... 

I believe I have answered your question and you can enhance it further from here.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

14 REPLIES 14

@Ankur Bawiskar   i want to do it on delegations not incident sorry timezone france

@Skydev22 

So what need to happen on delegation?

delegation email should be sent only between 9am to 6pm France time?

but how are you triggering those emails

please share some more details

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar  for the notification created outside of 9h 18h they need to be queued and sent next day between 9h and 18h for now i am triggering with simple condition (record created) 

@Skydev22 

not possible directly with notification create/update checkbox

You can use after update business rule and use gs.eventQueueScheduled() and trigger it the next day at 9am.

In that business rule check if the current date/time (france) is between that 9am to 6pm, if yes then use gs.eventQueue(), if not then in eventQueueScheduled() you can inform system when this event should be processed.

so in your business rule determine the next working day and set the start time as 9am and then use that

eventQueueScheduled(String name, Object instance, String parm1, String parm2, Object expiration) 

Find next business day 

Get next business day (date/time - based on schedule) 

"Next business day" calculates two business days if the start time is on weekends, holidays, or befo... 

I believe I have answered your question and you can enhance it further from here.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Skydev22 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader