SLA definition based on date/time field in location table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 11:42 PM
Hi,
We have a requirement where SLA should start based on a custom fields in location table. The sla duration has to be 12 hours from start time.
There are two custom fields ('open time' and 'close time') in location table. Now SLA should pick the start time from 'open time' field and should breach once 12 hours are passed. Also it should pause when it is out of working hours based on open time and close time.
If anyone has any idea how to achieve this, please let me know.
Thanks,
Amrit
- Labels:
-
Scripting and Coding
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 02:59 AM
Hello Amrit,
Refer the below screenshot may helpful to you.
ServiceNow Commnunity MVP -2018 class.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 03:14 AM
Hi Karthik,
For this I will have to create a schedule in Schedules table. Then only I can specify that schedule here but if I do this, then I will have to create hundreds of schedules as I am having different Open and Close time on different days for different locations.
That's why I need something that will dynamically create a schedule at run-time based on Open and Close Time of location.
Expected Scenario:-
P2 Incident is created on 7AM CST Sunday for location A, then the Resolution SLA should attach to the ticket in Paused state. The SLA should move to in progress at 8 AM CST (Since the location open time on Sunday is 8 AM CST).
Similarly, if a P2 Incident is created at 7AM CST on Monday, then SLA should start 9 AM CST and pause at 5 PM CST.
And SLA breach time is 12 hours.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 03:20 AM
Time Zones in Service Level Agreements
Service Level Agreements have a number of options of which time zone to use. To set a time-zone for SLAs, navigate to Service Level Management > SLA Properties and locate the following property:

Time zone for SLA
Some special considerations:
- If The caller's time zone is selected, there will be unpredictable behavior if the caller does not have a time zone defined.
- If The SLA definition's time zone is selected, the time zone must be manually defined on the SLA's form.
For more information on defining an SLA, see Defining an SLA with Plugin.
Hope this helps you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 04:06 AM
Thank you Sneha for your reply but I am not looking for timezones.
Suppose I have 2 fields start time and close time in location table. Now these fields have different values for different locations. What i want is how to create a schedule so that the working hours should be considered only between these two fields. Now these fields will differ for different locations. Hence the need to create the schedule at runtime.