Zendesk Support placeholders are containers for dynamically generated ticket and user data. The format is a data reference contained within double curly brackets. Since you can also access ticket and user data when defining programming logic, it may be helpful to think beyond placeholders and think instead of data objects and their properties that can be used for either purpose.
There are two primary data objects in Zendesk Support: Ticket and User. Each has its own set of properties; the User object, for example, contains user properties such as name and email. In addition to these two data objects, there are associated data objects. For tickets, there are the Comment and Satisfaction Rating objects. For users, there are the Organization and Agent objects.
Although placeholders can be in HTML format, when a placeholder is sent to a HTTP or URL target, Markdown is used to render the placeholder, not HTML.
Support includes inborn system rules that suppress placeholders in triggers in certain situations. Inborn system rules are rules that you cannot change, modify, or override, which dictate the default behavior of Support. These rules may sometimes make it seem like placeholders in triggers failed to work, but this isn’t a mistake. These rules protect you because they prevent spammers from using your account to distribute spam messages. For more information, see Understanding placeholder suppression rules.
This article categorizes the placeholders by the data they display:
Related articles:
User data
- ticket.requester, who is the person who requested the ticket
- ticket.assignee, who is the agent assigned to the ticket
- ticket.submitter, who is either the user who submitted the request or the agent that opened the ticket on behalf of the requester
- current_user, who is the user currently updating the ticket (an end-user or agent)
This means that most of the user data listed in the following table can be returned for each type of user (for example, {{ticket.submitter.name}}, {{current_user.name}}, and so on).
Properties/placeholders | Description |
---|---|
user.name
Important: Remember to replace user with one of the user types shown above (for example, ticket.requester).
|
The user's full name. |
user.first_name | The user's first name. |
user.last_name | The user's last name. |
user.email | The user's email address. |
user.language | The user's language preference. |
user.phone | The user's telephone number. |
user.external_id | The user's external ID (if one exists). Optional for accounts that have enabled enterprise single sign-on using JWT or SAML. |
user.details | The user's details. |
user.notes | The user's notes. |
user.time_zone | The user's time zone. |
user.role | The user's role (Admin, Agent, or End-user). |
user.extended_role | When using Support Enterprise agent roles, this returns the name of the agent's Enterprise role. These are the predefined roles:
If you've created custom agent roles, those role names are returned. If you're not an Enterprise account, using this placeholder returns 'Agent' for all agent users. End-users are 'End-user'. For more information about custom agent roles, see Custom agent roles. |
user.id | The user's ID. |
user.locale | The user's locale (for example: en-US). |
user.signature | The agent's signature. Only agents have signatures. |
user.organization... | See Organization data below. |
user.tags | Tags. See Adding tags to users and organizations. |
Organization data
Each type of user can be added to an organization. An organization contains the following data properties.
Properties/placeholders | Description |
---|---|
user.organization.id
Important: Remember to replace user with one of the user types shown below.
|
The ID of the organization that the user is assigned to. |
user.organization.name | The name of the organization that the user is assigned to. |
user.organization.is_shared | True or False. Indicates if the organization is a shared organization. |
user.organization.is_shared_comments | True or False. Indicates if the organization allows users to add comments to other user's tickets. |
user.organization.details | Details about the organization. |
user.organization.notes | Notes about the organization. |
user.organization.tags | Tags. See Adding tags to users and organizations. |
- {{ticket.organization.name}}, which is the ticket requester's organization
- {{ticket.requester.organization.name}}, which the same as {{ticket.organization.name}} (the requester)
- {{current_user.organization.name}}, who is the user currently updating the ticket (an end-user or agent)
- {{ticket.assignee.organization.name}}, who is the agent assigned to the ticket
- {{ticket.submitter.organization.name}}, who is either the user who submitted the request or the agent that opened the ticket on behalf of the requester
Agent data
You can use the following placeholders in agent signatures only. For information on agent signatures, see Adding an agent signature to ticket email notifications.
Properties/placeholders | Description |
---|---|
agent.name | The agent's full name (or alias, if present). |
agent.first_name | The agent's first name. |
agent.last_name | The agent's last name. |
agent.role | The agent's role. |
agent.signature | The agent's signature. |
agent.email | The agent's email address. |
agent.phone | The agent's phone number. |
agent.organization | The agent's organization. |
agent.language | The agent's language. |
agent.time_zone | The agent's time zone. |
Ticket data
Zendesk Support tickets contain the following data properties.
Properties/placeholders | Description |
---|---|
ticket.account | The Zendesk account name. |
ticket.assignee.name | Ticket assignee full name (if any). See User data above. |
ticket.brand.name | The ticket's assigned brand name. |
ticket.cc_names | Returns the names CCs on the ticket.
Note: If you are using the new CCs and followers experience and you are adding or updating your placeholders, we recommend using
ticket.email_cc_names instead of tickets.cc_names . They do the same thing.If you want to return the email addresses of the people CC'd on the message, you can use this Liquid code:
|
ticket.email_cc_names |
With the new CCs and followers experience, returns the names of CCs on the ticket. With the old CCs experience, returns empty. Note: If you are using the new CCs and follower experience and you are adding or updating your placeholders, we recommend using
ticket.email_cc_names instead of tickets.cc_names . They do the same thing. |
ticket.follower_names | With the new CCs and followers experience, returns the names of followers. With the old CCs experience, returns empty. |
ticket.follower_reply_type_message | With the new CCs and followers experience, indicates what type of comment (public or private) triggered the notification. With the old CCs experience, returns empty. |
ticket.created_at | Date the ticket was created (for example, May 18, 2014).
Note: The year is not included if the ticket was created in the current year.
|
ticket.created_at_with_timestamp | Time the ticket was created expressed as an iso8601 format date/time. Example: 2013-12-12T05:35Z, which translates to December 12th, 2013 at 05:35am UTC. |
ticket.created_at_with_time | Date and time the ticket was created. For example, February 10, 14:29. |
ticket.current_holiday_name | If the placeholder is used outside of a holiday, it is null. If it is used within a holiday, the holiday's name is displayed. If you've set up multiple schedules, this placeholder respects the list of holidays set in the schedule applied to the ticket. |
ticket.description | The ticket description (the first comment), the agent's name, and the comment date.
Note: If the subject field is empty or not visible to the requester, then this first comment will be used and sent to the requester. This is true for private tickets as well.
|
ticket.due_date | The ticket due date (relevant for tickets of type Task). The format is: May-18. |
ticket.due_date_with_timestamp | The ticket due date (relevant for tickets of type Task) expressed as an iso8601 format date/time. Example: 2013-12-12T05:35+0100 which translates to December 12th, 2013 at 06:35am UTC+1. |
ticket.external_id | The external ticket ID (if one exists). |
ticket.encoded_id | The encoded ID is used for threading incoming email replies into existing tickets. |
ticket.group.name | The group assigned to the ticket. |
ticket.id | The ticket ID. #{{ticket.id}} creates a clickable link. {{ticket.id}} renders the ticket number in plain text. |
ticket.in_business_hours | True or False. True if the ticket update is during business hours. See Setting your business hours. |
ticket.link | Full URL path to ticket. |
ticket.organization.custom_fields.<key_name> | Property/placeholder format for custom organization fields. See Adding custom fields to organizations. |
ticket.organization.custom_fields.<field_key>.title | Property/placeholder format for the option title of a custom organization drop-down field. See Adding custom fields to organizations |
ticket.organization.external_id | External ID of the ticket requester's organization. |
ticket.organization.name | See Organization data above. |
ticket.priority | The ticket priority (Low, Normal, High, Urgent). |
ticket.requester.name | Ticket requester full name. |
ticket.requester.custom_fields.<key_name> | Property/placeholder format for custom user fields. For example, {{ticket.requester.custom_fields.my_custom_field}}. See Adding custom fields to users. |
ticket.requester.custom_fields.<field_key>.title | Property/placeholder format for the option title of a custom user drop-down field. For example, {{ticket.requester.custom_fields.manager_for_approval.title}}. See Adding custom fields to users. |
ticket.status | The ticket status (New, Open, Pending, Solved, Closed). |
ticket.tags | All of the tags attached to the ticket. |
ticket.ticket_field_<field ID number> | Property/placeholder format for custom fields. For example, {{ticket.ticket_field_123}}. See Placeholders for custom fields. |
ticket.ticket_field_option_title_<field ID number> | Property/placeholder format for the option titles of a drop-down custom field. For example, {{ticket.ticket_field_option_title_456}}. See Placeholders for custom fields. |
ticket.ticket_form | Form name for end-users. |
ticket.ticket_type | Ticket type (Question, Incident, Problem, Task). |
ticket.title | The ticket subject. |
ticket.updated_at | Date the ticket was last updated (for example, May18). |
ticket.updated_at_with_time | Time and date the ticket was last updated. For example, February 10, 14:29. |
ticket.updated_at_with_timestamp | Time the ticket was last updated expressed as an iso8601 format date/time. Example: 2013-12-12T05:35Z, which translates to December 12th, 2013 at 05:35am UTC. |
ticket.url | The full URL path to the ticket (excluding "http://"). |
ticket.verbatim_description | The plain text value of the ticket decription (the first comment). |
ticket.via | The source type of the ticket (Web form, Mail, Twitter, etc.). |
account.incoming_phone_number_ID | Zendesk Talk inbound phone number. For example,{{account.incoming_phone_number_123}}. |
Comment data
- Standard objects allow you to use liquid hashes to pick and choose what you want to display, and return a collection of comment and attachment data. For example, you can set up templates to iterate over comments using
{{ticket.comments}}
. - Formatted objects allow you to return preformatted, rendered HTML representations of the standard placeholders, but without a large degree of customization. They simply return comments in predefined formats. For example,
{{ticket.comments_formatted}}
returns a chunk of rendered HTML. The ticket comments will include dates, author, the author’s avatar, and the like. - Rich text objects allow you to use rich text in your customized template (as with the formatted object placeholders) without being restricted to the predefined formatting rules, so you can have more control over the look and feel of your notifications. However, rich text objects do not allow you to include attachments.
Properties/placeholders | Description |
---|---|
ticket.comments | Used as a placeholder, {{ticket.comments}} displays all the comments in a ticket in unformatted text.
Note: Agents will receive both public comments and internal notes; end-users will receive only public comments.
Ticket.comments also serves as a collection for comment and attachment details. You can access the following data using Liquid markup:
For an example of accessing this data in business rules, see Customizing the formatting and placement of text in comments and email notifications. Note: This same comment data collection is available when using the ticket.public_comments, ticket.latest_comment, and ticket.latest_public_comment placeholders.
|
ticket.public_comments | All public comments, most recent first. Unformatted text. |
ticket.latest_comment | The most recent comment. Unformatted text. Does not include attachments, unless Include attachments in email is enabled. To return attachments, use ticket.latest_comment_formatted.
Note: Agents will receive the most recent public comment or internal note; end-users will receive the most recent public comment.
|
ticket.latest_public_comment | The most recent public comment. Unformatted text. |
Properties/placeholders | Description |
---|---|
ticket.comments_formatted | All comments, most recent first.
Note: Agents will receive both public comments and internal notes; end-users will receive only public comments.
|
ticket.public_comments_formatted | All public comments, most recent first. |
ticket.latest_comment_formatted | The most recent comment including any attachments.
Note: Agents will receive the most recent public comment or internal note; end-users will receive the most recent public comment.
|
ticket.latest_public_comment_formatted | The most recent public comment. |
Properties/placeholders | Description |
---|---|
ticket.latest_comment_rich |
The most recent comment. Rich text formatting. Does not include attachments, unless Include attachments in email is enabled.To return attachments, use ticket.latest_comment_formatted. Note: Agents will receive the most recent public comment or internal note; end-users will receive the most recent public comment.
|
ticket.latest_public_comment_rich | The most recent public comment. Rich text formatting |
Satisfaction rating data
Properties | Description |
---|---|
satisfaction.rating_section | A formatted block of text prompting the user to rate satisfaction. |
satisfaction.rating_url | A URL to rate the support. |
satisfaction.current_rating | The text of the current satisfaction rating (e.g. "Good, I am satisfied"). |
satisfaction.positive_rating_url | A URL to rate the support positively. |
satisfaction.negative_rating_url | A URL to rate the support negatively. |
satisfaction.current_comment | The comment that the user added when rating the ticket. |
207 Comments
Hello,
Is there any placeholder that captures all the public comments except for the latest one?
I was trying to combine these two on my trigger, just that it will show double entry of the last comment.
Hi Donald,
No, the placeholder options are to either only the latest comment (which we see used a lot when people want shorter email threads) or to send the full conversation history. We wouldn't recommend both placeholders in one trigger since the duplication you're seeing with that combination is expected in that case.
There's any placeholders for the total number of solved and unsolved tickets? To give you more context. I plan to add an automated message that tells me at a specific hour the total number of solved and unsolved tickets for that day.
Hi Sorin,
No, there isn't a placeholder that reports on tickets numbers. Your best option for a a workflow like this would be to schedule an Explore dashboard with queries for solved and unsolved tickets to be emailed out instead.
Is it possible to execute a certain macro from within another macro? What I would like to do is: Have an "onboarding" macro that starts a private note containing "DRAFT reply:" followed by the content of another macro, but I'd like to avoid both the copy-pasting that content and needing to remember to execute that other macro manually.
Thanks for any advice, or upvotes to https://support.zendesk.com/hc/en-us/community/posts/115010289948-Automatically-Include-The-Contents-of-another-Macro-in-a-Macro- if it's not currently possible!
Hi Katrin Leinweber,
Could you tell me a little bit more about the use case of why you would need one macro to contain info from another one? I just want to make sure I am connecting the dots properly before I make any recommendations.
Thanks!
Hi Ben Van Iten,
the onboarding macro is supposed to provide a few safeguards for new hires, i.e. drafting a reply as an internal note that can be reviewed, before being sent to the customer. Since we normally use a separate macro to set up regular replies, it would be neat to be able to make the onboarding macro execute that other macro, so that the onboarding process is most realistic.
Thanks for your consideration :-)
https://support.zendesk.com/hc/en-us/articles/203662156/comments/204815867
Jason Littrell That's very helpful, but what about the case where it's automation (e.g. c-sat survey) where I want to reference the agent's name. However, there may be tickets where the ticket was never assigned to anyone and remained assigned to a group (e.g. "Level 1 Team"), which I clearly don't want to be referenced in the email notification. Instead, I'd like to show our company name as a fallback.
Any suggestions? Thanks for your help!
Allen
You can use a little liquid markup to check if the ticket assignee is blank. Try this:
{% if ticket.assignee.name == nil %}
MyCompanyName
{% else %}
{{ticket.assignee.name}}
{% endif %}
Bruce Ledbetter Not sure if you are still interested but we were looking to do the same thing. We wanted to send the solved notification and display a comment only the agent added a comment prior to solving, else send a solved notification without ticket comments. I too wish there was a Comment Not Present. In order to achieve what we are looking for we had to add two additional tags: In our case we added Notify_Comment_present & notify_solved_sent.
Does anyone know how to show the ticket description unformatted? I do not need to display all the comments or the latest comment...I am actually looking for the initial comment which would be the description. It must be unformatted.
Hi Katrin Leinweber,
Sorry for the delay in my response! Thanks for providing more context. I can mark this as Product Feedback so that this is routed to the proper team for review. I don't have any direct recommendations at this time other than perhaps referencing the other macros you want people to use in the original internal note. Obviously that's not ideal, but this is a limitation of how macros function at this time.
In regards to the question that Reshma Patel raised, unfortunately there isn't a way to use an unformatted version of that placeholder. However we do have this guide on how to have an unformatted email template in general for all of the comments: https://support.zendesk.com/hc/en-us/articles/203661346-Setting-up-an-unformatted-email-template
I am not sure if that would be relevant in this case for you.
Ben Van Iten
We are actually using the unformatted comment placeholders in all other comment update notifications. Without being able to pull an unformatted placeholder for ticket.description it provides a very inconsistent look and feel on our notifications. I have read other thread comments on using the unformatted comments placeholder with offset to show the most recent comment....can anything similar be done to show the very first comment?
Katrin Leinweber,
Could you create separate macros for the onboarding that contain the info including the draft note and private note status?
I have multiple email addresses connected to my Zendesk - I have a trigger that sends an email to the requester stating in the Title 'Your question to ____' and the only option I see is ticket.brand.name, but that just shows my company name. I want it to show 'Your question to webshop 1', 'Your question to webshop 2', etc... Under each of my connected email addresses, I have added the webshop names...I want the webshop name to show there instead of my company name...
How can I do this?
Hey Patrick Wilson
There's no placeholder for connected email name, but if you have a ZD plan that supports use of the Ticket Forms feature, you could name ticket forms according to the appropriate webshop and the placeholder for the {{ticket.ticket_form}} placeholder.
Patrick Wilson you can also use the {{ticket.group.name}} in the case that you're routing your tickets to specific groups when receiving the tickets, or
There's also in a longer direction of creating a ticket field containing the different names, and setting this value depending on the received at email addres via triggers.
You can then in your subject use the placeholder for the value in the newly created ticket field, e.g. {{ticket.ticket_field_option_title_<field ID number>}}
If you don't want more ticket fields to be shown in the ticket form from the agents perspective, you can use Ticket Field Manager app to hide the field.
Do we have a placeholder for assignee custom fields?
Hi Jiri Kanicky,
There are no custom field categories that are categorized specifically for assignees. There are custom user fields however. This article goes over that: https://support.zendesk.com/hc/en-us/articles/203662116-Using-placeholders
Could you explain more about the custom fields you are looking to utilize in a placeholder and I can try to help further?
Thanks!
Hi Zendesk Community,
is there any possibility to access in a subticket the data from a parent ticket? For example in a macro of the subticket I want to access the requester name of the parent ticket like {{parent_ticket.ticket.requester.first_name}}.
Many thanks in advance!
Hi Ben Van Iten
I need to use placeholder for
Yes the field is an agent/user custom field, but in the context it is an assignee of the ticket. Not a user of the ticket.
You currently have placeholders for:
ticket.requester.custom_fields.<key_name>
ticket.organization.custom_fields.<key_name>
But no ticket.assignee.custom_fields.<key_name>
Why to have requestor but no assignee custom field placeholder?
Please read your own documentation:
In the context of updating a ticket, there are a number of different types of users. These include the following:
In the context of updating a ticket we should be able to use custom fields of these users. For example I would like to create a message to the Assignee using some user custom fields.
Again you have the option for requestor, but not for assignee. I don't understand how programmers can do it for one but not for the whole bunch of the users to keep it consistent.
@michael, sorry there is no placeholder for this. The only possibly is to try to find a way to record this in a custom field or tag when the child ticket is created. Passing it to the child ticket is the biggest challenge.
@jiri, depending what you are needing to achieve, and the number of possible variations, it may be possible to build something in dynamic content to accomplish this. There is no placeholder for it.
My question to Zendesk is, why we have placeholders for
but don't for
There should be some consistency in Zendesk. Requester and Assignee are users in the context of updating a ticket, hence Zendesk should have same functions for both.
Andrew J please let me know what is the variation for adding a placeholder (text from an Assignee Custom field) into Send Email payload.
Jiri Kanicky Although it's not explicitly stated in the user object data table, every user object should also return a 'custom_fields' object with any custom field key/value pairs. That means that
should work with any of these user placeholders:
One note: unlike the other placeholders, 'ticket.assignee' can return a blank value for the user object, which is, unsurprisingly, when the ticket is not assigned. If you're using a 'ticket.assignee.<property>' placeholder somewhere other than an "Email user: (assignee)" action, you may want to add an "Assignee is not (blank)" condition, or use liquid markup to make that part of your email notification or code conditional (e.g. {% if ticket.assignee %}Do this...{% endif %}).
Jiri Kanicky
{{ticket.assignee.custom_fields.<key_name>}} works. I just tested it on a ticket I had assigned to myself. Can you try it on your side? Make sure the field is populated with data otherwise you may get an empty value of the placeholder
Edit: Looks like Jason Littrell beat me to it!
Is there a place holder for a brand URL?
Can you set up a place holder for a custom brand URL?
I'm currently setting up an auto-responder email when a requester submits an email and there are links within the email. I would prefer to set up one email no matter the brand the email goes to but from what I am seeing I have to do a different email per brand.
Hi, any placeholder for agents latest comment? (nevermind if its public or private)
Is there a way to truncate {{ticket.latest_comment}}? When using the Notify Target to Slack, if it is too long, it just fails quietly and doesn't notify slack of a failure or anything.
Thanks!
Naomi Watnick Something like this should work:
See here for more info: https://shopify.github.io/liquid/filters/truncate/
Please sign in to leave a comment.