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. Using Explore Professional, 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 queries 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 queries should be created in the Support: Ticket Updates 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 sections below to find the information you'll need to create each one.
- In Explore, click the query (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Support > Tickets > Support: Ticket updates, then click New query. Query 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 below:
Note: 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 ([Changes - Field name] = "Total time spent (sec)")
If you are creating the Update handling time (min) metric, the Standard calculated metric menu would look like this:
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 - 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 query: 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 query: SUM, AVG, MIN, MAX, MED
Metric name: Update handling time (min)
This metric should be created in the Support: Ticket updates 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 query: SUM, AVG, MIN, MAX, MED
Metric name: Update handling time (hrs)
This metric should be created in the Support: Ticket updates 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 query: 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 query (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Support > Tickets > Support: Tickets, then click New query. Query 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 query (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Support > Tickets > Support: Tickets , then click New query. Query 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 query (
) icon.
- In the Queries Library, click New query.
- On the Choose a dataset page, click Support > Tickets > Support: Ticket updates, then click New query. Query 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:
96 Comments
Hi Eugene Orman,
Thanks for the quick reply. (Though I must say that it's a pity that an app like Time Tracking doesn't have this capacity itself - a feature many would say is essential to a help desk.)
We are continuing to research how to analyse time spent on tickets.
1- If we are to get Explore Pro, must we get it for all our agents, or just those who will use it? (In our case just, 1 or 2.)
2- On this page https://www.zendesk.com/explore/compare/, there is a row for Zendesk Support - Support Time Tracking. It's ticked for both Lite and Professional. What is the facility for Explore Lite?
Colum Wedel, I have created a ticket with our Sales team for you. They will be able to help you on this matter. Regarding the pricing page I think it refers to the Time Tracking app itself. Within each ticket you can see how long the heandeling time was and for how long each agent wroked on the ticket.
Hello, I’m wondering if anyone can help me. We would like to generate an email notification when an organisation breaches a specified threshold for time used in a given month.
So for example for each organisation we have a custom field defining the allocated hours. (8)
We track time on all tickets.
We add the time used by all agents on all tickets each month and if it exceeds the allocated amount we generate an email notification to a manager.
I’m unable to create an automation in Zendesk support as the time tracking data metrics are not there? Can anyone please help or suggest an alternative?
Hey Phil,
You mentioned you have a custom field defining the hours for each organization correct? Is this a numeric field you've set up on your end? If so, you should be able to use this field in your automations as shown in the screenshot below:
Let me know if the above solution doesn't work for you.
Thanks!
Hi Brett, yes that's what I'd like but the 'hours worked' data is in Zendesk Explore. How would I create a custom field in Zendesk Support and get that data over here?
Hey Phil,
Have you had a chance to review our Reporting with custom fields article for Explore? You can pull these numbers from your Support account an email sent over to the manager from Explore if necessary. The only downside is that you can set up scheduled emails in Explore once that number has reached a certain threshold.
Let me know if the above isn't what you're looking for.
Cheers!
Hi, this kind of is what I need but doesn't solve the problem.
I want to be able to send a notification when the total time in a given month exceeds what we have defined as the allocated time.
So, if our custom field is 8 hours. and using Zendesk time tracking we reach say 6 hours in a given month we want to send an email.
I'm not sure this can be done with what you've suggested and if so how?
Hey Phil,
This cannot be done within Explore. If you're tracking this information in an organization field, you would need to use automations as I mentioned above but it may be a bit tricky getting the time tracking data from the ticket over to the organization field. I'm thinking you can use our API to pull this information from a ticket field and populating it into an org field using a custom script. However, that may be more trouble than it's worth.
I wish I was able to provide an alternative solution for you here. It may be beneficial to create a separate post under our Support Troubleshooting and Q&A topic to help provide visibility to other users in the forum. Once you've created a post, I'm happy to get it added to our monthly Community Roundup and get your question out there :)
We have several agents assist in a case. Is there a way we can see how much time each individual agent spends in each case? The Example 1: Ticket handling time by ticket ID report shows an overall time spent in the case for the last agent that accessed it and I'd like to see actual time by agent.
Hello Mistyamber Reynolds,
One thing I wanted to ask is if you've tried slicing it by the updater?
Devan - Community Manager I am not sure what you are referring to.
Hey Mistyamber,
I believe what Devan is referring to is adding the Updater attribute to your report which should get you the individual agent contributions. More information in our Metrics and attributes for Zendesk Support article which I've linked for you.
When using the Updater attribute, you'll want to make sure you add the Updater Role > is not > End-user filter to your report.
Let me know if you run into any issues setting this up :)
Brett Bowser When I add the Updater attribute, I get the message: "'Updater Role' which is unknown as attribute, isn't valid."
Does anyone know if there's a way to display a decimal when doing the calculated metrics?? For example, if I show the total update handling time (hrs) it shows 143 minutes as 2 hours. Is there a config to show 2.xx hrs?
Thanks!
Casey Moore
You'll need to first add **/60** to your metric formula so the minutes are converted to hours.
You can then edit the display format of your query as shown in the screenshot below:
Mistyamber Reynolds can you provide a screenshot of the query you're trying to set up so I can take a look at your metrics/attributes?
Hi team,
Just want to ask, for time tracking data is it can only shown by D+1 or real time? We are using Zendesk support professional and Zendesk explore professional.
Thank you
Hi Makmur,
If you're using Explore Professional, your data syncs one hour after the most recent sync ended. The sync time is randomized within the hour.
Currently, there's no realtime syncing with Explore but something the team is looking into.
Cheers!
Brett Bowser after further digging, I'm not sure what I'm wanting to do is possible. I noticed in the logs that Time Tracker continually adds time by case, not agent:
Kamron first had the case and responded:
End user contacted back, Kamron added a note and responded:
User emailed back in after Kamron was off shift. Dorothy picked up the case. Note that time tracker added her ticket time to the over all ticket time total. It did not start a new timer based on agent. What I was hoping for is that time tracker would be linked to the agent, not the ticket:
Hey Mistyamber,
In the events of a ticket you'll see the total time applied to the ticket. If you're looking for individual agent time, you'll need to track this using either Explore or Insights
If you're using Insights you can take a look at this report: Time Tracking recipe: A look inside your agents' day-to-day productivity
For Explore, we have a large number of recipes found here: Zendesk Explore recipes reference
I hope this helps!
I receive this error:
"The set of calculations Calculated member named 'SUM(updatehandlingtimehrs-81a76591b6)' references 'Changes - New value' which is unknown as attribute. isn’t valid. Adjust the calculation and try again. (Error code: ed71afa3)"
But both Min and Hrs query were approved with green tick when I saved them.
Hey Francesco,
It looks like you have a ticket created with our Customer Advocacy team related to this issue. They will follow-up with you on the ticket since they may need to look at account-specific information to troubleshoot further.
Cheers!
Hi,
Is there a way to format the time metric as HH:MM:SS? We use this in insights, but I cant seem to understand how the display format works in explore.
Edit: Nvm. Found out the metric needs to be in seconds and the format used is duration.
Hey Alex,
Have you had a chance to take a look at this Explore article? How do I change my query to display time-based results as HH:MM:SS?
This should hopefully point you in the right direction :)
Hey Brett,
Was looking for an article, but couldn't find it. Regardless, I found out that it needed to be in seconds for the duration format to work.
Can dashboards/reports/queries generated in Explore be exported/imported to Insight so my weekly reports are just one PDF/report and not several?
Hi Jim -
You would need to rebuild the reports in Insights; there's not functionality to do a direct export/import between the two systems.
Thank you, Nicole, however we do not see 'time tracking' in Insights.
As it is an app and only shows up in Explore we do not see how to make it show in Insights.
We use the time tracking app within our domain, but not to monitor agents. More to define the time spent per query type.
One of the problems when it comes to reporting is that agents can sometimes keep a tab open, letting the clock run on. This leads to wildly inaccurate reporting, with some tickets logging 16 hours against them.
I've tried to find a way to disregard tickets with a logged time of greater than 1200 seconds (20 mins is a decent enough threshold), with no success. Can anyone help me build an attribute to cover this, please?
Thanks
Hey Gareth,
You would need to create a bracket attribute that would separate tickets with an update time of < 1200 seconds and another with an update time of > 1200 seconds. The following recipe should point you in the right direction: Explore recipe: Displaying tickets answered within different time brackets
I hope this helps!
Hell again Nicole,
I'll ask again,
The Timekeeping app makes you build your reports in Explore. The same functionality is not in Insight so how does one go about building a timekeeping report in insight?
Please sign in to leave a comment.