Using Decision Variables in Flow Conditions
Decision Variables are a system of user profile variables integrated into the Flow Builder. Their objective is to access real-time historical and contextual user data (such as their risk history, previous interactions, or consolidated data). This allows for the creation of smarter and more personalized business rules than those based solely on the information from the current flow execution.
Configuration in the Flow Builder
This process explains how to use a Decision Variable within the Condition Block to direct the flow through different paths based on the user’s history.
Step-by-Step Configuration
-
Add and Connect the Condition Block
Add the “Condition” block at the point in the flow where you need to apply the rule (e.g., after a
Document Validationor aMessage Block).
-
Choose the Variable Type
Within the Condition block’s properties panel, configure the condition as follows:
- In the
Set the condition of the conversation flowsection, selectDecision Variablein the variable type selection field. - Click the button to Configure decision variable.
- In the
-
Define the Logic and Value
Search for and select the Decision Variable you need (e.g.,
criminal_record). The system will automatically load the available logical operators, based on the variable’s Data Type.
-
Establish the Rule Paths
Relate the logic of your business rule to the selected decision variable(s) to define the flow paths. The condition block will generate two outputs: the Primary Option when the condition is TRUE, and the Alternative Option (Else) for all other cases.
Additionally, you can configure multiple conditions within the same Condition block, combining different decision variables and rules as needed. This allows you to create more complex and tailored branching logic directly within a single block.
Flow Control Example
If you use the boolean profile variable criminal_record (which indicates if the user has a criminal history), the goal is to stop the process if it is true. Therefore, the rule is configured as: If criminal_record is equal to true.
- The True Path (if the condition is met) will connect immediately to a Finish Chat block with a failure status (rejection), preventing the process from continuing.
- The Else Path is used for the success path, directing the flow to the next validation step.