Zendesk Support API Ticket Metrics

The Ticket Metrics API in Zendesk Support allows you to retrieve and manage metrics related to tickets, providing insights into various performance indicators such as resolution times, wait times, and more. This guide covers the endpoints and properties related to ticket metrics, helping developers effectively integrate and utilize this data.

What can you do with Ticket Metrics in the Zendesk Support API?

The most common operations people perform on ticket metrics using the Zendesk Support API.

Action HTTP Method Endpoint
List Ticket Metrics
GET /api/v2/ticket_metrics
Show Ticket Metrics
GET /api/v2/ticket_metrics/{ticket_metric_id}

Ticket Metrics provide detailed insights into the performance and handling of tickets within Zendesk Support. These metrics are crucial for understanding agent efficiency, customer satisfaction, and operational bottlenecks.

Each Ticket Metric is uniquely identified by its id field, which is an integer.

Ticket Metrics are automatically generated and updated by the system as tickets are processed. There are no manual creation endpoints for Ticket Metrics.

To find specific Ticket Metrics, use the GET /api/v2/ticket_metrics endpoint. You can retrieve all metrics or use the GET /api/v2/ticket_metrics/{ticket_metric_id} endpoint to fetch metrics for a specific ticket by its ID.

Properties of a Ticket Metric

The properties section provides a detailed look at the fields available within a Ticket Metric object. These properties are essential for understanding the metrics associated with each ticket, including time-based metrics and status updates. Show all properties Only show essential properties

Field Name Type Short Description
id integer Automatically assigned when the client is created
ticket_id integer Id of the associated ticket
created_at datetime When the record was created
updated_at datetime When the record was last updated
agent_wait_time_in_minutes object Number of minutes the agent spent waiting during calendar and business hours
first_resolution_time_in_minutes object Number of minutes to the first resolution time during calendar and business hours
full_resolution_time_in_minutes object Number of minutes to the full resolution during calendar and business hours
reopens integer Total number of times the ticket was reopened
replies integer The number of public replies added to a ticket by an agent
solved_at datetime When the ticket was solved
assigned_at datetime When the ticket was assigned
assignee_stations integer Number of assignees the ticket had
assignee_updated_at datetime When the assignee last updated the ticket
custom_status_updated_at datetime The date and time the ticket's custom status was last updated
group_stations integer Number of groups the ticket passed through
initially_assigned_at datetime When the ticket was initially assigned
latest_comment_added_at datetime When the latest comment was added
on_hold_time_in_minutes object Number of minutes on hold
reply_time_in_minutes object Number of minutes to the first reply during calendar and business hours
reply_time_in_seconds object Number of seconds to the first reply during calendar hours, only available for Messaging tickets
requester_updated_at datetime When the requester last updated the ticket
requester_wait_time_in_minutes object Number of minutes the requester spent waiting during calendar and business hours
status_updated_at datetime When the status of the ticket was last updated
url string The API url of the ticket metric

What to watch out for

When working with Ticket Metrics, there are a few common pitfalls and important considerations to keep in mind to ensure smooth integration and data accuracy.

Read-Only Fields

Most fields in the Ticket Metrics are read-only and cannot be modified directly. Ensure that your application logic accounts for this.

Archived Tickets

Archived tickets are not included in the list of ticket metrics. Be aware of this when retrieving metrics for historical analysis.

Time-Based Metrics

Metrics such as agent_wait_time_in_minutes and first_resolution_time_in_minutes are calculated in both business and calendar hours. Ensure you understand the context in which these metrics are used.

Frequently Asked Questions

Below are some frequently asked questions regarding the Zendesk Support Ticket Metrics API and how to effectively use it.

How do I retrieve metrics for a specific ticket using the Zendesk Support Ticket Metrics API?

To retrieve metrics for a specific ticket, use the GET /api/v2/ticket_metrics/{ticket_metric_id} endpoint. Replace {ticket_metric_id} with the ID of the ticket metric you wish to retrieve.

What is the difference between business and calendar hours in ticket metrics?

Business hours refer to the working hours defined in your Zendesk account settings, while calendar hours are the total hours including non-working hours. Metrics like agent_wait_time_in_minutes are provided in both contexts to give a complete picture of ticket handling times.

Can I modify ticket metrics directly through the API?

No, ticket metrics are read-only and are automatically updated by the system as tickets are processed. You cannot modify these metrics directly through the API.

Why are some ticket metrics missing for certain tickets?

Metrics may be missing for tickets that have not yet been processed or for archived tickets. Ensure that the tickets you are querying are active and have been updated recently.

How can I use ticket metrics to improve customer support performance?

Analyzing ticket metrics can help identify bottlenecks, measure agent performance, and track resolution times. Use this data to optimize workflows, set performance benchmarks, and improve overall customer satisfaction.