Magento 2 – Migrate Orders Preserving ID
Importing Magento orders is not a trivial task. But you can’t do without it when you need to transfer orders from one Magento instance to another. Migrating data from another shopping cart or ERP system would also involve order import procedures.
Since the Magento import option is not available out of the box you will have to find an external solution. Transitioning data programmatically requires certain development knowledge, and it takes time and effort. An alternative way of transferring Magento orders is to use Store Manager for Magento. The procedure is performed via a step-by-step wizard and doesn’t require any tech experience.
How to migrate Magento orders with IDs preserved using import
When you upload orders with Store Manager, you can choose between two options: "General import" without preserving old IDs and keeping them in a separate database field just for your reference or "Migrate order ID and numbers (Increment ID)".
During general import, the orders from a file are appended to the existing ones and order IDs are generated automatically based on Magento requirements (auto-incremented). Read more about this in our previous article https://www.mag-manager.com/product-information/magento-order-management/magento-import-orders/
When you choose the option “Migrate orders id and numbers” all the existing orders (for instance, test orders) are cleared from a database and orders from the file are imported. This is applicable when you have a fresh Magento installation.
In this article, we will describe the second option – Migrating Magento orders id and numbers.
1. Prepare a file for import
First, you have to prepare a file for import. If you are transferring orders data from one Magento store to another we recommend you export all fields so that you don’t miss any required fields. Check our article on how to export Magento orders.
If you are moving orders data from ERP, another shopping cart or any other system you need to get a CSV file with all orders information available in the database. If you have one already, go ahead with the import.
2. Open Store Manager and launch Import/Export Orders wizard from the main or lower toolbar:
3. Select the import option and proceed:
4. Choose the file on your computer or provide an HTTP URL or FTP credentials:
5. Preview data from the file in a wizard and check delimiters.
On this step, you can see how the file was parsed. Also, check the delimiters – they must correspond with the ones used in the file. If everything is OK, click Next:
6. Now select the store view you are importing orders to:
7. Review base formats.
Usually, you can just look them through and proceed to the next step:
8. Enable the “Migrate Orders id and numbers” option to preserve IDs from your CSV file.
On this step, you should also map columns for import.
When you are importing the file that you’ve previously exported from Magento the fields are mapped automatically.
If you are importing orders from another shopping cart or ERP you should review the mapping carefully and assign database fields to appropriate CSV columns in the Wizard. Unassigned columns from a CSV file will be highlighted in red so you have to review them and specify an appropriate database field number like it is shown below:
9. In the preview window, you can check how the file was parsed. Proceed to the next step if everything is correct:
10. On the last step of the wizard, review the report and click “finish”:
After Magento orders import is complete you can check the data in the Orders section in Store Manager. As you can see, all orders with ID and order # (Increment ID) were transferred to the Magento 2 store successfully.
Now you know how to use Store Manager for Magento to migrate orders keeping IDs. If you experience any difficulties during the procedure feel free to contact us, we’ll be glad to help.