---
title: "Switch Step"
url: "https://docs.robotiq.ai/en/article/switch-step"
language: "en"
last_updated: "2025-12-24T15:01:31.906Z"
---

# Switch Step

The Switch Step lets you control your automation process based on a variable's value. You can set up different "cases" for specific variable values. The process then follows the steps inside the matching case.

Use this step when your process needs to go in different directions based on an input or condition.

## How to Use the Switch Step

### Step 1: Add the Switch Step

1.  Drag and drop the **Switch Step** into your process flow.
2.  A **Default Case Step** will automatically appear inside the Switch Step.

### Step 2: Set up the Input Variable

1.  Select the **Switch Step**.
2.  In the properties panel, find the **Source text variable** field.
3.  Pick an existing variable from the dropdown menu. This variable needs to be a string or an integer.

### Step 3: Add Case Steps

1.  Right-click on the **Switch Step**.
2.  Select **Add Case Step**.
3.  For each **Case Step**, type in a specific value that the **Source text variable** might have.
4.  Put the steps that should run for each specific case inside its own **Case Step**.

**Important:** The process will run the steps within the first case that matches. If no cases match, the steps inside the [Default Case Step](https://docs.robotiq.ai/en/article/switch-default-case-step) will run.

## Parameters Explained

**Step Name** (Optional)

-   A custom name for this step.
-   It helps you find the step in the process editor.

**Source text variable** (Required)

-   The variable whose value decides which case to run.
-   It must be a string or an integer.
-   **Example:** If your variable `invoiceStatus` can be "Approved", "Pending", or "Rejected", you would choose `invoiceStatus` here.

## Related Articles

-   [Switch Default Case Step - Robotiq.ai](https://docs.robotiq.ai/en/article/switch-default-case-step)
-   [Define Variable Step - Robotiq.ai](https://docs.robotiq.ai/en/article/define-variable-step)
-   [Set Variable Value Step - Robotiq.ai](https://docs.robotiq.ai/en/article/set-variable-value-step)

## Need Help?

Can't find what you're looking for? Join the [Robotiq Community](https://community.robotiq.ai/home/) to get help from other users and the Robotiq team.

![](https://cdn-assets.productfruits.com/db51dc8c-3ffd-48c0-be26-d03f723f9243)
