This is an advanced feature that executes an expression (addition, subtraction, series or advanced) and stores the result of the expression in a named location (stored value) associated with a workflow member for use later on in the Workflow.
One use for this could be to combine GatorMail and GatorLeads scores to give you an overall score for use in Workflow conditions.
The below screen is shown on dragging the stage to the canvas.
- Give a description for your expression
- Specify a name for the Stored Value that will hold the result
- Select the 'Type' (these are detailed below)
Execute Expression - Types
- Addition - adds two values together.
- Subtraction - subtracts one value from another.
- Date Adjustment - allows you to add or subtract a number of units to a date in a stored value and store the output in a different stored value.
- Series - enables different data item to be retrieved each time a Workflow member passes through the stage, based on a numeric value stored in an stored value.
- After your selection is made, click on the second tab.
Please Note: the name of the tab will be different based on your selection type.
Execute Expression - Addition & Subtraction
- Enter the first number for your calculation
- Enter the second number for your calculation
Please Note: One or both of these items could be the result of a Stored Value.
Execute Expression - Date Adjustment
Date Adjustment allows you to add or subtract a number of units to a date field and store the output in a Stored value.
This could be based on the current date at the time a member enters the stage or the date held in a Stored Value.
- To perform an adjustment to the current date, select this check box OR
- If performing an adjustment to a Stored Value date, select the name of the Stored Value from the list.
- Select the 'Adjustments' tab.
Applying the Adjustments
In this tab you choose the adjustment to apply to each of the date units.
If applying a negative adjustment you should include the minus symbol. Otherwise use a positive number without (+).
The example above will minus 3 months from the date it is querying so if the date it was looking at was 07/06/2018, then the result will be 07/03/2018.
Execute Expression - Series
A Series expression allows you to use a member stored value as a starting point, and to change that value each time a member passes through the stage.
This can be used to progress people through sections of a Workflow by updating the value once they've completed particular sections.
The item number could also relate to a campaign ID which in turn can be used to trigger particular campaigns to members. This is an advanced feature.
- Select the Stored Value from the index list.
- Set a default value to be used if the current value for the member doesn't match any value you intend to use within this stage.
- Use the add button to add a row, one at a time.
- Type the value that the Stored Value should change to on each occasion the member passes through the stage.
Execute Expression - Advanced
This can be used for many things including:
- concatenating contact fields together
- setting strings to lower case
- performing arithmetic
- Type your code into the input area.
Both functions and single expressions are supported e.g.
var firstName = '[@contact->firstName]';
//single expression version (return not required)
'[@contact->firstName]' + ' ' + '[@contact->lastName]'