The condition for the insertion of the personalized content is defined in the ​start tag​.

This condition is enclosed by expression="${()}" tag. When placed in the expression, each condition must be enclosed within its own set of parentheses.

If each condition is enclosed within its own set of parentheses, multiple conditions can be embedded in the expression.

An entire paragraph can be inserted as long as all the individual conditions apply.

Example

To insert a text only when a recipient is born on 11/16/1961, the syntax is as follows:

<% InsertIf expression ="${((user['DateOfBirth'] == '1961-11-16'))}"%> text <%/InsertIf%>

Build a Single Condition​

To set up a condition, the conditions belonging together are bracketed.

First, specify in which attribute the respective value is to occur. For an overview of the nomination of attributes, see Attribute References​.

Then follows the relationship between the attribute and the value which is stored there.

The following relations are possible:

Relation

Description

<                               

Less than                                      

>

Greater than

<=

Less-than-or-equal

>=

Greater-than-or-equal

==

Equal

!=

Not equal

-

Not empty

After the relation follows the value that is to be reviewed. This value can be entered as a fixed value or it is checked out of another attribute.

When a value is entered, it must be set in single quotes. For a blank value, enter zero. If another attribute is set in relation, then do not use any apostrophes.

Example

It is to be verified whether a recipient is already aged 18. If so, a corresponding section in the email is inserted. The shipping date is 16/11/2010.

You use the following complex personalization:

<% InsertIf expression ="${((user['DateOfBirth']> = '1992-11-16'))}"%> text <% / InsertIf%>

Link Multiple Terms​

Single conditions can be linked with the aid of operators and further conditions.

Operators

Operator

Description

And                                     

Both conditions must be fulfilled.                                 

Or

One of the conditions must be fulfilled.

The operator makes it possible to create personalization rules that meet several conditions.

Example

You want to identify male contacts who are 18 years old or older. If both conditions are fulfilled, you want to insert a corresponding section of the email. The shipping date is 16/11/2010.

You use the following complex personalization:

<% InsertIf expression ="${((user['DateOfBirth']> = '1992-11-16 ') and 
(user['Title'] == 1 ))}"%> text <% / InsertIf%>

Example

Verify if a customer made a purchase on a specified date and is male. If both conditions are fulfilled, a corresponding section is inserted into the email. The purchase date is 16/11/2012.

You use the following complex personalization:

<% InsertIf expression ="${((<user['Purchase Date'] > = '2013-11-16 ')
and (user.Title == 1 ))}"%> text <% /InsertIf%>

Set​

Through parentheses, you can add hierarchies that are required for insertion the section.

Example

You send messages to two groups of contacts. Both groups have indicated French as their language. The first group is from the region of Paris, the second group is from the region of Quebec. The regions of the contacts are stored in a custom attribute region(user.CustomAttribute['Region']). The language is stored in the standard attribute ISOLanguageCode.

You use the following complex personalization:

<% InsertIf expression ="${(((user.CustomAttribute['Region'] == 'Paris')and (user['Title'] == 1)) or 
((user.CustomAttribute['Region'] == 'Quebec')and (user['Title'] == 1 )))}"%> text <% / InsertIf%>

Mapp Engage Functions​

Beside the JSP expression language, Mapp Engage uses functions to create special personalizations. These functions enable Mapp Engage to check certain parts of an attribute value, use regular expressions, or consider upper cases within a personalization. An overview of all available Mapp Engage functions and the creation of personalization rules can be found in Mapp Engage Functions​.