Magento 2 Import: Basic Functionality, Drawbacks & Best Replacement

- Magento 2, Our extensions

Magento 2 Development; Magento 2 tutorial

Managing your Magento 2 store’s products, customers, and other entities can be challenging. One essential feature that can help you cope with large volumes of data efficiently is the Magento 2 import. This guide will walk you through the basics of the Magento import, highlighting its key features and downsides. You will also find a step-by-step tutorial on how to import any supported entity to Magento 2 below. 

To make your import routine more feature-rich and potent, we propose an alternative to the default Magento 2 importer. The second part of our Magento 2 import guide compares the default import capabilities with the powerful Improved Import & Export Extension, introducing a way to address the downsides of the built-in tool.

Understanding Magento 2 Import

Magento 2 provides a built-in import functionality that allows store owners to upload and update various types of data, including products and customers. This feature is crucial for maintaining an up-to-date catalog, migrating data from other platforms, and bulk updating information on your e-commerce website. 

Now, let’s see what key types of import are available in Magento 2 by default.

Key Types of Magento 2 Import

With the default Magento 2 importer, you can transfer the following information to your website: 

  • Advanced prices, including tier and customer group prices;
  • Products, including simple and configurable products;
  • Customers, including customer account data and address information;
  • Stock sources – to sync product quantities between several points;
  • Tax rates – to manage tax rates for different store views (available in a different instrument). 

Magento 2 import supported entities

Although these entities cover basic import needs, an average e-commerce website consists of many more entities that you may need to import at some point. We will return to this aspect of the Magento 2 import in the section related to drawbacks.

Magento Import Requirements

The default Magento 2 import process has the following requirements: 

  • File Size Limit. The default file size limit is 2 MB. However, you can change it in the php.ini file on the server. The current size limit displays the system message on the Import page. 
  • Special Characters. Various special characters, including the equal sign, greater and less than symbols, single and double quotes, backslash, pipe, and ampersand symbols, etc., can cause problems during import.
    You can ensure that special characters are correctly interpreted by marking them as an escape sequence. Let’s suppose you have the following string of text: code=”lght1″, code=”lght2″. Enclose it in double quotes to ensure the original double quotes are understood correctly: “code=”lght1”, code=”lght2″”. Magento 2 understands a double set of double quotes as the outer set enclosing the actual data.
  • Attributes and Values. Your CSV should contain the correct attributes and values to result in a successful import. You can find more information about this import requirement in our Magento 2 Import Guide List or Master Import Table. Just find the entity you want to import and peruse the corresponding attributes. 
  • Product Images. If you import products and want to upload product images, you need to specify a path to every image in your CSV and upload all media files to the server.
    Specify a path to a local server folder or the full URL to the directory on an external server.

How to Use Default Magento 2 Import Step-by-Step Guide

Now that you are familiar with the key Magento 2 import types and requirements, let’s look at the import process itself. 

Prepare The Data & Select The Entity

Make sure your update follows the requirements of Magento 2. 

If everything is ok, follow these steps to start your Magento 2 import:

  1. Proceed to System > Data Transfer > Import.
  2. Select Entity Type (one of the import types mentioned above) under Import Settings:
    Magento 2 import select entity

Set The Magento 2 Import Behavior

Now, you need to set your import behavior. Choose one of the following options from the Import Behavior dropdown:

  • Add/Update. The imported data is added to the existing entity data in the database. For products, you can update all fields except SKU.
  • Replace. The existing data is replaced with the imported data.
  • Delete. Entities in the database are deleted from the database if they are available in the imported data.
    Magento 2 import behavior

Choose A Validation Strategy That Fits Your Magento Import

Determine what happens when an error is encountered when importing data to Magento 2:

  1. Choose one of the following: Stop on Error or Skip error entries.
  2. Next, specify the number of errors that can occur before the import is canceled for Allowed Errors Count.
    10 is the default value.
    Magento 2 import validation strategy

Configure Separators

CSV uses a comma as its default separator. Therefore, the following default values

  • A comma (,) for Field separator.
  • A comma (,) for Multiple value separator.
  • _EMPTY_VALUE_ for Empty attribute value constant.
  • Select the Fields Enclosure checkbox to enclose any special characters that might be found in the data as an escape sequence.
    Magento 2 import field separators

If you want to use a different character, make sure that the data in a CSV file matches the character that you specify.

Locate The Import File

At this point in your Magento 2 import routine, you need to upload a file that contains the update:

  1. Click Choose File.
  2. Locate your CSV file.
  3. Click  Open.
    Magento 2 import file upload

Product Import Tip: For Images File Directory, enter the relative path to the location on your server with uploaded images. For instance, product_images if media files are stored in the <Magento-root-directory>/var/import/images/product_images folder. Read more about this process in our guide to Magento 2 product import.

Check The Update 

Click Check Data in the upper-right corner to commence the validation process.

Magento 2 import data validation

If the data is valid, you will see the following message:

Magento 2 import: validation results

Click Import to start the Magento 2 import. 

If the data is invalid, correct its problems, and try to import the file again.

If you see an error message in the Validation Results, address the problem and re-import the file.

Magento Import History

Magento 2 maintains a record of the imported data under System > Data Transfer > Import History. You can find the start date and time, user, execution time, and a link to the imported file there. 

Magento import history

Drawbacks of Default Magento 2 Import

Now, that you are familiar with the basic Magento 2 import functionality, let’s focus on its drawbacks. 

Limited Number of Import Types

The lack of support for all core entities may be the largest drawback of the built-in Magento 2 importer. For instance, you cannot transfer a category tree import meaning that you need to recreate it manually while migrating to Magento 2 from Magento 1 or another platform. Just think how much time a category tree import would save. 

You may argue that Magento 2 facilitates category creation if you import a product with a full category path. Yes, if no category exists by this path, Magento 2 creates it and places this product there after a successful Magento 2 import. However, importing the entire category tree is problematic. To save time and effort, you can switch to a more robust importer:

Magento 2 Categories Import

The lack of a Magento 2 order import results in additional manual labor, too. Imagine you need to sync order data between your store, POS, and e-commerce website in the Magento admin. If there is no order import in Magento 2, you have to recreate orders from the related systems manually. Or you can get the missing functionality with the Improved Import & Export extension. The module supports order import for both Magento Open Source and Adobe Commerce. You can find more information about it here: 

Magento 2 Import Orders

These are just two downsides of the default Magento 2 import associated with its limited support for the data that can be transferred. 

Let’s see what entities the Improved Import & Export extension supports compared to Magento’s importer:

Entity Default Magento 2 Import Improved Import & Export
Products
Categories
Customers and Addresses
Customer Main File
Customer Address
Advanced Pricing
Tax Rates
Attributes
Orders
CMS Pages
CMS Blocks
Cart Price Rules
Catalog Price Rules
Gift Cards
Reviews
URL Rewrites
Search Terms
Search Synonyms
Page Hierarchy
Newsletter Subscribers
Stock Source Qty
Stock Sources
Total 6 22

Get Improved Import & Export Extension

No Mapping

As we’ve already mentioned, if during the validation process, Magento detects issues, you need to edit a CSV file manually. It’s another annoying and time-consuming routine that is prone to errors, and the second biggest drawback of the default Magento import,

With the ImprovedImport & Export extension, you can apply the necessary changes manually in a user-friendly matching interface: Select a problematic attribute and specify a system replacement. That’s it. 

You can even use mapping presets to apply changes automatically to the data from external systems, e.g., when you migrate from Magento 1 to Magento 2.

Lack of Automation

The lack of automation is another notable disadvantage of the Magento 2 import. Scheduled data transfers are available in Adobe Commerce only. If you are a Magento Open Source user, you have to do everything manually. 

As for the Improved Import & Export Magento 2 extension, it provides the ability to create update schedules to launch import profiles automatically. You only need to specify the frequency of transfers while configuring an import profile. 

Magento 2 import and export automation with cron

Final Words

Choosing the right import method for your Magento 2 store depends on your specific needs. The default Magento 2 import functionality is sufficient for basic import tasks, but for more complex requirements, the Improved Import & Export Extension by Firebear provides advanced features and greater flexibility. Let’s compare the two ways to conduct the Magento 2 import side by side:

Feature Default Magento 2 Import Improved Import & Export by Firebear
Supported Entities 6 22
Data Mapping Absent Advanced
Mapping Presets Absent Prebuilt and custom
Third-Party Integrations No Extensive
Scheduled Imports No Yes
Supported File Formats CSV  CSV, XML, JSON, XLSX, ODS, etc.
Data Validation Basic Advanced
Error Handling Basic error messages Detailed logs and improved error handling
Import Speed Moderate Faster
Ease of Use User-friendly for non-technical users User-friendly for non-technical users

Get Improved Import & Export Extension

Magento 2 Import FAQ

How to import a file in Magento 2?

– Go to System > Data Transfer > Import.
– Select an entity you want to import.
– Set an import behavior.
– Choose a validation strategy.
– Accept default separators or specify custom ones from your CSV.
– Upload the CSV.
– Validate the file.
– Import data.

How to add custom import in Magento 2?

You cannot add a custom import in Magento 2 by default. It is either necessary to create a custom module or use a third-party extension, such as Improved Import & Export. This tool lets you customize import processes according to your data transfer demands.

How to import categories in Magento?

Magento 2 facilitates category creation if you import a product with a full category path. If no category exists by this path, the system creates it and places the product there. If you want to import a category tree, you need to use the Improved Import & Export extension.

How to import order in Magento?

Magento 2 order import is only associated with third-party solutions. The built-in Magento 2 importer cannot import orders. Therefore, you need to use the Improved Import & Export module to import order data in Magento.

Post Tags: