Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to send a notification only on Weekdays

SAS21
Tera Guru

 Existing logic - when the INC is in Pending state , a notification would trigger to the customer. From this first notification, we have to automate a follow-up notifications to users i.e. 3 follow-up notifications should be triggered Only on Business days (Week Days) .

(Email intervals-Every 2nd Business Day up to 3 notifications.)

How to implement this ?

Appreciate the Help!

Thank you

Bhavana

 

 

 

1 REPLY 1

Sandeep Rajput
Tera Patron

@SAS21 You can trigger your notifications via a Scheduled Job, use following script in the condition fied.

 

(function isWeekday() {
   var isWeekday;
var gDate = new GlideDate(); //Uses your Timezone!
var day = gDate.getByFormat('EEEE'); //Gets name of day
switch(day) {
       case "Saturday":
       case "Sunday":
           isWeekday = false;
           break;
       default:
           isWeekday = true;
   }
return isWeekday;
})();

 

Source:https://docs.servicenow.com/bundle/vancouver-platform-administration/page/administer/time/reference/...

 

Hope this helps.