Rule of Thumb: Condition vs. SmartAI
- Use Condition Block: When you have clear, rule-based logic (e.g., “If
amount> 500 ANDuseris ‘Gold’”). It is faster and error-proof. - Use SmartAI/Ask Block Routing: When you need to route based on vague user intent or sentiment (e.g., “If the user seems angry”).
How it Works
The Condition Block executes logic similar toif / else-if / else statements in programming. It evaluates rules top-to-bottom and follows the path of the first matching condition.
1. Defining Conditions
To configure a logic rule:- Select a Variable: Choose the variable you want to evaluate (e.g.,
{{transaction_amount}}). - Choose an Operator: Select a comparison operator such as:
- Equals / Not Equals
- Less than / Greater than
- Contains / Does not contain
- Is Empty / Is Not Empty
- Other conditions
- Define the Value: Compare the variable against:
- A Fixed Value: (e.g.,
500,active,refund) - Another Variable: (e.g.,
{{account_balance}})
- A Fixed Value: (e.g.,
2. Complex Logic (Nesting & Chaining)
You can handle sophisticated scenarios by layering your logic:- AND/OR Logic: Combine multiple criteria within a single branch (e.g., “If
Regionis ‘US’ ANDStatusis ‘Active’”). - Else-If Structure: Add multiple distinct conditions to the block. The system checks them sequentially.
- Condition 1: Is User VIP? -> Route to VIP Flow.
- Condition 2: Is User New? -> Route to Onboarding Flow.