> 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/create-and-configure-a-scenario/how-to-configure-a-scenario-step.md).

# How to Configure a Scenario Step

This document explains how to configure a scenario step, including destination template settings, conversion rules, and optional conditions.

{% hint style="info" %}

* **Scenario step** — a single stage inside a scenario with source, destination, and optional conditions
* **Conversion rule** — a rule that transforms incoming or outgoing files into another structure or format
* **XSLT** — a transformation language used in conversion rules and scenario conditions

See the [Glossary](/glossary/glossary.md) for DocStudio term definitions.
{% endhint %}

### Configure the first step

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FYmgH3wt4gxYGts4z0DSd%2Fimage.png?alt=media&amp;token=c631eddc-54ad-447b-a146-7ab43986d2e1" alt=""><figcaption></figcaption></figure>

1. In **Step name**, enter a name.
2. In **Destination template UUID**, paste the UUID, or unique ID, of the target template for the next envelope.
3. In **XSLT conversion rule**, paste the rule that maps data from the source envelope to the destination envelope.
4. Enable **Send an envelope immediately after starting a step** if the next envelope must be sent automatically.
5. Click the **Save** <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FkMgjQeGRIlInIRX2zOUc%2Fimage.png?alt=media&amp;token=d79c43f9-2498-4760-8172-4b1365ce02eb" alt="" data-size="line"> icon in the upper-right corner of the step.

{% hint style="info" %}
After you enter **Destination template UUID**, the system will auto-fill the latest template version UUID.
{% endhint %}

After you save the first step, you can add another step or save the scenario.

### Add and configure the next step

1. Next to **Scenario steps**, click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FsyIeAPL8sluHqiBFVkT5%2Fimage.png?alt=media&amp;token=a39c0793-a4dd-4c82-9ce6-e7b39fff3532" alt="" data-size="line"> button.
2. Fill in **Source template UUID** and **Source template version UUID** so they match the destination of the previous step.
3. Configure the destination template and conversion rule like in the first step.
4. Enable **Condition** if this step must run only in specific cases.
5. Save the step.

### Configure optional conditions

Conditions are optional. Use them when the step must run only for specific source data.

See [Scenario Step Conditions](/user/scenarios/condition-types/scenario-step-conditions.md) for condition logic and supported condition types.

### Before you save

* make sure the destination template UUID is set
* check that the destination template version is correct
* add the XSLT conversion rule
* configure a condition if the step must run only in specific cases

### Next steps

* [Scenario Step Conditions](/user/scenarios/condition-types/scenario-step-conditions.md)
* [How to Run a Scenario](/user/scenarios/running-scenarios/how-to-run-a-scenario.md)
* [How to Run a Scenario via Integration](/user/scenarios/running-scenarios/how-to-run-a-scenario-via-integration.md)


---

# 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/create-and-configure-a-scenario/how-to-configure-a-scenario-step.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.
