# Replacement data pools

## Introduction

Having [chosen to configure data pool replacements for a virtual environment](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/configuring-virtual-environment-replacements/..#configuring-replacements-for-a-virtual-environment-version), a new replacement rule is displayed, ready for you to configure:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FW62iInK0tS4A1qaEuqwO%2Freplace%20data%20pool%201.png?alt=media&#x26;token=d2d0b262-6e8f-486b-8ab1-a8ed553de4d9" alt=""><figcaption></figcaption></figure>

Having defined the first rule, you can add more - you must create one replacement rule for every [data pool](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/advanced-shapes/de-dupe-shape/working-with-data-pools) that you need to replace in every process flow that will run in this environment.&#x20;

## Defining replacement rules for a data pool

{% stepper %}
{% step %}
**Select the required ORIGINAL data pool**

Use the `original` dropdown list to select the first data pool in a 'master' process flow that must be replaced when this process flow runs in the given virtual environment - for example:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FVq8vwpoBrQlnV4K4qrGi%2Freplace%20data%20pool%202.png?alt=media&#x26;token=ec76cc4a-7adc-4c60-a473-5b854efe4e26" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
As you work through your replacement configuration, it's helpful to view related ['master' process flows](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/creating-a-master-process-flow) in another browser tab. You can duplicate a Patchworks browser tab and navigate to a different page whenever needed.
{% endhint %}
{% endstep %}

{% step %}
**Select the required REPLACEMENT data pool**

Use the `replacement` dropdown list to select the replacement data pool that must be used when this process flow runs in the given virtual environment - 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%2FQUpDWobgHL21gq14aECp%2Freplace%20data%20pool%203.png?alt=media&#x26;token=91fc1eb4-7c8f-4a88-a38c-5044bb9546f2" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Confirm your selections**

Click the `create` button (associated with this replacement rule) to confirm your selections:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FdaeIFCgklrjbSmN8hhPU%2Freplace%20data%20pool%204.png?alt=media&#x26;token=ef058270-920b-4aa4-8a76-b0552e98091a" alt=""><figcaption></figcaption></figure>

The rule is added:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fh0CIfmonp9bjtio4XKkK%2Freplace%20data%20pool%205.png?alt=media&#x26;token=1a5b6aea-3d33-4e1e-9750-cebce7c1a7c8" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Once a rule is confirmed, it can't be edited. If you need to change a replacement rule, use the 'trash' icon to remove it and add a new one.
{% endhint %}
{% endstep %}

{% step %}
**Add more replacement rules for data pools**

To add another replacement rule for a data pool, click the top-right `create` button:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F0hjiiZERzHK9fa1rQh2K%2Freplace%20data%20pool%206.png?alt=media&#x26;token=817467be-df7f-4561-883c-2c6d4a85f9bd" alt=""><figcaption></figcaption></figure>

Update the new rule as required, then click the associated `create` button to confirm your selections:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FANwMazmqQCDuRmIgeQLQ%2Freplace%20data%20pool%207.png?alt=media&#x26;token=727a4105-e142-4355-914f-bf502c7df40c" alt=""><figcaption></figcaption></figure>

Repeat as many times as needed to define all required data pool replacements for all process flows that will be running in this virtual environment.

{% hint style="info" %}
If you don't want to define ALL data pool replacements now, that's OK. For example, you might choose to add the minimum number of replacements needed for [testing](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/testing-a-process-flow-against-a-virtual-environment), then define remaining rules (in a [new draft](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/understanding-virtual-environment-versions)) later, after initial testing is complete.
{% endhint %}
{% endstep %}
{% endstepper %}
