Skip to main content

How to migrate Shopify orders between stores

Copy your order history from one Shopify store to another with an Altera export and import.

Goal: Copy the orders of one Shopify store (the old store) to another Shopify store (the new store), with their line items, customers, payments, fulfillments, and refunds. You export the orders from the old store with Altera and import the file into the new store. To copy all the data of a store, see How to duplicate a Shopify store.

Prerequisites:

  • You have Altera installed on both stores.

  • Your products are in the new store, with the same handles and SKUs as in the old store. Altera links the order line items to these products. See Product fields.

  • Your customers are in the new store, if you want to keep their full customer records. Altera links each order to the customer with the same email. See Customer fields.

Step 1 - Export the orders from the old store

In the old store, open Altera and click New export. Select Orders and open the field selection. Select the Transactions, Fulfillments, and Refunds fields, because they are not selected by default. To export only some orders, add a filter (see Export filters). Click Start export, and when the export is done, click Download output.

Step 2 - Check the commands and options in the file

Open the file. Make sure that the Command column is NEW on every row (Altera writes NEW when it exports orders). With NEW, Altera creates the order only when the new store has no order with the same ID or Name. Otherwise, the rows fail with ORD085, so a second import of the same file does not make duplicate orders.

Do not change the ID column. For a new order, the ID only groups the rows of one order.

Keep Send Receipt, Fulfillment: Send Receipt, Refund: Send Receipt, and Cancel: Send Receipt at FALSE, so that customers do not get emails (see Customer notifications). Files exported by Altera already contain FALSE.

Keep Inventory Behaviour at bypass (the exported value). Then the imported orders do not take units from the stock of the new store, which your product import already set (see Inventory Behaviour). To make sure that refunds do not add units back to stock, set Refund: Restock to FALSE.

Step 3 - Check the order names

If the new store already has orders, its order names (for example #1001) can be the same as names in your file. These orders fail with ORD085. To prevent this, change the Name values (for example, to OLD-1001), or clear the Name cells so that Shopify gives each order the next order number. Change or clear the name on every row of the order.

Step 4 - Prepare the new store

Turn off staff notifications for new orders (see How to disable staff email notifications for new orders). If the new store has the Shop sales channel, customers who use the Shop app can get a notification for each imported order. Before a large import, ask Shopify support to pause these notifications (see Shop app notifications).

If the two stores use different currencies, keep the Shop Currency column and the (Shop Currency) columns from the export (see Shop Currency).

Step 5 - Import a few orders as a test

Make a copy of the file and delete all rows except the rows of two or three orders. An order can have many rows, so keep all the rows that have the same ID. In the new store, open Altera, click Upload file, select the copy, and click Start import. Open the orders in the Shopify admin and check the line items, customer, payment status, and fulfillments.

Step 6 - Import all the orders

In the new store, upload the full file and click Start import. When the import is done, look at the warnings in the results:

  • ORD093: Altera found the product of a line item, but not the variant. The line item is imported without a link to the product.

  • ORD026: a line item matches no product and has no Line: Title, so the order is not created.

  • ORD039: the Source value is one of Shopify's own channels, such as web. Shopify does not let apps set it, so the order is created without it.

Outcome

Your orders are in the new store under Orders, with their names, Processed At dates, line items, customers, tax lines, discounts, shipping, payments, fulfillments with tracking numbers, and refunds.

Altera links each line item to a product in the new store by Line: Product Handle, and then to a variant by Line: SKU or Line: Variant Title. When there is no product handle, the variant is found by Line: SKU in the whole store. A line item that matches no product is imported with its title and price, without a link to a product. See Line items.

These items do not carry over:

  • Created At, Confirmation Number, and Transaction: ID: Shopify sets new values. The order date in the admin and in reports comes from Processed At.

  • Channel: Shopify shows Altera as the channel of imported orders. To group the orders, use Tags.

  • Cancellation dates: cancelled orders are cancelled at the time of the import. See Importing orders as cancelled.

  • Order timeline: the comments and events on the order timeline are not exported.

Next steps

Did this answer your question?