# Config Duplication

## Config Duplication

In this section, you can duplicate the tenant configuration for different tenants.&#x20;

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2FC7cq4teVqBRIbEcuuIqw%2Fimage.png?alt=media&#x26;token=42280a04-799a-41fd-8d54-8fe72bffc6c2" alt=""><figcaption></figcaption></figure>

The duplication includes:

* Wallets
* Custom event schemas
* Rewards
* Segments
* Achievements
* Campaigns
* Referral Campaigns
* Automations

{% hint style="warning" %}
Config duplication works for the duplication of the configuration with the same environment.

If you want to transfer the configuration between the environments, export the configuration to the individual modules' views.
{% endhint %}

{% hint style="success" %}
**Config duplication how-to**

1. Choose the configuration you want (wallets, Custom event schemas, etc)

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2FmhzOoZiya52fIjeKqHOL%2Fimage.png?alt=media\&token=25681f98-d749-43ae-b17a-9e150d1d3aba)

2. Select the tenant you'd like to duplicate the configuration from

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2FmOXgVy4bwu7gduYjIWxZ%2Fimage.png?alt=media\&token=7a4b09c7-7bea-460c-bd7d-466a45786ecf)

3. Select checkboxes next to the Name you'd like to migrate to a different tenant.

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2FSeRqSIP9aPNZEPLn63u3%2Fimage.png?alt=media\&token=77fd5b64-f5d4-420f-a6d5-75f046ea5856)

4. Click **Duplicate selected records** in the upper-right corner.

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2FkERBqaC0WmdVBQR5ueK0%2Fimage.png?alt=media\&token=5931795a-9ff6-4326-8ae5-6cd82443c2f6)

5. The pop-up window will appear so you can choose **Target tenant -> Duplicate and view the target tenant.**

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2FYcvOXPxDGCKn69Cuod77%2Fimage.png?alt=media\&token=6aec68cc-7a8b-47a1-9b4e-79273e12baf2)

6. Once you duplicate, you may get a successful message that the record was duplicated or an **Action required**, so you will need to update information (Achievements, Campaigns)—more in the [Error handling](#error-handling-in-confit-duplication) section.

Example of a successful message:

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2FWJC8XsgEVIuwhBJGrV32%2Fimage.png?alt=media\&token=0e671e12-ebe1-4e60-8682-4ed927ab2c0f)
{% endhint %}

### Error handling in config duplication

Sometimes you may need to take additional action when duplicating config between tenants.&#x20;

* **Action required - We detected unsupported fields** - The message appears when duplication is not allowed due to unsupported fields. In this case, we tried to duplicate a Wallet that had an existing wallet code in the tenant to which we were attempting to migrate. The error occurred because the wallet code is not editable and must be unique. In summary, the wallet with the existing wallet code cannot be migrated.

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2F4SPh2IvGlWbAiNUcFu6d%2Fimage.png?alt=media&#x26;token=876d340e-ef3c-47b5-a353-52bda23949b7" alt="" width="563"><figcaption></figcaption></figure>

* **Action required - Edit the records -** This message typically appears when you duplicate Campaigns or Achievements and Rewards that contain elements with generated IDs. To avoid this issue, ensure that these elements are created in the new tenant before duplicating the configurations. Below is a list of the elements that need to be created prior to duplicating specific configurations:

{% tabs %}
{% tab title="Rewards" %}
In the reward configuration the elements that contain IDs are the following:

* Tiers
* Segments
* Reward Collections
  {% endtab %}

{% tab title="Achievements" %}
In the achievement configuration the elements that contain IDs are the following:

* Custom event schemas
* Segments
* Tiers
* Channels
  {% endtab %}

{% tab title="Campaigns" %}
In the campaigns configuration the elements that contain IDs are the following:

* Achievements
* Custom Event schemas
* Segments
* Tiers
* Channels
* Rewards (as effect)
* Channels
* Collections
  {% endtab %}
  {% endtabs %}

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2F0LDIOQzbNHhFhelGJPy4%2Fimage.png?alt=media&#x26;token=76f96a79-c18c-4f6a-b52a-05bb87030a6f" alt=""><figcaption></figcaption></figure>
