> 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="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FG42J3SOZZDGORNAx6rnE%2Fcomponent%20replacement%20example.png?alt=media&amp;token=fac71b05-10c6-446e-949e-69f67846e543" 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="/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/script-shape.md">Script shape</a></p><p><a href="/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/map-shape/working-with-field-transformations/available-transform-functions/other-transform-functions/script-transform-function.md">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="/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/cache/add-to-cache-shape.md">Add to cache shape</a><br><a href="/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/cache/load-from-cache-shape.md">Load from cache shape</a><br><a href="/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/map-shape/working-with-field-transformations/available-transform-functions/other-transform-functions/cache-lookup-transform-function.md">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).
