Start a conversation

Customizing notification email templates

We're actively rewriting our user guide, so check back for improved coverage.

Customizing the templates that govern your notification emails allows you to personalize the content that appears in each email. This can be very useful when choosing which content is most relevant to your staff versus your customers. This article will give you a quick overview of notification email templates and how the customization process works. It will also walk you through the steps you need to follow to personalize your own email notification templates.

Understanding the role of variables in email templates

Let's start with a quick, high-level overview of what email templates contain. Most outgoing emails from Kayako are rendered through their respective email templates. Generally these templates include language phrases, plain text, HTML/CSS, logical statements, and template variables. Basically, it means that you have a lot of options for controlling how the notifications will appear to you and your customers.

In this article, we're going to focus on Variables. Variables can be used in email templates to fill in specific content elements related to either a user or a ticket. So, for example, if you want each notification email to start with 'Dear [Customer's Name]', you can use a variable in the email template to supply the Customer Name for each recipient. 

The notification email templates we're going to be discussing here are the staff notification template and the user notification template. Additionally, each template has two versions: an HTML version and a plain text version. You can set your preference for which format to use in the admin control panel, and then modify the matching template.

Finally, it's important to note that each of these starts out with just a single variable, called either '$_notificationContentsHTML' or '$_notificationContentsText', depending on the template. These variables contain the default contents of your notification emails. If you ever want to restore the default contents for your emails, you can just delete your changes and replace them the default variable.

Modifying notification email templates

You can customize your notification template by following these steps: 

  1. Log in to the Kayako admin control panel. 
  2. Click on Templates in the left navigation bar. 
  3. Under that, click Groups and select the template group you're going to work on. 
  4. In the 'Edit Template Group' window that opens, click the Templates button. 
  5. Click General to expand the category.
  6. We're going to start with the staff notification templates, which are called 'emailnotification_text' for plain text emails and 'emailnotification_html' for HTML emails. 
  7. Let's start with 'emailnotification_text'. Click on it in the list to open the template for editing. 
  8. In the 'Template Contents' text area, you'll see the default variable:
  9. <{$_notificationContentsText}>
  10. Select and delete this variable.
  11. Now, to add your preferred content to the template, you can add any one of combination of the following variables. Simply copy them and paste them into the 'Template Contents' window in the order in which they should appear.

    Ticket subject
    Ticket ID/mask
    Ticket hyperlink
    Customer's full name
    Customer's email address
    Customer's phone number
    Creator (i.e., user/staff)
    Ticket department
    Ticket owner's full name
    Ticket type
    Ticket status
    Ticket priority
    SLA plan on ticket
    Template group used
    Ticket creation date & time
    Last activity date & time
    User's organization name
    Person who made changes
    Changes that took place
    Last ticket post contents
    Reply due date & time
    Resolution due date & time
    Custom fields:
    Valid examples for the GroupName and FieldName

    GroupName is -Testing group
    FieldName are - Testing, Testing text, Text-area, Select_value, Testing-123

    Template changes will be:

    <{$_customFields[Testing_roup][Testing]}><br /><{$_customFields[Testing_group][Testing_text]}><br /><{$_customFields[Testing_group][Text_area]}><br /><{$_customFields[Testing_group][Select_value]}><br /><{$_customFields[Testing_group][Testing_123]}><br />

    Custom field data.
    NOTE: You can use any custom field as a variable by copying this tag and swapping in the group and field name for your custom field. Only ticket custom fields can be used in the notifications email templates. 
  12. When you're happy with your changes, click the Save & Reload button. 
  13. Next, let's tackle the 'emailnotification_html' template.
  14. Click the Back button to return to the list of templates. 
  15. Click 'emailnotification_html' in the list to open it for editing. 
  16. This time, you're looking for:
  17. <{$_notificationContentsHTML}>
  18. Select and delete this variable, and add your own variables, as you did above. 
  19. Don't forget to save the Template changes from 'Save & Reload' button on top. 
  20. Click the Back button to return to the list of 'General' templates. 
  21. To edit the user notification email templates, you'll follow exactly the steps as above, but you're looking for 'emailnotificationuser_html' and 'emailnotificationuser_text'. The same variables are supported. 
Choose files or drag and drop files
Was this article helpful?
  1. Gaurav Katal

  2. Posted
  3. Updated