Overview
This feature allows you to insert one of two text or image variants into a message, based on whether a recipient meets a predefined condition. During sendout, Mapp Engage checks the recipient’s attribute data and inserts the matching variant.
This type of personalization can only be created in text mode. The graphical personalization Builder does not support it.
Background Information
This setup requires three pieces of information:
Which attribute should fulfill which condition
What to insert if the condition is met
What to insert if the condition is not met
You can insert either text or an image variant as an alternative.
Conditions are built using JSP Expression Language, and you can also use Mapp Engage functions.
Configuration and Behavior
Use this placeholder structure:
"<%${(attribute and condition)? 'text/picture1' : 'text/picture2'}%>"
Key rules inside the expression:
The expression is wrapped in
${ ... }.Text values are written in single quotes
'...'.Attribute names are written without quotes.
user['Title']is an exception, the queried value (1,2,-1) is written in single quotes.For the condition part, you can also check whether an attribute is present (
not empty) or missing (empty).
Example
Goal: Display the saved message name in the header. If no message name exists, display the subject instead.
Placeholder:
<%${(not empty message['Name'])? message['Name']: message['Subject']}%>
Result:
If
message['Name']has a value, that value is inserted.If
message['Name']is empty,message['Subject']is inserted instead.