If you're using the Time Tracking app, and have Insights, you can track the time your support team spent on every Zendesk ticket.
With the app, support managers gain visibility into the actual time spent across all your customer service interactions. While the app tracks time automatically, you’ll need to build a few custom metrics and reports in Insights to analyze your team’s time logs. We’ve created a four-part series to walk you through best practices on how to best report on time spent:
- The time-tracking metrics you need to be measuring (this article)
- Leaderboards, time logs, top customers
- Advanced time-tracking report: A look inside your agents’ day-to-day productivity
- Advanced time-tracking report: The most costly support issues for your organization
This first article in the series walks you through setting up three essential metrics in your Insights account. These metrics are the building blocks that you will use to create reports in our other recipes and an be used in any custom report you want to make later.
Note: If you recently installed the Time Tracking app, the custom fields required to build these metrics might not yet appear in Insights. The fields become available after your ticket data sync with Insights. This sync occurs once an hour for Enterprise and once a day for Professional.
For general information on setting up the Time Tracking app, see Setting up Time Tracking.
Metric 1: Total time spent
This metric will measure the total time spent on each of your tickets through the Time Tracking app. This metric is used as part of the other two metrics in this recipe, so be sure to follow the instructions carefully.
Skill Level: Basic
Time Required: 10 minutes
Instructions
- Click Reporting (
) in the sidebar, then click the Insights tab. Click the GoodData link in the top right corner of the panel.
- In Insights, in the top menu, click Manage > Metrics > Create Metric > Custom metric.
- In the Name your metric field, enter Total time spent (min).
- Click into the metric editor and enter SELECT SUM(IFNULL(
- Add an element by going to the menu on the right side of the screen and clicking Facts , then select [Numeric Field] New value and click Add Selected to add the fact to your metric.
- Back in the Metric editor, add ,0) - IFNULL(
- Add another element to your metric by clicking Facts , then then select [Numeric Field] Old value and click Add Selected to add the fact to your metric. This fact should be right next to the last one you added.
- Back in the metric editor, enter ,0)) / 60 WHERE
- Add another element to your metric by clicking Attributes > Numeric Field. Once Numeric Field is selected, add it to your metric by clicking Add Selected.
- Back in the metric editor, enter an equals sign (=).
- Click Attribute Values. You will see a list of attributes again. After you select the attribute you're using for your metric, you can then select the attribute value as your final element.
- Select the Numeric field attribute, then the Total time spent (sec) attribute value. Your attribute value will appear in orange.
- Add the element by clicking Add Selected.
- Your final Metric should appear as follows: SELECT SUM(IFNULL([Numeric Field] New value,0) - IFNULL([Numeric Field] Old value,0)) / 60 WHERE Numeric Field = Total time spent (sec)
- Click Add at the bottom right.
- On the next screen, under Metric Format , click on #,##0.00 and change it to #,##0.0 min
Metric 2: Avg time spent per ticket (min)
This metric will measure the average time spent on each individual ticket. This will use the metric we previously created in this recipe, so be sure not to skip around. We’ll use this metric later in some of our reports to get a birds eye view on how long tickets are taking your team to complete.
Skill Level: Basic
Time Required: 5 minutes
Instructions
-
Click the Reporting (
) in the sidebar, then click the Insights tab. Click the GoodData link in the top right corner of the panel.
-
In Insights, in the top menu, click Manage > Create Metric > Custom metric .
-
In the Name your metric field, enter Avg time spent per ticket (min).
-
Click into the metric editor and enter SELECT AVG(SELECT.
-
Add an element by going to the menu on the right side of the screen and clicking Metrics > Total time spent (min) and click Add Selected to add the metric to your metric. Note that this is the metric we created earlier in the recipe.
-
Click in to the metric editor again and enter BY.
-
Add another element by going to the menu on the right side of the screen and clicking Attributes, then Tickets, then select Ticket Id and click + Add Selected to add the Attribute to your metric
-
Click in to the metric editor again and enter ).
-
Your final metric should read SELECT AVG(SELECT Total time spent (min) BY Ticket Id).
-
Click Add at the bottom right.
-
On the next screen, under Metric Format , click on #,##0.00 and change it to #,##0.0 min
Metric 3: Avg time spent per update (min)
This metric will measure the average time spent on each update of a ticket. This will use the first metric we created in this recipe, so be sure not to skip around. We’ll use this metric later in some of our reports to get an up close look at your agent activity to help you tighten up efficiency.
Skill Level: Basic
Time Required: 5 minutes
Instructions
-
Click the Reporting (
) in the sidebar, then click the Insights tab. Click the GoodData link in the top right corner of the panel.
-
In Insights, in the top menu, click Manage > Create Metric > Custom metric .
-
In the Name your metric field, enter Avg time spent per update (min).
-
Click into the metric editor and enter SELECT AVG(SELECT.
-
Add an element by going to the menu on the right side of the screen and clicking Metrics > Total time spent (min) and click Add Selected to add the metric to your metric. Note that this is the metric we created in the first section of the recipe.
-
Click in to the metric editor again and enter BY.
-
Add another element by going to the menu on the right side of the screen and clicking Attributes, then Ticket Updates, then select Ticket Updates and click + Add Selected to add the Attribute to your metric
-
Click in to the metric editor again and enter ).
-
Your final metric should read SELECT AVG(SELECT Total time spent (min) BY Ticket Updates).
-
Click Add at the bottom right.
- On the next screen, under Metric Format , click on #,##0.00 and change it to #,##0.0 min
169 Comments
Hi Martin! Do you have at least one ticket with data in the time tracking fields that has since synced to Insights?
Insights pulls these fields through your ticket data. If none of your tickets have data in the fields, then Insights can't see them. This does make things a bit less convenient when you first create ticket fields, but it makes the data model much easier to manage overall.
If tickets with values have synced and you still don't see the fields, you may be over the ticket field limit for Insights. The limit is around 500 custom ticket fields, though, so most accounts are well under it. You can read more in this article about Reporting on Custom Fields.
I hope this helps! Happy reporting!
Hi Amy, how do I check if they have data? Since I enabled it, hundreds of tickets have a non-0 time spent on them, but that I got simply by looking at the Time Track widget counter. I can't access the Ticket Fields themselves.
Hi Martin! The fields themselves are locked by the app. However, you can see the changes in your tickets by viewing the ticket events. Time tracking updates usually look like this:
You can see the values in the Time spent last update (sec) and Total time spent (sec) fields changing when the ticket is updated.
It sounds like you should have valid data, so there may be something else going on in your case. I'm going to open a ticket so we can investigate in more detail.
Watch for my email, and happy reporting!
I tried setting up the first measurement but I am also not able to find the "total time spent (sec)" attribute value.
I do select attribute values, Ticket Numeric Field Changes, Numeric Field, but I only see my custom fields.
I created a new ticket and spoke to myself just to get a time logged, thought that might help. Regardless, the "total time spent (sec)" has not appeared. Any help would be much appreciated.
Hi Larry! It sounds like you have everything set up correctly. The most likely issue here is the sync schedule.
Insights is not a real-time platform. It gets its data through regular syncs with your Zendesk Support account. In order to report on a field, at least one ticket needs to have data in the field and sync that data over to Insights.
If you're on a Professional plan, your data syncs once per day. Try building the report again tomorrow.
If you're on an Enterprise plan, new data syncs an hour after the previous sync ends. Try building the report again in a couple hours.
I hope this helps! Happy reporting!
Hello Amy,
Found out the problem. Didn't enable the role restrictions so I think it was only recording my times.
Thanks for the help! Was able to build the other measurements!
This seems not so logical approach. E.g. agent can spend 20 seconds to copy-paste the reply to the customer from some notepad or whatnot, which has been prepared for 3-4 hours. As a result - Time spent will be counted as 20s, however astronomical value for customer's wait time - 4 hours 20 seconds. Is there any possibility to fetch the actual time between updates of an agent?
Hi Integrator! The Time Tracking App and its metrics are designed to show you how long an agent spent on a ticket in the Zendesk interface. Zendesk doesn't natively capture this type of handle time, so apps like this one are very helpful for a lot of workflows.
This isn't the only way to report on agent activity, though. Here are a few links to get you started:
I hope this helps! Happy reporting!
Hi,
I would like to report on time spent on tickets on a monthly basis. Say for example 'ticket A' is an ongoing ticket that spans two months (common in our line of work), how would I generate a report with a the total time spent in that month only? For example if 1 hour on the timer was submitted in the first month, and 2 hours in the second month, the report should show this rather than just showing a total of 3 hours in the second month.
Any help appreciated!
Hey Leo,
Since what you want to track is in the updates to the ticket, using Events (ie. Month/Year (Event)) either in the filter or How should get what you need.
Hope this helps!
Hi Chad,
That worked really well - thanks!
Regards,
Leo
Thanks for helping out, Chad!
Hi Is there a way to see total time spent on a Organisation? With start & end date to make a report of a certain timeframe?
grtz
g
Hi Gys! Welcome to the Community!
I'm no Insights expert, but I'm fairly certain you can create a report using Metric 1 listed above and then slice/dice/filter by Organization to get the info you're looking for!
Hi,
I added these recipes with no errors, but when I go to reports I get "No Data Matching the Filtering Criteria" on all the custom metrics:
This happens even with no filters. What did I do wrong?
Hey Robin,
If it happens without filtering here are some common causes:
Thanks for answering, Chad!
Robin - let us know if Chad's answers helped you out, or if you have further questions.
Chad and Nicole,
Tickets Lack Data:
Data Sets:

Oh, I see, Total time spent (sec) is not in orange. Let me go follow Chad's steps.
error building metric:
Hi there
I maked this metrics and later the report
the report result is empty...
One detail.
When i maked the metric TOTAL TIME SPENT (min) i dont find the Attribute Values, then under the Ticket Numeric Field subheader, select Numeric Field > Total time spent (sec)
I find total time spent (sec) in FACTS Folder , unsorted.
May be that is the reason of malfunction report ?
Thanks a lots
Thanks, Leonardo. I've asked our team to check the recipe and update it.
Hey Leonardo - also, did you check the things that Amy Dee mentioned in her comment above?
Specifically, making sure that you have at least one ticket with data in the time tracking fields that has since synced to Insights?
Hi Leonardo! The version of Total time spent (sec) that you find under Facts will not work in this metric. That shows you the actual value in the total time spent field, which is not what you need here.
Instead, go back to Attribute Values. It will show you a list of attributes again, and the Time Tracking fields won't be on the first list. That's normal.
Once you're looking under attribute values, search for Numeric Field. That's the attribute you just selected for the metric. When you select Numeric Field, it should show you all available values for that attribute, including Total time spent (sec). That's the version you want to add. When you do, it will appear orange in the metric editor.
This metric works by looking for changes in a numeric field, then adding those changes together. In this part of the metric -- Numeric Field = Total time spent (sec) -- you're saying that you want to find changes in the "Total time spent" field, instead of any other fields you may have.
I hope this helps! Happy reporting!
Hi,
does this report(total time,avg time) cover those tickets that were updated in bulk as well?
Thanks! :)
Hi Angie,
Time tracker doesn't automatically log time when bulk updating (The tickets aren't opened, so the app isn't running), but if you add times to the fields in the bulk update window, then it would.
Otherwise, they have a NULL value and depending on how you build the metric are either not included or handled as 0.
Many Thanks, Chad! :)
I'm getting the message
Unexpected 'BY'. Expecting: )
But unlike the other person who asked, I am using the metric. Does anyone see what I am doing incorrectly here?
Hey Corey,
Looks like you're missing the second SELECT call.
SELECT AVG( SELECT Total Time spent (min) BY Ticket ID)
Chad, that was totally it. Sorry I missed that. Thank you!
Thanks for helping out, Chad!
Good morning Zendesk community,
I found a different thread in the community posts that explains the exact report I am trying to create but unfortunately, I was unable to get the results I need.
The original question is posted: here
Example: if Agent A and Agent B touch upon a ticket, I need to track the individual time taken to update/comment, broken down by the individual agent.So if Agent A were to escalate to Agent B, I need to know exactly how many comments were left by each person individually, and I need to be able to track exactly how much time was taken by each agent per individual comment. Currently, Zendesk reporting reads all time taken per comment or update based on whoever last owned the ticket. So if Agent A comments 5 times on a ticket, and it totals 15 minutes, then agent B comments once and it takes 4 minutes, ZD will report as Agent B having taken 19 minutes for total time spent in comments for the ticket. I need to be able to look at a report that will show both Agent A and B having handled that ticket, then it needs to show how much time was spent on each comment, separately, not combined or averaged out
Currently, Zendesk reporting reads all time taken per comment or update based on whoever last owned the ticket. So if Agent A comments 5 times on a ticket, and it totals 15 minutes, then agent B comments once and it takes 4 minutes, ZD will report as Agent B having taken 19 minutes for total time spent in comments for the ticket. I need to be able to look at a report that will show both Agent A and B having handled that ticket, then it needs to show how much time was spent on each comment, separately, not combined or averaged out.
I attached a true-life example of what a ticket looks like and why I need the day to roll up correctly on the report. I would be forever grateful if someone is able to help me get this done, I'm pretty sure everyone can see why I need this!
{PS no judging about the time it took to resolve this customer’s issue…lol….I have already addressed that part! 😊}
Thank you in advance for any help anyone can provide.
Erica Rodney
Please sign in to leave a comment.