The Zendesk Time Tracking app helps support managers gain visibility into the actual time spent across all your customer service interactions within a ticket. The app tracks the time spent on each ticket update, and stores this with the ticket. With Explore, you can create calculated metrics that contain this information, and use them to produce reports. Use this article to learn how to set up custom time tracking metrics and produce three sample reports.
In this article:
Choosing the approach
As with any other Support ticket data, there are two approaches for analyzing the time tracking app data.
Ticket handling time
The first approach is to look at the handling time per ticket. It can be used to analyze agent performance when the ticket is handled mostly by the same agent and for reporting on time your team spent supporting a specific end-user or organization.
If you choose to go with this approach the best place to create your reports is the Support: Tickets dataset. To do so you can create two simple calculated metrics based on the Total time spent (sec) metric and use them to report on the handling time per ticket alongside the native time metrics.
Metrics that can be created to support this approach are:
- Ticket handling time (min)
- Ticket handling time (hrs)
Update handling time
The second approach is to look at the handling time per update. It is the best way to report on the agent performance and it is suitable for the complex workflows where the same ticket is handled by multiple agents.
For this approach, the calculated metrics and reports should be created in the Support: Updates history dataset based on the data stored in the Changes - Previous value and Changes - New value attributes. You can use the NUMBER() function to transform the text attribute values into numbers.
Metrics that can be created to support this approach are:
- Update handling time (min)
- Update handling time (hrs)
Creating the metrics
If this is the first time you've created a calculated metric, see Creating standard calculated metrics and attributes.
To create the metric
Repeat the following general procedure to create each custom metric. Use the metrics configuration section to find the information you'll need to create each one.
- In Explore, click the reports (
) icon.
- In the Reports library, click New report.
- On the Select a dataset page, click Support and select the appropriate dataset for the metric you're creating (Updates history for update handling metrics, or Tickets for ticket handling metrics), then click Start report. The report builder opens.
- From the calculations menu (
), click Standard calculated metric.
- On the Standard calculated metric page, enter a name for your calculated metric from the list below, for example Update handling time (min).
- In the Formula field, enter or paste the formula you want from the metrics configuration sections. The example immediately below is for the Update handling time (min) metric:
IF ([Changes - Field name] = "Total time spent (sec)")
THEN
IF ([Changes - Previous value]=NULL OR [Changes - Previous value]="")
THEN NUMBER([Changes - New value])/60
ELIF (REGEXP_MATCH([Changes - New value], "[0-9]+") AND REGEXP_MATCH([Changes - Previous value], "[0-9]+"))
THEN(NUMBER([Changes - New value])-NUMBER([Changes - Previous value]))/60
ENDIF
ENDIFNote: The formulas in this article won't work if the user profile is set to a non-English language. If your user profile in Explore isn't in English, follow the instructions in this article to make the formula work: How can I convert Explore formulas from English into another language? - If your user profile language is not in English replace the attribute names in the formula with attributes in your language. For example, in German the formula will look like this:
- When you are finished, click Save.
- In the Metrics panel, click Add.
- From the list of attributes, expand the Calculated metrics folder, find your calculated metric, then click the pen icon next to it.
- From the Options menu of the Standard calculated metrics page, choose Edit aggregators.
- Set the metric's default and visible aggregators. If you are creating the Update handling time (min) metric the aggregator menu looks like this:
- Continue creating the calculated metrics as shown below.
Metrics configuration
Metric name: Ticket handling time (min)
This metric should be created in the Support: Tickets dataset. It returns the time spent by agents per ticket, calculated in minutes.
Copy and paste this formula into the formula field of your standard calculated metric:
VALUE(Total time spent (sec))/60
Supported aggregators when you use this metric in a report: SUM, AVG, MIN, MAX, MED
Metric name: Ticket handling time (hrs)
This metric should be created in the Support: Tickets dataset. It returns the time spent by agents per ticket, calculated in hours.
Copy and paste this formula into the formula field of your standard calculated metric:
VALUE(Total time spent (sec))/60/60
Supported aggregators when you use this metric in a report: SUM, AVG, MIN, MAX, MED
Metric name: Update handling time (min)
This metric should be created in the Support: Updates history dataset. It returns the time spent by agents per ticket update, calculated in minutes.
Copy and paste this formula into the formula field of your standard calculated metric:
IF ([Changes - Field name] = "Total time spent (sec)")
THEN
IF ([Changes - Previous value]=NULL OR [Changes - Previous value]="")
THEN NUMBER([Changes - New value])/60
ELIF (REGEXP_MATCH([Changes - New value], "[0-9]+") AND REGEXP_MATCH([Changes - Previous value], "[0-9]+"))
THEN(NUMBER([Changes - New value])-NUMBER([Changes - Previous value]))/60
ENDIF
ENDIF
Supported aggregators when you use this metric in a report: SUM, AVG, MIN, MAX, MED
Metric name: Update handling time (hrs)
This metric should be created in the Support: Updates history dataset. It returns the time spent by agents per ticket update, calculated in hours.
Copy and paste this formula into the formula field of your standard calculated metric:
IF ([Changes - Field name] = "Total time spent (sec)")
THEN
IF ([Changes - Previous value]=NULL OR [Changes - Previous value]="")
THEN NUMBER([Changes - New value])/60/60
ELIF (REGEXP_MATCH([Changes - New value], "[0-9]+") AND REGEXP_MATCH([Changes - Previous value], "[0-9]+"))
THEN(NUMBER([Changes - New value])-NUMBER([Changes - Previous value]))/60/60
ENDIF
ENDIF
Supported aggregators when you use this metric in a report: SUM, AVG, MIN, MAX, MED
Example 1: Ticket handling time by ticket ID
In this example, you'll produce a list of tickets with their handling time and some additional attributes.
Before you start, ensure you've created the custom metrics shown previously.
- In Explore, click the reports (
) icon.
- In the Reports library, click New report.
- On the Select a dataset page, click Support > Support - Tickets, then click Start report. The report builder opens.
- Now, add your metrics. In the Metrics panel, click Add.
- From the list of metrics, choose Calculated Metrics > Ticket handling time (min) ,then click Apply.
- In the Rows panel, add the attribute you want to report against the metrics. Click Add.
- From the list of attributes, expand Ticket, and then choose Ticket ID.
- Expand Assignee, and choose Assignee name.
- Expand Requester, and choose Requester name.
- Expand Time - Ticket solved, and choose Ticket solved - Date.
- Click on one of the Time - Ticket solved, then Date range and select the time period you wish.
- From the visualizations menu (
), choose Table.
Example 2: Ticket handling time by month and organization
In this example, you'll produce a chart showing total ticket handling time and average ticket handling time by month and organization.
Before you start, ensure you've created the custom metrics shown previously.
- In Zendesk Explore, click the reports (
) icon.
- In the Reports library, click New report.
- On the Select a dataset page, click Support > Support - Tickets, then click Start report. The report builder opens.
- Now, add your metrics. In the Metrics panel, click Add.
- From the list of metrics, choose Calculated metrics > SUM(Ticket handling Time (hrs)) and AVG(Ticket handling time (min)), then click Apply.
- From the visualizations menu (
), choose Line.
- Click the AVG(Ticket handling time (min)) metric you just added, then select Dual.
- In the Columns panel, add the attribute you want to report against the metrics. Click Add.
- From the list of attributes, choose Time - Ticket created > Ticket created - Year and Ticket created - Month, then click Apply.
- Click the Ticket Created - Month, then Date range and select the time period you want.
- In the Rows panel, add the attribute you want to have in the row selector. Click Add.
- From the list of attributes, choose Ticket organization > Ticket organization name, then click Apply.
- Click the Ticket organization name, and choose the organizations you want to look at.
- You can adjust the chart colors, labels and more in the chart configuration menu (
).
You'll end up with a chart that looks like this:
Example 3: Update handling time by agent
In this example, you'll generate a graph showing agents with the top ten average handling time.
Before you start, ensure you've created the custom metrics shown previously.
- In Zendesk Explore, click the reports (
) icon.
- In the Reports library, click New report.
- On the Select a dataset page, click Support > Support - Updates history, then click New report. The report builder opens.
- Now, add your metrics. In the Metrics panel, click Add.
- From the list of metrics, choose Calculated metrics > AVG(Update handling time (min)), then click Apply.
- In the Columns panel, add the attribute you want to report against the metric. Click Add.
- From the list of attributes, choose Updater > Updater name, then click Apply.
- In the Filters panel, add the attributes that will refine the results. Click Add.
- From the list of attributes, choose Updater > Updater role, then click Apply.
- Click the Updater role attribute you just added and select Admin and Agent from the menu.
- In the Filters panel, click Add
- From the list of attributes, choose Time - Ticket update > Update - Date, then click Apply.
- Click the Update - Date filter you just added, then click Date range and select the time period you want to show.
- From the visualizations menu (
), choose Bar.
- To show only the top ten users, in the result manipulation menu (
), click Top/bottom. On the Top/bottom page, select Top, then set the number to 10.
- Adjust colors, labels and other customizations in the chart configuration menu (
).
You'll end up with a chart that looks something like the following:
105 Comments
Hi Deo Labindalawa
Just checking in if your exported average still doesn't match the one in Explore. If yes, do let me know so we can look into it. But to clarify, Explore's average aggregator is calculated by adding up all the values and dividing the sum by the total number of values which is explained here.
So one of the things I want to easily look at is amount of time my team is logging each week, think of it as a utilization metric. Time handling makes sense for this, but I'm struggling with how to show that based on when the time was logged. Is there no timestamp for when the time logging occurred that can be used? If I group by week for when a ticket was solved, the time handling for that ticket would all be showing for the same week, even if it were logged in different weeks. For example, a ticket has 3 hours logged in week 1 and 3 hours logged week 2. I want to group by when the time logging occurred to see that 6 hours split out, however grouping by solved date all 6 hours will show for the week the ticket was solved.
If you using the Update handling time metric, sliced by agent/updater, then you can filter the report by Update date attributes (Update - Date, Update - Week of year, etc.). These date filters will slice/filter the data by the time the actual update was made and the time tracking data was logged.
I see what you're saying, @..., this covers exactly what I needed. Appreciate it!
Hi Dainne Lucena
Still not matching.
Im using the below query to get the overall AHT but when I'm trying to get the per analyst AHT to get the breakdown its not matching with the overall.
Let me create a ticket so that we can drill into the values. Thanks!
Hi there - how do I exclude tickets with the closed_by_merge tag within these metrics (this calculated metric: https://support.zendesk.com/hc/en-us/articles/4408843359898-Explore-recipe-Excluding-tickets-closed-by-merge)
Hi Everyone,
We recently activated time tracking app.
Roles have been updated for the time tracking feature prior 12/2. However, the total time spent remains blank for created tickets starting 12/3 onwards whereas activation and update on roles was made prior.


Would anyone know why else would we show blank or 0 information for the total time spent field?
Hello Team, Would like to seek help on different Average Handle time from manual computation
ex. For Agent 1, Average handle time on the "(avg) Update Handling time (sec)" shows 1078.62222 however for manually computing Update Handling time by (sum) Update Handling time (sec)/Tickets Updated = 48538/37 it's giving me 1311.837. Can someone confirm why am I seeing a variance on AVG Handle Time (sec) from Manual computation of handle time?
Hi Zendesk community,
I just downloaded the time tracking app and enabled it. I created the metrics by copy/pasting the code from this article but I can't seem to get it to work. I just get an empty field. Is there someone who can point me in the right direction? Thank you!
I noticed that you have already submitted a ticket for this concern. For visibility it was identified that some tickets with multiple updates can have additional entries for Update Handling Time causing the discrepancy if you manually calculate it.
It will be better to drill-in to all the updates on the ticket before manually calculating for the value.
Hi Dane,
Thanks for your response. I did open a ticket on this and was able to find out that the calculation of Update Handle time exclude Nulls or tickets that has no handle time. That's why when I did the previous calculation "HANDLE TIME / TICKETS HANDLED" it doesn't match. Excluding the tickets from the calculation that has no handle time gave me the exact result.
So the correct calculation is
Handle Time / Tickets with Handle time
How can I obtain the time duration for a ticket that is in the "open" status, specifically during working hours? I understand that the requester wait time calculates the total waiting duration, and the time tracking app can track time, but it only starts counting when the agent opens the ticket. The data we are looking for is, for example, when a customer submits a ticket and it remains in the "open" status. After 2 hours, Agent responds, and then the customer replies again, followed by a response from the agent after 5 minutes. Where can I find the duration of 2 hours and 5 minutes in this scenario?
How can I obtain the time duration for a ticket that is in the "open" status, specifically during working hours? I understand that the requester wait time calculates the total waiting duration, and the time tracking app can track time, but it only starts counting when the agent opens the ticket. The data we are looking for is, for example, when a customer submits a ticket and it remains in the "open" status. After 2 hours, Agent responds, and then the customer replies again, followed by a response from the agent after 5 minutes. Where can I find the duration of 2 hours and 5 minutes in this scenario?
HELP:
We need to be able to report on agent time activity across any/all Tickets per day/week/month but the metrics don't seem to work unless a Ticket has been closed. Can you provide a report recipe for this?
example:
Rows= Days of the week (mon, Tues, Weds, Thurs, Fri) (alternatively day/week/month)
Columns= Agents
Data= accumulated total time logged across any/all tickets per day whether the ticket is still open or closed
-------------------------------------------------------------------------------------------------------------------------
UPDATE: I have managed to work out how to report on day/week but the data shown is still incorrect. Is this because some tickets are still open? How can I report on time logged on open Tickets too?
Please sign in to leave a comment.