Using placeholders

Return to top


  • Tipene Hughes
    Zendesk Developer Advocacy

    Hi Chin Sin,

    I've done a bit more testing on my end and you are correct, the placeholder does populate to the custom fields when using triggers + webhooks. As you noted, it does not populate as expected when testing using something like Postman. The reason for this is that when the webhook fires, it runs through a proxy which populates the placeholder field with the actual value before being sent to the specified endpoint. This does not occur when using Postman hence you see the placeholder sent as a string.

    Sorry for any confusion but I hope this clears it up. Feel free to reach out with any questions!


  • Colleen Hall
    Zendesk Documentation Team

    Hi Mike Konstantin,

    Thank you for providing this solution! And thank you Rudolph Beaton for pointing it out. I've updated the article with this information.

  • Rudolph Beaton

    Wooo, thanks for doing that, Colleen Hall!

  • Joubin Saedi

    the checkbox logic should actually be swapped.

    {% if ticket.ticket_field_<insert field_id here> contains 0 %}
    checkbox is unchecked
    {% else %}
    checkbox is checked
    {% endif %}

    should actually be

    {% if ticket.ticket_field_<insert field_id here> contains 1 %}
    checkbox is checked
    {% else %}
    checkbox is unchecked (or null)
    {% endif %}

    Can someone give me an example of what the checkbox line will actually look like when you enter it into a the trigger section?

    Screen Value: {{% if ticket.ticket_field_9508015623188 contains 1 %}}

    Screen Value line, from above, does not work for getting if the checkbox was selected. 

  • Albert Lechuga

    Hello, do placeholder work in the Email HTML template. For example, If I add an HTML signature and I use {{}} where the phone number would go, should it display the agent that responded to the ticket's phone number in the HTML signature? I have been unable to get any {{current_user.XXX}} placeholders to show anything in the HTML template. 

  • Gab Guinto
    Zendesk Customer Care
    Hi Albert,

    I'm afraid the system placeholders like won't work when used within email templates. An alternate solution is to use the signature field in the user profiles; you can use these placeholders within that field. But, at this time, the signature field does not support HTML. You may only use Markdown formatting

    If you can, I suggest that you upvote or add a comment to this product feedback thread - Feature Request: HTML or Rich Text Editor for Signatures.

    Thanks Albert!
  • Maddie F.

    Hi! Can this article please be edited to mention that placeholders are case-sensitive? I found this out today while working with a Zendesk agent to troubleshoot an issue I was encountering and I think it may be helpful to include it on this page.

  • Lisa Kelly
    Zendesk Documentation Team
    Thanks, Maddie,
    I updated both these Placeholder articles to include the following sentence:
    "When you specify placeholders, remember they are case-sensitive."
    I'm marking this ticket as Solved. Let me know if you disagree. 
  • Ke Zhao

    Hi. I am trying to apply macro with placeholder {{ticket.requester.first_name}} when I create ticket via Zendesk API, but the placeholder won't be replaced in this situation. The placeholder only works when I update a ticket via API. Just wonder how to create a ticket with placeholder in comment via API? Thanks.

  • Mike Konstantin

    Ke Zhao,

    Out of  curiosity, are you running all of this in one command? If so, it won't work (from similar testing and work I've performed), as Zendesk doesn't understand who the Requester is until the ticket is actually saved with the Requester's details. It is best to perform this within two steps (first create the ticket, then have automation apply the Macro).


  • Ke Zhao

    Thank you for your quick reply, Mike Konstantin. I am running 

    • GET /api/v2/macros/{macro_id}/apply

    to get the comment from macro first, then call

    • POST /api/v2/tickets

    Yes, I think you are right, Zendesk won't understand the requester. I had a workaround to create a ticket with a starting comment, then update the ticket with macro. Thank you!

  • Luke Aleo

    I used a placeholder {{ticket.ticket_field_option_title_<field ID number>}} to show content from a Multi-Select Dropdown. The ticket itself looks fine, but when I search for it the results are showing the {{ticket.ticket_field_option_title_<field ID number>}} instead of the actual data. Is this a user error on my part or working as intended?

  • Dane
    Zendesk Engineering
    Hi Luke,

    I have tried the placeholder below and it worked on my end. Make sure to use Cmd/Ctrl + Shift + V when pasting to avoid converting it to HTML.

  • Leticia

    I'm creating a placeholder for the chat in Zendresk. I need a placeholder that automatically modifies the brand of the casino we are serving, as well as the name of customers and agents changing when adding the placeholder. Is that possible?

  • Viktor Osetrov
    Hello Leticia,

    Unfortunately, it doesn't work for the web widget (Classic) chat trigger.
    However, it works for web widget Messaging. I have tested the following scenario. 
    1. Created placeholder using dynamics content for each brand 

    2. Added my custom placeholder "" into triggers and macros. 
    Please notice content text is different for each language.
    It works for both cases.

    Hope it helps

Please sign in to leave a comment.

Powered by Zendesk