# Switch

**Switch** lets you create cases with conditional logic, checks them as an ordered list, and follows exactly one branch. It stops at the first match; if none match, it uses **Default**.

## When to use it

Use Switch instead of stacking several conditions when one value can lead to three or more outcomes, such as plan tier, region, or API status.

## Settings

![Switch settings with two ordered, named cases and their conditions](/documentation/flowcrafter/screenshots/node-switch-settings.png)

Add cases in the order they should be tested.

| Setting | What it controls |
|---|---|
| **Label** | Name shown on the case's branch. A blank label falls back to `Case N`. |
| **Conditions** | Flow tag or literal comparisons for that case. Each case may require all rules or any rule. |
| **Default** | Permanent fallback used when no case matches. |

:::tip[Need more ways to compare values?]
[GP Advanced Conditional Logic](https://gravitywiz.com/documentation/gravity-forms-advanced-conditional-logic/) adds extra comparison operators such as **is in**, **does not contain**, and fuzzy matching. Use these operators when a case needs more flexible matching of flow tags or literal values.
:::

## Output and branches

Each case has its own branch. Only the chosen branch runs.

| Output | Meaning |
|---|---|
| `matched` | Internal branch ID, such as `case_0` or `default`. |
| `matched_case` | Matching label, or `Case N`; `null` on Default. |

## Good-to-knows

- Order matters. Put narrow cases before broad ones.
- A case with no rules is treated as a match and prevents later cases from running.
- Cases compare upstream data; use [Condition (entry)](/documentation/flowcrafter/nodes/logic/condition-entry/) when you want a Gravity Forms field picker.

## Example

Route a webhook by its `status` field: add cases labeled **Paid**, **Pending**, and **Failed**, comparing the body status flow tag with `paid`, `pending`, and `failed` respectively. Connect each case to its own review email, and connect **Default** to a review email for unexpected statuses.

![A saved webhook workflow with Paid, Pending, Failed, and Default branches leading to review emails](/documentation/flowcrafter/screenshots/node-switch-canvas.png)
