In this recipe, you'll learn how to create a report that shows the number of times tickets were assigned from one group to another. For example, you could report how many tickets are being escalated from the Support group to the Sales group.
Tip: If you want to report on how much time a ticket spent in each group, see Explore recipe: Reporting on the duration of fields.
What you'll need
Skill level: Moderate
Time Required: 20 minutes
- Zendesk Explore Professional or Enterprise
- Editor or Admin permissions (see Giving agents access to Explore)
- Ticket data in Zendesk Support
Creating the report
To create the report
- In Zendesk Explore, click the reports (
) icon.
- In the Reports library, click New report.
- On the Select a dataset page, click Support > Support - Updates history, then click Start report. The report builder opens.
- Now, create a Standard calculated metric to show when tickets move from one group to another. From the Calculations (
) menu, click Standard calculated metric.
-
On the Standard calculated metric page, enter or paste the formula below into the Formula field. Add a title for the metric like Ticket assigns from Support to Sales.
Replace the IDs in the formula with the group IDs of the two groups you want to report about. To get the group IDs of your groups, make a GET request to subdomain.zendesk.com/api/v2/groups.json. Check out our documentation here for more information. In the example below, the first group ID would be for 'Support' as the previous group and the second group ID would be for 'Sales' as the new group the ticket is assigned to.
The completed metric will look like the screenshot below:IF ([Changes - Field name] = "group_id" AND
[Changes - Previous value] = "36000000xxxx" AND
[Changes - New value] = "3600000xxxxx") THEN
[Update ID]
ENDIF
Tip: If you're working in a language other than English, read this article to help you enter Explore formulas in your language. - When you are finished, click Save.
- In the Metrics panel, click Add.
- From the list of metrics, choose Calculated metrics > Ticket assigns from Support to Sales (the calculated metric you just created), then click Apply.
- Ensure the metric aggregator for Ticket assigns from Support to Sales is set to COUNT. For more information, see Choosing metric aggregators.
- (Optional) Filter the report's results by date by adding the Ticket created - Date attribute in the Filters panel.
Next steps
If you want to see the agents who are making the group update, you can add an attribute to show the agent's name.- In the Rows panel, click Add.
- From the list of attributes, choose Updater > Updater name, then click Apply.
-
From the Result manipulation (
) page, click Metric filter.
- On the Metric filter page, set the metric filter so it only shows results greater than 0.
Your report is now complete. See the screenshot below for an example of how it might look.
71 comments
Drago
I get 2 syntax errors when trying to use this formula
They're preventing me from saving the calculated metric. Any ideas how to resolve?
0
Vitalii Zhidkov
Drago looks you are using a wrong dataset. This metric has to be created in Updates history dataset.
0
Drago
I am using the Support Updates History data set, sorry if not visible in the screenshot. That's what's confusing...
0
Chandra Robrock
Hey Drago - I'm a bit stumped as well. You appear to be in the correct database and, based on the first screenshot you sent, it looks like the error you're seeing isn't showing the exact attribute you're referencing in your formula.
For example, instead of [Update ID], Zendesk appears to be looking for the [ticket_upDates_id] attribute. Any time I've see this error, it typically shows me exactly what I entered in the formula (see screenshot below), so I'm almost wondering if this is a bug?
I attempted to reproduce this in my own Zendesk account but wasn't able to. If you copied and pasted the formula from this help document, you could try to type it out manually just to see if that resolves the issue (sometimes it oddly does) but, otherwise, it may be worth reaching out to Zendesk's Support team so they can take a closer look at your account & see what's going on.
0
Pedro Rodrigues
It should be "Name" and not "name"
Edit: then again I haven't double-checked so I may be wrong here, better to type everything as Chandra suggests!
0
Chandra Robrock
Pedro Rodrigues Double checked and can confirm that "name" should be lowercased. Hopefully re-typing everything out does the trick for you, Drago. 🤞
0
Drago
Hi Chandra Robrock, thanks for the tip retyping the formula manually has worked.
0
Gouthami Munugoti
Hi Stephen Gallagher ,
Can we get the total ticket assigns across groups with name till ticket gets solved.
May i know is there any way to get this?
I have used the Group reassignments but it is giving me the count.
Thanks in advance!
1
Kelly Janssen
We move tickets internally between support groups. I'm trying to track the number of tickets assigned to Group 3 vs the number of those tickets solved by Group 3 each week.
Ideally, a table in a format like:
Week Tickets assigned to group 3 (5/20-5/24) Tickets solved by group 3 (that were assigned 5/20-5/24)
5/20-5/24 10 8
The part I'm having the most difficulty with is filtering both the # of tickets assigned and the # of tickets solved to only count tickets with a group assignment date in within the week. So, if a ticket is assigned to group 3 from 5/20-5/24 it's included in the “assigned to group” metric and then either counted as solved or not solved. I don't want the solved column to look at tickets solved between 5/20-5/24 if they were assigned to our group in an earlier week. Hopefully that makes sense and someone can help!
0
Lauryna Naseviciute
Hi, I'm using this same formula to get an update timestamp in attributes, when the ticket is assigned from one group to another. However, I'm getting multiple timestamps, is there any way to get only the first timestamp? My goal is to calculate the duration from ticket creation to being assigned to this particular group.
IF ([Changes - Field name] = "group_id" AND
[Changes - Previous value] = "36000000xxxx" AND
[Changes - New value] = "3600000xxxxx") THEN
[Update - Timestamp]
ENDIF
0
Jiri Missbach
Hello all,
great article; I'm looking for a way to report on ticketsthat were ever escalated to the L2 support group. The above described seems to make the trick well, but I'm unsure how this behaves in more complex flows, ie:
For the last step, the Previous Value will be L3 and the new value L1. Would the formula still help/capture/be aware of the previous move L1-L2? Or would I have better luck creating a custom field and trigger that would set a value whenever a ticket is assigned to the L2 group?
Jiri
0