SLA time
Hi
I need help with solving the API for SLA and specifically, how can I get how many hours of downtime before the SLA expires.
We are using Zendesk as our incident logging tool. Then if an incident occurs, we create it in JIRA. And I need the team to have an indication on their kanban board of how much time they have left to resolve the incident.
I have tried the API /api/v2/incremental/ticket_metric_events it only comes up what type of SLA is set there, if it is business hours etc.
Also when I call /api/v2/tickets/{id}/metrics I don't see relevant information there.
I have also read on the forums that I can't even set the automation to be able to write the data into a custom field. And then via GET ticket id you retrieve the data.
The only complicated solution I could think of is to set up say 10 automations that if "Hours until next SLA breach (business) is 4 hours", then send the information to my webhook. Then another automation "Hours until next SLA breach (business) is 3 hours, 2 hours....
Can you guide me? Has anyone solved a similar problem?
-
Hi Slavomír,
The Incremental Ticket Metric Events endpoint will return Apply SLA events. These are events where the SLA policy is applied on the ticket or the SLA target on the ticket changes. So even though this API doesn't return a singular counter figure, it does return the context needed to understand the time until the next breach.
For example on a ticket with a requester wait time SLA applied:
- An activate event triggers on ticket creation to mark the start of the requester wait time metric counter. Here the clock starts on that metric, regardless of whether an SLA is later applied to the ticket.
- After a change to the ticket, conditions allow a requester wait time SLA to be applied. This triggers an Apply SLA event noting the policy and the target.
- Now with the context of when the clock started on the metric and the active policy applied to the ticket, you can calculate the time until the next breach.
Iniciar sesión para dejar un comentario.
1 Comentarios