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
Dustin Suits
If my organization has dozens of groups, how can I calculate the total number of tickets that were assigned to a specific group (and solved by any group)? I have tried the following formulas, filtering them to tickets created in 2021 for easier verification.
Formula 1 - Seems like the logical option for organizations with a large number of zendesk groups, but displayed a wildly inaccurate number in the single digits.
Attempt 2 - The outputted value was wildly inflated. I also would prefer not to use this method because it would require adding each group ID individually and it would remain a static list requiring manual updating if new groups are created.
2
Taylor Bowser
Hi @...,
Thanks for reaching out! To confirm, it sounds like you are looking for a sum of solved tickets that are assigned to a specific group, even if they were marked as solved by someone outside of that group? Is that correct?
Looking forward to your reply!
0
Dustin Suits
Hello @..., yes that is correct! We're trying to figure out how often tickets are being assigned to a group and someone outside of that group is solving. This would help us identify how often tickets are being assigned to this group incorrectly or how long this group spent on tickets without being the one to solve it. Thank you!
0
James McCoy
Where do we find an index of Group IDs so we can match them to their names?
0
Joseph
Hello James,
Group names and Ids can be obtained through our API's, List Groups endpoint to obtain those references.
Alternatively, through Manage > People in Support, the Groups tab will have each group's name listed. Here, the group name itself is a hyperlink with the group's ID encoded at the end of the URL.
1
Marcos Sasson
Hi,
Which time filter should I use to see the amount of group assignments for a specific date?
0
Dave Dyson
Hi Marcos -
To limit the results to changes on a specific date, you'd want to add a filter using Ticket updated - date
For more information on using filters, see Working with query filters
0
Danny Koss
When using the custom metric, I am able to accurately capture tickets assigned from one group to another.
I'm trying to get a sense of how many tickets are assigned to a particular group by date. I attempted using the "Update - Ticket Date" attribute, but that seems to attribute a count to the date a ticket was most recently updated which was assigned to that group.
There is a "Ticket Assigned - Date" attribute which is almost what I'm looking for, but it doesn't properly account for tickets assigned to a group but not yet an individual agent.
If there were a "Ticket GROUP Assigned - Date" attribute, I think that would help answer what I am looking to understand. Is there a way to write a custom attribute of this nature? Or is there another way to understand, by date, the tickets that were assigned to a particular group?
0
Chandra Robrock
Hey @... - Have you tried using the 'Update - Date' attribute? This date attribute will adapt to the specific update your metric is about so, in this specific case, it would be the date in which the ticket was reassigned to that specific group.
0
Auf Mir
I have a similar query I am really struggling with.
I have over 900 groups with my instance of Zendesk with 100's of triggers that assign a ticket to the initial group.
What I am trying to identify is
First group | Second group | Total
ABC | DEF | 20
EFG | DEF | 19
ERF | HUI | 15
For last week
This is so I can see if I can intervene and provide a solution that means the tickets don't have to be moved and improve our FTR (first-time resolution)
When I run the queries I get a lot of entries where the ticket started in group 1 went to group 2 then back to group 1.
The result is then
Group 1 to group 1 = 2266 tickets
If I exclude these tickets that came back to the original group then I am losing the data of where it went from the first group to the 2nd group. I could am then missing possible opportunities to improve a process and have a single group deal with a specific issue.
Thank you for all the help
0
Love Penuliar
Hi Glen - we will need additional information in order to assist with your query. I'll be creating a ticket for this and reach out to you on that ticket shortly!
Warm regards,
Love Penuliar | Associate Premier Support Engineer - Manila
0
Roberto Cassarino
Hi,
thanks a lot, this is very helpful.
In our environment we're escalating tickets to "Tech Support" group from different groups, so from the formula I removed the "previous value" and now it looks like this (obviously I changed the group ID)
When a tkt is updated, the "Tech Support" team assigns it back to the original owner, so I added a row with the Assignee name to see who's the owner of the escalated ticket.
However, I'm trying to see also the actual ticket IDs of the tickets but if I add the Ticket ID as a Row it shows all the tickets, regardless if they've been assigned to the group or not.
How can I add the Ticket ID to the output to see how many and which tickets have been assigned to the specific group?
Thanks a lot!
0
NIkita Kadri
Hi Team,
The above formula helps to track reassignments to the group only . Is there a way to include another command to indicate if the ticket was also solved in the new group? only then the formula returns results?
Example: I want to track how many tickets were assigned from Group A to B. Ticket is assigned from Group 'A' to Group 'B'. Then it is re-assigned back to Group 'A'. The above formula calculates this option of assigned from 'A' to 'B'. However if the same ticket was reassigned back to Group 'A' and solved there; is there a way to exclude tickets which were assigned back and solved in the Previous Group value?( in this case its 'A')
0
Dane
Most of the time when you add ticket ID attribute it will behave the way like you experienced. What you need to do is just go to Result Manipulation > Metric Filters and remove 0 from the results. It will then filter out your results to show only the updated tickets specified on your calculated metric.
0
Dane
As long as the Group ID values is correct, the formula should work without a problem. If in case you have already verified that it was indeed the correct group ID, feel free to Message us and we'll investigate on it further.
0
Francois Spinnael
Dane, thx I was in the wrong query type.
I'm having some struggles with something maybe easy for the community.
Currently I'm looking to the cases assigned to group X.
It is working well, but when I drill in, I see that some "TICKET IDs" Aren't unique, some tickets have been assigned multiple times to that specific group.
How can I count each ticket ID as 1 in place of 2, 3,...
See screenshots:
Decompose, tickets ids with more than 1 as result:
Screenshot 2: What of course has impact on the results provided:
0
Dane
If you are seeing 2 values for your created formula, it only means that the ticket was assigned to the group two times.
0
Francois Spinnael
Dane
I understood this, but I want to see unique values only.
Only if this "happened" or "not happened" on a ticket.
I don't care that it was assigned 20x times to that specific group. (thats usefull for another charts, for example to analyse & solve pingpong of cases)
0
Stephen Gallagher
Taylor Bowser Was a solution ever provided for Dustin's issue at the beginning of this thread? I'm trying to solve the same problem.
0
Stephen Gallagher
Ended up trying the following:
I'm not sure how to control to tickets counted twice i.e. we assigned to the same group more than one over the course of the ticket's lifetime.
0
Francois Spinnael
Stephen Gallagher
You can "dig in" to see the tickets that have been assigned more than onces.
If you only want to see cases assigned more than once, just change the result starting from "2" in place of "1" (in Metric filter)
0
Stephen Gallagher
Thanks Francois Spinnael!
Correct - using the Metric filter can show me those tickets that have been assigned to a given group more than once.
For my use case, I'm trying to do what you have described above:
For my sample group, here is the trouble that I'm running into:
I'm not sure where the difference of 25 between 612 and 589 is coming from.
0
Stephen Gallagher
I believe deleted tickets lose their Ticket IDs, which could be the reason for the difference described above: https://support.zendesk.com/hc/en-us/articles/4408827553690-Why-are-there-ticket-IDs-missing-
0
Francois Spinnael
Stephen Gallagher
Any idea how we could count tickets ID with "2 times assigned to" as "1" ?
0
Stephen Gallagher
Francois Spinnael not yet :(
I'm wondering could someone on the Zendesk team give us a steer?
Taylor Bowser @... Chandra Robrock Dane
0
Dane
I'm currently testing it. I'll provide an update as soon as I have the result.
0
Dane
Instead of using Update ID, please try to use Update Ticket ID on the formula. This way, it will only return the result for the ticket and not the events on the ticket.
0
Stephen Gallagher
Excellent, Dane - thank you!
It's worth noting (for anyone with the same issue) that this worked (for me) only after I used D_COUNT. The steps at the top of the article refer to COUNT.
0
Francois Spinnael
Dane & Stephen Gallagher
Thanks guys! it works
0
Luis Duvauchelle
Hello,
Do you know how it's possible to count the transfered ticket from one group to another groupe whitout creating each request on Explore ?
My idea is to know the transfered ticket from my group A to my group B C D
Thanks !
6