There are some rare cases where SLAs have accurate metric data but are saved in the wrong status. For example, this can happen when an existing schedule is changed. Any tickets that were active before the change may end up with split data. The SLA status and badge still use the original schedule, while the duration metrics use the updated schedule.
Use this recipe to create alternate SLA metrics. These metrics use the durations instead of the status to determine when tickets are Achieved or Breached.
Most tickets will have accurate SLA data with accurate statuses with the native metrics working. These alternate metrics should be necessary only in rare cases. Using these alternates will ensure you get accurate reports if the SLAs are saved in the wrong status.
This article contains the following topics:
- What you'll need
- Creating the calculated metric and attribute
- Using the attribute to create alternate SLA metrics
- Comparing native and alternate SLA metrics
What you'll need
Skill level: Advanced
Time required: 30-40 minutes
- Zendesk Explore Professional or Enterprise
- Editor or Admin permissions (see Giving users access to Explore)
- SLA data in Zendesk Support
Creating the calculated metric and attribute
This section starts with a metric that finds the difference between the SLA target and the amount of time it took to fulfill. That difference is then used in a calculated attribute to label achievements and breaches.
Standard calculated metric
- In Explore, click the reports (
) icon.
- In the Reports library, click New report.
- On the Select a dataset page, select Support > Support - SLAs , then click Start report. The report builder opens.
- Open the Calculations menu (
), then click Standard calculated metric.
- Name the new metric Alternate: SLA breach time.
- In the Formula field, enter the following:
VALUE(SLA metric completion time (min)) - VALUE(SLA metric target time (min))
- Click Save.
SLA metric completion time (min) is the amount of time an SLA metric was active on a ticket. SLA metric target time (min) is the SLA target. For more information, see Metrics and attributes for Zendesk Support.
Standard calculated attribute
- In the report builder, open the Calculations menu (
), then click Standard calculated attribute.
- Name the new attribute Alternate: SLA target status.
- In the Formula field, enter the following:
IF VALUE(SLA metric completion time (min))
- VALUE(SLA metric target time (min))>=0
THEN "Breached" ELIF VALUE(SLA metric completion time (min))
- VALUE(SLA metric target time (min))<0
THEN "Achieved" ELSE "Unknown"
ENDIF - Click Save.
Below is a simple example to demonstrate how the metric works.
An SLA policy has a target of 30 minutes. Ticket A was fulfilled after 60 minutes. Ticket B was fulfilled after 15 minutes.
- The SLA metric target time (min) value is 30 for both tickets.
- Ticket A has an SLA metric completion time (min) value of 60. The metric will calculate 60-30 and get a result of 30. That is greater than 0, so the attribute will return Breached.
- Ticket B has an SLA metric completion time (min) value of 15. The metric will calculate 15-30 and get a result of -15. That is less than 0, so the attribute will return Achieved.
Using the attribute to create alternate SLA metrics
The calculated attribute can be used wherever the native SLA target status attribute is used. This recipe will cover counts of achieved and breached tickets, along with a % achievement metric.
Achieved tickets metric
- In Explore, click the reports (
) icon.
- In the Reports library, click New report.
- On the Select a dataset page, click Support > Support - SLAs dataset, then select Start report. The report builder opens.
- Open the Calculations menu (
), then click Standard calculated metric.
- Name the new metric Alternate: Achieved SLA tickets.
- In the Formula field, enter the following:
IF [Alternate: SLA target status] = "Achieved"
THEN [Ticket ID]
ENDIF - Click Save.
Breached tickets metric
- In the report builder, open the Calculations menu (
), then click Standard calculated metric.
- Name the new metric Alternate: Breached SLA tickets.
- In the Formula field, enter the following:
IF [Alternate: SLA target status] = "Breached"
THEN [Ticket ID]
ENDIF - Click Save.
% Achieved metric
- In the report builder, open the Calculations menu (
), then click Standard calculated metric.
- Name the new metric Alternate: % Achieved SLA.
- In the Formula field, enter the following:
COUNT(Alternate: Achieved SLA tickets)/
(COUNT(Alternate: Achieved SLA tickets)+COUNT(Alternate: Breached SLA tickets))- The line break is not necessary for the calculation. It just makes the metric easier to read.
- In the Standard calculated metric window, check the Compute separately box.
- Click Save.
Optional: After the metric is saved, change the default display format to a percentage.
- Under Metrics, click Add and locate the Alternate: % Achieved SLA metric.
- Click the pencil icon to open the metric for editing.
- In the Standard calculated metric window, click the Options arrow in the top right and select Edit display format.
- In the Display format window, select %.
- Click the arrow on the top left to return to the metric.
- Click Save.
Comparing native and alternate SLA metrics
These alternate SLA metrics should work just like the native SLA metrics, with two main exceptions:
- The alternate metric won't count active tickets.
- If tickets are saved in the wrong status, the alternate metrics will still return accurate results.
Below are two sample reports showing the differences between the native and alternate SLA metrics. The reports contain 8 tickets.
- 6 fulfilled tickets achieved their SLAs.
- 2 of the 6 hit edge cases where they saved the wrong status.
- 1 fulfilled ticket breached its SLA.
- 1 active ticket is past its SLA target.
In blue, the Alternate metrics count all 6 achievements and do not include the active ticket. In red, the native metrics count the active ticket and both edge case tickets as breaches.
Below shows the same 8 tickets with their native and alternate attribute values.
This shows the two edge case tickets are Achieved in the Alternate: SLA target status row and the active ticket is Unknown. Those tickets are all counted in the Breached column for the native SLA target status attribute.
12 comments
Leif Cederblom
I am trying to encourage managers to go after the most overdue by SLA tickets. In effect, I am trying to achieve in Explore what a view in the support interface sorted by SLA would look like. Thus, I am trying to understand effectively the difference between the current metric breach time - the metric target time. However, I cannot figure out how to get the current metric time value. It seems like this would be a really basic desire/need for reporting on SLAs, so I must be missing something here... help? Thanks in advance.
0
Amy Dee
Hi Leif Cederblom! At this time, Explore only captures SLA durations after the target has been fulfilled. There is no way to create an Explore report that shows live SLA counters for breached tickets.
This is due to how Explore syncs data. It isn't a live feed; it pulls data at periodic intervals. That means it has no way to maintain live durations for metrics. Explore can't tell whether an SLA has been fulfilled until after the next data sync, so durations would be stale.
If you need to monitor active SLAs in real time, we recommend using Views. You can export Views to CSV as well if needed. Explore is better suited for historic reporting.
I hope this helps!
0
Matt Taylor
Hi Amy Dee
Looking at the attributes in the following
It doesn't appear that "Alternate" is a valid entry for Standard calculated metric. Is this something I'm missing?
Additionally, for the screenshot, it looks like Alternate: SLA target status was added as an attribute, but the steps say to add it as a metric. Should this be updated to reflect that it should be an attribute?
0
Zsa Trias
Hello Matt,
Per the instructions above,
Alternate: SLA target status
should be created as an attribute.Once you have this created, you can then proceed in creating the metrics:
Alternate: Achieved SLA tickets
andAlternate: Breached SLA tickets
.0
Franck BADIN
Hello,
I would like to have an indicator of 1st reply SLA breach Yes/No but within the Support Dataset.
The objective is to have a report with 1 line per ticket.
I do manage to find the right way to create the calculated metrics.
It would be in textual form like that
IF Ticket priority is Urgent and if First reply in business hours is higher than 1 then Breached
IF Ticket priority is High and if First reply in business hours is higher than 4 then Breached
IF Ticket priority is Medium and if First reply in business hours is higher than 8 then Breached
IF Ticket priority is Low and if First reply in business hours is higher than 8 then Breached
IF not breached then NOT breached
Can someone help me on how to translate this for Explore?
Best regards
0
Dane
You can try to use this one:
You can change the value of the First Reply time depending on your preference.
0
Mayra
We have set the SLAs for the support team in a structure on Zendesk where the 1st Reply and the Full Time Resolution are on the same policy. For the Full Time Resolution, we only consider the Agent Work Time (disregarding Pending and On-Hold stages).
I have successfully created a metric to see the % of SLA achieved for First Reply, but I'm not sure how to set it up for Full Resolution. Can you help me?
0
Mayra
Also, I have encountered a problem checking the SLA for our calls (Voice/Talk).
Screenshot removed by community team as it contained sensitive information.
In this image, for example, the register of the call was only input at 07:52 (after the call was finished), so it looks like it has breached our SLA (up to 1 minute), but in fact, the agent answered the call in less than one minute. How can I resolve this to match our SLA for First Reply?
0
Mike DR
Did try searching for an article about this exact formula but currently can't find one available. You can however create a custom calculated attribute following this formula as a base for getting the percentage of the First Reply Time and Full Resolution Time: To get the percentage, compute manually replied tickets/total tickets x 100 = % replied tickets
Hope this helps!
0
Joshua Wilkinson
Hey folks,
Quick question on this section here;
An SLA policy has a target of 30 minutes. Ticket A was fulfilled after 60 minutes. Ticket B was fulfilled after 15 minutes.
Is there a way to show the calculated time? We're looking to show how long over the SLA the breach was on each ticket, so it'd be great if we could show this calculated time!
0
Michael Workman
If you are trying to get live dashboards for SLA data I encourage you to use Geckoboards. Its pricey, but you can get live data of what tickets will breach SLA and you can send a report to Slack and a bunch of other locations.
0
Dainne Kiara Lucena-Laxamana
Hi Zaffar Sayed !
You could follow Dylan's guide here on how to create a report that shows when the SLA breached.
0