undefined - Add a Switch (Condition) Node - illustration 06a6cdda-2e0c-4345-a3de-6be30f5393ad

Add a Switch (Condition) Node

This guide shows you how to add a switch (condition) node in a QuoteCloud workflow, allowing you to create conditional paths and manage approvals based on different scenarios.

 

FAQ — Add a Switch Condition node (Workflow)

What is a Switch Condition node?

A Switch Condition node is a workflow component that evaluates one or more conditional expressions against the workflow data and routes execution down different paths (branches) depending on which condition(s) match. It is used to implement branching logic inside a workflow.

When should I use a Switch Condition node?

Use a Switch Condition node when you need the workflow to take different actions based on variable values, field contents, or the results of earlier nodes — for example, routing by status, pricing tiers, or validation outcomes.

How does the Switch Condition node evaluate and route conditions?

The node evaluates each defined condition (usually expressed against workflow fields, variables, or outputs from previous nodes). When a condition evaluates to true, the workflow follows the associated branch. Multiple exclusive branches let you map specific values or ranges to different processing paths.

What happens if none of the defined conditions match?

You should define a default or fallback branch to handle cases where no specific condition matches. If a default branch is present, the workflow will follow it when no condition is met. If no default/fallback branch is configured, behavior depends on the workflow engine’s settings and may result in the workflow stopping or logging an unmatched state; consult your workflow settings for exact behavior. For official guidance, see more information.

Can conditions use data from previous nodes?

Yes — conditions are typically evaluated against the workflow’s current data context, which includes outputs and variables produced by earlier nodes. This lets you branch based on computed values or results from prior actions.

Can I create nested or multiple Switch Condition nodes?

Yes. You can nest Switch Condition nodes or place multiple Switch nodes at different points in the workflow to implement layered decision logic or complex routing scenarios.

How should I test a Switch Condition node to ensure correct routing?

Test by running the workflow with representative input cases that exercise each branch, including cases that should hit the default/fallback path. Use any available workflow simulator or step-by-step run mode to inspect evaluated conditions and confirm the execution path. If your platform provides execution logs or an inspector, review those to verify which condition evaluated true and why. For platform-specific testing tips, see more information.

What are common issues to watch for with Switch Condition nodes?

Common issues include: conditions that overlap or are not mutually exclusive, incorrect data paths (using the wrong variable or field name), missing default/fallback branch, and type mismatches when comparing values (string vs number). Ensure condition logic is ordered and scoped as intended and validate input data types in tests.

Can a Switch Condition node evaluate complex expressions or only simple comparisons?

Switch nodes generally evaluate expressions that may include comparisons, logical operators, and references to workflow variables or node outputs. The exact expression capabilities (functions, operators, expression syntax) depend on the workflow engine. Check the workflow expression documentation for the specific syntax supported by your platform. For general usage details, see more information.

Where can I find official documentation and related workflow topics?

For the primary guide to adding a Switch Condition node, see more information.

References — other relevant user guides

- Workflow user guide (overview): Workflow user guide
- Main user guide index: User guide home
- Add a Switch Condition node (detailed): Add a Switch Condition node