How to configure SLA for catalog item tasks (sc_task) that will exclude Weekends and Holidays?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Team,
We want your suggestion on implementing SLA for catalog item tasks that will execute only on Weekdays, excluding Weekends and Holidays.
Each catalog item has a delivery time associated in the Flow. When the Flow is executing, its considering all the days of the weeks (including weekends and holidays) for the fulfilment.
We have the SLA configured where Holiday schedule is mapped, still unable to pause the SLA execution.
Screenshot of SLA configuration:
Holiday Schedule:
PFA of the followings:
1. Fulfilment duration configured at the FLOW level
2. RITM that has Delivery date and due date calculated and auto populated (including weekends and holidays)
Please let us know how can this be restricted at the Task level.
Thank you!
Subhashree
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17m ago
The delivery date set in flow does not have a direct correlation with the SLA or schedules. So what I did was hide the delivery date based on the flow/workflow and then I created a after insert business rule on the task_sla table.
Then I used the following code in the advanced section to set the due date on the RITM.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var dueDate = new setDueDate().CalculateDueDate(current.sla);
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', current.task);
gr.query();
if (gr.next()){
gr.due_date = dueDate;
gr.update();
}
})(current, previous);
Then I send a notification to the requestor to let them know the estimated delivery date.