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 queries and formulas, see Creating queries 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 query using the Support: Tickets dataset.
- In the Metrics panel of query 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 query 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 query
- Open a new query using the Support: Tickets dataset.
- In the Metrics panel of query 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 query
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 query 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 query
In this example, you've created a query 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 query. 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, Ticket Updates, 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 Ticket Updates datasets. |
Requester tags | Returns the tags associated with the user who requested the ticket.
Available in the Support: Tickets, SLAs, and Ticket Updates datasets. |
Submitter tags | Returns the tags associated with the submitter of the ticket.
Available in the Support: Tickets, SLAs, and Ticket Updates datasets. |
Ticket organization tags | Returns the tags of the organization associated with the ticket.
Available in the Support: Tickets, SLAs, and Ticket Updates datasets. |
Requester organization tags | Returns the tags associated with the organization of the ticket requester.
Available in the Support: Tickets, SLAs, and Ticket Updates datasets. |
Updater tags | Returns the tags of the user who updated the ticket.
Available in the Support: Ticket Updates dataset only. |
Updater organization tags | Returns the organization tags of the person who made the ticket update.
Available in the Support: Ticket Updates dataset only. |
Agent tags | The tags associated with the agent for the 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.
64 Comments
Question:
I have a query set up that counts tickets created by org in three ways. 1) total tickets for the org, 2) tickets with a certain tag, and 3) tickets without the same tag. All of this works fine.
However, I now need to exclude (at a global level in my query) all tickets created where the org name is NULL, in which case there is also a tag applied to the tickets ("email_ticket"). These are tickets that we auto-close when someone else's ZD instance starts auto-responding to our tickets to avoid an endless loop.
My problem is: I cannot see a way to exclude tickets where org name = NULL/empty (although I could do this in Insights). OR, if I have to use the "email_ticket" tag and exclude it from all three counts, what is the best way to do that?
The above is deeply frustrating. :(
Hi Ellen,
If I am understanding correctly I believe you may be able to achieve your end goal by navigating to your Result Manipulation options and hide columns/rows. More information on this process can be seen here - https://support.zendesk.com/hc/en-us/articles/360022366993-Hiding-rows-and-columns
You would need to identify the appropriate column or row that is tied to null value Orgs and hide that from your table.
@Oliver
I'm sorry to hear of the frustrations! I can understand the need to be able to report on that and strongly recommend you submit your feedback to our Explore feedback forums https://support.zendesk.com/hc/en-us/community/topics/360001200913-Explore-Product-Feedback-and-Discussion
Hi Dan-
I did look at the hide rows/columns option, but I don't know how that would work. My results by default are sorted by number of tickets, so the row that contains the NULL org is not always the same row. Any other thoughts?
Hi Ellen, thanks for your patience.
This seems tied to an ongoing investigation with our Explore, so I have created a ticket on your behalf and escalated it to our Engineer team!
Is it possible to change what the tag says when displayed in a dashboard? For example, I have a system whereby a tag is added to a ticket based on what the customer selects as the contact reason. I have a query to pull counts of these tags so we can see why customers are contacting us. However, my naming convention for the tags (to make them easy to identify) is contact_reason_general_inquiry, contact_reason_return etc etc. Is there a way to change the name of the tag displayed in the dashboard/query to make them easier to read, ie. 'general inquiry', 'return' etc?
Thanks!
Fiona
Hi Fiona,
For my reports I rename my tags with the 'Renamed set' feature. Hope this helps!
https://support.zendesk.com/hc/en-us/articles/360022367993-Explore-recipe-Using-renamed-and-ordered-sets-to-change-displayed-values
Regards,
Laura.
Oh my goodness! Thank you so much, I wouldn't have known what to search to find that article. Very helpful, thank you!
Fiona
How can I do something like this https://support.zendesk.com/hc/en-us/community/posts/360002299947-Creating-Groupings-for-Tags?page=1#community_comment_360005430673 in explore?
Hi Jessie, I answered you in another thread here, but posting this for posterity!
For reporting on groups of tags in a ticket, you can use the metric below:
IF (CONTAINS([Ticket tags],"vip") AND CONTAINS([Ticket tags], "laptop"))
THEN [Ticket ID]
ENDIF
Let me know how you go with this.
Hi,
I have followed the instructions in this article to use a standard calculated metric to show tickets with a specific tag but it is not working. I have used the formula provided in the example: IF ([Ticket tags]="csat") THEN [Ticket ID] ENDIF and have obviously added in my own tag in the place of csat. It looks like this:
IF ([Ticket tags]="tasks_created_subticket") THEN [Ticket ID] ENDIF
When I follow the subsequent instructions to use this in a query, it is not producing any results and I receive this error:
Please help.
Hello Jessica,
I made a custom metric as you suggested to Jessie, so like this:
IF (CONTAINS([Ticket tags],"vip") AND CONTAINS([Ticket tags], "laptop"))
THEN [Ticket ID]
ENDIF
But it can't make it work: I always get 0 results. I think this is due to a technical limitation on Explore, since this article also says that "You cannot currently filter a query to return tickets that have two or more specific tags (an AND condition)."
Is this the case? Is the Explore team going to implement this feature in the future?
We make many reports based on multi-tag analysis so it'd be really useful for us.
For instance, in Insights we successfully created a report that tells us which ticket tags are in use (so just like this example), but it also limits the results to the ticket that already have another tag.
I.e. this way we can check which tags are used just in the tickets that are already tagged with "laptop", instead of making the system search in the whole database. If a ticket is tagged with "laptop" AND "vip" and 3 other tickets are tagged with "laptop" AND "hardware" the report would return "1" for the row "vip" and "3" in the "hardware" row, but it wouldn't consider other tickets that haven't the "laptop" tag. I hope this is clear enough.
Thank you.
Hi Erin,
The error “Only partial results are visible for this query because the underlying SQL returns more than 50,000 rows. To limit the performance issue, each delegated SQL query is restricted to 50,000 rows” means that the query you are trying to run is too large. For the sample you provided, you may add a date filter for the query to work. Per testing in your account, the error happened probably because using the metric on its own is too much data. In other words, the data is too large sans date filtering.
Thank you.
Hey Francesco!
We've already reviewed this in a ticket separately but I'm posting here as well after stumbling upon your question for visibility to others.
After having reviewed the end goal of the reports you were looking to replicate we were able to confirm that the issue you were seeing was the limitation outlined in the notes of this article. Our teams are aware of this limitation and working to ensure that this type of reporting can be achieved within Explore in the future.
hey!
I dont get [Ticket tags] instead i have option of [Obsolete - Ticket tags]. Can someone help?
I am also experiencing issue where Obsolete - Ticket tags has appeared in my report. They were not labeled Obsolete previously.
Hi Mandvi, Roslyn, thanks for reaching out. We will soon be releasing new versions of the datasets. Among other changes, we will be introducing new versions of the Tags attributes, which will - eventually - give you more flexibility to build complex queries. However don't worry, the legacy / obsolete Tags attributes will still work.
Vincent,
Will there be any information related to what this new flexibility will be released alongside the new dataset? Also, do we have to clone our queries into the new dataset?
Hi Devon, we're working on better tag conditions, which will enable you to report on combinations of presence & absence of specific tags. The availability timeline of this new functionality is TBC and will be based on these new tag attributes. These attributes will automatically appear in all prebuilt & managed datasets. If your queries are already in these datasets, you will not need to clone/move them.
Hi Vincent,
Will this also include reporting on presence & absence of tags containing specific strings/starting with a specific string? That would be very helpful for us.
Vincent,
Would this new functionality allow us to ignore a certain subset of tags when running reports on tags.
We use a specific report to ensure our tickets are being tagged, we would like to be able to see all tickets that only have user tags applied.
Hoping for good features from this functionality. Will it include being able to add a data filter of tags so we can see the instances of tickets with tag __ over time?
Hi Lotte, while 'partial' match will unlikely make it in the first release, it's on the backlog (no ETA yet)
Hi Liam, I'd need more information to ensure I get your use case right. Among the use cases we're looking at, you will be able to pull all tickets which do not have a specific set of tags. You'd therefore be able to pull a list of tickets that include specific user tags and that are missing other specific tags. That should help you verify that your tickets are being tagged correctly. Does that make sense?
Hi Ayal, you will be able to plot your data as time series, which will enable you to visualise the volume of tickets with tag X created by month/week.
Thanks, Vincent!
Do you have an estimated ETA for the first release?
We are planning to ship the first release by end of year. We should have more information on the timeline by end of September '19.
This statement is so incredibly frustrating: "Because of the way tags are stored, you cannot use filters to exclude tags from a report."
I have no way of filtering out tickets that are outliers that are negatively effecting our First Reply Times and other metrics because Zendesk can't perform a basic function of excluding tags.
This is basic functionality that even Help Scout had when we used that Help Desk.
See Community Feedback thread here: https://support.zendesk.com/hc/en-us/community/posts/360029386094-Exclude-ticket-tags
So, if I understand correctly, it's currently not possible to break down a group of tickets sharing the same tag into smaller groups based on other tags (so search for tickets which share two or more tags).
"We are planning to ship the first release by end of year. We should have more information on the timeline by end of September '19."
Is the release including this feature still scheduled for 2019? Or did it change?
Hi Judd, Julia, thanks for reaching out. We are actively working on tag reporting and are planning to launch an EAP by the end of year. Thank you for your continued patience
Is there a way to see the following data?
Hey Laura,
Let me know if you have any other questions for me!
Please sign in to leave a comment.