For more details see how the Import Orders for Magento 2 extension works.
Transfer orders placed on third-party sources, marketplaces and other online stores into your Magento 2 store. Use Import Orders extension for Magento 2 to build a single management system across all platforms.
Amasty Import by now has 3 separate modules to carry out import tasks:
The more Amasty modules you have, the more entities you will be able to import in the simplified module and in the Cron Jobs version. Follow Import & Export solution updates to discover new possibilities.
Before building import profiles, configure the basic import performance options.
Go to Stores → Configuration → Amasty Extensions → Import Orders.
Import Batch Size - set number of orders that will be processed in an iteration.
Enable Multi-Process Import - enable this option to perform import in multiple threads and speed up the import process.
Number of Parallel Processes - if the previous option is enabled, specify the number of processes according to your server capabilities. The more parallel processes are set, the faster the import process goes, but the higher the load on the server is.
The extended order import functionality allows you to create flexible profiles for import and execute it on regular basis. To view all the profiles, proceed to System → Import Orders → Profiles.
Here you can see all existing profiles, their IDs, names, file formats, execution types and the dates of the last run/update.
Let's consider the case of new profile creation. For example, we want to set automatic import of orders from Amazon.
First of all, hit the Add New Profile button.
Profile Name - specify the name of the profile for internal usage. This name will be displayed in the grid.
Batch Size - set the number of orders that will be processed in an iteration. You may configure batch size for each profile separately or specify the value in general configuration and use this default value.
You can also automatically execute particular actions when the orders are imported.
Change Processed Orders Status To - specify the status that imported orders will get.
Change Only New Orders Status - if enabled, the action will only apply to new orders that were created during the import process and not affect the orders that were just updated.
Actions that can be applied to order documentation:
All these actions can also be applied to newly-created orders only. Additionally, you can send automatic notifications to customers.
Now we need to choose the required file type and configure its settings.
The following formats are available:
For CSV, ODS and XLSX formats you can:
Add Header Row - column titles will be displayed in this row.
Rows Merged into One - enable this option if the rows in the import files are merged.
For a CSV file you can additionally set:
For a XML file specify the path to the node in the Data XPath field, e.g. if you have <items><item>1</item><item>2</item></items>, the path will be items/item.
We've chosen a CSV format.
Now choose a suitable import source.
For Local Directory specify a File Path relative to Magento installation (e.g. var/import/import.csv).
For File Upload select the file to import. Make sure your file isn't more than 2M and it is saved in UTF-8 encoding for proper import.
If you want to use FTP / SFTP for import, you will need to fill the following fields:
For FTP you can also enable a Passive Mode.
For URL source, apart from the URL itself, provide Basic Authentication Username and Password.
https://example/download?id=19&file=-1.xml(here we use XML format). It is necessary since in Google Cloud the link to the file is used without an extension, and the Import Orders extension can't validate it. Thus, you need to add the format. Additionally, if the access is shared for all users, then the username and password fields are not required. If only certain users can see the file, then you need to enter their credentials for access.
For Google Sheets specify the required URL.
As we already have a CSV file to import, we've chosen the File Upload option.
In this tab, you can adjust import behavior.
Import Behavior - choose a suitable behavior for import:
Enable Autofill for Typical Use Cases - if enabled, Fields Configuration will be automatically filled in with the settings to perform the typical use cases for importing orders from third-party systems. The setting can be used only during new profile creation.
The required data for add behavior: Order, Order Item, Payment, Shipping Address, Billing Address.
Please, enable the autofill option to avoid errors during import and map fields properly.
Order Identifier - choose Order Entity ID or Order Increment ID as an identifier.
Validation Strategy - you can either stop the import process if any error appears (Stop On Error option) or skip invalid data and continue importing (Skip Error Entities option).
If you choose Stop on Errors option, the status will be 'Failed'.
Allowed Errors Count - specify the number of errors to halt the import process.
Customer Mode - select the strategy to deal with customers:
As we want to import orders from Amazon for the first time, we've selected the Only Add import behavior and a Guest Order If Customer Doesn’t Exist strategy.
In this tab, you need to choose the required entities and map fields. If you enabled the Autofill for Typical Use Cases option previously, the required fields will be automatically added and you can proceed to mapping. If the option was not enabled, you need to add the entities and fields manually.
The functionality has a tree structure. Thus, you can add any entity, any field within a particular entity, customize entity keys/field names/delimiters and so on to match the requirements of the import.
See how the tree-structure configuration is created:
Below you can see all available for importing entities:
Apart from adding required entities and fields, you need to map all required fields and additional fields that you want to import from the file.
Let's see how to configure the mapping.
First of all, open your import file and check how it is configured. Pay attention to column names and delimiters.
As we see, in our file all columns have a custom entity key - amazon.
In this case, we need to provide the same entity key in the fields configuration.
Then we check the delimiters. In our file we have a slash as the delimiter:
Thus, we need to specify the same delimiter in the configuration:
If ready, proceed to column names.
In the configuration, we see that the entity_id, state and status are the required fields (as they were autofilled).
Now we check if we have the same columns in our import file.
Here we see that the columns are present, but they have a different column name, e.g. instead of entity_id we have just entity. In this case, we should match the title from the import file with the title in Magento.
If the titles are identical (as we have for the state column), just leave the Import File Field empty.
If you check all fields and see that some of the required ones are absent in the import file, set the Default Value. For example, Magento requires store_id column, but we don't have this one in our file as Amazon doesn't have this parameter. In this case, we can just provide the required ID in the Default Value field (e.g. 1).
This way, you need to check all fields and map the titles so that the extension could import orders properly. Add any entities and provide custom entity keys if needed.
To add the fields, click Map Fields and choose the necessary ones in the modal window. Use the search field to speed up configuration.
When the configuration is ready, upload the file in the Import Source tab. Click Save and Continue Edit.
Now you can Validate the file.
The extension will display validation progress and results in a popup window.
If the configuration was incorrect, you will see an error.
In case of successful validation, you can start the import.
If you have configured the mapping and the orders were imported successfully, you can set the automatic import of future orders.
Run Profile by Cron - if enabled, the import will be initiated automatically by cron according to the schedule specified.
Frequency - choose a suitable import schedule.
If you choose a custom one, provide the schedule manually.
For each profile a separate import history is available. Check the statuses, dates and logs.
You may also check the logs for all import profiles in one place. Navigate to System → Import Orders → History. See the statues and check details to get a full picture.
This extension is helpful to perform one-time operations as it has a simplified UI. If you have only the Import Orders extension, you will be able to import any order entity, but if you will have other import extensions by Amasty, you will easily import any available entity in one place.
Go to System → Amasty Import → Import and select the entity to import.
As soon as you choose the entity, you will be able to configure import details, such as format, title, included fields, etc. Check each configuration detail for each tab in the Import Profile Configuration sections.
To configure the basic options for Amasty Import, navigate to Stores → Configuration → Amasty Extensions → Import.
Enable Multi-Process Import - set to Yes to speed up the import.
Number of Parallel Processes - specify the number of processes according to your server capabilities. The more parallel processes are set, the faster the import process goes, but the higher the server loads.
Also, the extension includes Amasty Import Cron Jobs features: you can create regular cron jobs to import any available entity.
Go to System → Amasty Import → Cron Jobs.
The more installed Amasty Import extensions you have, the more entities you can import by cron.
Click New Import Job.
Specify the cron job title for internal use and set the schedule for importing. The file configuration algorithm is the same as described in the Import Profile section.