Contact data is a crucial part of the internal database.
Generic structure of contact data
Much of contact data is stored within single-choice fields fields that have both a value ID and a text value. You can check for the value of a field with an if statement (ID used). To reference the value ID of a single-choice field, use {{contact.XX}}. If you want to reference the text value, use {{contact.label.XX}}. Please bear in mind that the value for a given ID can vary by language.
First Name + Title (first letters capitalized), Replace, and Default filters:
{{contact.1|title|replace({'_':' '})|default('Friend')}}
Checking email domain
In this example below, we are looking for system field #3 (contact.3), which is the email address. If the contact has an example.com email address, it is displayed so. Otherwise it is stated that it has a different address.
{% if "@example.com" in contact.3 %}
this is an example.com email address
{% else %}
this is not an example.com email address
{% endif %}Just hello?
Using anifstatement you can check if a field is empty {% '' %}. So, if we got no first name on file (the corresponding contact.1 is empty), just say 'Hello'. See example below:
{% if contact.1 !='' %}Dear {{contact.1}}
{% else %}Hello!{% endif %}Birthday
Find out if today is someone’ birthday:
{% if contact.4|localized_date('en','Mdd') == 'now'|localized_date('en','Mdd') %}
Happy birthday !
{% endif %}
Gender distinction
In the next example we are targeting our customers based on their gender. We can show different products to them, based on the above query.
{% if contact.5 == 1 %}
this is for him
{% else %}
this is for her
{% endif %}Reference
Let's go through a list of the possible email personalization placeholders.
General Information
| Parameter | Description |
|---|---|
| {{ contact.1 }} | First Name |
| {{ contact.2 }} | Last Name |
| {{ contact.3 }} | |
| {{ contact.9 }} | Title |
| {{ contact.26 }} | Preferred email format |
| {{ contact.46 }} | Salutation |
Personal Information
| Parameter | Description |
|---|---|
| {{ contact.4 }} | Date of Birth |
| {{ contact.5 }} | Gender |
| {{ contact.6 }} | Marital Status |
| {{ contact.7 }} | Children |
| {{ contact.8 }} | Education |
| {{ contact.10 }} | Address |
| {{ contact.11 }} | City |
| {{ contact.12 }} | State |
| {{ contact.13 }} | ZIP Code |
| {{ contact.14 }} | Country |
| {{ contact.15 }} | Phone |
| {{ contact.16 }} | Fax |
| {{ contact.37 }} | Mobile |
| {{ contact.38 }} | First Name of Partner |
| {{ contact.39 }} | Birthdate of Partner |
| {{ contact.40 }} | Anniversary |
Company Information
| Parameter | Description |
|---|---|
| {{ contact.17 }} | Job Position |
| {{ contact.18 }} | Company |
| {{ contact.19 }} | Department |
| {{ contact.20 }} | Industry |
| {{ contact.21 }} | Phone (office) |
| {{ contact.22 }} | Fax (office) |
| {{ contact.23 }} | Number of Employees |
| {{ contact.24 }} | Annual Revenue (in 000 EUR) |
| {{ contact.25 }} | URL |
| {{ contact.41 }} | Company Address |
| {{ contact.42 }} | ZIP code (office) |
| {{ contact.43 }} | City (office) |
| {{ contact.44 }} | State (office) |
| {{ contact.45 }} | Country (office) |
Other Information
| Parameter | Description |
|---|---|
| {{ contact.27 }} | Avg. length of visit (minutes) |
| {{ contact.28 }} | Page views per day |
| {{ contact.29 }} | Days since last email sent |
| {{ contact.31 }} | Opt-In |
| {{ contact.32 }} | User status |
| {{ contact.33 }} | Contact source |
| {{ contact.34 }} | Contact form |
| {{ contact.35 }} | Registration Language |
| {{ contact.36 }} | Newsletter |
| {{ contact.47 }} | Email valid |
| {{ contact.48 }} | Date of first registration |