Introduction
Customization zones can be integrated by declaring the field names in the desired content (URL, text zone, ...) in the form {{MM:NOM_DE_LA_PERSO}}.
Note: the name of the PERSONAL_NAME customisation field must be written in upper case.
It is also possible to integrate dynamic content directly into the code based on the fields present in the target.
Customisation and dynamic content
The management of different cases is done on the entire block (raw). This block takes the following form:
<dynamic-content format="raw">
<scenario default="true">
<conditions>
</conditions>
<value>
Hello,
</value>
</scenario>
<scenario>
<conditions>
<condition field="MM:CIVILITY" op="is not none"> </condition>
<condition field="MM:LASTNAME" op="is not none" logic="and"> </condition>
</conditions>
<value>
<a href="https://monsite.com" target="_blank" style="text-decoration:none; color:#333333">Hello {{MM:CIVILITY}} {{MM:LASTNAME}}, </a>
</value>
</scenario>
<scenario>
<conditions>
<condition field="MM:CIVILITY" op="is none"> </condition>
<condition field="MM:LASTNAME" op="is none" logic="or"> </condition>
</conditions>
<value>
<a href="https://monsite.com" target="_blank" style="text-decoration:none; color:#333333">Hello, </a>
</value>
</scenario>
</dynamic-content>
Within this main block, we define the various scenarios via the <scenario> tag. It is mandatory to define a default block in the event that none of the conditions of the other scenarios are met. To define this default scenario simply add the default attribute.
Scenarios are defined with:
- A <conditions> block in which we define the list of conditions (<condition>) to be met in order to display this block. Each condition is based on a field in the target, which must be prefixed with "MM:" (example: field="MM:LASTNAME").
- A <value> block in which we find the value to be displayed if the conditions are met.
The <conditions> block is composed of N <condition> blocks for N conditions in this form:
<condition field="MM:FIRSTNAME" op="==" value="TEST"></condition>
<condition field="MM:FIRSTNAME" op="==" value="TEST2" logic="or"></condition>
The various possible operations for conditions (op="xx" attribute) are:
- equal to : ==,
- different from : !=,
- is null : is none,
- is not null : is not none.
The various logical operators (logic="xx" attribute) are:
- AND : logic="and",
- OR : logic="or".
The logic attribute should only be applied from the second condition block onwards.
Conclusion
The ability to add personalisation zones and dynamic content in an HTML file or the code editor means that the message can be adapted to the specific characteristics of the recipients.