Execute Expression

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

  1. Give a description for your expression
  2. Specify a name for the Stored Value that will hold the result
  3. Select the 'Type' (these are detailed below)

For more info on using Stored Values see Using Stored Values.

Execute Expression - Types

Execute Expression - Types
  1. Addition adds two values together.
  2. Subtraction subtracts one value from another.
  3. 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.
  4. 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.
  5. Advanced. This executes an ECMA 5.1 (JavaScript) script allowing for numeric, date and string operations to be performed for advanced data manipulation.
  6. 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

  1. Enter the first number for your calculation
  2. Enter the second number for your calculation

PLEASE NOTE: One or both of these items could be the result of a Stored Value - See Using Stored Values.

Execute Expression -  Subtraction

  1. Enter the first number for your calculation
  2. Enter the second number for your calculation

PLEASE NOTE: One or both of these items could be the result of a Stored Value - See Using Stored Values.

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.

  1. To perform an adjustment to the current date, select this check box OR
  2. If performing an adjustment to a Stored Value date, select the name of the Stored Value from the list.
  3. 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.

  1. Select the Stored Value from the index list
  2. 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.
  3. Use the add button to add a row, one at a time.
  4. 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

Advanced executes an ECMA 5.1 (JavaScript) script allowing for numeric, date and string operations to be performed for advanced data manipulation.

This can be used for many things including:

  • concatenating contact fields together
  • setting strings to lower case
  • performing arithmetic
  1. Type your code into the input area.

Both functions and single expressions are supported e.g.

//function version

function execute(){

var firstName = '[@contact->firstName]';

return firstName.toLowerCase();

}

//single expression version (return not required)

'[@contact->firstName]' + ' ' + '[@contact->lastName]'

 

 

0 Comments

Add your comment

E-Mail me when someone replies to this comment