In this Explore recipe, you'll learn how to use the Updates history dataset to find the first agent a ticket was assigned to. You'll also create a filter that can be used to exclude results where the first assignee is the same as the current assignee.
You can also modify this report to find the first assigned group instead of agent.
This recipe contains the following topics:
What you'll need
Skill level: Intermediate
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
This report returns the first assignee for each ticket in your instance.
To create the report
- In 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.
- In the Calculations menu (
), click Standard calculated attribute.
- On the Standard calculated attribute page, give your attribute a name like First assignee name.
- In the Formula field, enter or paste the following formula:
IF ([Changes - Field name]="assignee_id" AND [Changes - Previous value]=NULL AND [Changes - New value]!="0" AND [Changes - New value]!=NULL) THEN [Update ticket assignee] ENDIF
Tip: If you're working in a language other than English, read this article to help you enter Explore formulas in your language. - From the Computed from dropdown list, choose Ticket ID.
- When you are finished, click Save.
- Repeat steps 4 to 8 to create a second calculated attribute named Current assignee filter and the following formula:
IF [Update ticket assignee] = [Assignee name] THEN "true" ELSE "false" ENDIF
- Now, you'll construct the report. In the Metrics panel, click Add.
- From the list of metrics, choose Tickets > Tickets updated, then click Apply.
- In the Rows panel, click Add.
- From the list of attributes, choose Calculated attributes > First assignee name, then click Apply.
- In the Filters panel, click Add.
- From the list of attributes, choose Calculated attributes > Current assignee filter, then click Apply.
- Click the Current assignee filter you just added. On the Exclude tab, exclude one of the following values:
- True: If you want to exclude tickets where the current ticket assignee is the same as the first tickets assignee.
- False: If you want to exclude tickets where the current ticket assignee is NOT the same as the first tickets assignee.
Explore displays the finished table showing agents who were both the first and the current assignee for each ticket and the number of tickets for which that was the case. If you want to see the individual ticket IDs for these, add Tickets > Ticket ID to the Rows panel.
Modifying the report to find the first assigned group
To find the first assigned group on a ticket, rather than the first assigned agent, follow the steps above but substitute the following formulas:
- In step 6, use this formula instead:
IF ([Changes - Field name]="group_id" AND [Changes - Previous value]=NULL AND [Changes - New value]!="0" AND [Changes - New value]!=NULL) THEN [Update ticket group] ENDIF
- In step 9, use this formula instead:
IF [Update ticket group] = [Ticket group] THEN "true" ELSE "false" ENDIF
29 comments
Ben Singer
Hi team,
Is it possible to find all assignees for a ticket?
Thanks,
Ben
1
Brett Bowser
Hey Ben,
You should be able to report on this using the Ticket Updates dataset along with the Update Ticket Assignee attribute. This recipe may help: Explore recipe: Total number of assignments
0
Kuka
Hi team,
So our team need the data from the tickets, specifically the first assignee of the tickets to make it easier to see an overview of ticket processing .
Our team using Chatbot named Ivy and if using this query, it would trigger all ticket from live chat with Ivy as first assignee. could we exclude Ivy and utilize the second agent as first assignee?
is there any logic that we can utilized to recognize our second assignee agent to sort out the ticket? some kind of logic that work like this:
Could we utilize that logic?
Thanks,
Kuka
0
Marco
Thanks for reaching out regarding this.
I am not able to test this out as I would not have the same chatbot integration as you, and it looks like you are using a 3rd party bot that actually falls as an assignee. But I have some ideas on this.
First, we may need to actually separate the reporting on live chat tickets from the rest of the tickets. You can do that by filtering the report by ticket channel. Then when creating the report for tickets created from live chat, have you tried editing the formula so that instead of the assignee id being changed from NULL, it is changed from Ivy? Something like this:
IF ([Changes - Field name]="assignee_id" AND [Changes - Previous value]="Ivy Assignee ID"
AND [Changes - New value]!="0" AND [Changes - New value]!=NULL)
THEN [Update ticket assignee]
ENDIF
Of course, you would change the "Ivy Assignee ID" to the actual assignee ID. Check here for more information: https://support.zendesk.com/hc/en-us/articles/4408823393306-How-can-I-locate-an-agent-ID-in-Support-
It may be possible to have this all in a single query, and having a custom attribute using the logic that you provided, but that extent of custom coding would be out of our scope.
Hope this helps! Cheers!
0
Crawford Philleo
Hello -
I followed the steps here, but I'm not getting 100% the results I'm looking for in in my query results.
I built a custom metric to show me the the number of tickets that are moved from a specific group into another group like this:
In this case, it seems like the "First Assignee" attribute can't be bound to this in a table row - I would like to visually show who the first assignee on the ticket was prior to the ticket changing groups.
In my example here, I isolated to a single ticket that should be included:
So this is working for the "Tickets updated" metric, but I would like to have this also work for my custom "Upgrades" metric.
1
MineralTree | Support
I utilized this Standard Calculated Metric a while ago to help me identify tickets moving from group to group. I now have a need for it to try to find some other information. It seems that the formula is now failing.
If I run the original queries/reports that I initially used this metric in they seem to run fine. However, when I now select it from the list of metrics under columns or rows, I get the error below.
Can anybody shed some light on this?
0
Alex Zheng
You are probably in the wrong dataset, make sure you are in the Updates History dataset and the formula should work.
Let me know if you have any further questions.
0
Gerald J
Is it possible to get the same information, first assignee name and hopefully group in the ticket and SLA dataset?
0
Alex Zheng
Unfortunately not, as the changes - field name attribute only exists in the Updates History dataset.
Best regards,
0
Rachayeeta Dutta
Hi team,
Is it possible to find all assignees for a ticket?
or
get first assignee for a tickets in one column and get second assignee for a tickets in second column.
I am New to Zendesk Can any one help me with this?
Thanks,
Omkar
2
Pedro Rodrigues
Hi Rachayeeta Dutta, it is possible but it will require some work. Here's an example of how to do this.
1. Create a new report under the Support - Updates history dataset
2. Add the attribute [Changes - Field name] to Filters, and select "assignee_id"
3.1. Create a standard calculated attribute, let's name it "Ticket Assignee • Previous", for example:
⚠️Don't forget to replace "yoursubdomain" with your actual Zendesk account subdomain.
3.2. Create a second standard calculated attribute, "Ticket Assignee • New":
4. Add the Assignee reassignments metric to the report
5. Add the two new standard attributes to the report, exclude "NULL" values on both:
The only downside is that this will return the user ID instead of the name, so we'd have to edit the previous standard attributes in order to obtain the agent's name.
This will be a manual task, however, as we'll have to use a SWITCH function. Exemplifying for the "Ticket Assignee • Previous" attribute:
⚠️ You should add a "CASE" value for each agent in your account. This makes the whole report more difficult to maintain, of course, depending on how many agents you have.
Result:
In the example image above, we can see that there are CASE conditions for two agent IDs, but we'd need to edit our two attributes and add more CASE conditions for the other user IDs.
Hope this helps!
2
Rachayeeta Dutta
Thanks for the response Pedro Rodrigues . it helped a lot.
can you help me with one one more thing like how to just get first assignee name of a ticket and name of last agent who have updated the ticket .
apologies for the late response and again thanks for the response .
Omkar Salyan
0
Pedro Rodrigues
Hi Rachayeeta Dutta, you can follow the steps shared on this page to report on first assignee. As for the last assignee, you can try the following standard calculated attribute (also in the Updates history dataset):
Hope this helps!
0
Allen Lai | Head of CX at Otter.ai
I'm using the "Bad initial satisfaction ratings" metric to find negative C-SAT data based on the first assignee and this is not working for us. All of the numbers are associated with a blank value under "First Assignee Name".
0
Gab Guinto
If you're using the Bad initial satisfaction ratings in your report and you need to see which agent was assigned at that time of the rating, you can try slicing the data by the native Update ticket assignee attribute instead of the custom one discussed above. This should show the assignee at the time the bad rating was added to the ticket.
0
Anais
Hi,
The first reply metric is attributed to the current assignee / group even if it wasn't them who did that first answer (we actually got a separate group that triages most tickets).
Is there a way to see how long it took to send the first reply and attribute it to the agent who actually wrote that first reply?
Thanks
0
Gab Guinto
This may be achievable through the Updates history dataset. You can try building a custom attribute using the earliest date functions to get the timestamp of the first agent reply – see Working with earliest and latest date functions – and then use the Updater name attribute to see the agent who performed the update.
0
Almog Zamir
Hey all,
How can I see the first reply time - business hours by the first assignee agent?
0
Adam Wilson
I'm following the recipe above, but when adding the "Current Assignee" to the filter panel - I get
"The report cannot be displayed because it took too long to execute".
But if I remove from the filter panel and place the same attribute in the Rows, the report will display the results as a column.
I've tried narrowing the date range and adding additional filters such as brand. But the same result, won't allow me to add to the filters.
Any pointers?
0
Christine Diego
Could you please try clearing your cache and cookies and trying a different web browser. If the previous step does not resolve the problem, contact Zendesk Customer Support for further assistance.
0
Arthur Mori
while this recipe works for finding out the first assignee or group, i am trying to figure out how would this work if i wanted to display the previous group it was assigned to
scenario: ticket gets assigned to group A, then group B, then group C, then group D. I need to create a report and find out how many tickets were assigned to group C and show also the group before it was assigned to group C
0
Elaine
I'm confident that the recipe provided in this article can assist you in extracting the data you're looking for. Explore recipe: Tracking ticket assigns across groups
I hope that helps!
0
Arthur Mori
Elaine i've tried that report and unfortunately it doesn't work as it will only provide me the count of ticket reassignments. It does not provide the information of the group that made the assignment.
So in my example: ticket gets assigned to group A, then group B, then group C, then group D. I need to create a report and find out how many tickets were assigned to group C and show also the group before it was assigned to group C.
I need the report that shows group B made the ticket assignment to group C
0
Elaine
Apologies for the confusion.
To accomplish this, you'll need to create multiple calculated metrics for each reassignment scenario. For instance, you'll need a formula for when tickets are reassigned from Group B to Group C, another formula for Group A to Group C, and so on. If you find this process confusing, I recommend reaching out to our support team for further guidance and assistance.
0
Pedro Rodrigues
Arthur Mori as an alternative to what Elaine suggested, a single standard attribute will be enough in the Updates history dataset.
Following more or less the same logic above, you can create a standard calculated attribute to consider only the value for "New value" of group_id that you want.
Example (let's assume Group C has ID = 123456789):
As an example table, we'd add this to our report filters (excluding NULL), add Changes - Previous Value and Changes - New Value to rows and then select the metric to count # updates.
Hope this helps!
0
Arthur Mori
This is amazing Pedro Rodrigues! Thank you! Thanks also Elaine
0
Chad Mitrado
This is not working. The formula returns the agent's name even if they are not the first assignee. Every time “Assignee” becomes NULL, it will consider the next assignee as the first assignee.
I tried to use DATE_FIRST_FIX, but the result is showing a lot of NULL values even if the ticket was assigned to an agent.
Do I need to use Ticket Created - Date or Update - Date in the filters?
0
Pedro Rodrigues
Hi Chad Mitrado , I used your formula and it's working for me, for example, on the following table report:
The output allows me to see the number of tickets where each specific agent was the first assignee, as well as who's currently assigned. Checked multiple tickets specifically and everything looks correct.
Can you please share a screenshot or describe how you're visualizing your output?
0
Boyce Worley
Does anyone have any guidance for creating a report that shows the First Group a ticket was Assigned to and the Group that Solved the ticket? I think I would use the updates history data set > Solved Tickets Metric > Ticket Group (for solving group). But I'm struggling to compose an appropriate formula to show me the first group a ticket was assigned to. I'm trying to avoid anything that requires writing for a specific Group ID since there are over 80+ in my instance and more could be added. Zendesk recommended using DATE_FIRST but I'm completely lost as to how to use that in this scenario.
I tried the below as a custom attribute which sort of worked, but I don't think its quite right. In my results I have tickets that are solved in a Group without any first assigned group showing. When I look at the ticket example I can clearly see that the First Assigned Group is not the same as the Solving Group (Ticket Group).
IF ([Changes - Field name]="group_id"
AND [Changes - Previous value]=NULL
AND [Changes - New value]!="0"
AND [Changes - New value]!=NULL)
THEN [Update ticket group]
ENDIF
0