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

@Robert H   for the notification created outside of 9h 18h they need to be queued and sent next day between 9h and 18h

Robbie
Kilo Patron
Kilo Patron

Hi @Skydev22,

 

This question has me thinking (Which I like...)

Can you expand on the "Why" here. If I understand your question and requirement correctly, you only want to send notifications when an incident is created during core business hours (9am to 6pm).

What is the expectation when an incident is created outside of these hours? Should the notification be 'queued'? And then sent when this window opens?

What happens when users are in different time zones? However, the notification would be based on the system timezone - however it is something to be conscious of.

 

@Dr Atul G- LNG's additional setting via the 'Advanced conditions' of the Notification filter configuration would provide you with what you require, however I would definitely consider the questions above re what should happen when incidents are created outside of these hours etc.

 

To help others (and for me to gain recognition for my efforts), please mark this response correct by clicking on Accept as Solution and/or Kudos.




Thanks, Robbie

Skydev22
Tera Contributor

@Robert H  i want to do it on delegations not incidents sorry timezone france

Skydev22
Tera Contributor

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Skydev22 

what's your business requirement here?

Incidents can be created from caller from any location.

are you not allowing incidents to be creation during off-business hours?

9am to 6pm but which timezone or location?

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