
Overview
Objective: Report on user and/or organization tags in Insights
Conditions
MorgWard 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.
Comments
0 comments
Please sign in to leave a comment.