Overview
Objective: Report on user and/or organization tags in Insights
Conditions
Zendesk Professional or Enterprise account with access to Insights.
Procedure
Reporting on tags is tricky in Insights. That's because a ticket, user, or organization can have any number of tags at the same time. You need to be able to report on a single tag, even if there are a dozen or more.
To make this possible, Insights stores tag data in separate datasets. That allows you to report on individual tags, but it also means that you need to take some extra steps. Tag data will not work correctly in a report unless the metric is connected to the right dataset.
We have a detailed recipe article about reporting on ticket tags. It covers the logic behind tag reporting, and it goes through several example recipes. If you want to report on tags, keep this article handy: Reporting on tickets with one or more tags.
User tags and organization tags follow the same logic as ticket tags, but they need one extra step. That is because the default # Tickets metric is already connected to the Ticket Tag dataset. The default # Users and # Organizations metrics are not connected to their tag data. You will need to create new versions of those metrics first.
The new user and organization metrics should look like this:
- # Users (with tags)
- SELECT COUNT(User, UserTagId) WHERE User Active = true AND User Tag Deleted Flag <> true
- # Organizations (with tags)
- SELECT COUNT(Organization, OrganizationTagId) WHERE Organization Deleted = false AND Organization Tag Deleted Flag <> true
These metrics link users with user tags and organizations with organization tags. Once you have these, you can create metrics that filter for a certain tag. The filter metrics should look like this:
- # Users with user_tag
- SELECT IFNULL((SELECT # Users (with tags) WHERE User Tag = user_tag), 0)
- # Organizations with org_tag
- SELECT IFNULL((SELECT # Organizations (with tags) WHERE Organization Tags = org_tag), 0)
These metrics count the number of users or organizations with a particular tag. If the tag isn't present, the metrics return a 0.
In filters, when you set one of these metrics equal to 1, it means the tag is present. When you set the metric equal to 0, it means the tag is not present. You can use these metrics in numeric range filters or within other metrics.
For examples of how these filters look in reports, check out the article about reporting on tickets with one or more tags.
30 Comments
Would the Records of User Tags be located somewhere else? I don't seem to have it available.
@Gabriel - I found that instead of "Records of User Tags" and "Records of Organization Tags" you can use "UserTagId" and "OrganizationTagId", respectively. Our instance is also without the Attributes described in this article.
@Amy - This may be a good article update.
Hi Brent! Hi Gabriel!
Brent is correct - those are the correct attributes. There was a weird issue with a recent template update. It temporarily changed the labels of several key attributes, including UserTagId and OrganizationTagId. We've since fixed the template issue and reverted attributes to their original names.
It looks like this article picked up the "Records of" labels during the changeover. Sorry about that! I've updated the article. Thanks for bringing this to our attention!
I hope this helps! Happy reporting!
Hello there,
is there any way to get the actual value of a tag into the report?
So far I only managed to filter the number of tickets by specific tags (for example, exclude the tickets that were closed by merge, they use the tag closed_by_merge)
Background:
We use a lot of organizations within Zendesk.
Every organization has tags / attributes like
and so on.
We want to create a report that is a table that shows every organization with all the attributes above.
However, we cannot find any of those attributes when creating a new report.
How can I add those attributes into the report table?
Can this be achieved witch custom metrics?
We would very much appreciate any help regarding this!
Regards, Chris
Hi Chris! As long as you use a metric that connects to tag data, you should be able to display tags in the report.
It looks like you're interested in organization tags. In that case, create the # Organizations (with tags) metric from the recipe above, then set up this report:
WHAT - # Organizations (with tags)
HOW - Organization, Organization Tags
This will show you the tags for each organization (along with any other organization fields you add under HOW).
Please note: All organizations, users, and tickets start with a placeholder N/A tag value, which is removed when tags are added. If some of your organizations don't have tags yet, you may see a lot of N/A values. In this type of report (and this type of report only), you should be able to add a list of values filter to exclude the "N/A" tag.
I hope this helps! Happy reporting!
Dear Amy,
thank you very much for your reply, I really appreciate it.
I tried my best to create the # Organizations (with tags) metric, but I just cannot figure out how to add the yellow true and false:
Please could you advice how this can be achieved?
Kind regards, Chris
Hi Chris! Those are attribute values. When you click "Attribute Values," it will appear to show you the attribute list again. That's normal. You need to select that attribute you put in the metric. That should show you all available values for that attribute.
For this particular metric, "false" and "true" can be found here:
I hope this helps! Happy reporting!
Hello,
I'm trying to create a report that will list out all open tickets for Organizations that have some particular tag. I'm completely new to this, so can you please help me out and give me some suggestions? Thanks a lot.
Hi Nikola,
Welcome to the community!
Keep in mind that Insights doesn't offer a real-time view of your data. Depending on whether you're on a Professional or Enterprise plan, the data will sync once a day or once an hour respectively.
So you may not get the precise state of the tickets in the report (they could have been solved in the meantime), only the state they were in at time of the last sync.
If you're familiar with creating a custom report, one way of creating the report would be the following.
WHAT
HOW
FILTER
This will give you something like the following:
Hope that helps you out.
I am looking to build two metrics:
1) # Tickets Solved where Assignee has a tag of external_support
2) # Tickets Solved where Assignee does not have tag of external_support
Can someone assist with the SELECT statements?
Hi Greg,
Is the tag you want to report on added to the ticket or is it only applied to the agent?
In the first case it should be simple enough to create a metric, in the second case I don't think it's possible - at least I would not know how to go about it.
Ideally on the agent. I am looking to run a report showing a vertical bar graph with two bars for each month. First set of bars would be for internal agents and second bar would be for external agents. Initially I was hoping to distinguish agents by different agent tags but I am open to other suggestions.
For clarification:
When you speak of External agents, is that
If the first, I would think there should be some structure to distinguish internal and external support tickets - could be that they are of different brands or if on the same brand, they could be assigned to different groups. Both brand and group structures would be easier to report on than an agent tag.
If the second, I think some kind of tag or field value would need to be applied to the ticket before or during solving of the ticket.
I hope to have more specific advice with the above clarification in place.
Thanks for the response. It is the second scenario.
So there is no way to group by the agent and instead only be able to group by ticket value. The problem with this is I am not able to group by any of the historical solved tickets.
Hi All,
I spent so much time to find out a metric which will show a number of active organizations per month.
I have tried several customs approaches but did not work. I struggled with this.
My question is if anybody was able to achieve a metric that will show a number of active organizations monthly?
Any pieces of advice would be appreciated.
@Zendesk - this is really incomprehensible that this basic metric is not available by default.
Hi Tomasz,
Perhaps this is not the best way, but here is how I do a similar thing (number of active end-users per week).
If you go to: Admin -> Manage -> Reports you can download user xml report. You will receive users and organizations list. Using excel documents, you can combine both xmls and get lots of information. In the users list, you have "last sign in" date and organization IDs. Using VLOOKUP excel function you can combine users with organizations by checking organization ID.
This requires some manual work, it's a little bit tricky but I manage to get the metrics I want. I didn't find some other option, but perhaps some else did :)
Hi Tomasz!
How are you defining whether an organization is active? Is it whether they've submitted new tickets, or updated existing tickets? Or something else?
@Jessie
The active organisation for me means that it is not deleted.
The major problem here is to measure how many organizations were active (created and not deleted) ina agiven time, e.g. monthly:
January: 10
February: 15
March: 20
April: 45
May: 47
June: 40
July: 60
I truly believe that this is a basic function for help desk system.
Hi Tomasz! That should be possible. The default # Organizations metric excludes organizations that have been deleted. We also have organization date dimensions, so you can see when organizations were created or updated.
Try setting up this report:
That should give you a solid place to start.
For more information on dates, check out our article on Insights date dimensions. Also, since you're working with organization details, make sure you stay aware of the difference between Ticket Organization and Organization.
I hope this helps! Happy reporting!
Hi Amy,
I tried this solution about 999 times, but this is not what I am looking for.
The report you offered will show how many organizations were created each month, not how many were active per month.
I am interested in a solution that will show me how many organizations were active in a given month.
You can have 2 org created in November, and this will be displayed on your chart.
However, when you had 4 organizations created in October, they would not be included in this chart and not counted together. I want to have 6 organizations active in November in this scenario.
Do you see my point?
Hi Tomaz! Thanks for clarifying! I understand what you're trying to do now.
Unfortunately, there isn't going to be an easy way to get this with Insights. The Zendesk API (which populates Insights) is focused on changes. If an organization/user/ticket doesn't change, it doesn't generate any new records that reports can see. That means there aren't any default elements that capture organizations that simply existed on any given date.
Insights does have a backlog dataset for tickets that show how many tickets existed at the end of each day. The dataset is created through a complex ongoing rollup calculation based on ticket events. At this time, we don't have an equivalent dataset for users or organizations. It may be possible to build your own backlog model using the incremental exports API to capture this information, but that would be done outside Insights.
You could also generate a report that shows how many organizations submitted tickets in any given month. It wouldn't catch organizations that existed without any interactions, but it may be more accurate than simply listing organizations by creation date. For this approach, I recommend using our recipe on finding how many users submit tickets, but using the Ticket Organization attribute instead of the User attribute.
I hope this helps! Happy reporting!
Is it possible to search users by User Segment? We didn't see this option in the frontend or via API and I don't think it's technically a tag. Thanks!
Hey Jessica -
Not really. There are some things around user segments available in the API, but I don't know if they'd get what you need.
What are you trying to accomplish?
We're trying to export a list of users that are members of a given User Segment - is that possible?
Hey Jessica -
It's not built into the UI, but you should be able to accomplish this using the Customer Lists add-on. It doesn't search by segments directly, but segments are delimited by either tags on the user profiles or by organizations, so you would be able to use it to search by either of those functions, depending how your segment is set up. Do note, however, that since it's an add-on, it would include an additional cost.
Hi,
i cant get this to work.
Hi Christer! It looks like you copied and pasted the metric into the metric editor. You need to select the color-coded items from the Elements list on the right.
In this case, User, UserTagId, User Active, and User Tag Deleted Flag are all under Attributes. The first true is under Attribute Values > User Active, and the second true is under Attribute Values > User Tag Deleted Flag.
We have more information in this guide on Creating custom metrics in Insights.
I hope this helps! Happy reporting!
Hi Amy,
Thanks. i thought it supported copy/paste, i managed now.
are these data live data?
Hey Christer,
If you're on the Professional plan you're data will sync up once after 24 hours and the Enterprise plan will sync once every hour. More information can be found in our How frequently does my Support data sync to my Insights project? article.
Let us know if you have any other questions :)
how can you do this in Explore?
Please sign in to leave a comment.