IF Statement Adv
The IF Statement Adv action allows chatbot builders to create advanced conditional logic workflows using multiple conditions, logical operators, and comparison rules.
Unlike the standard IF Statement, the advanced version supports more flexible and complex condition configurations such as:
Multiple AND/OR conditions
Numeric comparisons
Dynamic and static values
Advanced workflow branching
This utility action helps businesses automate decision-making processes inside chatbot workflows based on customer inputs, payment status, order details, purchase values, and other variables.
The walkthrough demonstrates configuring advanced payment and order validation logic using multiple conditions, operators, and automated response actions.
When to Use IF Statement Adv
Use the IF Statement Adv action when your chatbot requires complex conditional logic involving multiple variables or advanced comparisons.
Common Use Cases
Payment validation workflows
Order eligibility checks
Purchase amount verification
Lead qualification logic
Customer segmentation
Multi-condition chatbot automation
Example Interaction
Condition 1: Payment = Successful AND Condition 2: Last Purchase Amount > 1000
If both conditions are true, the chatbot triggers the success workflow automatically.
How to Add IF Statement Adv
Follow these steps to add the IF Statement Adv action to your bot workflow.
Open Bot Builder
Click the Add Node button
Open the Utilities tab
Select IF Statement Adv
Configure the condition settings
Add multiple conditions if required
Configure Success and Fail actions
Click Create
Click Publish to deploy the workflow
The walkthrough demonstrates selecting the IF Statement Adv node from the Utilities section.
Accessing the Utilities Section
To access the IF Statement Adv action:
Click Add Node
Open the action panel
Click the Utilities tab
The Utilities section contains workflow automation and conditional logic actions.
Selecting IF Statement Adv
Inside the Utilities tab:
Locate IF Statement Adv
Click the action to open the configuration dialog
The walkthrough highlights the advanced IF Statement element used for configuring complex conditional workflows.
IF Statement Adv Configuration
When configuring the IF Statement Adv action, several fields must be completed.
Action Name
The Action Name identifies the advanced condition workflow inside the bot builder.
This name is visible only within the workflow editor.
Example
Advanced Order Check Advanced Payment Validation Premium Customer Validation
The walkthrough demonstrates renaming the default value to:
Advanced Order Check
before saving the configuration.
Condition Type
The Condition Type field defines how multiple conditions should be combined.
Available options include:
AND
OR
The walkthrough specifically selects:
AND
to combine multiple conditions together.
AND Condition Logic
When using AND:
All configured conditions must be true for the workflow to succeed.
Example:
Payment = Successful AND Last Purchase Amount > 1000
If any condition fails, the chatbot triggers the Fail workflow.
Key Field
The Key field defines the variable or customer attribute that should be evaluated.
To configure:
Open the Key dropdown
Select the required variable
The walkthrough first selects:
payment
as the primary condition variable.
Later, the walkthrough adds another condition using:
Last Purchase Amount
as an additional comparison field.
Operator
The Operator field defines how the selected value should be compared.
Available operators shown in the walkthrough include:
Equals To
Not Equals To
Greater Than
Greater Than or Equal To
Less Than
Less Than or Equal To
Between
The walkthrough initially selects:
Is
for the payment condition.
For numeric comparison, the walkthrough later selects:
Greater Than
to validate the purchase amount.
Is Dynamic Value
The Is Dynamic Value toggle determines whether the condition value should be:
Dynamically generated or
Manually entered as a static value
The walkthrough demonstrates disabling the toggle to manually configure fixed values for the conditions.
Value Field
The Value field contains the expected comparison value for the condition.
Example 1 — Payment Condition
Successful
The chatbot checks whether the payment variable matches this value.
Example 2 — Purchase Amount Condition
1000
The chatbot checks whether the customer's last purchase amount is greater than this value.
Adding Multiple Conditions
To create advanced workflows:
Click Add New Condition
Configure another Key, Operator, and Value
Repeat as required
The walkthrough demonstrates combining payment validation and purchase amount conditions inside the same workflow.
Creating the IF Statement Adv Action
After configuring all conditions:
Review the logic carefully
Click the Create button
The advanced IF Statement node will now appear in the workflow canvas.
Workflow Behavior
Once triggered, the IF Statement Adv action:
Evaluates multiple conditions simultaneously
Supports complex comparison logic
Validates text and numeric conditions
Triggers Success or Fail workflows automatically
Enables advanced chatbot automation
The walkthrough demonstrates configuring advanced order validation rules based on payment status and purchase amount conditions.
Success and Fail Actions
After creating the IF Statement Adv workflow:
Success output triggers when all required conditions are satisfied
Fail output triggers when one or more conditions fail
You can connect any chatbot action to either output.
Example:
Success → Send Confirmation Message Fail → Send Incomplete Payment Message
Configuring Success Response
To configure the success message:
Drag a Send Text node from the Success output
Enter the action name
Add the success notification message
Click Create
Example
Bot: ✅ Your order and payment have been verified successfully.
The walkthrough demonstrates configuring a Send Text action after the success condition.
Configuring Fail Response
To configure the fail message:
Drag a Send Text node from the Fail output
Enter the action name
Add the fail notification message
Click Create
Example
Bot: ❌ Payment verification failed. Please complete the payment to continue.
The walkthrough shows a fail message node for incomplete payment conditions.
Publishing the Bot Changes
After configuring the IF Statement Adv workflow:
Review all Success and Fail conditions
Click the Publish button
Deploy the updated workflow to production
The final step of the walkthrough demonstrates publishing the configured bot logic successfully.
Example Workflow
Example Chatbot Workflow
Collect Payment Details ↓ IF Statement Adv ↓ Condition 1 → Payment = Successful AND Condition 2 → Last Purchase Amount > 1000 ↓ Success → Premium Offer Message Fail → Payment Incomplete Message
Example Interaction
User Payment Status: Successful Last Purchase Amount: 2500 Result: Success
The chatbot automatically validates all configured conditions and triggers the appropriate workflow response.
Best Practices
Follow these recommendations when using IF Statement Adv.
Store variables before evaluation
Ensure customer data is collected before applying conditions.
Use clear action names
Name workflows based on their business logic.
Use AND and OR carefully
Choose the correct logical operator based on workflow requirements.
Separate complex conditions clearly
Organize multiple conditions for easier maintenance.
Test all condition paths
Validate both Success and Fail scenarios before publishing.
Summary
The IF Statement Adv action allows chatbot builders to create advanced multi-condition workflows inside Ownchat bots.
With IF Statement Adv, you can:
Build advanced conditional chatbot logic
Combine multiple AND/OR conditions
Validate numeric and text-based conditions
Automate decision-based workflows
Trigger dynamic Success and Fail actions
This utility action helps businesses create powerful chatbot automation and intelligent workflow branching within Ownchat.
Last updated