How to report on agent updates in Explore (when Agents have been downgraded to End users)?
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.
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]
Non-Agent Org updates
IF ([Updater organization name] != "The Agent Org"
AND [Updater role] = "End-user")
THEN [Update ID]
Creating a Query that does a distinct count on those metrics lets you accurately report on end-users vs. agents updates.
Thanks for posting this, Jacob!
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?
Great recipe, Jacob! Thanks for sharing it.
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!
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.
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:
IF ([Updater organization name - Unsorted] = "The Agent Org")
THEN [Update ID]
I've added a note and linked to your comment in the post.
Thank you! I will checkout the solution.
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?
That can depend on what you did with the agent. We recommend reassigning any non-Closed tickets, downgrading the agent to End-user, and then suspending the agent's access: see Best practices for removing agents
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.
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.
Please sign in to leave a comment.