# Running a test tenant before go-live

Audience: Logistics Manager

Trying Pyck on your real orders without shipping anything, then switching to your live warehouse

You can connect a Pyck test tenant to your live store and let it receive your real products, customers and orders, before the live warehouse takes over. Nothing is shipped, no stock moves, and customer details are replaced with made-up ones. When you are ready, one switch makes the live warehouse take over.

## What a test warehouse can and cannot do

| | Production warehouse | Every other warehouse |
| --- | --- | --- |
| Receives your products, customers and orders | Yes | Yes |
| Customer details | Real | Replaced with made-up ones |
| Receives orders placed in test mode | Never | Yes |
| Can ship an order in Shopify | Yes, for orders that were sent to it | **Never** |
| Can change your Shopify stock | Yes | **Never** |

There is no separate setting for this. A warehouse that is not the production warehouse is a test warehouse, and it is limited this way whatever it is called.

In the copies a test warehouse receives, names, emails and phone numbers are made up, street lines are replaced and a second address line is dropped. City, postal code, province, country and company stay, so shipping logic still has a real destination. The same customer always gets the same made-up identity, so their orders stay linked to them. An order without a customer account gets a made-up identity of its own.

Notes, tags and metafields are copied as they are. Do not keep personal details in them if a test tenant should not see them.

## How to set it up

You end up with two warehouses: your production warehouse, switched off, and the test warehouse, switched on.

1. **Finish [setup](https://docs.pyck.cloud/shopify/setup.md).** The first warehouse is always called `production`. Use the details of your live tenant if you already have them; you can change the address and the API key later, the name stays.
2. **Add the test warehouse.** Open **Warehouses** and choose **Add warehouse**. Either choose **Sign in to Pyck** and pick the test tenant, or choose **Paste an API key** and enter the test tenant's address and API key. When you paste, give it a label such as `testing` and leave the role on **Test copy**. A warehouse added by signing in is always a test copy, and its label is made from the tenant's name. The app registers itself with the test tenant when you save. Saving does not create the app's schemas (Pyck `DataTypes`) there.
3. **Switch the test warehouse on.** A new warehouse starts switched off and receives nothing, and the message after saving says so. Open it from the **Warehouses** list, answer **Choose how this warehouse gets its schemas** with **Create the standard schemas** or **I'll map my own** (see [Setup](https://docs.pyck.cloud/shopify/setup.md#choose-how-the-warehouse-gets-its-schemas)), then choose **Switch on** under **Danger zone**.
4. **Keep production off.** Production also starts switched off after setup. If you have already switched it on, open `production` from the **Warehouses** list and, under **Danger zone**, choose **Switch off…** and confirm. Production now receives nothing and cannot call back.
5. **Check that products, customers and orders are switched on** under **Settings**, in the **Sync scope** card.

The Warehouses page now shows a warning that your production warehouse is switched off and that your other switched-on warehouses still receive anonymised copies. That is expected while you test. If no warehouse is switched on yet, the warning instead says that nothing is sent to Pyck and nothing comes back.

Switched off only means production receives no store data. You can still prepare it while you test: edit its [data mapping](https://docs.pyck.cloud/shopify/data-mapping.md) and create or revoke its worker keys. A worker key of a switched-off warehouse cannot get Shopify access yet; the app refuses that until the warehouse is switched on.

From now on, every product, customer and order goes to the test tenant as a copy. No order is sent to production, so nothing can be marked as shipped in Shopify, and your stock counts are never written to.

Only orders created or changed after setup arrive on their own. To bring existing orders over, choose **Sync now** on the **Overview** page.

:::caution
**Do not set the test warehouse's role to Production.** It would start receiving your customers' real details and could ship real orders, including every order it already received as a copy, whether or not another warehouse is picking it. The app asks you to confirm and says so, but only you know which warehouse is which.
:::

## Going live

1. Open `production` from the **Warehouses** list. If its page still asks **Choose how this warehouse gets its schemas**, answer that first: switching on waits for it (see [A warehouse cannot be switched on](https://docs.pyck.cloud/shopify/troubleshooting.md#a-warehouse-cannot-be-switched-on)). Then, under **Danger zone**, choose **Switch on and go live…**. The app shows what starts at once: real customer details, shipping and stock writes. Confirm.
2. **Switch the test warehouse off** on its own page, or leave it on to keep receiving copies. It cannot ship either way.
3. **Bring your data over.** Choose **Sync now** on the **Overview** page. Switching production on does not send it anything on its own. Orders that were synced while production was off cannot be shipped by production yet. Each one can be once it syncs again with production switched on, because that sync sends it to production.

Decide with your team before step 3 what happens to orders that are still open. An order that is open on the day you go live may already be in your old fulfilment process, and syncing it makes Pyck pick it too.

Switching production on is reversible, but shipments and stock changes it has already sent to Shopify are not undone.

## Things to watch

* **Deleting your last warehouse** reopens setup and stops all syncing.
* **Labels are permanent.** A label cannot be changed once the warehouse is added, so choose names like `testing` or `stage` deliberately.
* **Orders placed in test mode** never reach production, so they are never shipped. To test the shipping report itself, use a real order in a development store.
* **A worker key can bypass this.** If a Pyck workflow gets its own Shopify access through a worker key, the key's permissions decide what it may do. Do not give a test tenant's key permissions to change fulfilments or stock.

See [Sending data to several Pyck tenants](https://docs.pyck.cloud/shopify/routing.md) for what each tenant receives, and [When something looks wrong](https://docs.pyck.cloud/shopify/troubleshooting.md) if a tenant is refused.
