# Switch

Routes one input field to the first case whose value matches exactly, with a default branch.

## Configuration

1. Select one **Field to evaluate**, for example `input.output_parsed.status`.
2. Add the expected values, for example `pending`, `approved`, and `rejected`.
3. Optionally give each value a branch name.
4. Connect every value handle and the **Default** handle.

The field is resolved once. Cases contain values only, not independent expressions. They are evaluated from top to bottom and the first exact match wins. Use **If/Else** when rules need different fields or operators such as `>`, `contains`, or `!=`.

Example:

```
Field: input.output_parsed.status

approved → Send confirmation
rejected → Notify requester
pending  → Request approval
Default  → Manual review
```

## Runtime output

The node writes its main result to `last_output` and, when structured, to `last_output_parsed`. Downstream nodes can reference named outputs through `{outputs.<node_id>.parsed}`.

## Example workflow

Use the workflow card below to create a working example in the editor. It uses safe sample data and avoids external side effects unless the node itself is an outbound integration.

---

*Source: https://agentbuilder.systalink.sn/docs/node-switch — human documentation.*
*Other language: [/docs-md/fr/node-switch.md](/docs-md/fr/node-switch.md).*
*Machine-readable index: [/llms.txt](/llms.txt).*
