What if you need to import orders to Magento 2? The platform doesn’t support this process. But you can easily add the missing functionality with the help of third-party order import solutions. But what if your import file doesn’t include order increment IDs? The situation becomes slightly more complicated since not all third-party modules know how to deal with this problem. In the following article, you explain how to generate order increment IDs automatically during Magento 2 import.
Missing order increment IDs
Let’s assume you need to import orders from a dropship vendor. It implies that there is no Magento order increment or entity ID in your order import file. However, you need these IDs to be automatically generated upon import, just as it happens when you create a new order from the Magento admin panel. Let’s see, how to do that.
How to generate order increment IDs automatically during Magento 2 import
You need to use the Improved Import & Export Magento 2 extension to generate order increment IDs automatically during Magento 2 import. First of all, it enables automated order import from any external system. Furthermore, the module can automatically generate increment IDs for orders in the following two cases:
- Your order import file contains the increment_id column but it is empty;
- The increment_id column is missing in the import file.
In the case of an empty increment_id column, the Improved Import & Export Magento 2 extension can automatically fill it in with data, adding the corresponding records to your Magento database. If there is no increment_id column, it is not an issue at all. The module can create it from scratch, filling in the necessary data for you.
Follow these steps to generate order increment IDs automatically during Magento 2 import:
- Open the Improved Import & Export extension;
- Open a new import job;
- Select Orders as your import entity;
- Configure job’s settings;
- In the ‘Import Settings’ section, activate the ‘Use auto-increment for order increment_id’ feature.
- Finish your order import job configuration and save it.
In addition to the ability to generate order increment IDs automatically during Magento 2 import, the Improved Import & Export Magento 2 extension lets you import and export data according to a cron-based schedule, using different file formats (such as CSV, XML, XLSX, and JSON) and sources (Google Sheets, Dropbox, Google Drive, etc.). You can apply mapping to third-party data, run API-based import and export, and move any entity to and from your Magento 2 website. You can learn more about the extension here:
Also, check our Magento 2 Cookbook for more useful tips.