Article | 1 min read

Tip of the week: Showing who’ has been cc’’d in email notifications

Last updated November 4, 2011

Have you ever wished that you could allow end-users to see who’s been CC’d 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, let’s modify theNotify requester of comment updatetrigger.

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 CC’d, you add this Liquid markup:

{% if ticket.cc_names != empty %} People CC’d on this ticket: {{ticket.cc_names}} {% endif %}

It’s a simple statement: if people have been CC’d, list their names.

We added this code above the first line of text in the email body but you can place it anywhere you’d like. And of course, reword the text as you see fit.

In email notifications, this looks like this to the end-user:



如果你也想商店w that no one has been CC’d, you just need to add two more lines of code:

{% if ticket.cc_names != empty %} People CC’d on this ticket: {{ticket.cc_names}} {% elsif ticket.cc_names == empty %} No one has been CC’d on this ticket. {% endif %}

When no one has been CC’d, your email notifications will look like this:



To learn more about Liquid markup and how it can be used in Zendesk, seeUsing Liquid markup to customize comments and email notifications.