# Condition Step

The **Condition** step splits workflow execution into multiple branches based on criteria you define. Each lead follows the first branch whose criteria they match.

<figure><img src="/files/Hst47DcgySNIBx0OOcRZ" alt=""><figcaption><p>The Condition step configuration panel with criteria and branch routing.</p></figcaption></figure>

## How It Works

A Condition step has one or more **branches**. Each branch has its own set of criteria. When a lead reaches a Condition step:

1. Spara evaluates each branch's criteria in order, top to bottom.
2. The lead follows the **first branch** whose criteria they satisfy.
3. If no branch matches, the lead exits the workflow at this point.

## Configuration

### Adding Branches

Click **Add branch** to create a new branch. Each branch can be named and has its own independent criteria and downstream steps.

### Criteria

Each branch supports one or more criteria rows. Multiple criteria within a branch are evaluated with **AND** logic — the lead must satisfy all of them to match that branch.

| Data Type      | Available Operators                                                                                          |
| -------------- | ------------------------------------------------------------------------------------------------------------ |
| **Text**       | equals, is not, is defined, is not defined                                                                   |
| **Number**     | equals, greater than, less than, is defined, is not defined                                                  |
| **True/False** | is true, is false                                                                                            |
| **List**       | contains, does not contain, is defined, is not defined, length equals, length greater than, length less than |
| **Date/Time**  | relative and absolute comparisons                                                                            |

### Connecting Steps

Each branch connects to its own downstream step (or sequence of steps). Click the **+** on any branch output to add the next step for that path.

## Example: Tiered Follow-up

```
Condition
├── Branch 1: employee_count > 500
│   └── Call Phone (high-touch outreach)
├── Branch 2: employee_count > 50
│   └── Send Email (mid-touch outreach)
└── Branch 3: (no criteria — catch-all)
    └── Send Text (low-touch outreach)
```

{% hint style="info" %}
**Tip: use a catch-all branch.** Add a final branch with no criteria to handle leads that don't match any earlier branch. Without a catch-all, unmatched leads exit the workflow silently.
{% endhint %}

## Warnings

If a branch requires a field (e.g., `email`) but the workflow's Audience criteria don't guarantee that field is present, Spara will show a warning on the step. This doesn't prevent publishing, but it means some leads may skip that branch at runtime due to a missing value.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spara.com/agents/workflows/condition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
