了解 Liquid Markup 和 Zendesk Support



已于 2025年3月19日 编辑


39

0

65 条评论

1900216093524 , I'd use the PUT /api/v2/tickets/{ticket_id}/tags endpoint instead of PUT /api/v2/tickets/update_many, as the latter creates a background job, which may be rate limited to 30 concurrent jobs for the entire instance.

You could use the Add Tags endpoint, as mentioned above, with a payload such as the following:

{
{%- assign randomizer = ticket.id | modulo: 2 -%}
{%- case randomizer -%}
	{%- when 0 -%}
		{%- assign randomTag = 'control' -%}
	{%- when 1 -%}
		{%- assign randomTag = 'experiment' -%}
{%- endcase -%}
	"tags": ["{{ randomTag }}"]
}

As for your other question:

How would I use liquid markup in this JSON response to tell it not to fire if a ticket already has the control or experiment tag?

The following trigger conditions could help you exclude this from firing on follow-up tickets with the tags:

  • Ticket Is Created
  • Channel Is not Closed ticket
  • Tags Contains non of the following: [ control, experiment ]

Of course, it'll depend on your specific use case. You could also try iterating over the {{ticket.tags}} placeholder and use Liquid's contains.

2


Hi Zendesk community! I have a question about using Liquid Markup with Zendesk ticket tags. I've set up A/B testing in our instance (as described in this article: https://ro.roca.work/blog/ab-testing-in-zendesk) and so far, it's mostly been working for us. However, I just identified a scenario that I can't figure out how to solve.

To summarize, every ticket that is created gets assigned either the control or experiment tag. The problem occurs only sometimes with tickets created as followups, as it's possible for a ticket to carry over the previous tags, like control, but then get assigned the experiment tag by the webhook. How would I use liquid markup in this JSON response to tell it not to fire if a ticket already has the control or experiment tag?

{% assign randomizer = ticket.id | modulo:2 %}

{% case randomizer %}

{% when 0 %}

{“ticket”: {“additional_tags”:[“control”]}}

{% when 1 %}

{“ticket”: {“additional_tags”:[“experiment”]}}

{% endcase %}

Thanks in advance for the help!

0


Hi Oliver!

Greg one of our developers created a workflow guide here that could serve helpful. Hope it helps!

0


Hello,

Is it possible to change requesters based on the ticket subject using a combination of triggers and liquid markup/webhooks?

I'd use a webhook + automation combination but ideally, we'd need the requester to change immediately rather than wait the 1-hour increment.

The use case is so we don't have to manually change requesters from a no-reply address.
It's trying to create a solution to this question. Any assistance would be greatly appreciated!

0


Hi Hannah!
 
You're most welcome and have an awesome day ahead too!

0


1263082264889 I had a feeling that would be the case. I looked EVERYWHERE for something. Thank you for your confirmation Mike!! Have a great day.

0


HeyA Hannah!
 
Did a thorough search on this and didn't see a liquid mark up here for highlights: Liquid for Designers.

0


Hello,

Is there a way to highlight text using liquid markup? We want to highlight text in our Macros to help callout important information to our end-users (if they read nothing else, at least they'll read this). Is this possible? If so, how? 

0


1264020519590

When I try that, I get no errors when saving my trigger, but I get an error in the email notification:

BUT!!! double-quotes fixes it!

{% if {{ticket.ticket_field_123}} < "3000.00" %}
{{ticket.ticket_field_123}} is LESS THAN $3000.
{% endif %}

{% if {{ticket.ticket_field_123}} > "3000.00" %}
{{ticket.ticket_field_123}} is greater than $3000.
{% endif %}

Wow, that was a wild ride, thanks for the inspiration ;) I can't believe I didn't think of trying that yesterday.

 

1


Hi Carmelo,
It looks like the number is being treated as a string.

Try this instead.

{% if {{ticket.ticket_field_123}} < 3000.00 %}
{{ticket.ticket_field_123}} is less than $3000.
{% endif %}

0


登录再写评论。