> For the complete documentation index, see [llms.txt](https://kbase.whitelabel-loyalty.com/product/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kbase.whitelabel-loyalty.com/product/loyalty-engine/loyalty-console/production-and-staging-environments/copy-data-between-environments.md).

# Copy data between environments

{% hint style="success" %}
Copy data is available on newer accounts, where your Test and Live environments run separately. If your account supports it, you’ll see the copy buttons in **Manage Environments**.

If you don’t see them, your account isn’t set up with separate Test and Live environments. Get in touch with your account manager to find out more.
{% endhint %}

Copy data lets you move **configuration** between your Test and Live environments without rebuilding it by hand. Use it to mirror production into Test so you can rehearse changes against a realistic setup, and to promote work you've validated in Test up into Live.

It works in both directions:

* **Copy data to test** — bring your Live configuration into Test to match production.
* **Copy data to live** — promote configuration you've built and validated in Test into Live.

Each copy is a one-off action. It moves configuration at the moment you run it — it doesn't keep your Test and Live environments in sync afterwards. To pick up later changes, run the copy again.

{% hint style="info" %}
**Copy data moves configuration, not people.** It never copies your customers, users, or event data — only the setup (event types, rewards, campaigns, microsite content, etc.). It is also additive: it only ever adds items to the target environment — it never edits or deletes anything that's already there. Re-running a copy won't duplicate what it copied before.
{% endhint %}

### Where to find it

Open the **Live/Test menu** in the header and choose **Manage Environments**. You'll see a card for each environment with a copy action:

* **Copy data to test** on the **Live** card.
* **Copy data to live** on the **Test** card, next to Generate / Reset data.

Both buttons are temporarily disabled while a copy is already running for your account, or while sample data is being generated or data is being reset.

### How a copy works

A copy runs in four stages: **Preview → Review → Run → Results**.

#### 1. Preview

The console scans the source environment and lists every item that can be copied, checking each one against the target. **Nothing is changed at this stage.** Items are sorted into two groups:

* **Can be copied** — items you can include in this copy. This covers both brand-new items and ones that already have a match in the target.
* **Can’t be copied** — items already copied in a previous run. Each shows a note such as “Already in Live — will be skipped.”

**Which items can be matched**

On a first copy, only these item types can be matched to something already in the target. For everything else, a match is recognised only if the item was copied in an earlier run.

* **Event types** — matched when the target already has an event type with the same name and the same active state.
* **Microsite group–section placements** — matched when the same section already sits in the same group in the target.
* **Microsite section–tile placements** — matched when the same tile already sits in the same section in the target.

When an item is matched this way, the copy links to the existing one instead of creating a duplicate.

{% hint style="info" %}
Occasionally the preview can’t load your full list of items in one go. If that happens, you’ll see a **Partial results** notice showing only part of your configuration. Run the preview again to load the complete list.
{% endhint %}

#### 2. Review

Items are grouped by type, with tabs for **Show all**, **Can be copied**, and **Can't be copied**.

* Everything copyable is **selected by default** — deselect anything you don't want to copy in the current run.
* Items under **Can’t be copied** were already copied in a previous run and can’t be selected again.
* Supporting configuration (such as visibility rules and other behind-the-scenes settings) always travels automatically with its parent item, though any references it contains keep their original IDs (see Results for more information).

#### 3. Run

Starting the copy queues it as a background job.

* **Only one copy can run at a time** for your account. If a copy is already active, starting another is blocked until it finishes.
* The page switches to a **progress view** that updates automatically every few seconds.

#### 4. Results

When the copy finishes, each item ends in one of three states:

* **Copied** — the item was added to the target environment. If it was copied in an earlier run, it's recognised and not copied again, so repeat runs don't create duplicates.
* **Needs review** — the item was deliberately not copied. Either something it depends on is missing (for example, an event reactor whose event type wasn’t copied, or a microsite tile whose reward wasn’t copied), or it isn’t copyable. This isn’t an error. Hover over the status for the reason.
* **Failed** — an error stopped the item copying. Common causes are the source item changing between preview and run (for example, being deleted), or a clash with something already in the target. Hover over the badge for the reason code and message. Re-run the copy to try again; if an item keeps failing, contact support.

Some items copy successfully but with a note. For example, a reward copies but its linked venue isn't carried across ("venue not mapped"), or a campaign copies but its audience link isn't remapped ("visibility criteria present").

**Links between items aren’t repointed.** When a copied item references another item by ID — for example, a campaign whose visibility criteria targets an audience — the copy keeps the original reference rather than relinking it to the target’s matching item. After promoting to Live, that campaign may still point at the Test audience, even if you copied the audience in the same run. The results view flags this (“visibility criteria present”). Re-link these references in the target after copying.

{% hint style="warning" %}
**Duplicates can appear on the first copy.** If you’ve built the same item by hand in both Test and Live, the first copy usually adds a second copy to the target rather than merging them — only the item types listed under Preview are matched by content. Once an item has been copied, later runs recognise it and won’t duplicate it.
{% endhint %}

### What gets copied

Copy moves configuration from two areas:

**Program & rewards**

* Audiences
* Badges
* Campaigns (including Missions & Reactors)
* Code pools
* Event types
* Leaderboards
* Points liability criteria
* Referral campaign tranches
* Reward categories
* Rewards
* Tiers

**Microsite & content**

* Groups
* Microsites
* Sections
* Tiles

**Not copied.** Copy only moves the configuration listed above. It does not include:

* **Customers, users, and event data** — only setup is copied, never the people or activity in your program.
* **Other service areas** — configuration from the Receipts and Marketing services isn’t part of copy. You’ll need to set these up separately in each environment.
* **Third-party rewards** — rewards linked to an external provider don't appear in the preview and can't be copied, because their external references are specific to each environment. Set these up again in the target.

### Good to know

* **Additive only** — a copy never deletes or overwrites what's already in the target environment.
* **Configuration only** — customers, users, and events are never copied.
* **One copy at a time** per account.
* **Latest run only** — you can review your most recent copy, not previous ones.
* **Live changes apply immediately** — anything you copy into Live takes effect for your end users straight away (or, for scheduled campaigns and rewards, once they're scheduled to begin).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kbase.whitelabel-loyalty.com/product/loyalty-engine/loyalty-console/production-and-staging-environments/copy-data-between-environments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
