How to get ticket sla from support app | Community
Skip to main content

How to get ticket sla from support app

  • March 8, 2024
  • 4 replies
  • 0 views

Alejandro13

Hello!

We are using zendesk apis to get some information for our support app. When we open the ticket tab we can see the sla time for the ticket as the image shows, but we are not able to get that info from the ticket API. Are we missing something? 

Thank in advance!

Alejandro

 

4 replies

Jacob20
  • March 8, 2024

Alejandro13
  • Author
  • March 8, 2024

Hey Jacob! Thanks a lot for your help. We already try that approach, when we include the sla for side loading that record we are receiving an empty array as the image shows, even when the ticket page is showing that it has an sla assigned, also the ticket due_at property is being returned as null.

Using your advice we added all the possible endpoints to see if there where something that might help: 

/api/v2/tickets/{ticketId}.json?include=brands,custom_statuses,users,groups,organizations,last_audits,metric_sets,dates,sharing_agreements,comment_count,incident_counts,ticket_forms,metric_events,slas

Again there were no data related directly to the SLA information, except for one metric that returned this:

After the metric with type: apply_group_sla, there is another with type: breach where we can find the information we are looking for:

Please, if you happen to know, I have the following doubt:
Can we always rely on the metric_events>group_ownership_time>[type=breach] to get the sla? Or this is something that could change based on the ticket metadata?


Jacob20
  • March 11, 2024

Hi @alejandro13

I haven't used this much, mostly just to investigate concrete SLA issues. Group SLAs are separate from other SLAs, so that may be why they are not coming up when sideloading "slas".

What information are you looking to get from your request?
There are multiple types of events, so you may not always get the breach event and time stamp.  


Alejandro13
  • Author
  • March 11, 2024

Hey Jacob, thank for all your help, I confirmed here that we are going to keep watching this breach_at property and that we will be using always the groups slas configuration, so I think is safe. In case we don't receive a breach, we are ok, thanks again for your support, I hope all this information could be helpful to others.

Alejandro