Blocks

Merge

The merge step: fan parallel branches back into one payload — keyed by branch, combined into a list, or first-through.

Fan-in: wire two or more branches into merge and they reconverge into one payload. The mode picks the output shape.

Config

The merge step in the Inspector One choice: how the branches combine.

  • wait_all — waits for every live branch; output is a map keyed by upstream step id, so you can tell branches apart: payload["stripe-1"]["ok"].
  • combine_array{ "items": […], "count": n } in wiring order — feed it to a loop or reshape.
  • first — the first live branch's payload passes through unchanged. The natural choice after an if/switch where only one branch survives.

Skipped branches

A branch a condition didn't fire never blocks the merge — it's simply absent from the output (omitted key in wait_all, missing item in combine_array). If every branch was skipped, the merge and everything after it skip too.

Patterns

  • Parallel enrichment — one webhook fans out to three lookups; wait_all collects all three, keyed, for one downstream report.
  • Rejoin after a branch — if/switch → per-case handling → merge (first) → shared tail (save, notify) written once.

Gotchas

  • In first mode the surviving branch's payload passes through as-is — every branch must carry all the keys the shared tail references. A key present on one branch but missing on another fails only when the other branch runs.
  • wait_all keys are step ids — rename-stable, but check the actual ids in the Inspector before writing payload["…"] references.