Cheat Sheet - Campaign versus Marigold Engage
This page contains a quick guide on how some functions, variables and components are used within Campaign versus Marigold Engage. It does not replace the dedicated topics, but can be used as 'cheat sheet'.
MASECTION / Conditional expression
Campaign:
<div id="MASECTION" MACONSTRAINT="ID=0" MAHIDEDIV="true"></div>
Engage:
<sg:conditional expression="eq([MASTER.ID],toint('0'))" id="row-043013eb-db1d-429a-bc0f-6b79783a1a19"></sg:conditional>
IF function
Campaign:
~(IF(ID=0,'anonymous','known'))~
Engage:
[%if(eq([MASTER.ID],toint('0')),'anonymous','known')%]
Field value from user list
Campaign:
~FIELDNAME~
Engage:
[%[MASTER.FIELDNAME]%]
Field value from profile extension
Campaign:
~PROFILE_EXTENSION.FIELDNAME~
Engage:
[%[PROFILE_EXTENSION.FIELDNAME]%]
Field value from actionlist
Campaign:
~ACTIONLIST.FIELDNAME~
Engage:
[%eventValue('FIELDNAME')%]
Field value from container / repeater
Campaign:
~ITEM.FIELDNAME~
Engage:
[%itemValue('FIELDNAME')%]
Field value from parameter
Campaign:
~@FIELDNAME~
Engage:
[%requestValue('FIELDNAME')%]
ARTICLE_PROPERTY / itemValue
Campaign:
~(ARTICLE_PROPERTY('CONTAINERNAME',0,'VAR'))~
Engage:
[%itemValue('REPEATERNAME',toint('0'),'VAR')%]
Variables
Campaign:
does not exist
Engage:
[%[VARIABLE.VAR]%]
Engage variables are created on message level. When using these variables in a template, they will not yet allow free-form values in there. If however you need to change the color in your email using free-form data, then use a repeater surrounding your entire message and treat the message as one big article. Creating an article will allow free-form data. The article_list would be called 'MAILSETTINGS'.
See the example 'Repeater in Repeater' below.
Content Blocks
Campaign:
does not exist
Engage:
Content Blocks will be dynamically populated when the variable used in the Content Block is present in the message and has a value defined for it.
Content Blocks are a powerful tool. A Content Block is basically a snippet of HTML that can be used and re-used all over.
See this topic for more info on Content Blocks.
Probe / Sensor / Link
Campaign:
<a href="~PROBE(0)~" />
Engage:
<a href="[%LINK(0)%]" /> OR <a expr:href="LINK(0)"></a>
Container / Repeater
Campaign:
<div id="MACONTAINER" macontenteditable="FALSE" maconstraint="" maparameter="ARTICLES" matype="" mahidediv="true">
<div id="MAHEADER" macontenteditable="true"></div>
<div id="MAITEM" macontenteditable="true"></div>
<div id="MAFOOTER" macontenteditable="true"></div>
<div id="MANOMATCH" macontenteditable="true"></div>
</div>
Engage:
<sg:repeater columns="0" dataselection="ARTICLES" id="ARTICLES">
<sg:repeaterheader visible="false"></sg:repeaterheader>
<sg:repeateritem content-value="" id="item-34bb229d-dbc9-4bbb-94ef-d172ea68d9ed" name="Layout-1"></sg:repeateritem>
<sg:repeaterfooter visible="false"></sg:repeaterfooter>
<sg:repeaterempty visible="false"></sg:repeaterempty>
</sg:repeater>
Container in container / Repeater in repeater
Campaign:
<!-- not gonna state the obvious -->
Engage:
This can't be done through the Engage UI.
<sg:repeater columns="0" dataselection="MAILSETTINGS" id="MAILSETTINGS">
<sg:repeaterheader visible="false"></sg:repeaterheader>
<sg:repeateritem content-value="" id="item-34bb229d-dbc9-4bbb-94ef-d172ea68d9ed" name="Layout-1">
<p style="background-color:#[%itemValue('MAINCOLOR')%]; color:#[%itemValue('CUSTOMERCOLOR')%];">
MAINCOLOR: [%itemValue('MAINCOLOR')%]
CUSTOMERCOLOR: [%itemValue('CUSTOMERCOLOR')%]
<br>
<ul>
<li>
NAME: [%itemValue('MOVIETRAILER',0,'NAME')%]
<br>
TRAILER_URL: [%itemValue('MOVIETRAILER',0,'TRAILER_URL')%]
<br>
FALLBACK_IMG: [%itemValue('MOVIETRAILER',0,'FALLBACK_IMG')%]
</li>
<li>
NAME: [%itemValue('MOVIETRAILER',1,'NAME')%]
<br>
TRAILER_URL: [%itemValue('MOVIETRAILER',1,'TRAILER_URL')%]
<br>
FALLBACK_IMG: [%itemValue('MOVIETRAILER',1,'FALLBACK_IMG')%]
</li>
</ul>
</p>
</sg:repeateritem>
<sg:repeaterfooter visible="false"></sg:repeaterfooter>
<sg:repeaterempty visible="false"></sg:repeaterempty>
</sg:repeater>
<sg:repeater columns="0" dataselection="MOVIETRAILER" id="MOVIETRAILER">
<sg:repeaterheader visible="false"></sg:repeaterheader>
<sg:repeateritem content-value="" id="item-2185007b-97d7-4a40-9726-a2863ccea163" name="Layout-1">
<div style="display:none!important;">
NAME: [%itemValue('NAME')%]
<br>
TRAILER_URL: [%itemValue('TRAILER_URL')%]
<br>
FALLBACK_IMG: [%itemValue('FALLBACK_IMG')%]
</div>
</sg:repeateritem>
<sg:repeaterfooter visible="false"></sg:repeaterfooter>
<sg:repeaterempty visible="false"></sg:repeaterempty>
</sg:repeater>
Labels
Campaign:
~#LABELNAME~
Marigold Engage:
[%label('DICTIONARY_NAME','LABEL_NAME')%]