Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Context

Excerpt

Status
subtletrue
colourGreen
titleNEW V3.15
Contact criteria and indicators can now be inserted as dynamic fields inside SAM's email templates. They can be inserted within titles or text content and used to trigger the display of certain elements of your template.

Solution

A certain number of contact fields, e.g., first name, email or contact number, were already available to create a more personalized display for the recipients of your SAM email. We have now extended the list of available dynamic fields to include gender, age, indicators and contact criteria.

Getting started

Gender & Age

In the list of Merge tags, the gender and age of the contact have been added to the list and can be inserted within any title or text content. The age is computed from using the date of birth of the individual contact (default value is 0).

$!campaignData.contact.age
$!campaignData.contact.gender

Contact criteria & Indicators

From the More menu of the text editor, you can click on the "Add custom merge tags" menu item to open a pop-up to select a contact criterion or indicator and then click OK. The code for that dynamic field will then be inserted in the text, similarly to what is done in the case of simple merge tags.

$!campaignData.contact.contactCriteriaMap.get('CRITERIA_CODE').get(0)
$!campaignData.contact.contactIndicatorMap.get('INDICATOR_CODE').get(0)

When the campaign is executed and the email created, the value of the criterion for each contact will replace the code of the dynamic field.

Info

All types of values will be returned as a string. Multiselect contact criteria will return the first value only. However, it is possible to loop of the different values inside a display condition (see examples below).


Image Modified

Image RemovedImage Added

Examples

Inside text

In the text editor toolbar, simply click on Merge tags or "More > Add custom merge tags" and select a value. The corresponding smart tag will displayed within your text and can be easily formatted. With smart tags, the code itself will be hidden. When the email is sent to the recipient, the code will be replaced by the actual value for that contact.

Example of the code for the "first name" field:

$!campaignData.contact.firstName

Example of the code for a contact criteria with the code "MEMBER":

$!campaignData.contact.contactCriteriaMap.get('MEMBER').get(0)

As a display condition

Display conditions can be added to the configuration of rows in order to toggle the display of certain rows based on contact details.

Example of the before condition to only display the row if the contact has the value true for the contact criteria MEMBER:

#if ('$!campaignData.contact.contactCriteriaMap.get('MEMBER').get(0)' == 'true')



Image AddedImage Added

Image Added