> For the complete documentation index, see [llms.txt](https://support.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.docstudio.com/user/scenarios/condition-types/scenario-step-conditions.md).

# Scenario Step Conditions

Use step conditions to branch a scenario or create multiple envelopes.

### Step conditions

Step conditions are optional. Use them to route execution to different steps.

The platform supports two types of conditions:

1. A condition **based on fields** (branching).

{% hint style="info" %}
If the amount in the certificate of completion is more than 1000, run one branch. Otherwise, run another.
{% endhint %}

2. A condition that creates several envelopes **based on values** in the source.

{% hint style="info" %}
If the value is **Yes**, create envelope(s) for **Yes**. If the value is **No**, create envelope(s) for **No**.
{% endhint %}

If a condition is not set, it can be missing in the request or set to `null`.

### Additional logic

* If the execution condition is `false`, check the next steps.
* If all steps evaluate to `false`, run the step where the condition is `null`.
* If there are no conditions, run the next steps where the condition is `null`, using the respective source value.
* If several steps meet the conditions, the envelope UI shows several buttons to start different steps.
* Several steps are also returned in the response.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.docstudio.com/user/scenarios/condition-types/scenario-step-conditions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
