# Condition

Condition logic allows you to split the chat-flow based on the conditions you want.

Each condition logic has two outputs - On Success and On Interrupt.&#x20;

### Setting the Condition Block

<figure><img src="/files/i6Xm8ixNsSp8GcX8ZBAD" alt=""><figcaption><p>Adding the Condition Card</p></figcaption></figure>

The condition card consists of **Comparator** (Variable), **Operator** (condition), the **Value**, and the A**ND & OR Logic** (To add more than one condition)

In the Comparator, you have to fill the variable that is saving the user's response.&#x20;

<figure><img src="/files/GSKufn3UYzPqsr3IXyIe" alt=""><figcaption></figcaption></figure>

In the Operator, you have to fill the condition that will be checked.&#x20;

<figure><img src="/files/6Ruq8ecJUzztC3VX8DKu" alt=""><figcaption><p>Selecting the condition</p></figcaption></figure>

After Setting the condition, you will have to add the value that you want to check against the comparator (variable).

<figure><img src="/files/dn0C5jI9LoyxlqGg4DK9" alt=""><figcaption><p>Adding the value</p></figcaption></figure>

### Using AND or OR Logic

These are used in case you want to add two or more conditions.

<figure><img src="/files/uLjSvjjUSE2Q4zzzjdiP" alt=""><figcaption><p>Using the OR Logic</p></figcaption></figure>

Follow the GIF below:

<figure><img src="/files/RS1G4o1TUjM02TtzdGm9" alt=""><figcaption></figcaption></figure>

The Condition card has On Success and On Fail Conditions which you can use to move forward with the chat-flow.&#x20;

<figure><img src="/files/x5Jd3gxoXsZHJqTl8f1X" alt=""><figcaption></figcaption></figure>


---

# 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://docs.gallabox.com/~/changes/A8xmww5XU9i8x7QbfPLe/bots/bot-utilities/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.
