Advanced Email Templating
Advance Email Templating allows for highly customized email templates. It can be used in both the drag-and-drop editor and directly on imported HTML.
Our templating syntax allows for highly customized email templates that cater to a wide range of business needs and individual preferences. Powered by Liquid, this syntax is incredibly versatile and can be used in both the drag-and-drop editor and directly on imported HTML. Leveraging this syntax opens up a world of possibilities to create outstanding email templates, be it for marketing campaigns, newsletters, transactional emails, or personalized customer communications. Whether you are a seasoned developer or new to email design, our templating syntax provides the tools and flexibility needed to craft visually appealing and highly effective email templates, ensuring you can achieve the best possible outcomes for your emails.
1. Predefined Variables
When you input predefined variables into your messages, they are replaced with the corresponding values when the message is sent.
Contact
Contact personalisation enables you to display dynamic Contact attributes in your messages. They are prefixed with contact.attributes.
. You can reference default contact attributes, and also any custom attributes defined in your workspace.
Organization
Organization tags allow you to include information about your company or organization in your messages. You can manage this information by navigating to Settings
> Organization
and updating the Contact information
section.
Tag | Description |
| Your organization’s ID |
| Your organization’s legal name |
| Your organization’s full address, including city, state zip code, and country |
| Your organization’s street address |
| Your organization’s city |
| Your organization’s state |
| Your organization’s country |
| Your organization’s zip code |
| Your organization’s website URL |
Email Address
To reference the email address that the email is being sent to, you can use the {{ emailAddress }}
variable.
Unsubscribe URLs
You can use the {% unsubscribe %}
tag to include an unsubscribe link in your email. Note that this tag also embeds a link (<a>
tag) with the text ‘Unsubscribe’, so using {% unsubscribe %}
will embed a generated unsubscribe url.
To customise the text you can provide an argument, e.g. {% unsubscribe 'Custom text' %}
will output:
If you need to embed just the link (URL) part without the surrounding <a>
tag (because you have your own <a>
tag already or you want to style your own link) you can use the {% unsubscribeLink %}
tag. Since no <a>
tag is being provided you need to have your own, e.g.:
<a href="{% unsubscribeLink %}">Unsubscribe</a>
Web view URLs
You can use the {% webView %}
tag to include a web view link in your email. Note that this tag also embeds a link (<a>
tag) with the text ‘View in browser’, so using {% webView %}
will embed a generated web view link.
To customise the text you can provide an argument, e.g. {% webView 'View on the web' %}
will output:
If you need to embed just the link (URL) part without the surrounding <a>
tag (because you have your own <a>
tag already or you want to style your own link) you can use the {% webViewLink %}
tag. Since no <a>
tag is being provided you need to have your own, e.g.:
<a href="{% webViewLink %}">View in browser</a>
Dates
There are a number of different ways to make references to dates.
Input | Output |
|
|
|
|
|
|
|
|
|
|
|
|
2. Filters
Filters allow you to change the way tags appear.
default
filter
default
filterThe default filter allows you to set a default value for a tag, if it’s value may not be set:
capitalize, upcase, downcase
filters
capitalize, upcase, downcase
filtersThe capitalize filter capitalizes the first letter of value:
date
filter
date
filterThe date filter allows you to format a date. This supports the same syntax as strftime
currencyFormat
filter
currencyFormat
filterThe currencyFormat filter allows you to format a number as a currency.
3. Logic & Segmentation
Conditionals
Conditional logic enables you to show or hide content based on certain conditions.
When writing conditional logic, it is important to consider the type
of the tag in question. If you are comparing a number for example you can use number-specific operators like >
, <
, >=
, <=
.
You can also write conditional logic based on a contact’s membership of a given segment. You can do this like so:
Loops
Loops enable you to iterate over a list of items. Ensure that attriute you are referecing is an array:
Last updated