Insights recipe: Reporting on duration of a text field Follow

Measuring the duration of a specific field value can give you lots of insight into how your Zendesk is performing. You can answer questions like: How long are agents holding on to tickets? How long do tickets take to cycle through each of your Support Levels? How do I measure the things that are important to me? This documentation will walk you through building some custom duration metrics to help answer these important questions. There are three duration facts in Insights that you can use. These three facts are related to the different types of updates that can occur on a ticket.
  • [Text Field] Duration in minutes: Used to measure how long a text field (like Ticket Group, Status, or Priority) was set to a certain value
  • [Numeric Field] Fact duration in minutes: Used to measure how long a numeric field was set
  • Satisfaction duration: Used to measure the length of time a ticket had a particular satisfaction rating

Note that duration can only measure calendar minutes, not business minutes.

You can read more about what types of Zendesk fields become attributes and which become facts in Understanding how custom fields are imported into Insights .
 

How long are tickets sitting with my support groups?

The first step to answering this question is to build a custom metric.

Note: If you've never built a custom metric before, you might want to watch How to Create a Custom Metric . During metric creation, you'll be selecting elements available to you from within your Insights project. For a list of the default facts and attributes please see our objects reference guide .

You'll want to build the following metric and name it Avg Time Assigned to Group :

 
Dividing by 60 converts minutes to hours, which is a more useful unit of measurement in this case. Once you are back in the report editor you will select the following elements to create the report and then select the stacked bar graph as your format:
  • WHAT: Avg Time Assigned to Group
  • HOW: [Text Field] Previous Value, Month/Year (Event)
  • FILTER: Month/Year (Event) is 13 months ago through one month ago, and [Text Field] Previous Value is whichever groups you are interested in.
 
 
 

Drilling across for more detail

If you want to take this report one step further, you can place it on a dashboard and add a drill report to see more details about the tickets making up those numbers.
  1. Create a separate report by saving a copy of this report under Options > Save As .

    I like to use the naming convention of [Drill-In] Report Name to make the report easier to identify when placing on a dashboard.
  2. Once you've saved the copy, you can make it into a table by selecting the table symbol and then add the other attributes that you are interested in seeing to the report.
    Quick tip: Adding a filter for a single day will limit the data returned in this table and allow you to format your report the way you want much quicker.
  3. When you are ready to save the report, you can remove all the filters, wait for the " Report too large to display " error, and then save the report. Don't worry that your report is too large, it will inherit the filters from the top level report on your dashboard and you will get a nice concise table when you drill across reports.
  4. After saving this report, you will need to go back to the dashboard where your first report lives and go into Edit mode.
  5. Click on the report, and then the gear icon above it to open the pop-up modal with the drill settings:
  6. To make this work, select the Avg Time Assigned to Group metric on the left and the new report you created on the right.
  7. Click Apply , and then save your dashboard changes. Next time you hover over that report, you will be able to click into any of your groups and see which tickets are making up the data for each month.
 
 

Measuring Average Time in Solved

To really drive this idea home, let’s have a quick look at another example. Insights comes with some default time based metrics that are useful when measuring the performance of your Zendesk.

  • Requester wait time : The combined total time spent in the New, Open and On-Hold status
  • Agent wait time : The total time spent in the Pending status
  • On hold time : The total time spent in the On-hold status

These metrics are designed under the assumption that you use Zendesk ticket statuses with a particular workflow. Some of you, however, might not use the five statuses (New, Open, Pending, Solved, Closed) in the same fashion as everyone else. In this case, you may want to build your own metrics.

Let's say your agents are setting their tickets to Solved after each update to the customer and each time the customer is replying, the ticket status is being set back to Open. And you want to know, on average, how long your agents spend waiting on your end users to reply. Rather than using the out-of-the-box Agent wait time metric, which measures time in Pending, you can measure this using the [Text Field] Duration in minutes fact.
 
Again, you will start by building a custom metric and naming it Avg Time in Solved :
 
 
Then you can start building the report using the following elements:
  • WHAT: Avg Time in Solved
  • HOW: [Text Field] Previous Value, [Text Field] New Value, and Ticket ID (if you want to get that granular)
  • FILTER: [Text Field] Previous Value is [Status] Solved
 
 
This report is showing you the average time spent in Solved prior to each of the statuses it can be changed to. If you are only interested in tickets that went from Solved to Open, you could specify this in your filters as well:
 
 
Alternatively, you can build these filters directly into your metric for the statuses you are interested in:
 
 
And there you have it! Building reports to look at the duration of certain field values is fun and easy. These techniques can be applied to any ticket field that carries over into Insights, forming an endless variety of ways to use this information to gain valuable perspective into the health of your Zendesk.
Have more questions? Submit a request

Comments

  • 0

    Hi there - it's really a great article but unfortunately  I am struggling to adjust it to my needs. I am looking for the number of hours a ticket is assigned to an agent (that is not closed, solved or deleted). Somehow it doesn't show any results if I follow the steps like with the group example. Could you please help?


    Thanks

  • 0

    Hi Johann,  

    The metric which you need to use in this case will look like this:

    I tried this metric on my test account and can confirm that it returns expected results. Here is a report example:


    I have created the ticket #1790068 for you in case you'll need more assistance on this case. 

    However, there is a downturn when the "[Text Field] Duration in minutes" fact is used for reporting on Text fields, which are not updated so frequently throughout the ticket live.  

    For example, "Assignee" field might be updated just once on a ticket, in this case, this fact will return a null value. Since it counts the time between 2 text field changes, there should be minimum 2 field updates on the ticket in order to capture the time duration. 

    To avoid this you can use metric logic described in Duration between two or more ticket events in minutes article. 

     

    Edited by Eugene Orman
  • 0

    I was directed to this article by support who suggested it could solve my question on how to report on how long (on average) our tickets are spending in each status before being solved.

    I'm not great with MAQL, how would I go about starting this?

    Thanks

Please sign in to leave a comment.

Powered by Zendesk