This article explains how to create metrics and reports using the Ticket Events datasets.
Ticket Events tracks all events of a ticket. The Ticket Updates attribute is the center of all our Ticket Events, and it's broken into three types of events. When looking at events you will create a count metric with Ticket Updates and one of these three events and use the other attributes to filter for what you are looking for.
Understanding the Events model
Before the Ticket Events model was added to Insights, reporting was ticket-centric, and we could only tell what your Zendesk looked like currently (for example: current assignee of a ticket, how many tickets are currently open, and so on). Ticket Events tracks all events of a ticket over time.
Here is the model of every Insights project.
The Ticket Updates attribute is the center of all our Ticket Events, and it's broken into three types of events: text field changes, numeric changes, and satisfaction score changes. Let's define each of these data sets in the events model.
Ticket updates
Ticket Updates is the key to the events model and is an attribute which is represented as a unique ID for each time the Submit button is clicked on a ticket. Within one ticket update you can have multiple events, such as the image below:
An important thing to note is the Ticket Update ID is randomly generated and does not represent the order in which events happen.
There are three different types of field change:
- Ticket text field changes
- Ticket numeric field changes
- Satisfaction survey changes
Ticket text field changes
To measure ticket text field changes, you will use the Ticket Text Field Change dataset. This dataset captures changes to any system or custom text field within a ticket. In this model, "text field" refers to any qualitative field, including ticket text fields, dropdown fields, and checkboxes.
There are three key attributes for each text field change:
- Text Field: the field that changed
- [Text Field] Previous Value: the value before the change
- [Text Field] New Value: the value after the change
For example, if a ticket status changes from Solved to Open, it will have these three values:
- Text Field: Status
- [Text Field] Previous Value: [Status] solved
- [Text Field] New Value: [Status] open
This type of tracking enables us to see how many times a ticket text field changed.
Ticket numeric field changes
Very similar to ticket text field changes, the Ticket Numeric Change dataset captures changes to any system or custom numeric field within a ticket. In this model, "numeric field" refers to any quantitative field, including ticket numeric and decimal fields.
There are also three key pieces of information for each numeric field change. However, numeric fields behave a bit differently.
- Numeric Field is an attribute, and it captures the field that changed.
- [Numeric Field] Old value and [Numeric Field] New value are both facts, and they capture the values before and after the change.
For examples of how to use numeric field changes in reports, check out this recipe article for the Time Tracking app.
Satisfaction Survey changes
The third type of change that is tracked is satisfaction surveys. Satisfaction surveys are similar to ticket text fields, but they have special rules and restrictions in Zendesk.
The Satisfaction Survey Change dataset has two key attributes:
- Satisfaction Old Value: the value before the change
- Satisfaction New Value: the value after the change
These attributes only have four possible values: Unoffered, Offered, Bad, and Good.
Creating metrics using the ticket events
Now that we’ve gone over the building blocks of the Ticket Events model, the next step is to learn how to create metrics using these different attributes. Typically, if you want to look at the number of events, your metric will look like this:
- SELECT COUNT(Ticket Updates, <second parameter>)
The default # Ticket Updates metric counts updates with text field changes:
- SELECT COUNT(Ticket Updates, Ticket Text Field Change)
For more information on COUNT metrics, see Working with COUNT metrics on the GoodData website.
Example 1: How many times did a ticket get re-opened?
Continuing the example we used above, if you are trying to measure how many times a ticket gets re-opened, you can create a metric like this:
- SELECT COUNT(Ticket Updates, Ticket Text Field Change) WHERE Text Field = Status AND [Text Field] New Value IN ([Status] open, [Status] pending, [Status] hold) AND [Text Field] Previous Value = [Status] solved AND Ticket Status <> Deleted
The way to interpret this metric in plain English is:
“Count the number of updates with at least one ticket text field change, where the status field changed to open, pending, or on-hold status from solved status, and the ticket has not been deleted.”
If you want to slice the report by the lowest grain (Ticket Updates) it will look like this:
As you can see, ticket ID 226 had 3 re-opens.
In Insights there is a default metric called # Reopens that measures the total number of reopens on each ticket. The custom metric above allows you to slice by Date (Event), so you can see when each reopen actually took place.
Example 2: How many times was the ticket updated with a comment?
Ticket comments are not stored in a separate dataset. They are connected directly to the Ticket Updates dataset.
There are three default metrics that count updates with comments: # Total Comments, # Public Comments, and # Private Comments. These metrics use the Comment Present and Public Comment attributes to find updates with public or private comments.
For example, the # Total Comments metric looks like this:
- SELECT COUNT (Ticket Updates) WHERE Comment Present = true AND Ticket Status <> Deleted
Note the metric does not include a second parameter in the COUNT, since comments are not connected with any field changes.
74 Comments
Hi Andrei, I'm happy to have a further look but would need to see some screenshots of your report + metric configurations.
Thanks.
Hello!
I'm trying to know since when do I have tickets on our Tier 2 groups? Is this possible to know thru Gooddata?
Hey Henrique,
If I'm understanding you correctly, you should be able to use the following recipe to help track the duration between two ticket events.
This would require the creation of a custom metric but the article I've linked should help get you started.
Cheers!
Hi Brett!
Thanks for the quick response.
I'm trying to do as guided even though using the Attribute [Text Field] Previous Value or Ticket Group, I'm getting an error message:
Help :(
Hi Henrique,
From your screenshot it seems like you've picked the wrong attribute values (the orange bits) and that's why you're seeing this error.
If you highlight the Spanish Level 2 part and go to:
Attribute Values > [Text field] New Value > [Group] Spanish Level 2 and add selected.
You should that for both of your attribute values and be able to save without the error.
Hope that helps you out.
Thanks for your response Jacob!
Seems that somehow when I go to Attribute Values to select [Group] Spanish Level 2 I'm not finding it, only the Spanish Level 2 option, by going to Attribute Values > Tickets > Ticket Group,
Am I doing something wrong or should I do something to add this Attribute value before creating this metric?
Hi Henrique,
I just want to make sure that you are navigating through all 3 steps I mentioned above:
Step 1 and 2:
Step 3.
Could you please check if that works for you?
Worked Jacob! Thanks!
Great! Glad I could help.
I'm trying to get/build a metric that will show me all tickets that not been updated with a public or private comment in the last 4 days from a user with the Agent or Admin Role. Is this possible?
Thank you all for the help, the metric is now working fine for me!
Now I have another question, is it possible to measure volumes in Intervals of time of 15 or 30 minutes instead of 1 hour as it's now available?
Hi Henrique,
Apologies for the delayed response!
I checked with one of our Insights experts and it looks like this isn't possible unless you created quite a few custom metrics.
Since this isn't something we support on our end, I'm going to leave this for other users to jump in and offer some guidance on.
Cheers!
Thank you Brett! And do we know which metrics do I have to create in order to be able to measure these intervals?
Hi Henrique,
We don't have any guidelines on what metrics are necessary here since this is outside our scope of support.
We currently only support 1 hour intervals.
Please sign in to leave a comment.