Need to create SLA based on regional time zone.

shashanksha
Tera Contributor

Currently the SLA is tight to the EST time zone as So need to create SLA based on submitter's local time zone.

 

 

Thanks,

Shashank Sharma

2 REPLIES 2

Shubham_Jain
Mega Sage

@shashanksha 

 

Update the SLA Definition

  • Navigate to Service Level Management > SLA Definitions.
  • Open the relevant SLA.
  • Ensure "Time Zone Source" is set correctly.

2. Use the Submitter's Time Zone Instead of System Time Zone

  • Add a Business Rule or Scripted Field on the incident table to fetch the submitter’s time zone dynamically.
Script Example (Business Rule on incident Table - Before Insert/Update)

 

var userGR = new GlideRecord('sys_user');
if (userGR.get(current.opened_by)) {
    current.u_submitter_time_zone = userGR.time_zone;  // Store user's time zone in a custom field
}

 

 

  • Add a custom field u_submitter_time_zone to store the user's time zone.
  • This value will be referenced when calculating SLAs.

Adjust SLA Timing Based on the Submitter’s Time Zone

  • Modify the SLA Start Condition in Task SLA:
    • Use a Scripted Start Condition to apply the correct time zone.
Script Example (SLA Start Condition)

 

var submitterTimeZone = current.u_submitter_time_zone || 'US/Eastern'; // Default to EST if not set
var slaStart = new GlideDateTime();
slaStart.setTZ(submitterTimeZone);  // Set SLA start in user’s time zone
current.sla_start_time = slaStart;

 

 

Ensure the SLA schedule considers sla_start_time instead of server time.

 

Use a Dynamic Schedule for SLA Based on Time Zone

  • Create Multiple SLA Schedules based on different time zones.
  • Dynamically assign the correct schedule based on u_submitter_time_zone.
Script Example (Assign Schedule Dynamically in SLA)

 

var timeZone = current.u_submitter_time_zone;
if (timeZone == 'Asia/Kolkata') {
    current.sla_schedule = 'India Business Hours';
} else if (timeZone == 'Europe/London') {
    current.sla_schedule = 'UK Business Hours';
} else {
    current.sla_schedule = 'US Business Hours';  // Default EST
}

 

✔️ If this solves your issue, please mark it as Correct.


✔️ If you found it helpful, please mark it as Helpful.



Shubham Jain


Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @shashanksha 

 

Check this option in the SLA. It’s not regional; it basically depends on the user’s time zone in their user profile.

 

AGLearnNGrow_0-1741249812520.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************