Mrug
Mrug

Reputation: 501

Zendesk API get tickets solved today

I want to use Zendesk API https://developer.zendesk.com/rest_api/docs/core/ticket_metrics#json-format but I am not sure how can I get metrics like tickets solved today, tickets solved yesterday, tickets solved this week etc.

Is this possible in the Zendesk API?

Upvotes: 1

Views: 1794

Answers (2)

Marcelo Gazzola
Marcelo Gazzola

Reputation: 1083

You can get this data using:

GET /api/v2/ticket_metrics.json

The return will contain the solved_at date:

{
  "id": 33,
  "ticket_id": 4343,
  "created_at": "2009-07-20T22:55:29Z",
  "updated_at": "2011-05-05T10:38:52Z",
  "group_stations": 7,
  "assignee_stations": 1,
  "reopens": 55,
  "replies": 322,
  "assignee_updated_at": "2011-05-06T10:38:52Z",
  "requester_updated_at": "2011-05-07T10:38:52Z",
  "status_updated_at": "2011-05-04T10:38:52Z",
  "initially_assigned_at": "2011-05-03T10:38:52Z",
  "assigned_at": "2011-05-05T10:38:52Z",
  "solved_at": "2011-05-09T10:38:52Z",
  "latest_comment_added_at": "2011-05-09T10:38:52Z",
  "reply_time_in_minutes": { "calendar": 2391, "business": 737 },
  "first_resolution_time_in_minutes": { "calendar": 2391, "business": 737 },
  "full_resolution_time_in_minutes": { "calendar": 2391, "business": 737 },
  "agent_wait_time_in_minutes": { "calendar": 2391, "business": 737 },
  "requester_wait_time_in_minutes": { "calendar": 2391, "business": 737 },
  "on_hold_time_in_minutes": { "calendar": 2290, "business": 637 }
}

More in the documentation here.

Upvotes: 1

Jimmy Long
Jimmy Long

Reputation: 788

As I know, there is not a broad-based endpoint to define a ticket status and when that status happened. Search Endpoint will let you define a status as of now (tickets currently solved). Incremental Ticket Events endpoint will show you when an event happened (ticket status changed to solved), but is not searchable. Most people will store the data from Ticket Events endpoint and then you can make it searchable.

Upvotes: 0

Related Questions