Merge Tags

Standard Merge Tags

Tag Meaning
ARCHIVE A link to an online version of the email
OPTIN A link to a page that subscribes a user
OPTOUT A link to a page that unsubscribes a user
UNSUB A link to a page where a user can opt out of emails
SUBJECT The subject of the email
PUBLISHED_ON The date/time the email is sent out
ARCHIVE_PAGE A boolean indicating True if viewed online, false if in an email
_FORM:FORM_ID A link to a custom form with id FORM_ID

Merge tags are inserted into a template surrounded by the  *| and |* characters. The merge tag is not case sensitive *|Name|* will work the same as*|NAME|* and *|name|*.

Formatting Merge Tags

You can provide an alternative value for a merge tag for cases where the merge tag may be empty by giving an OR value,  *|<tag>:OR:alternative|* e.g. *|NAME:OR:Visitor|*

Merge tags can take an additional formatting option by separating the merge tag with a  *|<tag>:FORMAT:<format>|* e.g. *|Name:cap|* to make the Name customer property use title casing.

If you have a list of items in the data, you can select the first or last item in a collecting with  *|<tag>:FIRST|* or *|<tag>:LAST|*, e.g. *|Basket.Items:FIRST|*.

The first and last selector can be used more than once, and can also be used in combination with the above OR and FORMAT merge tags, e.g. *|Basket.Items:FIRST.Attributes:LAST.Name:FORMAT:UPPER|*.

Formatting Types

Strings

Formatter Effect
upper MAKE UPPER CASE
lower make lower case
cap Capitalize Or Title Case
url-encode Encode as a URL
xml-encode Encode as XML
html-encode Encode as HTML
date:format Encode as date using format after trying to parse string as datetime
limit:length Limit the amount of text shown to length

Note that the limit formatting can be applied after other format tags too e.g. To make something titlecase and limited to 10 characters...  *|<tag>:cap:limit:10|*

The format directives above are not case sensitive

Money

Formatter Effect
P show the Pounds value
p show the pence value
S show the currency symbol

Dates and DateTimes

Symbol Meaning Presentation Example
G era text AD
C century of era (>=0) number 20
Y year of era (>=0) year 1996
x weekyear year 1996
w week of weekyear number 27
e day of week number 2
E day of week text Tuesday; Tue
y year year 1996
D day of year number 189
M month of year month July; Jul; 07
d day of month number 10
a halfday of day text PM
K hour of halfday (0~11) number 0
h clockhour of halfday (1~12) number 12
H hour of day (0~23) number 23
k clockhour of day (1~24) number 24
m minute of hour number 30
s second of minute number 59
S fraction of second number 978
z time zone text Pacific Standard Time; PST
Z time zone offset/id zone -0800; -08:00; America / Los_Angeles

The count of pattern letters determines the format.  

Text: If the number of pattern letters is 4 or more, the full form is used; otherwise a short or abbreviated form is used if available.

Number: The minimum number of digits. Shorter numbers are zero-padded to this amount.

Year: Numeric presentation for year and weekyear fields are handled specially. For example, if the count of 'y' is 2, the year will be displayed as the zero-based year of the century, which is two digits.

Month: 3 or over, use text, otherwise use number.

Zone: 'Z' outputs offset without a colon, 'ZZ' outputs the offset with a colon, 'ZZZ' or more outputs the zone id.

Zone names: Time zone names ('z') cannot be parsed.

Configuring Areas

Note that merge tags within the following tags must have any spaces replaced with an underscore, so that  First Name would become First_Name.

Repeated sections

To repeat a section over a list of items passed into with the merge data use  data-intilery-repeat

<code><tr data-intilery-repeat="item in Content">       <td>*|item.Name|*</td><td>*|item.Value|*</td> </tr>

If you want to repeat over everything except the first or last element you can use  data-intilery-repeat="item in Content:REST" to not include the first element, data-intilery-repeat="item in Content:TRUNC" to not include the last element, or data-intilery-repeat="item in Content:TRUNCREST" to not include either the first or last element.

Optionally displaying a section

You can test against a boolean or for the existence of a key using  data-intilery-if

<h2 data-intilery-if="ARCHIVE_PAGE">Only rendered online, not in email</h2>

Still need help? Contact Us Contact Us