Time Tracking recipe: The metrics you need to be measuring (Insights only)

Return to top
Have more questions? Submit a request

169 Comments

  • Cherise Russell

    Hi,

    This solution is great but I need a further step and not sure how to work it out. The scenario is this:

    We have about 30clients, each client's support package started on a different date, some of these packages over lap the year, so for instance one started on 11 November 2017 and runs until 10 October 2018.

    Ideally I want to be able to have a report that shows the organisation name and total time spent on tickets from the start of their support package. And even better if I can also display how many hours they have left.

    I understand to work this out I need to calculate the hours between current date and Support Package Start Date - but a bit lost how to do this. Anyone that can help or point me in the right direction please?

    0
  • Ignacio De La Llave Lorenzo

    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

    0
  • Corey Tisdale

    Chad, that was totally it. Sorry I missed that. Thank you!

    0
  • Nicole S. - Community Manager
    Zendesk Community Team

    Hi Hema, to clarify, you're asking how the Explore formula is different from the native reporting with respect to AHT?

    0
  • Jessie Schutz
    Zendesk team member

    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?

    0
  • Nicole S. - Community Manager
    Zendesk Community Team

    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? 

    0
  • Chris Pettigrew

    Hi There:

    We have just recently started using Time Tracker and as such, there are many 'solved' tickets that simply don't have times associated with them. 

    I believe this is skewing our ticket times. I am only speculating, but would it average 'zero values' with other tickets that actually do have times? I tried to create a filter that only pulls from tickets that actually have times associated with them, however, the 'Total Time Spent' metrics don't seem to be available for use in Filters. 

    Any advice?

    Thanks. 

    0
  • Amy Dee

    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 FieldTotal 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!

    0
  • James Greaves

    Hi Can someone give me some advice, basically I have had these metrics set for the last year and they appear to be working well.


    For the past few days I have been playing about having a look at pulling reports to see how many hours/minutes my staff are spending updating tickets and how much time they are spending on tickets, at first glance all looks well however it seems when I pull a report the report is showing the total amount of time spent for the entire ticket by each person.

     

    Example

    Engineer 1 spends 2 hours on 1st Jan working on an issue and passes it on to engineer 2.

    Engineer 2 spends 3 hours and fixes it on 2nd January.

     

    On the 2nd of January engineer 1 has 2 hours by his name for this ticket and engineer 2 has 3 hours by his name.

    Anyone know how to fix this? I want to only see the time an engineer has spent on the ticket for the day, not all engineers?

     

    Thank you in advanced.

    0
  • Amy Dee

    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!

    0
  • Gys Godderis

    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

    0
  • Andrew J
    Community Moderator

    I found a total time spent (sec) under metrics... are the instructions wrong?  

    0
  • Jacob J Christensen - Cloudhuset A/S
    Community Moderator

    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.

    0
  • Amy Dee

    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!

    0
  • Amy Dee

    Hi Patrick! In the Insights data model, the Group is a ticket property, not a user property. There isn't a way to dynamically filter agents by their group memberships.

    Instead, you can create filtered variables based on the Updater attribute. For the variable's Default Value, choose the individual support agents that belong to the group. For example, you could create a filtered variable called "Community Team," pick the Updater attribute, and choose Amy, Patrick, and Brett for your default value. 

    Once you have the "Community Team" variable, you can put it in any report or metric to quickly select those three agents. For this time tracking example, your metric could look like this: SELECT Total time spent (min) WHERE Community Team. In this context, the Community Team variable would behave just like Updater IN (Amy, Patrick, Brett).

    Creating these variables is a tedious process. However, variables make it easy to put the same group of values on any report without manually selecting them over and over.

    Variables also give you a central place to manage the values. In this example, if Brandon joins the Community Team later on, you can just add him to variable. That will automatically include Brandon in every report that uses the variable with no further effort needed.

    I hope this helps! Happy reporting!

    0
  • Jessie Schutz
    Zendesk team member

    Thanks for jumping in, Ignacio!

    0
  • Michael Ichioka

    Is this recipe up-to-date? I'm getting this error message at Step 5 for Metric 1:

     Edit:PEBKAC - thanks Bryan!

    0
  • Jessie Schutz
    Zendesk team member

    Hey James! 

    I see you were able to get help with this in a ticket. Let us know if you need anything else!

    0
  • Andreas

    Heya,

    I am trying to build a metric similar to the Average time spent per update (min). Similar as in I am trying to break it down even more (into Avg time per public comment and Avg time per private comment) and I am running into some issues.

    When trying to replace SELECT AVG(SELECT Total time spent (min) BY Ticket Updates) with SELECT AVG(SELECT Total time spent (min) BY Public Comments) it sort of works, except the resulting numbers are really far off.

    And I can't seem to find a way to utilize Private Comments either.

    Any ideas?

    0
  • Jason Brockett

    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.

    0
  • Integrator

    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?

    0
  • Helvijs Vigners

    Looks like total amount for a ticket gets allocated to assignee... How do I exclude any time other agents logged on the ticket...

     

    Example:Those are all agents each row. One of the agents suddenly had 3000 minutes.

    This screws up reporting as most of the time on one of the tickets was logged by someone else, but allocated to the assignee.

    Anybody able to help?

    0
  • Brett - Community Manager
    Zendesk Community Team

    Hi Ninja Raj,

    Zendesk only records the First Reply Time and not ongoing reply times unfortunately. That being said, you could use an SLA policy with a next reply time target, then report on the amount of time each instance of that target was active using the SLA Metric Target [Median] or SLA Metric Value metric.

    Hopefully other members of our community can join in and offer more guidance on how to create this sort of report :)

    Cheers!

    0
  • Amy Dee

    Hi Boyan! I recommend using this recipe: Reporting on the duration of a text field. That recipe can show you how long a ticket was in each group before the group changed.

    If you are using the Time Tracking app, you could also use the Ticket Group (Historic) attribute. We have more information in this article: What are the Historic attributes in Insights? The Ticket Group (Historic) attribute shows what group the ticket is in at the start of each update with a field change (including time tracking updates).

    There are a lot of ways to approach this type of reporting. These two options should give you a place to start.

    I hope this helps! Happy reporting!

    0
  • Amy Dee

    Hi Jason! This type of metric captures changes to the values actually stored in the field. It doesn't necessarily show you how long the value was set. (The Time Tracking app populates its fields with durations, which is why this recipe works for the app.)

    If you're interested in seeing how long certain values were set, regardless of what the values are, I recommend this recipe: Reporting on the duration of a text field. That recipe introduces the [Text Field] Duration in minutes fact, which captures the amount of time a field had a particular value before the value changed.

    The article is designed to report on text fields. There should be a matching fact for numeric fields as well, which behaves the same way.

    I hope this helps! Happy reporting! 

    0
  • Jessie Schutz
    Zendesk team member

    Thanks for sharing that, Kyle! 

    0
  • Amy Dee

    Hi Nathan! That screenshot appears to be a multi-select field, not a dropdown field. Since tickets can have any number of multi-select values at the same time, they run into the same problems that tags do. 

    At this time, multi-select fields do not sync as attributes in Insights. You do need to use tags for those fields. (We have details in this recipe: Reporting on multi-select fields by tags.)

    This means you'll need to look into those intermediate steps between tags and time tracking data. It should be possible, as long as you get the data relationships right. Ultimately, you'll want to find the total/average/median time spent per ticket, where the ticket also has one of your field's tags. 

    I'm sorry I don't have a quick answer here. I hope this at least gives you a place to start. 

    Happy reporting!

    0
  • Amy Dee

    Hi Patrick! If you're using variables as report filter shortcuts like this, you should select the values you want for the default value, then leave individual users on "use default value" -

    The User Specific Values section allows you to control what individual users see in reports. It's great for targeted user permissions, but that's not what we're doing in this example.

    In your case, it sounds like you have a lot of moving parts in your workflow and report. It's possible a couple of those parts aren't moving together, which is why you're getting weird results. I'm going to set up a ticket so we can look at your examples in more detail. Watch for an email!

    Happy reporting!

    0
  • Brett - Community Manager
    Zendesk Community Team

    Hi Patrick,

    If you do use the Updater attribute I believe you should be able to apply the User Role or Updater Role attribute to your filter so you can easily show to only agents on your account. More information on available attributes here: Insights Object Reference

    Let me know if that doesn't get you the results you're looking for.

    Cheers!

    0
  • Chad Dunbar

    Hi Erica,

     

    It looks like what you want is going to be based on the ticket updates directly. Give this a try:

    Metric 1: SELECT SUM( [Numeric Field] New value /60 ) WHERE[Numeric Field] New value=Time spent last update (sec)

    It's built in the same fashion as the Total Time Spent metric above. That will get the time spent on the updates without interacting with the total time spent values.

    From there, build the report with that metric using Ticket ID, and Updater. If you need the individual update times, then add Ticket Updates as well. Keep in mind, the Ticket Update IDs don't seem to be sequential (can't remember the article for it)

    Filters used are Date (Event) and Updater Role = Agent. To break out individual dates, also add Date (Event) to the report fields.




    0

Please sign in to leave a comment.

Powered by Zendesk