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, I'm building a report to show the update handling time per month. But a the update handling time of a reopened ticket will always be added to the month the ticket was created in.
eg. Ticket is created, updated in closed in July.
Ticket gets reopened and updated in August, but the update handling time will be added to July.
Can we get this time added to August somehow?
Hi Anton,
That is not possible since the Metric used is Ticket Created Date. If you would like to capture the handling time of a reopened ticket, I suggest that you create a new standard calculated metric or attribute that you can use on your report.
For some reason, this recipe ends up showing 0 handling time for about half of our two dozen agents, despite them all taking tickets regularly. Can't seem to figure out where I'm going wrong!
Hi Jasen,
One guess here is that you may have some restrictions on the role or group the Time Tracking app is available for, so it does not count time for these users/tickets.
You can check this by going to the manage app section and selecting the Time Tracking app.
What is the exact meaning of Update handling time?
When is the start point of calculating? Does it start from when the ticket is assigned or start from the agent starts to reply or add comment?
Hi there,
Can you advise, does the handling time record according to the time on the Time Tracking when you submit the ticket as Solved etc. (as the end user can alter this), or does it submit the time the ticket has actually been open, regardless of whether it has been altered at submission? Thanks
Hi @... –
The timer starts as soon as the agent navigates to the ticket in the Support agent interface. Hope that helps!
Hi @...,
The app records when an agent or admin clicks the Submit button (regardless of whether the ticket as been otherwise altered). It does not record if an agent navigates to a ticket and then closes the ticket tab (hitting the 'x' in the ticket tab) without clicking Submit. Does that address your question?
Thank you, so the time recorded at Submit is the time the agent records? For example a ticket could be open for an hour, but the agent only actually spent 1/2 hour working on it. The agent may therefore amend the time from 60 minutes to 30 minutes at 'submit'.
I have created a query that reports the sum handling time per agent on a ticket, could you therefore let me know which of these times will be pulled in, the time the agent had the ticket open, or the time the agent recorded and may have altered at submit.
Thanks for you help. :)
No problem, Jo! The query results will be based on the time recorded at Submit.
Hi!
I have followed this recipe to a T, multiple times. however I am not getting any results. Could I please have some help as to what I am doing wrong when copying and pasting these recipes in? Ultimately I just want to know AHT per user on support tickets (in minutes) - thanks for the help, getting desperate here!
Hi Chandni! You might want to check a couple of things.
I have had unexpected results from both of those things before :)
Hi there @...
I can confirm I have two ticket fields attached to the ticket form and no role restrictions.
Could it be because the formula is either hours or minutes, that it doesn't work for the below which is in secs? - Can you help where I may be able to either change this ticket field to minutes or how I'd have a recipe for seconds? Thanks for your help!
Hi Chandni,
The two fields need to be on ALL of the forms in your Zendesk instance, for time to be recorded - can you please check if this is the case on your end?
Hi @... upon looking at the settings it looks like its being used on all 4 forms which we have.
Chandni to answer the question about the time, the formulas above labeled (min) convert the seconds to minutes, and then the formulas labeled (hrs) convert to hours. So if you've pasted them exactly, then they should convert.
When you say you aren't getting any results are you seeing zeroes or is it just failing to calculate at all? If it's zeroes, it's possible that you need to adjust your display format to show a couple of decimal places if you are consistently below one minute on time spent per ticket.
Hi @... to be honest I am not sure where it is tripping up. Is it possible to get some support on a call on this to walk through how to?
Hi Chandni, the Moderators don't work for Zendesk, so we aren't available for 1 on 1 help. You can contact Support by using the Help button in your Profile menu
Hi there,
If you have a number of agents on a specific ticket, are you able to get the handling time of specific individuals on that ticket. Usually the ticket handling time will just assign the total time to the assignee agent so this agents handling time is inflated as they may have only been on the ticket 2 minutes, but the total time is 10 minutes as others were also on the ticket prior to them being on it. Any assistance would be appreciated
@... Hi, I need this on my report.
How do I do it?
Thanks in advance!
@...
I used 2 customer Metric
1. Update handling time (sec) =
IF ([Changes - Field name] = "Total time spent (sec)")
THEN
IF ([Changes - Previous value]=NULL OR [Changes - Previous value]="")
THEN NUMBER([Changes - New value])
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]))
ENDIF
ENDIF
2. AHT = (SUM(Update handling time (sec)) / D_COUNT(Public comments))/60"
Filters Used: Updater Role = Agent
Regards,
I've followed the instructions on this article but for some reason when I try to use one of the metrics it gives me the following error:
"The set of calculations isn’t valid. The calculated attribute "SUM(updatehandlingtimemin-a1dc65ad80)" references "Changes - Field name" which is as an unknown attribute."
hey there, i follow the instructions for example 3 but my x axis is totally off. can anyone point me to what im missing?
Hey @...! Based on the error message, I would recommend that you double check that you are building your calculated metrics in the Ticket Updates dataset, not the Tickets dataset.
Hey @...! In order to troubleshoot your issue further, it would be helpful to see your full query. I'll go ahead an open a ticket on your behalf so we can investigate further.
Re: https://support.zendesk.com/hc/en-us/articles/360022186134/comments/360003386073
@... post from 2yrs ago - did we ever get a satisfying answer to this?
@... @... @...
We're using the Update handling time metric to report on individual agents, and for the most part it works, but on tickets where multiple agents are responding the time is being added to everyone's totals. This isn't good!
Cheers
@.... Nope. I still cannot see time spent by agent rather than by case.
I am going round in circles on this one. I've created all the sample data sets, and the examples run fine. I am trying to create a couple of reports;
How much time was spent resolving a ticket in total by all agents. So how many hows were spent in total to get to a resolution.
How much time was spent on a ticket in a Month (Tickets can span several months prior to closure). How much time has been spent on a ticket within a time frame not in total.
How much time has an agent spent on each ticket during a time period.
No matter what I try it never tally's with the Time Stamps in Zendesk. Any help is appreciated as I know its me doing something wrong.
Hey Iain Spirit.
We'll definitely need to dive deeper into the metrics and queries you've created.
I'll reach out to you internally via a ticket and we'll be happy to help take a closer look into this for you!
Hi everyone,
I'm trying to review my group's performance on this ticket handling matter. So I have 3 teams and when a ticket came to use, the ticket will be assigned to team A first then assigned it to team B and last team C then team C close the ticket. In this article I did not find any metric or calculation to know how long a ticket is spent on team B and team C. Anyone can help?
Please sign in to leave a comment.