# If Else

**If Else** node lets you check for a boolean condition, which if true sends the flow execution to the **True** branch, else sends the flow execution to the **False** branch.

### Adding If Else node at the end

As you see in the below image, an **If Else** node comes with two child branches - **True** and **False** branch. You can build your remaining flow in these branches.

<figure><img src="https://392607133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZCdm9aJ8vkvDIIbg04AL%2Fuploads%2FYldiT4rH0L5l4vELcWdZ%2FScreenshot%202024-03-13%20at%2012.59.14%E2%80%AFPM.png?alt=media&#x26;token=b5e9d479-ca00-4f36-af24-3a458d5c8698" alt="" width="375"><figcaption><p>An If Else condition Block</p></figcaption></figure>

### Adding If Else node between 2 nodes

If you try adding the **If Else** node between 2 existing nodes, you will see a popup asking you which branch should the existing children be part of.

<figure><img src="https://392607133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZCdm9aJ8vkvDIIbg04AL%2Fuploads%2FCgEFTho3CT1agZrweOvs%2FScreenshot%202024-03-13%20at%2012.58.31%E2%80%AFPM.png?alt=media&#x26;token=62f5a7b9-c255-4cd1-909b-82f7a6f57017" alt="" width="375"><figcaption></figcaption></figure>

This is because **If Else** node breaks the flow into 2 separate branches, **which never merge**. If you want the branches to merge, checkout [<mark style="color:blue;">**If Else V2**</mark>](https://docs.cosmocloud.io/flow-builder/node-types/conditional-nodes/broken-reference).

{% hint style="warning" %}

### Deleting If Else node

If you plan to delete the **If Else** node, keep in mind that it will **delete the whole flow** **below** the current If Else node as the system does not know which branch to connect to the parent node.\
This does not happen with [<mark style="color:blue;">**If Else V2**</mark>](https://docs.cosmocloud.io/flow-builder/node-types/conditional-nodes/if-else-v2)<mark style="color:blue;">**.**</mark>
{% endhint %}

### Properties Panel

<table><thead><tr><th width="338">Field</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>Node name</td><td><a href="../../node-name"><mark style="color:blue;"><strong>Checkout Node name</strong></mark></a></td><td>true</td></tr><tr><td>Condition</td><td>The condition object which this node evaluates at Flow Runtime, based on which the flow is sent to <strong>True</strong> branch or <strong>False</strong> branch.<br><br>Check <a href="../../cql-cosmocloud-query-language/building-conditions">this documentation</a> to see how to build conditions in this node.</td><td>true</td></tr></tbody></table>

### Returns

`condition` - The boolean result of the condition at runtime. You can access this using Magical Autocomplete (Eg. `$.<node_name>.condition`) in any node below this node.
