This Explore recipe shows you how to change the color of the % One-touch tickets value to green when it reaches a certain value.
What you'll need
Skill level: Average
Time Required: 15 mins
- Zendesk Explore Professional or Enterprise
- Editor or Admin permissions (see Giving agents access to Explore)
- Ticket data in Zendesk Support
How to create the report in Explore
Use the following steps to create this report in Explore.
- In Explore, click the query (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Support > Tickets > Support: Tickets, then click New query. Query builder opens.
- Next, add your metrics, the things you want to measure. In this case, you'll add the number of tickets created. In the Metrics panel, click Add.
- From the list of metrics, choose Agent replies distribution > % One-touch tickets, then click Apply.
- In the Rows panel, click Add.
- From the list of attributes, choose Time - Ticket created > Ticket created - Year and Time - Ticket created > Ticket created - Month. Then, click Apply.
- In the chart configuration menu (
), click Display format.
- On the Display format page, change Standard to Advanced.
-
Copy and paste the code below into the Format section.
IF (SUM(onetouchtickets-c133534e9b) > .80) THEN
{
"backgroundColor": "#15B660",
"precision": 0,
"scale": .01,
"prefix": "",
"decimalSeparator": ".",
"fontColor": "",
"italic": FALSE,
"bold": FALSE,
"suffix": "%",
"thousandsSeparator": " "
}
ELSE
{
"backgroundColor": "#ff0000",
"precision": 0,
"scale": .01,
"prefix": "",
"decimalSeparator": ".",
"fontColor": "",
"italic": FALSE,
"bold": FALSE,
"suffix": "%",
"thousandsSeparator": " "
}
ENDIFYou can change the required reference value. In the example, it shows .80. You can also change the color that appears when the value is greater than the reference value. In the example, the HEX color value is #15B660. Finally, you can also change the color that appears when the value is less than the reference value. In the example, the HEX color value is #ff0000. For more information, see Color Hex.
The query is now complete.
7 Comments
Does this recipe work with all metrics? I'm trying to use it with the "Unsolved tickets age (days)" metric but the background color is not changing.
IF (AVG(Unsolved tickets age (days) > 7) THEN
{
"backgroundColor": "#EE0E0E",
"precision": 0,
"scale": 1,
"prefix": "",
"decimalSeparator": ".",
"fontColor": "",
"italic": FALSE,
"bold": FALSE,
"suffix": "",
"thousandsSeparator": " "
}
ELSE
{
"fontColor": ""
}
ENDIF
Zendesk support said that color customization is not supported
Hello Cesar Jimenez! Thanks for raising this. I recreated the query but this time using the metric Unsolved tickets age (days) and using your conditional formatting. I had the same issue you had. I reached out to our Explore team and apparently there is an issue with the use of brackets in the title of the metric because they are seen mathematically.
To solve this issue, duplicate the metric Unsolved tickets age (days) and leave the brackets out of the new name.
Let me know if this helps please!
Thanks Ricardo I found that workaround last night as well.
In this day and age I wouldn't expect someone having to go through this much to alter the color. IMO users trying to create a report wouldn't have the skill set to right out code such as above to accomplish a color change.
So is this this the only way to alter the color of results?
Hello Bill Cicchetti,
I understand that this process can prove less than intuitive in its current rendition. I would recommend posting in our product feedback forums since this would be the place where our developers look for feedback on ways to improve the product. As for now, the workaround share would be your best bet for accomplishing this.
Best regards.
Post added:
https://support.zendesk.com/hc/en-us/community/posts/360048029813-Explore-Simplify-the-process-of-colorization-of-results
Please sign in to leave a comment.