How to send a notification only on Weekdays
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 03:23 AM
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

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 04:00 AM
@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;
})();
Hope this helps.