> ## Documentation Index
> Fetch the complete documentation index at: https://codebeans-cb-checkout-rules.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Import and export rules

> Back up your rules as a JSON file, or copy them to another store.

Use **Import / Export Rules** to save all your rules to a file, or to copy rules from one store to another.

![Rules are exported from Store A to a JSON file, then imported into Store B as Deactivated rules.](https://mintcdn.com/codebeans-cb-checkout-rules/9lVKcptiAqYAtTXj/images/import-export.svg?fit=max\&auto=format\&n=9lVKcptiAqYAtTXj\&q=85\&s=1a0285a5b563b7e849b733c3c8327ae3)

> [!NOTE]
>
> Import and export are available on the Starter plan and above.

## Export your rules

1. In the app, click **Import / Export Rules**.
2. Under **Export Rules**, click **Export all rules as JSON**.

Your browser downloads a file named like `checkout-rules-your-store.myshopify.com-1760000000000.json`. It contains every preset and custom rule, with their settings and messages.

## Import rules

**1. Open the exported file**

Open the JSON file in a text editor and copy all of its contents.

**2. Paste it into the app**

In the store you want to import to, open **Import / Export Rules**. Under **Import Rules**, paste the contents into **Paste exported JSON**.

**3. Import**

Click **Import rules**. A message tells you how many rules were imported, and how many failed.

**4. Review and activate**

Imported rules are always created as **Deactivated**, so they don't affect checkout straight away. Open each rule, check its settings, then set it to **Testing** or **Active**.

> [!WARNING]
>
> Each preset rule can exist only once in a store. If the store already has a preset rule that is also in the file, delete it in the app before you import. Custom rules are always added as new rules, so importing the same file twice creates duplicates.

> [!TIP]
>
> Rules that use specific products or collections refer to items in the original store. When you import into a different store, open those rules and choose the products or collections again.

## Errors

| Message | What to do |
| - | - |
| **No JSON data provided.** | Paste the file contents before you click **Import rules**. |
| **Invalid JSON. Please upload a valid export file.** | Copy the whole file again, from the first `{` to the last `}`. |
| **Invalid export format. Expected `{ rules: [...] }`.** | Use a file exported from this app. |
| **Import/Export is not available on your current plan.** | Upgrade to Starter or higher. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.