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>
UNSUB_LINK¶
This macro is replaced with unsubscribe link.
Example:
<a href="[[UNSUB_LINK]]"> Click here to Unsubsribe</a>
PERMALINK¶
This macro is replaced with a permanent link where the campaign can be visualized if the mail client the email is broken.
Example:
<p>This message contains graphics. If you do not see the graphics, click <a href="[[PERMALINK]]">here</a> to view.
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 |
---|---|---|
|
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]] |
|
This will be used as an alternative content
to display if the expression evaluation
was false and must be used after the |
[[IF:IS_CLIENT]] We’re glad to have you as our client [[ELSE]] Would you like to become our client? [[ENDIF]] |
|
This signals the end of a conditional
structure and is mandatory if an |
[[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 |
---|---|---|
|
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]] |
|
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]] |
|
Use this expression with the |
[[IF:PHONE=android]] How’s your android phone? [[ENDIF]] |
|
Use this expression with the |
[[IF:PHONE!=android]] Want to switch to an android phone? [[ENDIF]] |
|
Use this expression with the |
[[IF:ORDER_COUNT>10]] You got a 20% discount for fidelity [[ENDIF]] |
|
Use this expression with the |
[[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.