# 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="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2F7OETHlB9xQVUA8fifbEb%2FCondition_Card%201.1.png?alt=media&#x26;token=d9c38e6c-2640-4f68-a70b-fb681f62458d" 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="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FerQONJnmABtXZz3OzL4W%2FCondition_Card%201.2.png?alt=media&#x26;token=c89ed139-ee0a-4ab2-9b75-719ed2219a95" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FxoyBpimFvJxVVeEagVqG%2FCondition_Card%201.3.png?alt=media&#x26;token=636f64bb-3de2-4a51-b312-16708e9af78e" 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="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2F6pqFM8jz9GpywTTha9W3%2FCondition_Card%201.4.png?alt=media&#x26;token=2dc5bf1b-4347-42b4-96f5-68923c6cb8d3" 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="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FN5ZRu0Pt75SUmEA7xXQm%2FCondition_Card%201.5.png?alt=media&#x26;token=c9661fee-fb92-44e5-9e50-26669dad52a9" alt=""><figcaption><p>Using the OR Logic</p></figcaption></figure>

Follow the GIF below:

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FJAxsuorBxeVCSNkQm458%2FCondition_.gif?alt=media&#x26;token=bf770b14-a9ae-4891-98e3-1611dae797fb" 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="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2F0cvJV4SEV8IvIeX1gS2X%2FOn-Success.gif?alt=media&#x26;token=ee089229-3a5c-47f0-857e-48928ca86851" alt=""><figcaption></figcaption></figure>
