Personalization and customization of email messages is accomplished using the special Template Tags, as well as Template Logic statements. This allows you to target your customers, using a single template to send different content to each contact.
- Set and Print Data
- Contact and Contact Custom Data
- List and Campaign Data
- Articles
- External Content and RSS Feeds
- Date Manipulation
- String Manipulation
- Tracking links: Display, Unsubscribe, FTAF, Analytics, STOP
- Fillin Fields
Template Tags
Content in Templates and Articles can be personalized using special replacement tags. You can include information in your messages such as the contact’s email address and first name, as well as any other information included in the contact's record. This manner of personalization will work in Plain Text, HTML, and Mobile formating.
All tags in the platform start and end with "%%". Personalization tags for contact data field names, such as "first", also include a dollar sign, and are in the following format:
%%$[FIELD_NAME]%%
For example, to display a contact’s first name, insert the tag %%$first%% where you would like the name to appear.
In Templates and Articles, custom fields also follow the same format for personalization. For example, if you have a custom field "gender", you can include it in your message by placing the tag %%$gender%% in your content.
Note: Tags are case sensitive. Be sure when you use a tag, the case matches that of the field in the system. The default contact data fields are all lower case. Custom fields can be created in mixed case.
Template Logic
Templates and Articles also support a simple logic control system. This allows you to evaluate data and include content based on the results. Logical statements are written in the following formats:
%%if [FIELD][CONDITON][VALUE]" then [DO SOMETHING]%%
For example:
%%if first != "" then printdata first else print "Friend"%%
This statement looks at the "first" field for each contact record, and if the first is no blank, then it will print the contents of the first field, otherwise it will print the string "Friend".
To check if a field is empty, use two double (straight) quotes with no space: "".
Note: If you are printing a data field, such as the email address, use "printdata" in your logic. If you are only printing alternate text, such as "Hello friend", use "print."
Using logic has the following limitations:
- Text must be enclosed with double quotation marks: print "This is text".
- Contact data field names are not quoted: printdata first.
- Logical and/or commands are not supported.
- Line breaks in the middle of the logic statement will break the tag, preventing the logic from being performed; however, logic statements can wrap.