Using zendesk tags in liquid markup


5 Comentarios

  • Colin Piper

    I found the answer myself -- or an answer anyhow!


    {% capture alltags %}{{ ticket.tags | remove: "xxxtesttagxxx" }}{% endcapture %}{% capture newtags %}{{ ticket.tags | remove: "testtag" }}{% endcapture %}{% if alltags == newtags %}No overload{% else %}Overloaded{% endif %}


    I am sure there might be a slightly better way but I stopped after this worked!

  • Timur Grigoryev

    Colin hi!

    Thank you for you message. 
    I wonder if I can use case statement in order to show the text that matches the tag. I'm adding tag to the ticket via my webform, but this does not work :(

    Do you have any idea why?

    {% case ticket.tags %} {% when tag_name_1 %}
    first text template
    {% when tag_name_2 %}
    second text template
    {% else %}
    another template
    {% endcase %}

    Any ideas :)?

  • Barry Finder

    @Colin -- Cool stuff! Is it possible to use some of that language to add/remove ticket tags based on ticket fields using Markup?


    casewhen_ticketfield_123 = "ticket_field" 

    ticket.tags add" "tag_abc"


    I know the syntax of what I just wrote is wrong, but I'm hoping you can share the scope of using liquid markup to dynamically add tags to tickets.


  • Graeme Carmichael
    Community Moderator


    Liquid Markup allows you to display different content in comments. If cannot be used to update ticket fields.

    It sounds like you need a custom trigger. After submitting a ticket, the trigger would check the value of your custom field and add the tag to the ticket. This is not as flexible depending on the type of custom field. For example, if it is a free text field you can only check if a value is present or not present.

    Some custom fields can automatically add tags to tickets- for example, check boxes and drop down lists.

    Hope that helps.

  • Barry Finder

    Thanks Graeme. I was hoping to avoid needing all these triggers :( Essentially I want to add tags based on two ticket field values being present and was hoping I could use markup to get there.


La publicación no admite más comentarios.

Tecnología de Zendesk