To test variables or command outputs within a chain, add a Conditional event. For example, with this event, you can use text-matching, regular expressions, or boolean true/false logic to verify an output contains a predefined value or no future dates.
Step 1. Add the Event to the Chain
- From Chains , click Build and click Edit for the chain.
- Click Chain Events , and move Conditional to where the event should occur in the chain.
- Drag a link to the event from the preceding node in the chain.
Note: To change a node's position in the chain, unlink it from other nodes, and then move it to where it should occur. To move multiple nodes at once, hold SHIFT as you select them.
- Select the event's node, and click Edit
- Under Basic Info, enter a unique name and description to help identify the event.
Step 2. Set Up the Conditional Logic
Under Conditions, build the conditional logic as rules or groups of rules to test outputs and variables of various data types:
- String, for one or more characters
- Integer, for any whole, non-decimal numeric value
- Date, for a date string or variable
- Float, for any numeric value
Note: For JSON, use a variable transformation to parse values.
- Select whether to add a Rule or Group of rules.
- If you include multiple rules or groups, join them with an AND or OR boolean:
- If all rules or groups must be true for the condition to pass, select AND.
- If any rule or group must be true for the condition to pass, select OR.
- For each rule, select the type of data and the output or variable to test, and set its criteria to pass the condition:
- To test whether the value is blank, select Is blank or Is not blank.
- To test whether the value includes specific characters or another output or variable value, select Contains, and enter or select the value to match.
- To test whether the value meets a regular expression, select Matches RegExp, and enter the expression to match.
- To test whether the value starts or ends with specific characters or another output or variable value, select Start with or Ends with, and enter or select the value to match.
- To test whether a numeric value equals an amount, select = or !=, and enter or select the amount.
- To test whether a numeric value is greater or less than an amount, select < or >, and enter or select the amount.
- To test whether a numeric value is greater or less than or equal to an amount, select <= or >=, and enter or select the amount.
- After you set up the conditional logic, click Save.