...
Child pages (Children Display) |
---|
Logic Step Introduction
The goal of the code is to instruct the autoresponder which step to run next.
This is done by setting the $result
variable (string value) to the name of a step directly following this logic step.
The links above will help you determine which step to use based on the customer and their history.
The simplest valid logic block would be a single assignment to $result
:
Code Block |
---|
#set($result = 'Name of Child Step') |
Here's another example:
Code Block |
---|
#if($customer.orders.size() > 0)
#set($result = 'Existing Customer Step')
#else
#set($result = 'New Customer Step')
#end
|
To debug your code, use the $logger.log('some message here')
method:
Code Block |
---|
$logger.log('Customer Email')
$logger.log($customer.email)
|
To end a campaign successfully within a logic step, do the following:
Code Block |
---|
#set($result = '_ENDCAMPAIGN_') |
Requirements
For Email Templates: any valid velocity syntax will do, and is totally optional
For Logic Steps: 1) valid velocity syntax and 2) must #set the variable $result to the name of child step.
...