How to fetch resolution time for a ticket on group basis in Freshservice

Hello folks,
I configured SLAs in the Freshservice on a group basis and while fetching ticket details including stats always receiving “resolution_time_in_secs”: 0.

Here is the API I used: https://artiss.freshservice.com/api/v2/tickets/6?include=stats
Below is the response for the above API:

    "stats": {
       "ticket_id": 27001994188,
       "opened_at": null,
       "pending_since": null,
       "resolved_at": null,
       "closed_at": null,
       "first_assigned_at": null,
       "assigned_at": null,
       "first_responded_at": null,
       "agent_responded_at": null,
       "created_at": "2020-12-31T06:17:21Z",
       "updated_at": "2020-12-31T06:18:21Z",
       "group_escalated": false,
       "inbound_count": 1,
       "status_updated_at": "2020-12-31T06:17:21Z",
       "outbound_count": 0,
       "first_resp_time_in_secs": null,
       "resolution_time_in_secs": 0
   }

In the above response “resolution_time_in_secs” is always returning 0 for any group. Below is the configuration for the group SLAs.

Is there any way to fetch resolution time for each group that is configured via APIs?

Thanks in advance,
Parimala.

Hello folks,

Can anyone respond and help me with this, as this is an immediate requirement?

Thanks in advance,
Parimala.

I had tested the following scenario.

  1. Checked API response for a ticket with no SLA policy. It returned the resolution_time_in_secs as null.
  2. I had added a group SLA policy and assigned a ticket to that group.
  3. I had again checked the API response.

It actually showed me a value > 0. Can you please check if the actual ticket is assigned to that group?

Hello Mani Deepak,

Thanks for your response!
Please have a look at the below link:
Vidyard Recording?

Thanks,
Parimala.

@Parimala, I think you have to resolve the ticket to have the resolution time in seconds. I guess it will not give you what is configured in SLA for the group, but the actual time resolution for the current ticket.

If the SLA rules are not triggered, the resolution_time_in_secs will be null. Else it will be 0 for a newly created ticket and for an old value, it will be > 0. Hope this clarifies your query.