If you're using the Time Tracking app, and have Insights (Plus and Enterprise), 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)
-
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
167 Comments
Hi Rob! That error most likely means you were clicking the "Add" button on the lower right, instead of double-clicking the element or using the "Add selected" option on the top right. The green "Add" button tries to complete the metric and add it to your report, which is why it throws errors if you use it early.
I hope this helps! Happy reporting!
I swear I am technical!
I have finally built this recipe but it will not pull data, any ideas?
R
Hi Rob! There are a handful of common things to check up front.
In particular, you need to make sure at least one ticket has data in the Time Tracking fields, that the ticket has synced to Insights since the fields were populated, and that the ticket (or update) is included in your report. If the app is relatively new for your account, and you don't have a lot of data yet, it would be easy to filter things out by accident.
In cases like this, I usually start by finding a few example tickets in the account, then building a quick test report in Insights for just those tickets. I don't include any extra metrics or filters at first. The goal is to make sure those tickets have synced with time tracking data.
If you're still not seeing results in Insights, even though everything else appears to be working, then we'll need to take a closer look at your account. For that, gather some examples and send us a support ticket. We'll dive right in.
I hope this helps! Happy reporting!
Hi,
For some reason i cannot find the Total time spent (sec) under attribute values. I enable the time fields in setting and they now appear in the events of the ticket. but for some reason we cannot get the total time spent to appear in attribute values or any where else.
Hi Joel! Welcome to the Community!
When this situation comes up, it's usually because the fields haven't had a chance to sync over to Insights yet. Depending on your plan, Insights will sync your data once a day (Professional) or once an hour (Enterprise). Once you've give Insights time to catch, though, everything should look right.
Are you still experiencing this issue, or has it resolved?
Hi,
I am having an issue with the "Total Time Spent (min)" metric. The problem comes with merged tickets. For example, I am trying to get the total time spent in tickets filtered by a custom field "Category". However, if a ticket from a category was merged to another ticket of the same category, the time spent on the first ticket won't add to the total time spent.
I thought that the "Total time spent (sec)" could be just added to the second ticket but it doesn't and so, my "Total time spent (min)" is always smaller than "Avg time spent per ticket (min)" multiplied by the # Tickets Solved (which includes these merged tickets).
Any ideas on where does the "Total time spent (sec)" go for merged tickets?
Thank you,
Never mind my last question. The issue was that those tickets where auto-closed with no time spent so they were being counted for the # Tickets Solved but not for the averages.
Filtering out tickets with no Time spent got my numbers to match
Sorry for going back and forth with this question. My issue at the moment is the following:
My "Total time spent (min)" looks like the one in this article:
SELECT SUM(IFNULL([Numeric Field] New value, 0) - IFNULL([Numeric Field] Old value, 0)) / 60 WHERE Numeric Field = Total time spent (sec)
As I see it, this should make that, if a ticket has no Total time spent (if the ticket was merged or closed in bulk without being opened), it still would return 0. However, when I'm applying this metric to tickets with no time spent, I'm not receiving a 0 and so the averages are not correct (as it's returning null and not being added to the total count)
How can I make the "Total time spent (min)" metric return 0 in these cases?
Thank you
Hi there!
I'm going to see if I can find someone to answer this for you, because I'm not sure how that works. Stand by!
Nevermind...I was right, I was doing something silly. I was adding it to the what, which I can't do evidently. I simply needed to select numeric filter instead of the List of Values filter.
I am trying to report on total time spent on tickets that have certain tags. I have created the custom metric but am not able to use in in the report. I am sure I doing something silly, so hoping someone here can help me out.
Hi Jason! Thanks for following up!
It looks like you already figured this out, but I'll add some context for anyone else following along: Tags and Events are not connected, so they don't get along when you try to display them in the same chart. They both connect to tickets, though, so you can use a tag metric in a numeric range filter and have it work on an event report.
Happy reporting!
Hi Ignacio! Sorry I missed your comment before!
The time tracking metric looks for updates with a change to the Total time spent (sec) field, and it compares the values at the start and end of each matching update. The result is the amount of time added in that update.
This metric does include "IFNULL" elements, but they're limited to the individual previous and new values. That way, the metric can still find a value of one of the two is null. It usually applies to the "previous" value at ticket creation.
Even with those IFNULL elements, though, the metric is still looking for updates with a change to the Total time spent (sec) field. If there aren't any matching updates, the ticket as a whole will still return a null.
You may be able to force tickets to return 0s instead of null values in your overall average. You'd need to be careful, though. If you use IFNULL in the wrong place, you may lose valid data or skew the result with too many 0s. It will depend on how the metrics and reports are set up.
If you continue to see weird results in your reports, I recommend submitting a ticket to our support team. That will allow us to go through some specific examples in more detail.
I hope this helps! Happy reporting!
Hey team,
Our group has been using these metrics and found them directionally very effective. I have two questions in this case:
1) I get negative update time for certain ticket categories. What would drive this?
2) Does the change of an assignee count towards a ticket update and influence the time spent per update?
Thanks,
Mike.
What am I doing wrong here? I have installed the time tracking app and yet I can' find and add the attribute values Total time spent (sec) to the Metric 1
Hi Sue,
Total time spent (sec) is a fact not an attribute. It should be under Elements > Facts
Thanks for jumping in, Ignacio!
Michael Kiss - The negative time issue is likely for Follow-Up tickets. See Stephen Fusco's comment on page 3 of these comments on December 15, 2017. It has been mentioned that this is not intended to a long-term fix but that's a quite subjective time frame. Would be nice if this was fixed. At some time this note was added near the top of this article "Note: Any follow-up tickets will use the same total time spent as in the ticket it was created from. To exclude follow-up tickets from your results, you will need to filter them out. See Filtering for follow-up tickets."
Hey Mike,
For your first question i'd actually like to take you into a ticket to investigate your specific case a little closer as that is not expected behavior.
For your second question, the metrics are tracking any updates made to the time tracking app. Changing the assignee on the ticket would be considered a ticket update and the time spent to do this would count as a submission to the time tracking app adding to the total time spent metric.
I'll create a ticket for you so we can discuss your first case in more detail
Hi,
I installed Time tracking 3 days ago.
There is more than one tickets with data in the time tracking fields.
How the Total time spent (sec) is not available in the Attribute Values.
How and when do the time tracking fields that has since synced to Insights?
Currently, it is not working for me?
How can we get it working?
Thanks
James
@Stephen Fusco - Awesome - looking forward to it and working through this.
Hey James!
I see you were able to get help with this in a ticket. Let us know if you need anything else!
Hi Jessie,
Yes all is working for me now.
Thanks for your help
James
Hey,
Thanks!
I'm having trouble setting up the 'Total Time Spent' metric, I keep getting this error message but I can't figure out what I have done wrong?
Lettie
Hi Lettie! There are two small issues with the metric in your screenshot.
First, the = sign after Numeric Field is in parentheses. It should be on its own: Numeric Field = Total time spent (sec).
Second, Total time spent (sec) is blue in this screenshot, which means it's the Fact instead of the Attribute Value. The blue Fact version is the actual value from the field on any given ticket. In this metric, though, you need to identify which numeric field to use for the New/Old value part.
Remove the blue Total time spent (sec), then go to Attribute Values > Numeric Field and find Total time spent (sec) in that list. It will appear orange in the metric editor.
I hope this helps! Happy reporting!
Amazing thank you Amy! Big help :)
You're welcome! I'm glad I could help. Happy reporting!
Hello,
I've been successfully using the Total Time Spent metric week over week, until one week I noticed a strange result. Since the week of 5/20 - 5/26, the same agents have been measured as having spent less than 400 minutes, whereas prior to this, they were spending 1200-1300 minutes. We haven't adjusted our process, and even when I go back in time to measure the old results, they still show as being over 1000 minutes. Any idea why this is measuring differently?
Hi Chris!
We'll be getting back to you via a ticket. Kindly check your email inbox regarding your concern.
Thanks!
I have followed these directions and built the metrics in but how do I now run a report using these metrics. I do not see these selections when I try to create a report and pick the attributes.
Hi Denise,
This article is the first in a series, the very next one is about creating reports from these metrics. If you're still having issues, please let me know.
Please sign in to leave a comment.