Recent searches
No recent searches

ashdivayus
Joined May 05, 2023
·
Last activity Apr 26, 2024
Following
0
Followers
0
Total activity
6
Vote
1
Subscriptions
3
ACTIVITY OVERVIEW
BADGES
ARTICLES
POSTS
COMMUNITY COMMENTS
ARTICLE COMMENTS
ACTIVITY OVERVIEW
Latest activity by ashdivayus
ashdivayus created a post,
The objective was to synchronize the "End user" field with an internal field with the same name for its field options. However, not all of the internal field's options can be made available to end users, so two separate fields were needed. While achieving this using multiple triggers is possible, it becomes cumbersome when there are more than 20 field options, as it would require creating 20 or more triggers for each option.
Create a trigger
in action notify webhook ( I used Update Manay API /api/v2/tickets/update_many.json)
and in JSON body use this code
{% if ticket.field_option_title_123456789 == "Option_A" %}
{"tickets": [{ "id": {{ticket.id}}, "additional_tags": "product_option_a"}]}
{% else %}
{% if ticket.field_option_title_123456789 == "Option_B" %}
{"tickets": [{ "id": {{ticket.id}}, "additional_tags": "product_option_b"}]}
{% else %}
{% if ticket.field_option_title_123456789 == "Option_C" %}
{"tickets": [{ "id": {{ticket.id}}, "additional_tags": "current_option_c"}]}
{% else %}
{% if ticket.field_option_title_123456789 == "Option_D" %}
{"tickets": [{ "id": {{ticket.id}}, "additional_tags": "product_option_d"}]}
{% endif %}{% endif %}{% endif %}{% endif %
In the above code, I am using an if statement to check if the field option title machines a text in “ ”
if true, I am passing JSON to the webhook
Otherwise, it's moving to the next if statement.
Zendesk trigger will report this JSON as having an error, but it does not; you can ignore the error.
Posted Apr 26, 2024 · ashdivayus
0
Followers
2
Votes
1
Comment
ashdivayus commented,
Can we please prioritize this?
View comment · Posted Oct 11, 2023 · ashdivayus
0
Followers
3
Votes
0
Comments