Tags are words, or combinations of words, that you can use to add more context to tickets. You can assign tags to tickets, users, organizations, and chats. You create, assign, and manage tags in the Zendesk Support console.
Tags are stored differently than other Zendesk objects and might require more consideration when you use them to generate reports. For example, while a ticket can be in only one group or have only one status at a time, a tag can be added to multiple tickets and a single ticket can contain multiple tags.
In this article, you'll learn how you can use tags in your Explore reports and see some examples. You'll also find out what tag information is collected by Explore. For an in-depth look at tags, see About tags.
This article contains the following topics:
Examples for using tags in reports
These examples illustrate the basic operations you can perform with tags in your Explore reports. The Ticket tags attribute is used throughout, but you can apply the same principles to any other tag attribute.
If the tag you intend to use is automatically generated by a field (like drop-down lists, multi-select lists, and checkboxes) consider using the custom field attribute instead. Custom field values load faster and have easily identifiable values. For more details, see Reporting with custom fields.
This section contains the following examples:
Reporting on all ticket tags in use over the last 30 days
This is a simple report that shows all of the ticket tags you're using and the number of tickets that are associated with each tag for the last 30 days.
To show all ticket tags in use over the last 30 days
- Open a new report using the Support - Tickets dataset.
- In the Metrics panel of the report builder, add the metric COUNT(Tickets).
- In the Rows panel, add the attribute Ticket tags.
- In the Filters panel, add the attribute Ticket created - date.
- Click the Ticket created - date filter and configure the date range for the last 30 days.
Your chart will look similar to the following example. You can click the Tickets column heading to sort the list by ascending or descending number of tags.
Reporting on ticket tags using filters
In this example, you'll create a report that uses a filter to return only tickets that contain a specific tag (in this case, checked_by_manager).
Before diving into the example, there are a few important things to note:
- If you want to filter by multiple tags at the same time, use the formula in Finding tickets with multiple tags instead. Selecting multiple tags in the Filters panel multiplies the report's metric values by the number of matching tags. For more information on why this happens, see Why do my metric values increase when I filter my report by multiple tags?
- If you want to check which items don’t have one or more tags, use the formula in Finding tickets that don't have a tag instead. You can't use report filters to exclude tags.
To create the report
- Open a new report using the Support - Tickets dataset.
- In the Metrics panel of the report builder, add the metrics COUNT(Solved tickets) and COUNT(Unsolved tickets).
- In the Rows panel, add the attribute Ticket group.
- In the Filters panel, add the attribute Ticket tags. Then, click this attribute to open the filter menu.
- Select the tag you want to show in the report (in this case,
checked_by_manager).
You'll see a count of tickets that contain the tag you chose.
Reporting on ticket tags using standard calculated metrics and attributes
In this section, you'll learn how to use functions that give you much more power and flexibility when reporting on tags. The basic tag reporting operations are:
- INCLUDES_ANY: Returns tickets with at least one of the supplied tags.
- INCLUDES_ALL: Returns tickets that have all supplied tags.
- NOT INCLUDES_ANY: Returns tickets that don't include one of the supplied tags. If the ticket includes any of the supplied tags, it's excluded.
- NOT INCLUDES_ALL: Returns tickets that don't include all of the supplied tags. The ticket must contain all of the supplied tags to be excluded.
To use these examples, you'll need to be familiar with standard calculated metrics and attributes and understand how to write formulas. Additionally, you can use the wildcard (%) character before or after a tag to return matching results.
This section contains the following examples:
- Finding tickets containing a tag
- Finding tickets that have one of two tags
- Finding tickets with multiple tags
- Finding tickets that don't have a tag
- Finding tickets that have one tag, but don't have another tag
- Finding tickets that contain a specific string in one of their tags
- Finding tickets with no tags
- Returning specific values when a certain tag is present
- Filtering a specific tag from all metrics on a report
- Using INCLUDES in a standard calculated attribute with multiple conditions
- Using INCLUDES in a standard calculated metric
Finding tickets containing a tag
In this example, you want to find tickets that have the tag "united_states". Create a standard calculated attribute with the following formula and use it as a filter in your report.
IF (INCLUDES_ANY([Ticket tags], "united_states")) THEN True ELSE False ENDIF
Finding tickets that have one of two tags
In this example, you want to find tickets that contain one of the tags "australia" or "japan". Create a standard calculated attribute with the following formula and use it as a filter in your report.
IF (INCLUDES_ANY([Ticket tags], "australia", "japan")) THEN True ELSE False ENDIF
Finding tickets with multiple tags
In this example, you want to find only tickets that have both of the tags "united_states" and "italy". Create a standard calculated attribute with the following formula and use it as a filter in your report.
IF (INCLUDES_ALL([Ticket tags], "united_states","italy")) THEN True ELSE False ENDIF
Finding tickets that don't have a tag
In this example, you want to find only tickets that don't have the tag "germany". Create a standard calculated attribute with the following formula and use it as a filter in your report.
IF (NOT INCLUDES_ANY([Ticket tags], "germany")) THEN True ELSE False ENDIF
Finding tickets that have one tag, but don't have another tag
In this example, you want to find tickets that contain the tags "greece" and "india", but don't contain the tag "ireland". Create a standard calculated attribute with the following formula and use it as a filter in your report.
IF (INCLUDES_ALL([Ticket tags], "greece","india")) AND NOT INCLUDES_ALL([Ticket tags], "ireland") THEN True ELSE False ENDIF
Finding tickets that contain a specific string in one of their tags
In this example, you'll use the wildcard character % to find tickets for which the requester tags contains the string "king". Create a standard calculated attribute with the following formula and use it as a filter in your report.
IF (INCLUDES_ALL([Requester tags], "%king%")) THEN True ELSE False ENDIF
Finding tickets with no tags
In this example, you'll create a standard calculated attribute and use it as a filter. This attribute returns the string "No tags" for all tickets that don't have any tags and "Has tags" for tickets that do have tags.
Use the following formula in a standard calculated attribute:
IF (INCLUDES_ANY([Ticket tags], "%")) THEN "Has tags" ELSE "Does not have tags" ENDIF
Returning specific values when a certain tag is present
In this example, you'll see how you can create a standard calculated attribute that tests for the presence of the tag "hawaii" and returns the text "Aloha!" when it is found. If it's not found, the formula returns "Hello". You can then use this in a filter, or add it as an attribute to the Rows or Columns panels in the report builder.
Use the following formula in a standard calculated attribute:
IF (INCLUDES_ANY([Ticket tags], "hawaii")) THEN "Aloha!" ELSE "Hello" ENDIF
Filtering a specific tag from all metrics on a report
In this example, you've created a report that contains several metrics. You want to exclude all tickets that contain the tag Alaska from your results.
Use the following formula in a standard calculated attribute:
IF (NOT INCLUDES_ANY([Ticket tags], "Alaska")) THEN "true" ELSE "false" ENDIF
Now, add this attribute to the Filters panel of your report. Click the attribute you just added and configure the filter to only show True values.
Using INCLUDES in a standard calculated attribute with multiple conditions
- If the ticket contains either of the tags "united_states" or "canada", the attribute returns North America.
- If the ticket contains any of the tags "germany", "france", or "uk", the attribute returns Europe.
- If the ticket contains either of the tags "china" or "japan", the attribute returns Asia.
- If none of the tags are found, the attribute returns Other.
Use the following formula in a standard calculated attribute:
IF (INCLUDES_ANY([Ticket tags], "united_states", "canada")) THEN "North America"
ELIF (INCLUDES_ANY([Ticket tags], "germany", "france", "uk")) THEN "Europe"
ELIF (INCLUDES_ANY([Ticket tags], "china", "japan")) THEN "Asia"
ELSE "Other"
ENDIF
Using INCLUDES in a standard calculated metric
IF (INCLUDES_ANY([Ticket tags], "united_states")) THEN [Ticket ID] ENDIF
Reporting on macros using tags
For an example of how you can report on macro usage by using tags, see Explore recipe: Reporting on macros using tags.
Tag information collected by Explore
The tag information collected by Explore varies depending on the dataset you choose, but includes one or more of the following attributes:
Attribute name | Description | Datasets available in |
---|---|---|
Ticket tags | Returns the tags associated with a ticket. |
|
Assignee tags | Returns the tags associated with an assignee. |
|
Requester tags | Returns the tags associated with the user who requested the ticket. |
|
Submitter tags | Returns the tags associated with the submitter of the ticket. |
|
Ticket organization tags | Returns the tags of the organization associated with the ticket. |
|
Requester organization tags | Returns the tags associated with the organization of the ticket requester. |
|
Updater tags | Returns the tags of the user who updated the ticket. |
|
Updater organization tags | Returns the organization tags of the person who made the ticket update. |
|
Agent tags | The tags associated with the agent for the Knowledge or Knowledge Capture event. |
|
Call agent tags | The tags associated with the agent for a Talk call. |
|
Leg agent tags | Returns the Talk call leg agent's user profile tags. Each person that engages in a call has their own interactions with the system and are considered a different leg by the system. |
|
Organization tags | Returns the organization tags of the call end-user. |
|
Chat tags | Returns the tags applied to a particular Chat session. |
|
78 comments
zAdrian
Hi, Since I couldn't figure out a way to do it, I follow up on my previous question which was answered positively.
In insights it was possible to apply a filter based on tags to an entire query and get for example a heatmap of FRT and corresponding tickets:
Filter:
In Explore I cannot figure it out how I can restrict the FRT only to certain tickets based on tags, like it was possible in Insights and was answered it will be possible.
Can you please help me with this? We have certain tags that we apply manually for example to outliers, so that they are not included in the FRT calculation, for accuracy. Is there a way to be able to have the same result in Explore?
Thanks in advance!
0
Brandon (729)
Hi Adrian
You should be able to select Ticket Tags as a filter to exclude. Hope this helps!
Brandon Tidd
729 Solutions
-1
zAdrian
Hello @... and thanks for the answer !
I guess it was right in front of my eyes, but my mind got biased from Insights that the simple filtering by tags doesn't work. :)
Good day!
0
Saxon Clay
How can I utilize attribute sets or groups in conjunction with "INCLUDES_ANY"?
For example, I've created an attribute set known as 'Ticket Workers' which includes the assignee tags of our various team names. All of these together should report on every member of every team.
I'd like to use this set instead of manually typing out each individual team name, but I can't seem to get INCLUDES_ANY to read an attribute set. For example:
I feel like this would be one of the major benefits of attribute sets but I can't find this kind of function documented anywhere. I feel like there is some way to "pull" values out of a set for comparison purposes, but I couldn't find it.
0
zAdrian
Brandon- I am following up on my previous concern with filtering FRT by tags if you can help please :)
I created a FRT heatmap, that includes also the number of tickets, which I filtered to exclude certain tags (as per advice).
When testing for accuracy, I discovered, as highlighted in the capture below, that there are FRT values for 0 tickets:
When drilling through for that FRT value, I found a ticket with one of the tags which should have been excluded by the filtering. This is the same for all cases where the ticket number is 0 but there is a FRT value in the heatmap: the tag filtering is not applied to FRT.
Am I missing/doing something wrong or the tags filtering functionality doesn't work for all metrics and FRT is among them?
Many thanks!
0
Saxon Clay
@... Tag exclusion filtering doesn't work, this has been a known issue in Explore for at least a year and it doesn't seem like something they'll be fixing anytime soon.
I would recommend instead baking a tag exclusion into a custom metric like so:
I didn't test that myself, but I've used similar metrics to good effect for us when we need to exclude automated nagios uptime tickets and such.
2
Tejas
@Adrian M. did you tried using the Metric filter to remove blank values for number of tickets metric?
1
zAdrian
@... Many thanks for the great suggestion to include the tag exclusion in a metric. The example formula worked for me, with a little change: VALUE instead of MED before (First reply time (min), since I am applying the aggregator in the query.
@... upon your advice, I tried the filter and nothing changed visibly to the heatmap. But the help is appreciated :)
1
James
We want to categorise our tags into 'primary' and 'secondary'. Primary defining the account query, order query, or delivery query. The secondary to outline the specific nature of the ticket i.e 'deliveryquery' 'delayeddelivery'.
Is it possible to search tag 'x' and view all other tags auxiliary to this?
0
Thibaut
Hi James,
I created a ticket for your question so we can look into it better.
Thibaut | Customer Advocate | EMEA
-1
Laurene Dupas
Hi
I would like to make reports in which I exclude all tags containing "autosolve" in them.
We have 16 subsidiaries live on Zendesk right now (on one instance), so we have a bunch of autosolve tags.
Would it be possible to make a formula this way :
0
Saxon Clay
@...
The metric you noted is close but you want to use '%' as the wildcard character instead of '*'. Something like this should do what you're looking for:
1
Laurene Dupas
Thank you @..., I will try it :)
0
bill cicchetti
Can anyone figure out why this custom attribute is not filtering out orgs with any of these tags?
IF (NOT INCLUDES_ANY([Ticket organization tags] ,"yes-hosted","yes","yes-saas")) THEN [Ticket organization name] ENDIF
If I create a report I am still seeing orgs with one of these tags on the org record.
Below are the attributed used and restrictions
0
bill cicchetti
Bumping to see if anyone can offer some advice on this one
Thanks
0
Saxon Clay
@... it's possible it's a syntax issue, I can't tell if the example you provided is actually missing spaces between the tags or if that's just how it pasted.
I created a test attribute on my instance though and this structure worked for me to exclude orgs that included the noted tags:
Double-check that you have spaces between the tags in the INCLUDES_ANY() function, and that the tags are identical to how they appear on the org itself.
0
bill cicchetti
@... It was the spaces (or lack there of)...Thanks!
1
Taline Moroyan
Hi,
I noticed when creating custom metric as suggested in the article the values that appear within the column are 0 and 1. Is there a way I can filter the metric to only show 1 as those are the rows I want to bring up only.
Also, I am trying to recreate the below query from Insights. Do the queries mentioned in the article replace the need to create a query like this one that is pulling only tickets with certain tags? If not, how do you recreate this using the Explorer language?
SELECT IFNULL((SELECT # Tickets WHERE (SELECT Ticket Filter Part 1_KBM_Assigned Tag BY Ticket Id)=1 AND (Select Ticket Filter_KBM_KB Monthly Tag BY Ticket Id)=1 AND (Select Ticket Filter_KBM_Completed Tag BY Ticket Id)=1 AND (Select Ticket Filter_KBM_Published Tag BY Ticket Id)=0), 0)
0
Qin Brian
Hi:
I would like to do as below
Find all tickets with tags of A and B, but without C to Z. In normal cases, there are many tickets containing tags of A and B and C and D. But I would sort out the tickets with only A and B.
Can Zendesk help me?
0
Gab Guinto
Hi Qin,
You can set up your metric using a formula similar to this sample:
This will count tickets that have either or both tags A and B, and does not have the tags C or D. If you have more tags that you need to exclude, then you'll need to list each of them under the NOT INCLUDES_ALL condition.
Hope this helps. Thanks Qin!
0
Sara Ledger
Do we know when there will be an ETA for the Exclude tab for filters will be working correctly so we do not have to create new metrics and attributes as a work around?
0
Dave Dyson
Hi Sara,
There's no ETA for further improvements on tag filtering at this time. For more information see the comments from Eugene Orman and Nicole Saunders in the comments section of this thread, and upvote & follow so you're updated if things change: Exclude ticket tags
0
Matt 🕵️
Greetings!
We were doing our first round of monthly stats since merging over to Explore for fully storing our stats. We noticed that a tag that was assigned to a fan's Twitter DM was counted 3 times because the fan messaged us on 3 different instances (this is fairly common with the nature of our business). Is there a way to filter the counts both when searching for the tags: on Zendesk and in Explore, so we can only count each single use of the tag rather than the cases of the tag being counted multiple times when its carried over on a new ticket?
Thanks a ton in advance!
Matt
3
Stéphanie Cettou
Hello, I modified today my Agents tags, including new tags. However, I have a doubt: will these tags being available to be filtered also on tickets in the past, using the "Attribute name" as "Updater tags" ? Would those be linked and saved to the past update?
Or, Explore will do the link with the Updater name and his actual/new tag?
thank you!
1
Colin-Pierre Larnerd
Hi! Is there a way to combine tags to display as one in queries?
For example, I have two tags I'm using to track the same type of ticket, and I want them to show as one column on my chart.
0
Brandon (729)
Hey Colin,
You should be able to do this via a custom metric or attribute:
To count them
From here you can just rename the column header by clicking on it.
To rename the returned results
Hope this helps!
Brandon
2
Ilaria
Hi! I need some help.
We have a bunch of tickets all containing the same tag (let's say main_tag). Of all these tickets, some contain a tag_A, others contain a tag_B, others contain a tag_C, and others a tag_D. Some tickets also contain multiple tags (ie. tag_A + tag_B).
I'd like to create a pie chart reporting only on the tickets containing main_tag, and finding how many of them have tag_A, how many have tag_B, how many tag_C, and how many tag_D.
I tried by creating a calculated metric with this formula and the COUNT aggregator:
But it's giving me a result that is adding up all the single cases in which each tag was used. Basically, the tickets with the tag main_tag were 22. Of these 22, 19 tickets had tag_A, 7 tickets had tag_B, 11 tickets had tag_C and 13 tickets had tag_D. And this is because many of these tickets have multiple tags.
But Explore is adding up all the numbers and it's doing 19+7+11+13 = 50, showing as if we received 50 tickets with the main_tag. How can I make it so that it calculates the pie and the percentages on the total 22 tickets?
Hope my question was clear. Thanks!
0
Saxon Clay
Ilaria Am I understanding correctly that there isn't actually a single "main_tag" in your example, but instead that "main_tag" is a 'base' and there's several possible variations of it? (ie tag_a, tag_b, etc)? Or that there is one main_tag which will always have accompanying "supplemental" tags - tag_a, tag_b etc
In either case, that you have so many tickets where multiple of these tags are applied and you don't want them overlapping (50 total tickets instead of 22 as described) then you need some sort of "prioritization" to determine that if a ticket has tag_a AND tag_b, which part of the pie chart do you want it represented in?
My first thought with what you presented in your comment is that the formula would work with the "D_COUNT" aggregator instead of COUNT, which will return distinct ticket IDs instead of a ticket ID for every match. Though I don't know if this alone would solve the problem with multiple tags appearing.
If you want to use some kind of tag prioritization I think a custom attribute would be the best approach where each 'supplemental' tag is listed out in an if/then/else structure like:
I haven't tested this but in theory it should give you back an attribute set that includes each _Aa tag that's grouped hierarchically in the order defined in the attribute.
If you can shed a bit more light on the setup and what you're trying to achieve I can try and help further.
0
Ilaria
Saxon Clay it's the second thing: there is always one main_tag which will always have accompanying "supplemental" tags - tag_a, tag_b etc. So all 22 tickets contain the tag main_tag, and then some of them have tag_A, others have tag_B, and so on.
I'd like to have all numbers reflected, and not define any prioritization, so maybe the pie is not the correct type of visualization for what I need? Basically I want a report that says:
and it doesn't matter if one or more tickets are repeated in this count. I already tried with the D_COUNT but it didn't work.
0
Saxon Clay
Ilaria I played around with the pie graph a bit but it seems the standard behavior is to aggregate all your values together (50 tickets) instead of referencing the actual total and I couldn't find a way around that behavior.
I think a regular table would work the best in this case. Using the metric you already built, and then using 'ticket tags' as the Row attribute you can select just the tags you'd like to display, then possibly change it to an Ordered Set attribute if the default listing isn't in the order you want.
To avoid manually selecting individual labels, or going back and updating it whenever a new label is added, you could make a custom "tag_%" attribute assuming all of the attributes actually follow a similar naming convention.
This would return all ticket tags in a filtered down attribute that match the "tag-" naming convention, and would automatically update to include any new tags.
2