Article • 1 min read
Tip of the week: Showing who has been cc'd in email notifications
อัปเดตล่าสุด November 4, 2011
Have you ever wished that you could allow end-users to see whos been CCd on a ticket? This tip shows you how. Using a very simple chunk of Liquid markup, you can include this information in email notifications. All you have to do is add it to your notification triggers.
As an example, lets modify the Notify requester of comment update trigger.
Normally, it looks like this (unless you customized yours of course):
This ticket #{{ticket.id}} has been updated.
To review the status of the ticket and add updates, follow the link below:
http://{{ticket.url}}
{{ticket.comments_formatted}}
To include whoever has been CCd, you add this Liquid markup:
{% if ticket.cc_names != empty %} People CCd on this ticket: {{ticket.cc_names}}{% endif %}
Its a simple statement: if people have been CCd, list their names.
We added this code above the first line of text in the email body but you can place it anywhere youd like. And of course, reword the text as you see fit.
In email notifications, this looks like this to the end-user:
If you also wanted to show that no one has been CCd, you just need to add two more lines of code:
{% if ticket.cc_names != empty %} People CCd on this ticket: {{ticket.cc_names}}{% elsif ticket.cc_names == empty %} No one has been CCd on this ticket.{% endif %}
When no one has been CCd, your email notifications will look like this:
To learn more about Liquid markup and how it can be used in Zendesk, see Using Liquid markup to customize comments and email notifications.