1 min read

Switch

Overview

The Switch node routes data to one of N output ports based on a field value. It functions like a switch/case statement — mapping field values to specific output ports, with a default port for unmatched values.

Category

Flow Controlflowcontrol/switch

Settings

SettingTypeDefaultDescription
fieldStringField to evaluate for routing
casesObject{}Value-to-output mapping: { 'active': 'output1', 'pending': 'output2' }
defaultOutputStringelseOutput port for unmatched values
caseSensitiveBooleanfalseCase-sensitive value matching
modeStringvalueMatching mode: value, range, regex

Inputs & Outputs

Use Cases

  1. Route by status — Send active orders to processing, cancelled to refund workflow, pending to review
  2. Regional routing — Route data to different pipelines based on country code
  3. Error classification — Route error types to different handling workflows