Tags are words, or combinations of words that you can use to add more context to tickets. You can assign them to tickets, users, organizations and chats. You create, assign, and manage tags in the Zendesk Support console. Tags are stored differently to other Zendesk objects and might require more consideration when you use them to generate reports. For example, while a ticket can only be in one group, or have 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
Use these examples to help you learn about the basic operations you can perform with tags in your Explore reports. If you need more help creating reports and formulas, see Creating reports and Writing Explore formulas.
For a useful example of how you can use Explore to report on macro usage by using tags, see Explore recipe: Reporting on macros using tags.
These examples are all based on the Ticket tags attribute, but you can apply the same principles to reporting with any other tag attribute.
This section contains the following examples:
Show all ticket tags in use over the last 30 days
This is a simple report that shows all of the ticket tags you are 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 any of the tags you choose, in this case tickets that contain any of the tags checked_by_manager, close, or csat. For a more flexible way to report on ticket tags, see Reporting on ticket tags using standard calculated metrics and attributes.
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 tags you want to show in the report, in this case
checked_by_manager, close, and csat.
You'll see a count of tickets that contain one or more of the tags you chose.
Reporting on ticket tags using standard calculated metrics and attributes
In this section, you'll learn how to use Explore's INCLUDES_ANY and INCLUDES_ALL functions to give you much more power and flexibility when you work with tags. To use these examples, you'll need to be familiar with standard calculated metrics and attributes in Explore and understand how to write formulas. The basic tag reporting operations are:
- INCLUDES_ANY: Returns tickets with 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.
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
- Using INCLUDE in a standard calculated attribute
- Finding tickets with no tags
- Using INCLUDES in a standard calculated attribute with multiple conditions
- Filtering a specific tag from all metrics on a report
Finding tickets containing a tag
In this example, you want to find tickets that have the tag "united_states". Use the following formula in a standard calculated metric with the COUNT aggregator:
IF (INCLUDES_ANY([Ticket tags], "united_states")) THEN [Ticket ID] 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". Use the following formula in a standard calculated metric with the COUNT aggregator:
IF (INCLUDES_ANY([Ticket tags], "australia", "japan")) THEN [Ticket ID] 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". Use the following formula in a standard calculated metric with the COUNT aggregator:
IF (INCLUDES_ALL([Ticket tags], "united_states","italy")) THEN [Ticket ID] 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". Use the following formula in a standard calculated metric with the COUNT aggregator:
IF (NOT INCLUDES_ANY([Ticket tags], "germany")) THEN [Ticket ID] 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". Use the following formula in a standard calculated metric with the COUNT aggregator:
IF (INCLUDES_ALL([Ticket tags], "greece","india")) AND NOT INCLUDES_ALL([Ticket tags], "ireland") THEN [Ticket ID] 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". Use the following formula in a standard calculated metric with the COUNT aggregator:
IF (INCLUDES_ALL([Requester tags], "%king%")) THEN [Ticket ID] ENDIF
Using INCLUDE in a standard calculated attribute
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
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
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
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.
Tag information collected by Explore
The tag information collected by Explore varies depending on the dataset you choose, but will include one or more of the following attributes:
Attribute name | More information |
---|---|
Ticket tags | Returns the tags associated with a ticket. Available in the Support: Tickets, SLAs, Updates history, Guide: Answer Bot, Guide: Knowledge Capture, and Talk: Calls datasets. |
Assignee tags | Returns the tags associated with an assignee. Available in the Support: Tickets, SLAs and Updates history datasets. |
Requester tags | Returns the tags associated with the user who requested the
ticket. Available in the Support: Tickets, SLAs, and Updates history datasets. |
Submitter tags | Returns the tags associated with the submitter of the
ticket. Available in the Support: Tickets, SLAs, and Updates history datasets. |
Ticket organization tags | Returns the tags of the organization associated with the
ticket. Available in the Support: Tickets, SLAs, and Updates history datasets. |
Requester organization tags | Returns the tags associated with the organization of the ticket
requester. Available in the Support: Tickets, SLAs, and Updates history datasets. |
Updater tags | Returns the tags of the user who updated the ticket. Available in the Support: Updates history dataset only. |
Updater organization tags | Returns the organization tags of the person who made the ticket
update. Available in the Support: Updates history dataset only. |
Agent tags | The tags associated with the agent for the Knowledge or Knowledge
Capture event. Available in the Guide: Knowledge Capture dataset only. |
Call agent tags | The tags associated with the agent for a Talk call. Available in the Talk: Calls dataset only. |
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. Available in the Talk: Calls dataset only. |
Organization tags | Returns the organization tags of the call end-user. Available in the Talk: Calls dataset only. |
For a full list of metrics and attributes you can use in Explore, see Understanding Explore datasets.
38 Comments
Hi everyone,
I would like to count the number of tickets solved or closed that do not contain the tags "system_email" Or "system_emaill". Can you help me with the syntax please as it seems not be working like that :
IF (([Ticket status - Unsorted] = "Solved" OR [Ticket status - Unsorted] = "Closed")
AND (NOT INCLUDES_ANY([Ticket tags], "system_email,"system_emaill"))
THEN [Ticket ID]
ENDIF
Thank you very much for your help.
Elsa
We would like to hide certain tags in report visualizations ( but not exclude the tickets that contain those tags). Our tickets often contain multiple tags, and we want to display ticket counts for certain tags, but not remove tickets that don't have those tags, so the "exclude" concept doesn't apply here.
Is there a setting in the visualizations that will allow us to do this?
It looks like you're missing a quotation mark and a closing parenthesis.
You can try this:
You can use the native Ticket tags attribute as filter, then under Selected, click Select all.
Make sure to go through all pages –
– and tick the box for Select all on each page.
When you see that all tags have been selected, you can then manually search for tags that you need to hide and untick them. This way, those tags will be not be displayed in the report; tickets that have the ticked/selected tags will still be included in the report even if they contain the tags that you intend to hide. Note that whenever a new tag is created, you need to revisit this filter to select the newly created tags.
Hope this helps.
Does anyone have any recommendation (recipe to share) about how to retrieve specific reports based on tags? Would be highly appreciated.
TIA
Edu Castanon Drack
Can you elaborate on what exactly you're trying to accomplish?
Ansolutely, Saxon Clay.
We have several tags that, by automatizations are linked to several macros, which are added when the tickets are answered. These tags are linked to statuses, bugs, and main words of inquiries, that we want to control on a daily, weekly, and monthly basis, and see where we need to spend more time on teaching and feeding the Help Center of our company, so our clients can rely on that information and not asking over and over questions that can be answered just reading a good article. Hope this makes more sense
Edu Castanon Drack
If each of the macros have their own tags associated to them then I'd approach it like so:
Create an Attribute Set (Calculations > Set under Attributes) that includes only the tags you're interested in. This is easier to manage than using the general Tags attribute and trying to filter down each one.
Past that, use Solved Tickets as your Metric, Ticket Solved - (Date/Week of Year/Month) as your Column attribute, and the custom tags attribute set as the Row attribute. I'd use a line graph, and multi-select all of the tags you want to review to see the trending over time rate of solved tickets having each of those tags on them.
I hope this helps get you in the right direction!
Please sign in to leave a comment.