Trigger condition with evaluation of the numeric value in ticket field
Answered
Posted Feb 14, 2022
In this moment the trigger condition based on numeric ticket field can only perform two basic stance: "Present" or "Not present".
It's quite icredible that there is no way to have a trigger condition base on the value of the numeric field like: "is more/less than" -> "1000" etc.
Anybody has a workaround to solve the trigger condition with numeric value in the ticket field?
17
18
18 comments
Keti
+1 to add this.
Thanks for sharing the workaround Rafa D.
Tested the below liquid markup and worked → Group assignment based on the custom field “numeric” value.
{
"ticket": {
{% assign field_value = ticket.ticket_field_123456 | default: 0 | times: 1 %}
{% if field_value > 10 %}
"group_id": 123456
{% else %}
"group_id": {{ ticket.group_id }}
{% endif %}
}
}
In my case, the liquid markup checks the custom field value (numeric)
default: 0 → IF the field is empty or null it defaults to 0.
If value is >10 → Assign to “x” group
Else → Leaves route it to the default group (based on triggers / routing)
0
Jules
Would love to see this with the option to determine the action based on:
- starts with…
- ends in…
e.g.: Ticket ID ends in 09
0
Joel Cohen
This is a great feature request and I have added it to the backlog for future consideration. This means that we will think about adding it as a priority later in our planning cycle. We are going to leave this post open for comment to allow others to provide their feedback and use cases, however please note as is stated in our Community Guidelines that we can not commit to prioritizing any one piece of feedback we receive in the community.
Thank you again for your feedback and for being a valuable customer with Zendesk.
0
Hannah Ehrlich
+1ing to add this. Really need to be able to base on a > or < number in one of my fields.
1
Jessica C.
+1 on having a way to do this via the triggers UI
We have partners who sometimes work with multiple customers at a time. So they may be submitting support tickets from the same email but for different customers. We collect the customer ID in our support form and our use case would be to have the ability to associate specific partners to specific Zendesk orgs by the customer ID and not by their email domain. However the current trigger UI only allows you to specify whether or not that numeric field is there.
2
Rafa D.
I have a solution for this situation, you can read the field value via Liquid markup in a webhook.
In my case, I want to create a new priority field with more options and starting with a number, in order to sort tickets with it.
I also want to change the priority based on the value of another custom field.
I created a webhook to the endpoint ‘https://orenes.zendesk.com/api/v2/tickets/{{ticket.id}}’ and used it in a trigger with the following JSON:
Here ‘ 19356697887122’ is the priority field and ‘20703424763538’ the numeric field.
The line ‘{% assign field_value = ticket.ticket_field_20703424763538 | times: 1 %}’ multiplies the field value by 1 to convert from string to number.
The Liquid markup then checks the value and returns the corresponding field tag.
You will need to adapt the code for each case. For changing the group, the code should look like this:
(Note: I haven't tested this last code snippet.)
1
Vitalii Petrus
+1
0
donna henry
Currently have to manually review and act on numeric fields for workflow processing...i.e. procurement request...does request require secondary approval based on $ threshold? Would be very helpful to have a trigger automatically forward for approval prior to landing in procurement dashboard...
1
ASPOCK Admin
+1, this would really help us automate certain cases.
e.g: If the one of the ticket field (custom) value is 5001, I am should be to categorize the ticket automatically as >5000 category using a trigger.
0
Dan R.
Just got bit by both this issue and the fact that automations don't support numeric fields either. It would be super if we could be allowed to evaluate and act on data in our systems via the Triggers and Automations features.
All data that goes in a field should be able to be evaluated and be acted on.
2
Sign in to leave a comment.