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

Return to top
Have more questions? Submit a request

169 Comments

  • Martin Kølbæk

    I'm experiencing the same issue as Kristina and Andrew. I've ensured that the app is installed andI can see that the Ticket Fields are added in Zendesk, but I still don't see the Total time spent (sec) in Attribute Values or anywhere else.

    2
  • Sam Russell (Concero)

    Is there a way that the total time spent could be in hours as minutes is useful but when running a report i don't want to have to transfer everything from minutes to hours.

    2
  • Amy Dee
    Zendesk team member

    Hi Helvijs! Which attribute are you using for the agents in this report? Also, how is the Time (min) metric set up?

    If you are using the Ticket Assignee attribute, Insights will combine all time under the current assignee. That's expected.

    However, if you use the Updater attribute (and a metric that works with updates), then Insights should show you the total time for each agent, regardless of who is assigned to the ticket.

    We have a quick summary of user attributes in this article: Which user attribute should I use in my report?

    I hope this helps! Happy reporting!

    1
  • Arthur Goerlitz

    This was a very helpful article. I used all 3 reports. Thanks!!

    1
  • Sore

    Hello

    I've come across a little issue that is quite critical in order to measure my agents time spent.

    When a "Follow up" ticket is created, it inherits the old tickets total time spent.

    That means on the follow up ticket, when it is created it has the value of the original ticket. However when the first agent submits, it will overwrite this value which is great.

    What is problematic is that the agent submitting the first time tracked on the follow up ticket, will have the old value withdrawn from his "Total Time spent metric" in Insights!

    So If I spend 1 hour on the original ticket, and 1 minut on the follow up, I will end up with -59 minutes on the follow up ticket in the Total Time spent metric.

    How can I avoid negative values in my metric?

    1
  • Pavel Kolpakov

    Want to share my experience. I was able to make by updater report, which shows how much did updater spend time during last update (works even when agent wasn't the last who updated ticket).

    SELECT MAX([Numeric Field] New value/60) WHERE Numeric Field=Time spent last update (sec) AND Date (Event)= MAX(Date (Event))

    You can just Paste this in Metric Editor:

    SELECT MAX([/gdc/md/i79vnfc3780jtagfbyzhux75lo29fqj0/obj/15098]/60) WHERE
    [/gdc/md/i79vnfc3780jtagfbyzhux75lo29fqj0/obj/21505]=[/gdc/md/i79vnfc3780jtagfbyzhux75lo29fqj0/obj/21505/elements?id=1573553] AND [/gdc/md/i79vnfc3780jtagfbyzhux75lo29fqj0/obj/14868] = MAX([/gdc/md/i79vnfc3780jtagfbyzhux75lo29fqj0/obj/14868])

    1
  • Amy Dee
    Zendesk team member

    Hi Rosalie! Attribute values are listed under their attributes. That keeps the list organized.

    To find Total time spent (sec), go to Attribute Values, then select Numeric Field. This should open a new list with all the available values for that attribute, including Total time spent (sec).

    I hope this helps! Happy reporting!

    1
  • Bryan Flaherty
    Zendesk team member

    Hello Michael!  It looks like you might be hitting the green add under the element selector.  In order to put an element into a metric you are building you will want to double click on that element.

    The add button is for you to add your newly created metric to a report when you are all done with it.

    Hope this helps!

     

    1
  • Amy Dee
    Zendesk team member

    Hi Andreas! This sort of report should be possible. It's a bit different from your approach, though, due to how comments are recorded in the data model.

    There are three relevant attributes here: 

    • Ticket Updates identifies each update on a ticket, regardless of where it came from or what changed in the update
    • Comment Present identifies whether any given update included a comment
    • Public Comment identifies whether any given comment was public or not

    The Ticket Updates attribute is the base for the dataset, so it can anchor a metric. The other two can be used to filter your results.

    In your case, I recommend creating the Avg time spent per update (min) metric described in the article above, where you use BY Ticket Updates. Then you can make two customized versions for comments:

    Avg time spent on public comments
    SELECT Avg time spent per update (min) WHERE Comment Presenttrue AND Public Commenttrue

    Avg time spent on private comments 
    SELECT Avg time spent per update (min) WHERE Comment Presenttrue AND Public Commentfalse

    These metrics should find the average handle time in minutes, but only for updates which include a public or private comment, respectively.

    I hope this helps! Happy reporting!

     

    1
  • Zach

    I must be missing something as I do not have that metric in my list. Hmm

    1
  • Mark Adkins

    Any chance these instructions can be updated to work with Explore?  

    1
  • Brent

    @Sam - yes! All you need to do is divide your metric by 60 another time to go from minutes to hours. For example, the MAQL will look like this:

    SELECT SUM(IFNULL([Numeric Field] New value,0) - IFNULL([Numeric Field] Old value,0)) / 3600 WHERE Numeric Field = Total time spent (sec)

    1
  • Amy Dee
    Zendesk team member

    Hi Jose! The Total time spent (sec) value is a fact, not an attribute. That means it won't show up under HOW or in Attribute Values. Instead, it needs to be aggregated in a metric.

    The recipe in this article should walk you through the steps to create the basic time tracking metrics. Notably, this recipe does not use the Total time spent (sec) value on its own. It looks for changes to that field throughout the life of the ticket, which allows you to report on individual ticket updates.

    Try going through this recipe article again, following the screenshots. It's a little tricky to set up, but it should give you the results you need.

    I hope this helps! Happy reporting!

    1
  • Amy Dee
    Zendesk team member

    You're welcome! I'm glad I could help. Happy reporting!

    0
  • Brent

    @Zachary it looks like you're using the "Total time spent (sec)" attribute value instead of the "Total time spent" metric in step one. Attribute values appear in orange text, and metrics appear in green text.

    In the end, it should look like this:

    0
  • Sue

    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

    0
  • Amy Dee
    Zendesk team member

    Hi Michael! I think I see the issue here.

    In the Total time spent (min) metric, you have the wrong attribute. Instead of Ticket Numeric Change, you should have Numeric Field. Since the attribute and value don't line up right now, the metric can't return any valid data.

    Update the Total time spent (min) metric first. Then, remove and replace it in the Avg time spent per ticket (min) metric (and any others where it is nested within a larger metric). That will ensure that the larger metrics are using the latest version of the Total time spent (min) metric.

    Once you get that attribute fixed and all the other metrics updated, you should start seeing data in the report.

    I hope this helps! Happy reporting!

    0
  • Ricky Davis

    Hello, Curtis!

     

    I'm glad you were able to the Time Tracking metrics set up ok! To break this metric down further, you can use Attributes in the HOW section of an Insights report. Specifically, you can use Ticket Group Historic or Ticket Assignee Historic, found in the Ticket System Field History folder:

    This will allow you to select a certain agent to report on! I hope this is helpful!

    0
  • Hema Mansukhani

    Can you replicate this recipes for Explore?

    0
  • Ignacio De La Llave Lorenzo

    Hi Sue,

    Total time spent (sec) is a fact not an attribute. It should be under Elements > Facts

    0
  • Jessie Schutz
    Zendesk team member

    Thanks for helping out, Chad!

    0
  • Jason Brown

    Is is possible to get the sum of time for at ticket for when a custom field was set to a value in particular?

     

    For instance: 

    SELECT SUM(IFNULL([Numeric Field] New value, 0) - IFNULL([Numeric Field] Old value, 0)) WHERE Numeric Field = <<Custom Numeric Field>> AND [Text Field] Previous Value = [Custom Field Name] Value

     

    We want to track time for when a field is set to a particular value historcially, the Custom field name will change as the ticket gets worked on by different engineers or teams.

    0
  • Michael Kiss

    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.

    0
  • Amino Assistant (Larry)

    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!

    0
  • Andrew J
    Community Moderator

    Hello Adam, yes you would need to use the metric in a report to use this, and best to add the report to a tab.

    0
  • Chad Dunbar

    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!

    0
  • Helvijs Vigners

    Thanks Amy! That was helpful. What about Date filter? which one do I select to get all time logged for an agent on the date.

    I have tried Date(Assignee Updated) and Updater as to which agent.

    My metric in minutes is:SELECT SUM(IFNULL([Numeric Field] New value,0)-IFNULL([Numeric Field] Old value,0))/60 WHERE Numeric Field=Total time spent (sec)

    My metric in hours: SELECT SUM([Numeric Field] New value - IFNULL([Numeric Field] Old value,0))/3600 WHERE Numeric Field = Total time spent (sec)

     

    0
  • Amy Dee
    Zendesk team member

    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 ValuesNumeric Field and find Total time spent (sec) in that list. It will appear orange in the metric editor.

    I hope this helps! Happy reporting!

    0
  • Amy Dee
    Zendesk team member

    Hi Nathan! Tags are unique in the Insights data model. One ticket can have any number of tags at the same time, and you may need to report on any one of them.

    Because of this, tag data is stored in a separate dataset, and the tags dataset is associated with the ticket as a whole. That means you need to take special steps to use tags in reports. We  have more details in this recipe: Reporting on ticket tags.

    In this case, the time tracking metrics are not connected to tag data. You can't put them in the same chart without a lot of complex intermediate steps. Instead, I recommend using ticket attributes to slice your report.

    Do the "support topic" tags correspond with a ticket dropdown field? That would be the simplest solution, since you can add a ticket dropdown field to this type of report without any extra steps.

    I hope this helps! Happy reporting!

    0
  • Andrea McMahon

    Hi - I am getting an error when trying to add the first metric. 

     

    0

Please sign in to leave a comment.

Powered by Zendesk