Customizing your site email templates

Tender allows you to customize the notifications sent to users. You can create new custom templates by going to Account & Settings > Email Setup > Email Templates:

Creating a new email template

The template comes pre-filled with our current default template, so it's easy to modify.

Syntax

You can use a special syntax to use preset variables in templates. Surround each variable with {{double_braces}} and use the following variables:

  • {{name}} - The name of the author
  • {{email}} - The email of the author (only available in notifications to supporters)
  • {{title}} - Title of the discussion
  • {{category}} - Category of the discussion
  • {{url}} - URL of the discussion created by the user's support request
  • {{number}} - Comment number
  • {{comment}} - Body of the discussion comment
  • {{comment_html}} - Body of the discussion comment rendered in HTML
  • {{internal}} - Whether the comment is internal or not
  • {{private}} - Whether the discussion is private or not
  • {{support}} - Whether the author is a supporter or not
  • {{user}} - Whether the author is a registered user or not
  • {{state}} - State of the discussion (open/resolved)
  • {{assets}} - Collection of assets attached to the comment
  • {{host}} - The Tender site URL
  • {{unsubscribe_url}} - Unsubscribe URL

Templates are parsed with Liquid, and follow the syntax described in the liquid wiki.

You'll note there are also variables for the previous comment (if this was a reply). You can see these in action in the default template;

  • {{previous_date}} - the timestamp of the previous comment. You can format this date to set the timezone (it will be in UTC by default) and to set the format - {{ previous_date | set_time_zone: 'EST' | date: "%a, %b %d at %I:%M %p %Z" }}. Time zones are from the IANA standard list of timezones and the format is in in strftime
  • {{previous_name}} - name of the previous commenter
  • {{previous_comment_html}} - truncated body, in html-suitable format, of the previous comment
  • {{previous_comment}} - truncated body, in text, of the previous comment.

How to test it?

The easiest/safest way to test custom templates is to use them on a test category, hidden from the public:

Creating a test category

Create a custom template associated with this category:

Selecting the test category on the template

And then create a discussion within that category, adding an external email address that you control:

Creating a test discussion

The email address test@company.com will receive notifications for each new comment, so you can play with your template until you find it satisfying.

When you're done, associate the template with other categories, and delete TEST CATEGORY.

Markdown, or not?

In the HTML version of the email, the comment that you write will render just as it does on the web. This means that if you chose Markdown when writing your comment (which is the default for supporters), it will be interpreted and rendered appropriately in the response. This should allow you to craft amazing answers, to the delight of your users :) This may also be an opportunity for you to improve your echo templates to take advantage of this feature.

If you chose plain text instead (no formatting), then the comment will be exactly as you typed it.

Restrictions

  • Custom HTML emails are only available to our customers on a plan with Custom Branding (Ultimo & a few legacy plans). This means that if you create a custom template, and you don't have access to custom branding, your email will switch back to plain text. This is important, so be aware of it.

  • No matter what you do, you should always keep the links that let your users unsubscribe (#unsubscribe and #ignore). Nobody likes to be spammed, and users should always be able to opt-out of emails.

Existing templates

For customers who have already setup a custom template, the switch to HTML emails as the default won't affect you.

However, you might want to upgrade your template to HTML, starting from the one we provide. Simply create a new template on a test category, as explained above, and switch to it once you are satisfied with the result.

If you have questions, remarks, just drop us a line.