Configure SLA based on caller's location

Poorna Chandu
Tera Contributor

Hello Everyone, 

I want to configure the SLA response and resolution for P1,  but the requirement is like SLA should start based on caller's location zone like suppose if the user is in INDIA then IST , if Europe then CET like that.

I have selected Timezonesource as Caller's location Zone 

Requirement: 9*5 weekdays excluding caller's location zone excluding holidays.

I have created the schedule 9*5 weekdays but not able to configure for caller's location excluding holidays.

Please help me in achieving this.

 

Regards

Poorna

1 REPLY 1

Riya Verma
Kilo Sage
Kilo Sage

Hi @Poorna Chandu ,

Hope your are doing great.

IN order to configure SLA response and resolution for P1 incident base on caller's location , follow below steps:

  1. Set the Timezonesource field as "Caller's location zone" in the SLA definition.

  2. Create a schedule for 9*5 weekdays, which will serve as the base schedule for the SLA. This schedule represents the working hours.

  3. To exclude the caller's location zone and holidays, you need to make use of a Business Calendar. The Business Calendar allows you to define non-working days and exceptions.

  4. Here's an example of how you can achieve this using a Business Calendar and a Business Rule:

    a. Create a Business Calendar that includes all the holidays and non-working days. You can define the holidays specific to each location zone.

    b. Create a Business Rule that triggers when a new incident is created or when the caller's location zone is updated. The Business Rule should calculate the expected response and resolution times based on the caller's location zone.

    c. In the Business Rule, you can use the following code snippet to calculate the expected SLA dates:

 

var callerLocation = current.caller_location_zone; // Get the caller's location zone
var schedule = new GlideSchedule('9to5'); // Base schedule for 9*5 weekdays
schedule.setTimeZone(callerLocation); // Set the schedule's time zone to the caller's location
var slaStart = new GlideDateTime(); // Current date and time
slaStart.setTZ(Packages.java.util.TimeZone.getTimeZone(callerLocation)); // Set the caller's time zone
var slaEnd = new GlideDateTime();
slaEnd.setTZ(Packages.java.util.TimeZone.getTimeZone(callerLocation)); // Set the caller's time zone
slaEnd.addSeconds(schedule.duration()); // Add the duration of the schedule

current.u_sla_start = slaStart; // Set the expected response time field in the incident record
current.u_sla_end = slaEnd; // Set the expected resolution time field in the incident record

 

Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma