# Copying an existing process flow version to draft

## Introduction

Any updates to a `deployed` process flow must be made in a `draft` version, and then this version must be [deployed](https://doc.wearepatchworks.com/product-documentation/process-flows/managing-process-flows/flow-deployment/deploying-a-process-flow-with-virtual-environments).

Sometimes it can be useful to copy the contents of an existing `deployed` or `inactive` process flow version to the `draft` version, as a starting point for editing. For example, you might have lost track of changes that have been made to the current `draft` and want to ensure it's in step with the `deployed` version before making changes. Or, you might want to revert to an older way of working, and so copy an `inactive` version to the current `draft`.

{% hint style="warning" %}
When an existing `deployed` or `inactive` version is copied to `draft`, the version number associated with the `draft` stays the same, but the content is replaced.&#x20;
{% endhint %}

## The steps

{% stepper %}
{% step %}
**Access version details for the required process flow**&#x20;

Open settings for the required process flow and scroll down to the `versions` panel.

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FRBgoJbC2EDGQrhn6NTqZ%2Fdeploy%20flow%201.png?alt=media&#x26;token=35ea8258-663b-49f0-ac64-4e9f086fad66" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For detailed instructions, please refer to [Accessing process flow versions](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-versioning/accessing-process-flow-versions).
{% endhint %}
{% endstep %}

{% step %}
**Access version actions**

Click the ellipsis icon associated with the `deployed` or `inactive` version that you want to copy, for example:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FIeovCmRS80yakwA03YgZ%2Fcopy%20to%20draft%200.png?alt=media&#x26;token=2852b20a-0939-4618-a211-cdb18718990b" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Copy the selected version to the current draft**

Select the `copy to draft` option:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FcDN4HdUNvM9vA1muyfxl%2Fcopy%20to%20draft%201a.png?alt=media&#x26;token=e174cc40-a5c6-45a5-9d4d-11a8a36c441a" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The `copy to draft` option is only shown when a `deployed` or `inactive` version is selected.
{% endhint %}
{% endstep %}
{% endstepper %}


---

# 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://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-versioning/copying-an-existing-process-flow-version-to-draft.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.
