We have very good news for you: it’s no longer necessary to import/export files to/from Magento 2 manually. And below we explain how to automate Magento 2 import and export processes. Check this post and you will find out how to save tons of time and effort making your daily routine fully automated.
Of course, you need a third-party extension to achieve your goal. And we recommend you to use the Improved Import & Export Magento 2 extension. The default Magento 2 platform doesn’t add any automation to import/export processes, so you have to perform each run manually, but before diving deep into the nature of our solution, let’s tell a few words about the automation itself.
In case of Magento 2, it is fully based on Cron – a time-based job scheduler which is widely used to schedule commands or shell scripts (jobs) to run periodically at fixed intervals. It not only automates system maintenance or administration, but is also useful for things like downloading/uploading files or scheduling other repetitive tasks. For further information, check
As for Magento 2 Cron, it is used in case of reindexing, catalog price rules, sitemap generation, newsletters, notifications related to price changes, etc. All features and nuances are described here:
The module is entirely based on import and export jobs. You can create an unlimited number of both jobs that will be launched automatically according to specified schedule. At the same time, you can run any job any time asynchronously. The Improved Import Export Magento 2 extension allows importing/exporting products from/to various sources in different formats. As a result, you can automatically update stock and other product attributes. Let’s pay attention to some details.
All import jobs are gathered in a grid that provides enough information to find the desired job (the same is about export jobs). You can view job ID, title, status, schedule, entity type, and import source.
Also note that it is possible to automate Magento 2 import & export right in the grid by changing crone schedule right there:
While adding a new import job, you have to deal with the following sections: General Settings, Import Settings, Import Behavior, and Import Source.
The first section allows enabling/disabling the job, typing its title, and automating the process by configuring the frequency of the import job. In addition to a custom schedule, you can select a predefined one as well as enable manual run only.
The rest of the General Settings include:
- Generate Unique Url if Duplicate – enable it if you are not sure that the products you are importing come with the unique URLs. This setting allows to get rid of the most annoying import trouble.
- – enable if you want to launch a re-build indices after the import is complete.
The second section of the configuration page provides the ability to specify an entity that will be imported. Now, our module supports such import entities as Products, Categories; Customers and Addresses; Customers Main File; Customer Addresses; and Advanced Pricing.
In this section you can also:
- Enable API connection with the CMS or ERP system you are using.
- Clear attribute values – if enables all values of the optional product attributes will be reset and deselected. For example if you are importing product with ‘Color’ attribute set to ‘Red’, in the imported product value for the ‘Color’ attribute will NOT be selected.
- Remove Product Association – removes product associations of the Grouped Products imported.
Next, it is necessary to specify import behavior: Add/Update, Replace, or Delete; configure validation strategy: ‘Stop on Error’ or ‘Skip error entries’; set allowed error quantity that will be used for halting import process; and specify separators.
In Import Source select one of three file formats (the default import supports just one): CSV, XML, XLSX (Excel), ODS (OpenOffice), Json and TXT.
The second step allows you to choose the import source. In order to automate Magento 2 import, our extension provides the ability to get the desired update via a specified file path or from FTP/SFTP, URL, or even Dropbox. File upload configuration looks as follows:
And this is how the Dropbox upload section looks:
We have also added support of Google Sheet CSV files. So you can work with your colleagues on a single import table. Share it, and only paste a link. Improved Import and Export extension will do the rest – it will get a CSV file and import anything from it to your Magento store.
Also note that despite the selected import source, there is always file validation.
If your import file has a custom structure, you can always apply mapping in order to automate Magento 2 import (the same is about export. Our extension provides the ability to use mapping presets as well as create custom mapping manually. Furthermore, you can always apply hardcoded (default) values to all items.
In the next section you can map categories of the imported products with the categories that currently exist at your store. This may come handy if you are importing product from a different store or migrating.
Additionally you can create new categories that are missing at your store right from the import job.
After the category mapping you can also control the prices of the imported products. This is done inside the Price Rules section.
You can decide of you want to increase or decrease the prices of the imported products by a flat or percent value. For example if you are getting ready for a sale, this section can help you quickly adjust the prices to include a discount.
Similar features are available in case of export, so you can fully automate Magento 2 export with the help of the Firebear Improved Import & Export Magento 2 extension. For further information, check our Improved Import & Export Magento 2 Extension Manual. You can get the Magento 2 import/export module here:'