# Condition

For chatbot flows requiring a logical condition to be evaluated to branch out to the next step in the flow, you can use the condition action block.

Setting up 'Branch' action block

You can create a set of conditions for each branch in the chatbot flow.

Each condition is made up of:

* **Variable** - which contains the value to be compared.
* **Operator** - specifies the operation to be carried out.
* **Value** - the value against which the variable's value is to be compared.

All conditions will be evaluated with **ANY** if you want any one condition to be satisfied, and ALL if you want all conditions to be satisfied.

<figure><img src="https://help.wotnot.io/~gitbook/image?url=https%3A%2F%2F360969599-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FsrMxU8nO3RjusUiYuXBB%252Fuploads%252FdskCXwLqIPNQWGGCN6ZR%252FCleanShot%25202024-06-08%2520at%252013.10.14.png%3Falt%3Dmedia%26token%3Dc9eb2efa-5a7b-4420-8eb4-bfd668f5ebb4&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=b0572db9cd7b1a609b9b11503bde72cb3329b86860cb45cf902c4625240c3f98" alt=""><figcaption></figcaption></figure>

### Operators supported <a href="#operators-supported" id="operators-supported"></a>

| Operator         | Description                                                                                      | Example                               |
| ---------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------- |
| Equals to        | Commonly used when you want to match the value of the variable with the defined value            | "City" '**Equals To**' "New York"     |
| Not equals to    | Commonly used when you don't want the value of the variable to be matched with the defined value | "City" '**Not Equals To**' "New York" |
| Contains         | Commonly used when you want the variable to contain the defined value                            | "URL" '**Contains**' "Web"            |
| Does not contain | Commonly used when you do not want the variable to contain the defined value                     | "URL" '**Does Not Contain**' "Web"    |
| Is empty         | You can use this operator to identify whether the variable is empty or not                       | "Phone" is '**Empty**'                |
| Is not empty     | You can use this operator to ensure that variable is not empty                                   | "Name" is '**Not Empty**'             |

### Default condition <a href="#default-condition" id="default-condition"></a>

If none of the conditions are satisfied, the chat flow will automatically proceed toward the 'Default condition' branch on the bot builder canvas.

This default branch cannot be deleted.

\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.wotsabot.ai/wotsabot-help-articles/bot-builder/action-blocks/condition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
