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

# Switch Case Step

The Switch Case Step runs a block of code only if its input value matches the variable set in a parent [Switch Step](https://docs.robotiq.ai/en/article/switch-step). Use this step to set up conditional logic in your automation.

## How to Use the Switch Case Step

Add a Switch Case Step to set a specific condition inside a [Switch Step](https://docs.robotiq.ai/en/article/switch-step). The code in this step runs if the Switch Step's variable matches the Case value you put in.

### Step 1: Add a Switch Case Step

1.  In your process, click the **+** button where you want to add the step.
2.  Pick **Switch Case Step** from the list.

### Step 2: Set the Case Value

1.  In the **Case** field, type the exact string or integer value.
2.  This value will be checked against the variable in the parent Switch Step.

**Important:** You can only type a fixed value here, not a variable. For instance, you can type `"this is my case"` or `123`.

## Parameters Explained

**Step Name** (Optional)

-   A custom name for the process step.
-   This name shows up on the step box in the editor.

**Case** (Required)

-   The fixed string or integer value that the Switch Step's variable will be checked against.
-   **Example:** `"Success"` or `1`
-   Use this to set a specific condition for the code block.

## Related Articles

-   [Switch Step - Robotiq.ai](https://docs.robotiq.ai/en/article/switch-step)
-   [Switch Default Case Step - Robotiq.ai](https://docs.robotiq.ai/en/article/switch-default-case-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/7aef718e-f2a2-455c-abec-c2fd5c9fc931)

![](https://cdn-assets.productfruits.com/4eb2584f-34fb-497a-96a6-f24543238c92)
