> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noclick.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Branching

> Route a run down different paths with the Conditional (if/else) and Switch (multi-case) nodes.

Two nodes control which path a run takes. Nodes on branches that don't match are skipped, along with everything downstream of them.

## Conditional (if/else)

The Conditional node evaluates one condition and routes the run to its **true** or **false** output handle.

| Field                 | What it does                                                                                                                                                 |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Input Data**        | Reference to the data to evaluate, e.g. `{{node-id.field}}`                                                                                                  |
| **Field to Evaluate** | Optional path inside the input, e.g. `status` or `data.user.role`. Supports array indexes like `emails[0].subject`. Leave empty to evaluate the whole input. |
| **Operator**          | How to compare (see below)                                                                                                                                   |
| **Comparison Value**  | The value to compare against. Not needed for the empty/true/false checks.                                                                                    |
| **Case Sensitive**    | Whether string comparisons match case (default No)                                                                                                           |

Operators: equals, not equals, contains, does not contain, starts with, ends with, greater than, greater than or equal, less than, less than or equal, is empty, is not empty, is true, is false, and regex match.

The node passes its input through as `data`, so downstream nodes can reference `{{conditional-id.data}}`.

**Example:** point **Input Data** at an HTTP response, set **Field to Evaluate** to `status_code`, **Operator** to less than, and **Comparison Value** to `400`. Wire a Slack alert to the **false** handle to get notified on failures.

## Switch (multiple cases)

The Switch node compares its input against a list of cases and routes to the matching output handle. Each case's **Match Value** doubles as the handle name, so a case `urgent` creates an `urgent` output.

| Field              | What it does                                    |
| ------------------ | ----------------------------------------------- |
| **Input Data**     | Reference to the value to match                 |
| **Cases**          | List of values, one output handle per case      |
| **Default Output** | Case to route to when nothing matches           |
| **Case Sensitive** | Whether matching is case sensitive (default No) |

**Example:** route a support ticket by `{{form.priority}}` with cases `low`, `medium`, and `urgent`, each wired to a different notification path.

## Next steps

* [Data references](/editor/data-references)
* [Loops](/logic/loops)
* [Error handling](/logic/error-handling)
