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.
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 (The name of the tab will be different based on your selection type).
Execute Expression - Addition
Execute Expression - Subtraction
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.
For more information on using Stored Values - See Using Stored Values.
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]'