> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/creating-replacement-components-for-a-virtual-environment.md).

# Creating replacement components for a virtual environment

## Introduction

Having [built a master process flow](/product-documentation/virtual-environments/implementing-virtual-environments/creating-a-master-process-flow.md), review the steps and identify those for which the setup will vary by environment - i.e. any replacements that must be made when the process flow is run in different virtual environments - for example:

<div align="left"><figure><img src="/files/7M6KPEAhtXjN2yY3MGry" alt="" width="563"><figcaption></figcaption></figure></div>

## Which components can be replaced?

The following items can be replaced when a process flow is run in a virtual environment:

| Item                                                                                                                                                                      | Related shape/area                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Connector instances](/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance.md)                                                       | [Connector](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md)                                                                                    |
| [Data pools](/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/de-dupe-shape/working-with-data-pools.md#adding-a-data-pool) | [De-dupe](/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/de-dupe-shape.md)                                                                                        |
| [Cross-reference lookups](/product-documentation/process-flows/cross-reference-lookups/adding-a-cross-reference-lookup.md)                                                | [Map shape (transform function](/product-documentation/process-flows/cross-reference-lookups/using-a-cross-reference-lookup-in-field-transformations.md))                                                          |
| [Scripts](/product-documentation/developer-hub/custom-scripting/creating-and-testing-custom-scripts.md)                                                                   | <p><a href="/pages/0C93Lh1WJuGoTR9rN6NN">Script shape</a></p><p><a href="/pages/VEY4jTycIDsGFwIsudto">Map shape (transform function)</a></p>                                                                       |
| [Company caches](/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/cache/add-to-cache-shape.md)                             | <p><a href="/pages/aGi157tdOz4wMkNdBOWh">Add to cache shape</a><br><a href="/pages/0Fl03CW16xxoUrQrDhqo">Load from cache shape</a><br><a href="/pages/ndRyzh91SsqO3Ac6GTiR">Map shape (transform function)</a></p> |
| [Flow variables](/product-documentation/process-flows/building-process-flows/dynamic-variables/flow-variables.md)                                                         | [Process flow settings](/product-documentation/process-flows/building-process-flows/process-flow-settings.md)                                                                                                      |
| [Flow queue priority](/product-documentation/process-flows/building-process-flows/process-flow-settings.md#understanding-process-flow-settings)                           | [Process flow settings](/product-documentation/process-flows/building-process-flows/process-flow-settings.md)                                                                                                      |

## Creating replacement components

Replacement components should be created as per standard instructions - for example, [add connector instances](/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance.md), [create scripts](/product-documentation/developer-hub/custom-scripting.md), [cross-reference lookups](/product-documentation/process-flows/cross-reference-lookups/adding-a-cross-reference-lookup.md), etc.

Take extra care with naming conventions for replacement components. Consistency at this stage will help when you go on to [configure virtual environments](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version.md).\
\
For example, if you intend to create virtual environments based on countries, your connector instances might be named:

* Shopify - UK - Sandbox
* Shopify - UK - Live
* Shopify - FR - Sandbox
* Shopify - FR - Live
* etc.

{% hint style="info" %}
If you have multiple master process flows for deployment to virtual environments, you should create the required replacement components for all.
{% endhint %}

## How are replacement components used?

Any components that you add now will be available for selection when you go on to [configure replacements for virtual environment versions](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version.md).
