Recent searches
No recent searches
How to report on agent updates in Explore (when Agents have been downgraded to End users)?
Posted May 13, 2020
The issue
The standard recommended approach when an agent leaves your Zendesk, is to downgrade them to the End-user role and suspend that user.
This has an impact on historical data in Explore, however, since that user is no longer an agent, any query that reports on updates (like comments) by agents/end-users will be inaccurate.
The former-agent updates will count as end-user comments.
Above you can see two updaters (Updater name)
- "Sample customer" (end-user)
- "Tom WAS an agent" (former agent, now an end-user)
You'll notice that all updates show up as End-user updates, even though Tom was an agent when he made those updates.
A solution (workaround)
One possible way to get accurate counts of updates is to create an Organization that all agents (and former agents) are part of and use this as a way to filter updates properly.
So when you downgrade and suspend an agent, that user remains part of The Agent Org and their updates are counted as such.
The metrics
I created two new calculated metrics to precisely capture updates from users as they were at the time their updates were made.
Note: Eugene Orman recommends using the base attributes when defining the custom metrics for speedier calculations. See his example in the comment below.
Agent Org updates
IF ([Updater organization name] = "The Agent Org")
THEN [Update ID]
ENDIF
Non-Agent Org updates
IF ([Updater organization name] != "The Agent Org"
AND [Updater role] = "End-user")
THEN [Update ID]
ENDIF
Creating a Query that does a distinct count on those metrics lets you accurately report on end-users vs. agents updates.
2
11 comments
Nicole Saunders
Thanks for posting this, Jacob!
0
bill cicchetti
Good to know!
On that note: When an agent is reassigned as an End User (or in some cases Light Agent) what other effect does it have on reporting on agent tickets? For example does it effect your total ticket counts such as # open #solved?
0
Jennifer Rowe
Great recipe, Jacob! Thanks for sharing it.
0
Rob Stack
Hi Jacob, I love this recipe. Thank you for posting it!
I've referenced it in the community section of our Explore recipes reference page to help more people find it.
Explore recipes reference
Again, thanks so much for posting!
1
Jacob the Moderator
Thank you all.
@...
The agent downgraded to end-user action only affects queries and metrics that include a filter for those roles.
While it is possible to have such filters applied on ticket counts, it shouldn't have an impact on your total ticket count.
If you have the option of downgrading to Light-agents, that will probably be the best solution - the above workaround will not be necessary in that case.
I hope that helps.
0
Eugene Orman
@...
This is a great workaround. Thank you!
Just a small suggestion. To make the calculations as fast as possible the best is to use the base attributes. In this case, it is better to use [Updater organization name - Unsorted] instead of [Updater organization name].
So, the example formula will be:
1
Jacob the Moderator
Thanks, @...!
I've added a note and linked to your comment in the post.
0
Bill Hollowsky
Thank you! I will checkout the solution.
0
Ed Ball
Quick question...
If we have an agent that answered some tickets in January. At the end of that month the agent left the company. The ORG they were assigned to was removed along with being changed to an end user. Will that persons work be counted if we report on 'Last Month' in February?
0
Dave Dyson
If you deleted the agent entirely, then any non-Closed tickets assigned to the agent would have been reassigned to their Group: What happens to the tickets of a deleted user?
At this point, it's likely that those tickets they answered would be closed already, and Closed tickets can't be modified, so they'd remain assigned to the agent.
0
Dwight Bussman
One small security-related caveat on this flow - you may want to make sure that the organization to which both agents/end-users belong is set such that users only have access to view their own tickets.
![](/hc/user_images/CRRuua_OcIbKtDf6zggdqA.png)
0