SLA - Duration END of Next Business Day

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2019 03:48 AM
Hi All,
A Response and Resolution SLA should be configured with a duration of END of Next business day .
My Schedule is 8-5 Weekdays and When a ticket is created today at any point of time, the SLA duartion should be till 5:00 PM next business day.
Cutsomer needs a SLA which breaches End of next business day, but for resolution SLA they need PAUSE conditions ( in case they are waiting for some additional customer information or something else) too.
Example : If a incident is logged @ 10:00 am on 2018-08-22, the duration should be till 5:00 pm 2018-08-23 --- i.e technically duration is 16 hours. If incase agent paused the ticket after 2 hours , then we still have 14 hours left for the incident to be solved.
If a incident is logged @ 3:00 pm on 2018-08-22, the duration should be till 5:00 pm 2018-08-23 -- i.e technically duration is 11 hours. If incase agent paused the ticket after 2 hours , then we still have 9 hours left for the incident to be solved.
Any suggestions?
Thank you all.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2019 11:25 AM
Hey Anil,
Based on your requirements, it looks like you need to define a relative duration. This allows you to script a dynamic Start and End time for your SLA's.
**see these docs for more info**
https://developer.servicenow.com/app.do#!/api_doc?v=madrid&id=r_DC-calcRelativeDueDate_GDT_N_S
1) Create a new Relative Duration [cmn_relative_duration] record:
**You said this should apply at ANY time during the day but if your requirements change, you may want to put a check into your script**
var days = 1;
// If the current time is after 5pm, add another day
if (calculator.isAfter(calculator.startDateTime, "17:00:00")) {
days++;
}
calculator.calcRelativeDueDate(calculator.startDateTime, days, "17:00:00");
You can now choose this Duration type from the dropdown on your SLA record:
Once you set your Start, Pause, and Stop conditions, your SLA's should work as intended.
**Pause condition should be based on state of record (ex: 'On Hold')**
I'm on an Eastern time zone and my SLA started 3 minutes ago (14:13:29)
I have 11 hours and 42 minutes left (9 hours for tomorrow's workday plus the 2 hours and 42 minutes left in todays workday).
Hope this answer helped or solved your problem. If so, please mark it as such. Thanks!
James Gragston | Developer at CloudPires
5721 Dragon Way | Suite 118
Cincinnati, OH 45227
CloudPires.com