SLA Duration help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 02:32 AM - edited ‎09-05-2023 02:47 AM
HI Team .
Can someone help me with SLA duration type Please?
Requirement : If case is created today before 2 PM then SLA should attach and breach today by 4.30 PM , as we have schedule define (7:am to 4.30PM CST).
2nd -if the case is created after 2 PM then it should breach tomorrow 4.30 PM CST.
For After I have written Duration type script ...
Looking for your help to fix this .
Many thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 04:28 AM
Hello @pramn,
You can try one of the following options:
- Option 1: You can use the Duration type field to specify a fixed duration for your SLA. For example, if you want your SLA to breach in 2.5 hours, you can enter 0 02:30:00 in the Duration type field. This will calculate the due date based on the start date and time, regardless of the schedule. You can find more details about this option in this link.
- Option 2: You can use the Relative duration field to specify a relative duration for your SLA. For example, if you want your SLA to breach at 4:30 PM on the next business day, you can enter 1 16:30:00 in the Relative duration field. This will calculate the due date based on the schedule and add one business day to the start date. You can find more details about this option in this link.
- Option 3: You can use a script to calculate the due date for your SLA based on custom logic. For example, if you want your SLA to breach at 4:30 PM on the same day or the next day depending on the start time, you can use a script similar to this:
var days = 0;
// If the current time is after 14:00, add another day
if (calculator.isAfter(calculator.startDateTime, "14:00:00")) {
days++;
}
// Calculate the due date based on the schedule and the number of days
calculator.calcRelativeDueDate(calculator.startDateTime, days, "16:30:00");​
Hope this helps.
Kind Regards,
Swarnadeep Nandy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 04:43 AM
Hi @pramn ,
Why not utilizing the SLA schedule and by that the business duration? Based on your requirement, you have a SLA target set for 2,5 hours. By utilizing the SLA schedule, it will automatically pause on the business duration when outside your schedule.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/