Skip to main content

How to use Conditions in Chatbot Builder

Updated over 2 weeks ago

Summary

Conditions in the WATI Chatbot Builder allow you to create dynamic chatbot flows by branching conversations based on user responses. They help customize interactions, ensuring users receive relevant responses based on their inputs. This guide explains how to use conditions effectively and when to apply them in your chatbot.

Instructions

When to Use Conditions

Conditions are useful when you want to:

  • Split chatbot flows based on user responses.

  • Apply different chatbot outcomes for different users.

  • Filter responses based on predefined conditions.

  • Use logical operations to refine chatbot behavior. To use conditions effectively, you should be familiar with variables in WATI Chatbot Builder.

Available Condition Types

In WATI Chatbot Builder, conditions allow you to compare user responses using different logical checks. The available condition types include:

1. Equal To

  • Checks if the user response exactly matches a predefined value.

  • Example: If a user selects "Yes", they receive a specific follow-up message, while a "No" response leads to a different message.

2. Not Equal To

  • Triggers a condition when the user response does not match a specific value.

  • Example: If a user does not select "Yes", they get an alternate response.

3. Contains

  • Checks if a user response includes a specific word or phrase.

  • Example: If a user enters "My name is John", you can filter responses that contain "John."

4. Does Not Contain

  • Identifies responses that do not contain a specified word or phrase.

  • Example: If you want to exclude responses that mention "India," you can set this condition.

5. Starts With

  • Filters responses that begin with a particular word or phrase.

  • Example: If you want to catch responses starting with "I am", this condition helps separate them.

6. Does Not Start With

  • Opposite of "Starts With," this condition filters out responses that do not begin with a specified keyword.

  • Example: If you want to exclude all responses not starting with "Hello," you can use this condition.

7. Greater Than / Less Than

  • Used mainly for numerical comparisons.

  • Example: If a user inputs their age, you can filter responses based on whether the value is greater than or less than a specified number.

Example:

So suppose you had this question to ask your users:

At this point, the chatbot flow remains the same, but towards the end, you may want to customize the final messages based on the user's response to the earlier question. For convenience, you can use variables from the chatbot or opt for Contact Custom Variables.

Combining Multiple Conditions

You can use two conditions simultaneously with logical AND/OR operators:

  • AND Operator: Both conditions must be met for the chatbot to proceed.

  • OR Operator: At least one condition must be met for the chatbot to proceed.

Example of AND/OR Logic:

  • AND Example: A chatbot only proceeds if the user is older than 18 AND from the USA.

  • OR Example: A chatbot proceeds if the user is either from the USA OR Canada.

Conclusion

Using conditions in WATI Chatbot Builder allows for smarter and more interactive chatbot conversations. By leveraging different condition types and logical operators, you can create dynamic responses tailored to user inputs. Start experimenting with conditions to enhance your chatbot flows today!

Frequently Asked Questions (FAQs)

General Questions

1. What are the conditions in the WATI Chatbot Builder?

→ Conditions are rules that help the chatbot decide how to respond based on user inputs. They allow you to create dynamic chatbot flows by branching conversations based on specific criteria, such as matching a user’s response to a predefined value.

2. Why should I use conditions in my chatbot?

→ Conditions help personalize chatbot interactions by tailoring responses to user inputs. They allow you to:

  • Split chatbot flows based on user responses.

  • Provide customized messages for different user inputs.

  • Filter and process responses more effectively.

3. Do I need to understand variables to use conditions?

→ Yes, familiarity with variables in WATI Chatbot Builder is recommended. Variables store user inputs and other data, which can then be used in conditions to make chatbot responses more dynamic.

Using Conditions

4. What types of conditions are available in WATI Chatbot Builder?

→ You can use the following condition types:

  • Equal To: Checks if a response exactly matches a predefined value.

  • Not Equal To: Triggers if the response does not match a specific value.

  • Contains: Checks if a response includes a specific word or phrase.

  • Does Not Contain: Identifies responses that do not include a particular word or phrase.

  • Starts With: Filters responses that begin with a specific word or phrase.

  • Does Not Start With: Excludes responses that begin with a particular word or phrase.

  • Greater Than / Less Than: Used for numerical comparisons.

5. How do I set up a condition in the chatbot builder?

→ To set up a condition:

  • Identify the user response you want to evaluate.

  • Select the appropriate condition type (e.g., Equal To, Contains).

  • Define the comparison value (e.g., "Yes", "No", "John").

  • Configure chatbot actions based on whether the condition is met.

6. Can I use multiple conditions at the same time?

→ Yes, you can combine multiple conditions using:

  • AND: Both conditions must be met for the chatbot to proceed.

  • OR: At least one condition must be met for the chatbot to proceed. For example:

  • AND Example: A chatbot only proceeds if the user is older than 18 AND from the USA.

  • OR Example: A chatbot proceeds if the user is either from the USA OR Canada.

7. Can I use conditions with numerical values?

→ Yes, you can use the Greater Than or Less Than conditions to compare numerical inputs. For example, if a user enters their age, you can set the chatbot to respond differently based on whether the age is above or below a certain number.

Best Practices

8. How can I make the most of the conditions in my chatbot?

  • Use conditions strategically to personalize user interactions.

  • Test conditions thoroughly to ensure they work as expected.

  • Keep conditions simple and avoid overly complex logic.

  • Use logical operators (AND/OR) effectively to refine chatbot behavior.

Did this answer your question?