Zendesk Support placeholders reference

Have more questions? Submit a request

94 Comments

  • Justin Graves

    Fellow Zendeskers - I just posted a request to try to address some of the same needs as many users have stated in the comments here- namely how to format only a portion (in my case the message section) of an otherwise "unformatted" email template. I used your post here as an example of another Zendesk users with a similar need. I'm trying to drum up support to get the Zendesk developers moving on this idea so I'd like to have you look at my post and give it a thumbs up and leave a comment there so we can bolster the case and show the need for these features.

    Please take a look:

    https://support.zendesk.com/hc/en-us/community/posts/220847487-Add-a-placeholder-for-formatted-comment-values-maybe-comment-value-formatted-

    1
  • Kaspars Laizans

    Is it possible to use ticket.group.name in signature? Trying to use {{ticket.group.name}} in signature results in blank 

    0
  • Andrew Mills

    I don't think placeholders work directly in signatures.  However we are doing this with a dynamic content code, then the placeholder is in the DC.

    If you have access to DCs you should be fine to do this.

    Our DC is:

    Your help desk request has been assigned to {{ticket.assignee.name}} ( {{ticket.group.name}}). 
    {{ticket.assignee.first_name}} will review your request and contact you as appropriate.

    If further relevant information or contact detail is available please note this as soon as possible on the online helpdesk request at *********/requests/{{ticket.id}}**
    You can also add detail to the request by replying to this email.

    Thank you for using the our Online Help Desk.

     

    0
  • Donato Dileo

    Hi all,

     

    I need you help for a request

    Basically I'm using Link Ticket App in the market place

    I need to set-up a target extention based on a HTTP URL

    https://mysite.zendesk.com/api/v2/tickets/{{ticket.ticket_field_12345678}}.json

    The problem is that in the ticket field {{ticket.ticket_field_12345678}} I've a string composed by "child_of:XY" where XY is the ticket number

    so Basically I need a trick in order to remove "child_of:" for the customer field during call JSON in order to have a right call and to have only the ticket number

    Is something that we can do? I hope that my question makes sense

    Thanks to all for any help

    D.

    0
  • Ragnar

    The ticket.link and ticket.url are broken. If I use ticket.link I get:

    http://

    i.e. only http://

    If I use ticket.url I get:

    http://Liquid error: undefined method `split' for nil:NilClass

     

    How can I get the ticket link back?

    0
  • Mark Hurty

    When we send our zendesk tickets to Pivotal tracker I send along the comments for context for our developers. (using the message field in the target that I use to send the ticket to Pivotal.) Because I want the description at the top I use ticket.description followed by comments. Because the description is the first comment, that description is displayed a second time at the bottom of the list of comments. ticket.latest_comment seems like a partial solution, but what would be most useful is something like ticket.all_comments_starting_with_the_second. Or can this be accomplished another way?

    0
  • Jason Littrell

    Hey Mark,

    You have a couple of options for this. If you only care about having the description first and don't care that the other comments are listed oldest to newest, try this:

    {{ticket.comments | reverse}}

    If you want the ticket description, then the other comments newest to oldest, something like this should work:

    {% assign count = ticket.comments.size | minus: 1 %}
    {% for comment in ticket.comments | limit: count %}{{comment}}
    {% endfor %}

    These are plaintext only. I'm not sure if there is a way to do this with the formatted comments.

    0
  • Michael Bialek

    Hi everybody!

     

    Is it possible to include a placeholder that displays the last public reply not from the requester of the original ticket?

     

    Thanks!

     

    Mike

    0
  • Brian Cechony

    I am trying to access the Tags associated to the current user's Organization so that I can use those values to conditionally change display elements on all pages. The problem is that I cannot find any references that work. In the examples above I see {{current_user.organization.name}} used as an example, but when I try to put that into a page display template I only get an error. 

    Can you point me to instructions on this, or does the capability not exist?

    0
  • Jesus

    Good morning, 

    We are having problems with placeholder. Concretely with:

    ticket.latest_comment

    ticket.latest_comment_formatted

    Both placeholders don't return private message to our Agents (bug?). It would be helpful to have this information available.

    Regards, 

    Thanks.

    0
  • Raul Barros

    Hello guys, 

    Sorry if this is some newbie question but, is there a way to navigate through a ticket in order to collect information? and can I put random information present in the ticket inside a variable?

    i.e.:

     awk -F: -v keyword="$key_word_I_am_looking_for"


    Or at least put the whole content of the ticket inside a string and then do something like this:

     

    String[] divided = {{ticket.comments}}.split(":");
    String firstAppend = divided[0];
    String secondAppend = divided[1];


    and if this is not possible, how do I create my own string variables?

    Thanks a lot, I am having a lot of fun working with this since I discovered coding in it.

     

     

    0
  • Andrew Mills

    Hello Raul,

    You can do this with liquid - this article may help - https://support.zendesk.com/hc/en-us/articles/203661176-Send-out-different-notification-messages-using-liquid

     

    0
  • Sarah Sanders

    I'd like to control the output text when using the "satisfaction.positive_rating_url" placeholder.

    I know that you can control normal link content by formatting it like this:

    [Text you see](URL link)

    This doesn't work with the placeholder. Is there a way to accomplish this?

    2
  • Fred Chamberlain

    I have the need to use the Organization placeholder in emails but I need it to show all of the possible organizations that an end user could be a member of.  In my case the organizations are departments or school sites and some people have several they are assigned to. 

    How would I be able to get it to show something other than the initial organization the user is assigned to. 

     

    Thanks

    0
  • Mark Hurty

    We created a macro to prepend ticket titles (subject) with {{ticket.group}}. It works as expected when applying that macro one ticket at a time. But when I applied the macro to a batch of tickets using the batch editing interface, the ticket is displayed as expected for agents (views show the title with the group name at the beginning) but our end users see the liquid string, not the name of the group. 

    Agents see:

    [SAT] Title of the ticket

    End users see:

    [{{ticket.group}}] Title of the ticket

    If I manually edit the title, removing the group name and then re-apply the macro to that ticket, everything works as expected.

    I am wondering if anyone has suggestions that would save me from having to manually re-edit every single ticket to resolve this issue?

    Thanks.

     

    0
  • Tom Pagut

    {{ticket.latest_public_comment_formatted}} and {{ticket.public_comments_formatted} do not actually copy the formatting! My hyperlinks do not copy, spaces and paragraph breaks are removed and images do not appear inline. 

    I would like the follow-up messages created with this macro to be formatted exactly as I sent the original including links, images, and spacing.

    I have an open support ticket with Zendesk about this but I was wondering if anyone else has run into this problem?

    1
  • Graham Lower

    Is is possible to display the previous ticket state, specifically status?

    Ideally, being able to include a summary like the one seen in the events view would be ideal. However, showing a change in status a trigger email (e.g. "{{ticket.last_status}} -> {{ticket.status}}") would meet my immediate intention.

     

    0
  • Dinesh Korgaokar

    ticket.comments_formatted this placeholder hides the email address in the footer ticket details.

    0
  • Zac

    When I use {{current_user.signature}} and {{assignee.signature}} in ticket comments, the placeholder populates the expected data (the agent's signature). However, I am not able to add this to Macros. When I do, using the macro does not populate the expected text - the text input field remains blank. Is there a reason for this?

    0
  • Travis Ricks

    Is there a way to insert {{ticket.requester.first_name}} without a space being added afterward automatically in comments?

    Use case: we respond to clients wth:

    Hello {{ticket.requester.first_name}},

    but always have to manually delete the space and add the comma.

    0
  • Zac

    "Is there a way to insert {{ticket.requester.first_name}} without a space being added afterward automatically in comments?"

    Travis - this gets me every time, too!

    0
  • Piotr Szlazak

    @Travis:

    Can you try {{ ticket.requester.first_name | strip }} ?
    Check https://github.com/Shopify/liquid/wiki/Liquid-for-Designers for full guide.

    Regards,
    Piotr

    0
  • Travis Ricks

    @Piotr that would only be useful if it was available as a dropdown in the Agent interface. This would be for agents writing replies, not for building templates.

    0
  • Mark

    How can we change the text in the placeholder itself? 

    Good, I'm satisfied.
    Bad, I'm unsatisfied.

    I am guessing we can use the below links but is there a way to customise the text?

    satisfaction.positive_rating_url

    satisfaction.negative_rating_url

    0
  • it.konton

    Dont know if this has been mention but is there a placeholder to get access to visitor notes through Chat message?

    1
  • Jolshock

    Is there a placeholder that will return all public comments formatted EXCEPT for the most recent? I want the most recent comment to look like a direct email and the previous comments to look more formatted. This is the closest I could get, but for the last line I would like {{ticket.public_comments_formatted}} without the most recent comment included. Any thoughts?

    {% for comment in ticket.comments limit:1 offset:0 %}
    {{comment.value_rich}}
    {% for attachment in comment.attachments %}

    Attachments:
    {{attachment.filename}}
    {{attachment.url}}

    {% endfor %}

    {% endfor %}

    -----------------------------------------------------------------------------------------
    {{ticket.public_comments_formatted}}

    0
  • Candace Alexandres

    Is there a placeholder for the channel used to submit the ticket? 

    0
  • Charles Wood

    The documentation for user.role is incorrect. Administrator accounts return as "Admin", not agent.

    0
  • Greg

    Thanks for catching that, Charles! I'll request an update to the article to fix this!

    0
  • Charles Wood

    It would be very helpful to get an enumeration of the various strings returned by "ticket.via".

    Also, it appears that an update from the agent interface returns the same "via" as an update from the API, making them indistinguishable in a trigger.

    0

Please sign in to leave a comment.

Powered by Zendesk