Campaign Macros

EMAIL_TO

This macro is replaced with recipient email address.

Example:

<p> You receive this email on [[EMAIL_TO email]] address becasue....</p>

CUSTOM FIELDS

Customfields can be defined in a contactlist. When we upload a contactlist it can be defined custom fields. You can define custom_fields when upload a contactlist is cvs or tab deliminated format (copy pasted or uploaded)

Example:

email firstname lastname
email@domain.tld Firstname Lastname
email2@domain.tld Firstname2 Lastname2

after this we will have a custom field with name [[firstname]] and [[lastname]]

Example of usage:

<p>Hello [[FIRSTNAME]] [[LASTNAME]], You received this email to address [[EMAIL_TO]], because....</p>

CONDITIONAL MACROS

Use conditional macros to write newsletter sections based on macro values. This allows for a more personal email, tailored for each recipient.

Conditional macros syntax example:

[[IF:*expression*]] I am the if text section [[ELSE]] I am the else text section [[ENDIF]]

Conditional macro components:

Name

Description

Example

IF

This signals the beginning of a conditional structure and must be followed by an expression (See the expressions table bellow)

[[IF:IS_CLIENT]] We’re glad to have you as our client [[ENDIF]]

ELSE

This will be used as an alternative content to display if the expression evaluation was false and must be used after the IF clause was previously opened. This is optional

[[IF:IS_CLIENT]] We’re glad to have you as our client [[ELSE]] Would you like to become our client? [[ENDIF]]

ENDIF

This signals the end of a conditional structure and is mandatory if an IF clause was previously opened, otherwise this conditional structure won’t work

[[IF:IS_CLIENT]] We’re glad to have you as our client [[ENDIF]]

Macros can be used inside the text of the conditional structures with no restrictions as long as the required format is met. The only restriction is that multiple level (nested) conditional structures are not allowed. YOU can’t use an IF inside an IF.

Expression types:

Expressions are the logic that determines what part of the content is displayed and must respect one of the following types:

Expression

Description

Example

MACRO

Use this expression without an operator to indicate the content to display if given macro exists and is not empty

[[IF:HAS_PHONE]] How’s your phone? [[ENDIF]]

!MACRO

Use this expression without an operator to indicate the content to display if given macro doesn’t exist, it’s empty, or 0 (NOTE: see ! in front of the macro)

[[IF:!HAS_PHONE]] Would you like to buy a phone? [[ENDIF]]

MACRO=str

Use this expression with the = operator to indicate the content to display if given macro equals to a certain string

[[IF:PHONE=android]] How’s your android phone? [[ENDIF]]

MACRO!=str

Use this expression with the != operator to indicate the content to display if given macro is not equal to a certain string

[[IF:PHONE!=android]] Want to switch to an android phone? [[ENDIF]]

MACRO>str

Use this expression with the > operator to indicate the content to display if given macro’s value is greater than a certain number

[[IF:ORDER_COUNT>10]] You got a 20% discount for fidelity [[ENDIF]]

MACRO<str

Use this expression with the < operator to indicate the content to display if given macro’s value is smaller than a certain number

[[IF:ORDER_COUNT<10]] Finalize 10 orders to get a 20% discount [[ENDIF]]

Note! Expression values don’t have types, meaning that it we have an inexistent macro, an empty macro value, or a macro with value ‘0’, all of them are all evaluated to false.