Disclaimer: This article is provided for instructional purposes only. Zendesk does not support or guarantee custom reports. Please post any issues you have in the comments section or try searching for a solution online.

Overview

Reporting on ticket tags in Insights when taking one of the following actions:

Conditions

Procedure

Reporting on tags is tricky in Insights. There can be any number of tags on a ticket at the same time, and you may need to report on any one of them.

To make this possible, tag data is stored in its own dataset. While this gives you the ability to report on individual tags, regardless of how many tags are on each ticket, it does mean you need to take some extra steps.

This article just covers the basic recipe. For more information about how tag reporting works, including the logic behind this recipe and some specific examples, check out this article: Reporting on tickets with one or more tags.

Create a custom metric for each tag

You need to create separate metrics for each tag you want to include in reports. The metrics should all follow this template:

SELECT IFNULL((SELECT # Tickets WHERE Ticket Tag = your_tag),0)

Replace your_tag with the tag you want to use in the report.

This metric will return a 1 for tickets that do have the tag and a 0 for tickets that don't have the tag. That means you can use it to include or exclude tickets based on their tags.

There are two main ways to do this:

1. Add a numeric range filter to the report

For the attribute, select Ticket Id.

For the metric, select your custom tag filtering metric.

For the range, there are two options:

Select "is equal to 1" for tickets that do have the tag.

Select "is equal to 0" for tickets that do not have the tag

This will filter the whole report based on the tag in your metric. This is useful if you want to compare several different metrics with the same tag restrictions.

2. Nest the tag filter in a custom metric

This will vary a bit, based on the metric. However, the tag filtering portion should follow this template:

Hi Amy, first of all, thanks for helping me in the past with my questions. I am curious why the new metric i created which fetches tickets with tags does not show up as under metric when i tried to generate a report? It is as if the new metrics created needs time to be synced or uploaded into a database before i could use it.

I noticed the same delay when i modify my ticket fields, specifically the ticket type which i have custom types setup, that the newly added/modified value does not show up as an option until the next day. Is this something today with the syncing? Is there a way to see or get live data whenever viewing Insight?

Based on what you've indicated in your first paragraph, it sounds like you might have made the metric report-specific. If you create a metric within a report, it has to be saved globally in order to be found in other reports. You can edit the created metric within your report, though, and save it globally:

As far as your question in the second paragraph-- if your account is on Plus or Professional, your project is only syncing once per day; hourly on Enterprise. If you make new ticket fields/adjustments to existing fields, they will need to be used in a ticket and then that ticket needs to sync to your project before you can find that information.

Hopefully this helps clear things up, but please let me know if you have any other questions or concerns!

Thank you for your input, it does make sense and i was able to fix the ones related to global metric. The syncing once per day is not as convenient and i didn't expect that to be an Enterprise feature but it is what it is, I will just live with it. :) Cheers.

Hi Antonio! Your metric is really close. You just need to make two changes:

1 - Add a "SELECT" before # Tickets. It should be inside the parentheses: SELECT IFNULL((SELECT # Tickets...

2 - You need to select the tag from the Elements list on the right:

Go to Attribute Values. That will show you the list of Attributes at first, which is normal.

Find Ticket Tag and click it. That should take you to a list of all tag values.

Find talkdeskphone and double-click it. When you add it, it should appear orange in the metric editor.

I realize this is a lot of extra steps, and it's not very intuitive. Ticket tags are uniquely difficult for reporting. A ticket can have any number of tags at the same time, and you may need to report on any one of them. That leads to more complicated relationships in the data model, which need more complicated reports.

Fortunately, you're almost there. Once you make these two changes, your report should start working.

Thanks for helping me clarify. As the reporting wizard, wonder if you can help me accomplish what I'm after.

I have a report headline built to show me how many tickets were created in the week previous, excluding tickets generated via api. The reason we have tickets excluded via API is because we have our Delighted NPS survey responses come in, however, I want my team to handle the priority tickets (tickets created by customers) first.

The problem comes into play now that we utilize a CTI integration (TalkDesk) for our telephony system which is also generated via API (once the call completes, a Zendesk ticket automatically creates).

After looking at our Contact Per Order rate for the past few weeks (total number of contacts divided by total number of orders), it's so low that I'm convinced our phone contacts are being contacted, and I suspect that's because I disallow API's to be counted in the ticket count headline report.

My question to you: what's a way to allow our TalkDesk phone generated tickets to be counted in our reporting without including the remainder of the API generated tickets (two other sources of API generated tickets: Delighted and another source)?

As I type this out, I'm thinking filtering via tag would be the best bet, but since there's no default option to do that in the filters provided, I'm not sure how to do it manually.

If it helps, tickets that are generated via API/Delighted and API/TalkDesk are tagged appropriately.

Zendesk records a couple pieces of information about how each ticket is created. In the Zendesk interface, those pieces are combined into a single, descriptive "channel." In Insights, they're separate attributes (Ticket Via and Ticket Update Via). It's still possible to get the same distinctions, but it takes extra steps.

If you're already tagging these tickets based on their Zendesk channel, those tags will be the best option by far. Zendesk business rules are much easier to manage, and they can get into more detail than a typical Insights metric.

In your case, I recommend creating a metric for the Delighted NPS tag, then use it in a Numeric Range Filter to exclude NPS tickets from your headline report.

Hmm, is it possible to set up a ticket to discuss this further? I think I have an understanding of what you're referencing, but I'm not sure I follow the "how-to" portion since this is unfamiliar territory.

(Replace your_tag with the tag you want to use in your report. It will be listed under Attribute Values > Ticket Tag.)

You must create a metric like this for each tag you want to include in filters. Once you create a tag-filtering metric like this one, you should be able to add it to numeric range filters and other metrics.

Hi Linda! Tags are not like other attributes. For other attributes, tickets can only have one value at a time. It's easy to see whether a ticket is in, say, Pending status -- the ticket only has one status, and it either is or isn't "Pending."

Tags are different. Tickets can have any number of tags at the same time. That makes things quite a bit more complicated. A ticket may have one of the tags from your filter, but not another. There are lot of ways to handle those situations, and Insights doesn't know which one you need.

Because of all this, ticket tags do not consistently work in a dashboard filter like the one in your screenshot. Every single report would need to have metrics that accurately connect to tag data, and even then, there would be a lot of exceptions.

We do not recommend putting a tag filter on a dashboard. If you want to use tags, you must use custom tag filtering metrics within your reports. Please follow the recipe above to filter your reports.

Is there a way to eliminate duplicate tags, when the tags are not exactly identical? See my image. We inadvertently have used a similar tag for a single issue (one in a macro, one in a trigger). How do I eliminate the duplicates in this scenario to give me a proper count (besides fixing the process which is broken).

Hi Gabriel! Insights can only show you what it receives from your Zendesk account. Insights can't change or delete your historical data. I strongly recommend cleaning up tag usage in your workflow going forward.

In this case, if these tags are interchangeable, you could make a filtering metric to find tickets with at least one of the two tags. It would look like this:

That should keep your overall ticket counts accurate, and most reports will function normally. You'll only notice a problem when you display the tags, as you have in your screenshot. There's not much you can do at that point, since both tags do exist on those tickets.

Hi Xander! That is certainly possible! In this case, you would need to make separate filtering metrics for each tag, then include both filtering metrics on your report.

If you want your whole report to require both tags, then you could use two numeric range filters. If you just want to filter one metric, you could create a metric like this:

SELECT metric WHERE (SELECT # Tickets with tag_1 BY Ticket Id)=1 AND (SELECT # Tickets with tag_2 BY Ticket Id)=1

The reporting on tickets with one or more tags article goes into a lot more detail on the theory behind this recipe. It also includes a detailed example for finding tickets that DO have one tag, but do NOT have a different tag.