Migrate Orders from Magento to Shopify

Migrate Orders from Magento to Shopify

So you decided to migrate your Orders from Magento to Shopify.

This is how you do it using the Excelify app:

  1. Export Orders data tables from the Magento database to CSV files.
  2. Zip those CSV files into one single zip file, and make sure the zip file name includes a word “magento” and “order” in it, like “Magento_Orders.zip”.
  3. Upload that Magento zip file to the Excelify app.
  4. When it’s done analyzing, check the checkbox “Dry run” under the Options – to generate the Excelify Excel file but not import just yet.
  5. Download the Import Results Excel file – you will have it in the Excelify Orders template format.
  6. Inspect that file, make any checks and data cleanup or adjustments as you need.
  7. Import the ready Excel file using the Excelify app.

It works if you are migrating from Magento version 1.x. If you need to convert from another version, please, contact us about that.

Each of the steps to migrate Orders from Magento to Shopify in details:

1. Export Orders data tables from the Magento database to CSV files

When you connect to the Magento database, you will see many tables there.

You need to use the database tool to export the following tables with their data to the CSV files – each table goes to its own CSV file with the following names:

Table Name (Magento v1.x) Table Name (Magento v2.x)
sales_flat_order.csv sales_order.csv
sales_flat_order_item.csv sales_order_item.csv
sales_flat_order_address.csv sales_order_address.csv
sales_flat_order_payment.csv sales_order_payment.csv
sales_flat_shipment_track.csv sales_shipment_track.csv
sales_flat_order_status_history sales_order_status_history

CSV file format requirements

  1. Include column headings.
  2. Column separator: ,
  3. Quotes symbol:
  4. Escape symbol:
  5. Newline symbol: \n
  6. NULL values to be empty.

1.1. Install a database client app

A good free database tool to do this export is DBeaver (https://dbeaver.io/download/), works on Windows, MacOS and Linux.

You can, of course, choose any other database tool if you have a preferred one.

This tutorial will assume you are using the DBeaver.

1.2. Connect to your Magento database

If you don’t have the login details to your Magento database, usually, you can get those from your system administrator.

Right-click in DBeaver “Database Navigator” and choose “New Connection“.

Migrate Magento to Shopify - 1.2. Create Database Connection with DBeaver

Choose MySQL 8.x. Most likely your Magento is running on MySQL database unless you have a special custom setup.

Migrate Magento to Shopify - 1.2.2. Choose MySQL database

Press Next.

Then enter the Connection Settings to connect to your database.

If it asks to download some drivers, just press “Download” button and it will download them itself – no need to do anything special for that.

You should enter the connection parameters to your database:

  • Server host: that’s the address to the server. It will be either an IP address like “127.0.0.1″ or the full internet domain name.
  • Port: usually it is “3306“.
  • Database: typically it’s “magento” but it might be something else, as configured by your administrator.
  • User name
  • Password

Migrate Magento to Shopify - 1.2.3. Enter connection detailsQuite often your Magento database is running on some other server which you need to “tunnel” in. In that case, you will have additional “server” login details which you need to press the “Network settings (SSH, SSL, Proxy, …)” button and enter this data there.

Migrate Magento to Shopify - 1.2.4. Enter SSH connection details

When entered all the connection details, press the button “Test Connection…“.

That should show the confirmation window telling that the connection was successful.

The window should look like this:

Migrate Magento to Shopify - 1.2.5. Test the connection to databaseIf it doesn’t say the “Success” then please check your all login details.

If it says “Success” then you are all good to connect – press the “Finish” button and you should get connected to your Magento database.

1.3. Find the needed tables to export Orders data

In the “Database Navigator” side panel you should see the “MySQL 8.x – magento” database which you added.

Expand that tree here: MySQL 8.x – magento -> Databases -> magento -> Tables.

There you should see all your Magento database tables like this:

Migrate Magento to Shopify - 1.3.1. Export Magento Orders tablesScroll down till you see the tables starting with “sales_flat_order…” if you are on Magento 1 or “sales_order…” if you are on Magento 2.

While holding Ctrl key on Windows or Cmd key on Mac, select all the required tables to export.

If you have Magento 1, then you need to select the following tables:

  • sales_flat_order
  • sales_flat_order_item
  • sales_flat_order_address
  • sales_flat_order_payment
  • sales_flat_shipment_track
  • sales_flat_order_status_history

In our Magento 2 example, those will be the following tables:

  • sales_order
  • sales_order_item
  • sales_order_address
  • sales_order_payment
  • sales_shipment_track
  • sales_order_status_history

When you have selected those tables, right-click with the mouse on any of the tables, and in the pop-up menu choose “Export Data“.

Migrate Magento to Shopify - 1.3.2. Select tables, right-click and select the Export Data1.4. Export those Orders tables to CSV files

You should see the “Data Transfer” window open where you can choose the different export formats.

Choose the CSV there and press Next.Migrate Magento to Shopify - 1.4.1. Choose CSV format for the exportThen you will see the Format settings window for the CSV files.

The default values are good for the export, but just in case, check that those are like this:

  • File extension: csv
  • Delimiter: ,
  • Header: top
  • Characters escape: quotes
  • Quote character:
  • Quote always: off
  • Quote never: off
  • NULL string: this must be empty
  • Format numbers: off

Migrate Magento to Shopify - 1.4.2. Make sure your format settings are set correctlyChoose the export directory – where to place those CSV files. A good place to put those is in the Downloads directory:

Migrate Magento to Shopify - 1.4.3. Choose the export directoryWhen you have chosen the directory then press Next and Finish.

You should have your files exported fairly quickly, depending on the database size, but usually, it takes less than 1 minute.

2. Zip those CSV files into one single zip file, and make sure the zip file name includes a word “magento” in it, like “Magento_Orders.zip”

Put all those CSV files in the same folder, and give that folder a name, like “magento_orders”. It’s important that the zip file name should include the name “magento” in it. That’s how the app will know you are having the Magento data in that file.

And zip that folder into the zip file, like “magento_orders.zip”.

Magento Orders import file to Shopify3. Upload that Magento zip file to the Excelify app

When you will upload that Magento zip file to the Excelify app, you should see that the app recognized it as Magento format, and runs through the Analyzing process to count how many Orders it finds in those files.

Analyzing Magento Orders import to Shopify

4. When it’s done analyzing, check the checkbox “Dry run” under the Options – to generate the Excelify Excel file but not import just yet

Press the “Options” button and click the “Dry run – just generate the Results file without importing” checkbox.

Import Orders from Magento to Shopify - dry runThat will not do any real import just yet – it will just run through our data transformation engine to simulate the import, and as a result, you will get the “Import Results” Excel file which is in the Excelify “Orders” import template format.

Press the “Import” button. Don’t worry – if the Dry run is on, there will be no changes done to your shop data just yet.

5. Download the Import Results Excel file – you will have it in the Excelify Orders template format

When the “dry import” is finished, you will see the Download button.

Press it and download the “Import Results” file of your test Orders import – it will be in the Excelify Excel file format.

Download import results file after dry run of Shopify Orders import from MagentoThe file will contain all of the Orders, their customer data, line items, shipping cost, refunds, fulfillments, and financial transactions.

6. Inspect that file, make any checks and data cleanup or adjustments as you need.

You might want to look at the total amounts, check the currencies, transactions.

Maybe improve the data of some of your customers, check that their phone prefixes are correct, as Shopify requires international phone codes for all phone numbers.

Check customer address data, their countries, cities, regions, streets.

Also, you might want to check the totals for line items, and Orders themselves, and the Taxes, tax codes, etc.

You can do all of those changes in the Excel file. Or… in the Magento system, and then re-export that data to CSV files again, and repeat the process until you are satisfied with what you are about to import.

If you do wish to send out a receipt to the customer for some orders, then you can update the column “Send Receipt” to the value TRUE for your orders.

7. Disable notifications from Admin

If you don’t want to receive e-mail notifications for creating each Order, go to Admin -> Settings -> Notifications, and disable the “Staff order notifications“.

Shopify Admin - disable the Staff order notifications when importing from Magento

8. Import the ready Excel file using the Excelify app.

Also, you might want to try importing just 1-2 Orders from that file first, to look how they look in Shopify.

Once you feel ready, grab the prepared Excel file and import that by uploading again using the same Excelify app import section.

When importing, be patient – there is a lot of stuff going on under the hood to construct your Orders, so it might take a while to complete, but it should be worth the wait.

Good to know

  • If you feel like a kamikaze, you can skip the whole “Dry run” part, and just import the Orders zip file directly, without looking at the Excelify Orders format file.
  • Read about all the fields you see in the Orders Excelify template Excel file.
  • If you don’t want to migrate the History comments, then don’t include the file “sales_order_status_history” in the upload file.
  • If you see that some Orders import is showing as Failed, don’t worry – you can downlaod the “Import Results” file of that import, and at the last columns you will see the comments for why those failed. Then you can resolve those issues, and re-import just the Failed rows.
  • If the import speed is important to you, the higher plan you upgrade to, the quicker the import will be, as for example, Enterprise Plan essentially spins off 10 parallel import processes, achieving the effect as if 10 apps would import your data in parallel.
  • If you have the error like this: “Missing or stray quote in line …” – please, make sure that your CSV files are prepared according to the requirements stated on this tutorial.
  • If you feel stuck with something, our Support is willing to help you – just reach out to us.