Skip to main content

Case

Use the Case step to branch a flow into one of several paths based on a value. When the step runs, AutoFlow evaluates the configured expression and continues along the branch whose label matches the result. It is the right tool whenever a downstream step should only run for a specific discrete value — such as a channel type, a status code, or a document category.

Typical use cases include:

  • Routing by dispatch channel. Branch a notification flow by channel — one path for email, one for SMS, one for push — each path doing its own send step.
  • Handling status codes. After an HTTP request, route 200, 404, and 500 responses to dedicated error handling or success paths.
  • Document category dispatch. Read a document type field and run different posting logic for invoices, credit notes, and orders.

Configure the step

Open the flow editor, add Case, and fill in the configuration card.

Description

  • Purpose: Make the branch's intent clear at a glance.
  • When to fill it: Always. The description is shown in the editor and execution history.
  • Tips: Name what is being evaluated, for example, Branch by dispatch channel or Route by response status.

Value

  • Purpose: The expression whose result determines which branch to follow.
  • When to fill it: Required. Leave this empty and the step will not publish.
  • Tips: Use a SmartField token — for example, {{trigger.dispatchChannel}} or {{httpRequest.statusCode}} — to reference an output of a previous step. Open the SmartField picker with the assist-edit button (…) or the Alt+S shortcut; the picker copies the chosen placeholder to the clipboard.

Branches

  • Purpose: The list of possible branches (edges) in this step. Each branch has a Value — the string to match against — and a Label — the name shown on the edge in the flow graph.
  • When to fill it: Add at least one branch. Branches can be added, removed, and reordered at any time.
  • Tips: Keep values short and exact. Matching is case-sensitive: Email and email are different values.

Behavior

When this step runs:

  • AutoFlow resolves SmartField tokens in the Value expression to produce a plain string.
  • The resolved string is published as the step output result.
  • The flow continues along the branch whose Value equals result.
  • If no branch matches — including when the expression resolves to an empty value — the flow continues along the Otherwise branch.

Every Case step has an automatic Otherwise branch. It is always shown last, cannot be removed or renamed, and catches every value that none of your explicit branches match. Connect the steps that should handle unmatched values to it. Your explicit branches are fully user-defined and can be freely named.

Duplicate branches

If two branches share the same value, AutoFlow always follows the first one. The second branch is unreachable. A warning is shown when you publish a flow with duplicate branch values.

Best practices

  • Use the Otherwise branch for unmatched values. Connect a Log or Error step to the Otherwise branch to surface values that none of your explicit branches handle, instead of letting them pass unnoticed.
  • Use Case for value dispatch, not conditions. When you need to evaluate an expression like amount > 1000, use a Decision step instead — Case only supports exact string equality.
  • Label branches with the actual values. A branch labeled email reads better in the flow graph than Branch 1. Use the label to document what value triggers that path.