How to Import and Export Attributes, Values, and Attribute Sets in Magento 2

Magento 2 attributes, values, and attribute sets import and export

Operating an e-commerce store is associated with numerous processes. Various management chores include a broad array of actions from creating a category tree to adding an FAQ section. Somewhere between these processes, attribute management is hidden. Magento 2 heavily relies on attributes, attribute sets, and attribute values. You may need to update them frequently as well as add new designations from time to time. Although the platform delivers all the tools necessary to manage your attributes and all the related data, your daily routine turns into an unbearable burden if you work with hundreds of records. However, we know how to assist you with that.

To automate various tasks, you can import or export attributes, attribute sets, and attribute values to/from your Magento 2 website. Below, we shed light on how to enable this functionality on your store even though Magento 2 lacks the corresponding features. A little spoiler: you need to install the Improved Import & Export Magento 2 extension. It will help you transfer Magento 2 attributes, values, and attribute sets to and from your e-commerce website. 

The article below focuses on the pros and cons of both manual attribute management and the corresponding import and export automation. After that, it sheds light on various aspects of the import and export functionality represented by our extension. You will learn how to manage attribute tables, edit attribute values, create new attributes on the fly during import, use multiple file formats and sources for the attribute import and export, as well as leverage alternative transfersMapping and scheduling are also described in this post.

Table of contents

  • 1 Reasons for Attribute Import & Export
  • 2 Manual Attribute Import and Export
  • 3 Automated Attribute Import and Export
  • 4 Improved Attribute Import/Export Functionality
  • 5 Conclusions
  • 6 Magento 2 Attribute FAQ
    • 6.1 How to import attributes, attribute values, and attribute sets to Magento 2 automatically?
    • 6.2 How to import attributes, attribute values, and attribute sets to Magento 2 from external systems?
    • 6.3 How to import attributes, attribute values, and attribute sets to Magento 2 via API?
    • 6.4 How to import attributes, attribute values, and attribute sets to Magento 2 via ODS files?
    • 6.5 How to import attributes, attribute values, and attribute sets to Magento 2 via XLSX files?
    • 6.6 How to import attributes, attribute values, and attribute sets to Magento 2 via JSON files?
    • 6.7 How to import attributes, attribute values, and attribute sets to Magento 2 via compressed files?
    • 6.8 How to import attributes, attribute values, and attribute sets to Magento 2 from Google Sheets?
    • 6.9 How to import attributes, attribute values, and attribute sets to Magento 2 from Dropbox?
    • 6.10 How to import attributes, attribute values, and attribute sets to Magento 2 from Google Drive?
    • 6.11 How to use product import to mass update attributes in Magento 2?
    • 6.12 How to import csv with several attributes to Magento?
    • 6.13 How to import attribute values into Magento 2?
    • 6.14 Where are yes and no attributes stored in the Magento import CSV?
    • 6.15 How to import yes/no attributes to Magento?
    • 6.16 How to remove attribute values on catalog import to Magento 2?
    • 6.17 How to export product attributes in Magento 2?

Reasons for Attribute Import & Export

Why is it necessary to import or export attributes, attribute sets, or attribute values into/from your Magento 2 website? There are many reasons to do so:

  1. Switching from another e-commerce platform or webshop engine;
  2. Extending your current store with third-party data related to new products;
  3. Copying another shop;
  4. Increasing your current product assortment.

You may know many more reasons to import/export attributes, but let’s make the long story short and proceed to different ways of reaching our goal.

Manual Attribute Import and Export

Let’s take a look at all pros and cons of the manual attribute import.

Pros

If you want to import attributes, attribute sets, or attribute values into Magento 2, you have to recreate them manually in the admin section of your store. What are the positive aspects of this process? First of all, you don’t need any third-party extensions. At the same time, you will face the structure of your attribute system learning it far better (but does it really matter?).

Cons

Why don’t we recommend using the manual approach, you will ask? Because an average e-commerce store usually has hundreds or even thousands of attributes, several attribute sets, and a plethora of corresponding attribute values. It usually takes weeks to recreate the necessary attribute scheme without importing it directly from an external system.

And don’t forget that you cannot export attributes, attribute sets, and attribute values manually in case of barebone Magento. Your only export file is your brain. While it is a perfect machine, we know much better ways of attribute export, for instance, with the help of the Improved Import & Export Magento 2 extension.

Automated Attribute Import and Export

Now, we’d like to discuss how to revamp the manual attribute import and export entirely saving tons of time and effort and what other benefits this approach offers.

Pros

Magento 2 mysql data importWith the Improved Import & Export Magento 2 extension, you can:

  • Import attributes, attribute sets and attribute values using multiple file formats: CSV, XML, JSON, ODS, etc.
  • Export attributes, attribute sets and attribute values with the help of the same file formats.
  • Apply mapping for import to modify any third-party attributes according to the default requirements of Magento 2.
  • Apply mapping for export to create output suitable for any third-party system.
  • Freely transfer all attribute details: properties, options, swatches, etc.
  • Use a sample file on import.
  • Create new attributes on the fly during import.

All these and other features dramatically decrease the time necessary to create new attributes, their sets, or values. You no longer have to waste weeks doing the routine processes manually. Get all the required information right in a few clicks with the Improved Import & Export Magento 2 extension. But what are the cons?

Cons

There is only one negative aspect related to the automated attribute import and export. To achieve the desired functionality, you need to install a third-party extension. But how would the Magento 2 ecosystem compete with other e-commerce platforms without third-party extensions? In any way, shape, or form.

Get Improved Import & Export Magento 2 Extension

Improved Attribute Import/Export Functionality

Below, we shed light on core features provided by the Improved Import & Export Magento 2 extension to enhance attribute import and export functionality of the platform. The module lets you create:

  • Attribute groups, attribute set names, and multiple attribute sets;
  • Attribute labels on the store view basis;
  • Attribute options on the store view basis;
  • New attributes on the fly.

At the same time, you can update:

  • Attribute labels for each store view;
  • Attribute option values for each store view.

And don’t forget that the extension offers the corresponding export options, including export by specific attribute sets. And it was just the tip of the iceberg. More features are described below.

Manage attribute tables

The most important thing during Magento 2 data transfers is to have a reliable source to retrieve data from. You can create a data table yourself or allow Improved Import and Export to extract the necessary info automatically from another Magento site or any system if you use the tool for integration purposes.

Commonly, CSV is used for creating and managing data tables as it is the sole format supported by Magento 2. However, the Improved Import and Export functionality goes beyond such limitations by introducing flexibility in file format selection. Once ‘Attributes’ is set as the involved entity type for an import or export job, the extension will read any source file you choose. We’ll turn to the topic later on.

As Improved Import and Export relieves you from worries about the applicable data format, you can easily focus on compiling a table with attributes. Follow our Master Import Table to see how a product attribute table must look like. There you can find an explanation to all the columns and get the actual samples of attribute option values.

If you create an attribute table from scratch, use the info from our attribute import guide. The manual will help you to understand the peculiarities of attributes and custom attributes, attribute sets, attribute groups within the Magento 2 system.

When it comes to attribute import or export, there’re only five required columns that must be specified in any case: store_id, attribute_code, attribute_set, option:value, option:base. These are the minimum options needed to create viable product attributes accessible from both the backend and frontend.

Edit attribute values

The Improved Import & Export extension lets you edit attribute values during import with the help of multiple rules. Create numerous rule combinations using the following features:

  • Add a prefix or/and suffix to SKU and other attributes;
  • Split data from one block to multiple blocks;
  • Merge data from multiple blocks in one;
  • Manipulate the values in the source file via RegEx.

For further information, check this post: How to Modify Attribute Values During Import and Export in Magento 2.

Create new attributes on the fly during import

The idea behind this feature is quite simple – instead of having an attribute name in an attributes column, we place all data necessary to create an attribute there: an attribute set, a frontend label, scopes, etc. Below, you can see an example of the general format of an attribute creation column:

Use a pipe symbol – “|” – to separate values. Note, that the new attribute column should ALWAYS start with ‘attribute’. Thus, the Improved Import & Export extension understands that it is a new attribute.

Below, you can see the example of the name of the column with the new attribute:

The feature is described in more detail in the official manual of the Improved Import & Export Magento 2 extension here: Product attributes import.

Multiple file formats for attribute import & export

As it was mentioned above, the Improved Import & Export Magento 2 extension works with multiple file format. It allows importing data in CSV, XML, JSON, ODS, and Excel files. The same is about export. Since attribute import/export processes are an integral part of the module, you can leverage the same standards to transfer data between your e-commerce store and any external systems.

While other similar modules usually work with CSV only, we dramatically extend the list of supported file formats. It means that you no longer need to convert XML, JSON, ODS, or Excel files to CSV to run attribute import. At the same time, the Improved Import & Export extension provides the ability to export attributes, attribute sets, and attribute values in one of the formats mentioned above that radically improves integration with third-party platforms.  

Multiple file sources for attribute import & export

When it comes to file transfers, we should also draw your attention to file sources supported by the Improved Import & Export Magento 2 extension. With our module, you can transfer data files with attributes using the following destinations:

  • FTP/SFTP. The extension enables attribute import from a remote or local server. The same file source can be used for attribute export processes.
  • Dropbox. You can also leverage a Dropbox account to transfer attributes, attribute sets, and attribute values between your e-commerce store and an external system.
  • URL. URL import is another option provided by the module. The extension allows you to import files with attributes using a direct link to them.

Note that you can freely import compressed data since the extension extracts it automatically.

Alternative ways of attribute import & export

In addition to file transfers, the Improved Import & Export Magento 2 extension offers several alternative methods of attribute import and export. If you have attributes, their sets, or values stored in Google Sheets, our extension lets you import them without any headaches. The process of Google Sheets import is illustrated below:

Magento 2 Google Sheet import

Besides, you can avoid files and intermediaries due to the ability to establish SOAP API, REST API, and GraphQL API connection between Magento 2 and the system that contains the necessary information.

Advanced Usability Features

Now, when you know all possible ways of importing/exporting product attributes into/from your e-commerce store with the help of the Improved Import & Export Magento 2 extension, we should tell a few more words about core usability improvements the module offers. First of all, it is a flexible mapping interface.

Mapping

Do you know that it is impossible to take attributes of an external system and import them into Magento 2? Before doing that, you should edit the third-party output making it suitable for the requirements of the e-commerce platform your store is based on.

Usually, this process consists of a manual data editing which can be endless depending on the size of imported files. As we’ve mentioned at the beginning, the number of product attributes may be extremely huge so that you’ll need weeks to edit all of them.

To save your time, money, and effort, we’ve introduced a convenient mapping interface as a part of the Improved Import & Export Magento 2 extension. You can use it to map third-party attributes to Magento 2 attributes in a user-friendly manner right in the Magento admin. Thus, the need to edit data files is eliminated. Consequently, you should spend much less time on preparations. Another essential feature of the mapping interface is the ability to save a created scheme for further usage. Thus, you don’t need to recreate it in case of a new import process. In case of the default Magento tools and most third-party solutions, you still have to repeat file editing before every update.

The Improved Import & Export Magento 2 extension lets you match attributes as follows:

To simplify that process more, we’ve introduced premade mapping schemespresets. You should select one suitable for your integration and apply it matching attributes in a few clicks. The process is displayed below:

Please, contact our support regarding mapping presets for your specific business case. Leave your requests here: Firebear Help Center.

Schedules

While attribute import/export is usually a one-time procedure, we cannot forget about the ability to create an update schedule within the Improved Import & Export extension. This feature is beneficial for all other update types. For instance, you need to import product data updating your Magento 2 database regularly. The default tools or most third-party extensions don’t let you automate that process. But the Improved Import & Export Magento 2 module is an exception.

The extension supports cron allowing you to create any custom schedule of updates. Apply the default cron syntax to configure update time suitable for your business requirements. Alternatively, you can choose one of the predefined intervals which can be customized as well. Besides, the Improved Import & Export enables you to create import/export jobs for a manual run only. Such tasks are entirely suitable for transferring attributes, attribute sets, and attribute values due to the reasons mentioned above.

Also, note that it is possible to launch every scheduled update asynchronously.  For instance, you need to import data right now, but the corresponding process is planned for tomorrow. With the Improved Import & Export Magento 2 extension, you don’t need to wait or create a new import job. Instead, you can launch the update in the asynchronous mode.

Below, you can see how to create a schedule of updates:

It is also important to mention that all usability improvements – mapping and scheduling – can be fully leveraged with all file formats, data sources, and alternative ways of import/export. Feel free to use them to improve the way you import/export attributes, attribute sets, or attribute values. You can discover more features of the Improved Import & Export extension in the following video:

[embedded content]

Conclusions

As you can see, the Improved Import & Export extension not only extends the default boundaries of Magento 2 by introducing the ability to import/export attributes and all the corresponding data but it also essentially simplifies these processes in comparison to the existing ways. For any further information about the plugin, follow this link:

Get Improved Import & Export Magento 2 Extension

Magento 2 Attribute FAQ

Below, you can see other tips on how to manage Magento 2 attributes, attribute values, and attributes sets in your admin.

How to import attributes, attribute values, and attribute sets to Magento 2 automatically?

If you need to transfer attributes, attribute values, and attribute sets or other entities to Magento 2 on a regular basis, you need the Improved Import & Export module. Use the recommendations provided in this article to implement automated data transfers for attributes, attribute values, and attributes sets.

How to import attributes, attribute values, and attribute sets to Magento 2 from external systems?

With the Improved Import & Export Magento 2 extension, you can import attributes, attribute values, and attribute sets not only between two Magento 2 websites but also from external systems. While the default Magento 2 import solution prevents the import of third-party data unless it follows the system’s requirements, you can use our module to create a mapping scheme matching any external values to the default Magento 2 attributes. As a result, you can effortlessly adapt any external data to the native standards of your e-commerce website. And don’t forget that our plugin lets you do everything right in the admin.

How to import attributes, attribute values, and attribute sets to Magento 2 via API?

By default, Magento 2 neither lets you import attributes nor transfer other entities via API integrations. However, it is possible to leverage the Improved Import & Export extension to transfer attributes, attribute values, and attribute sets to Magento 2 via API. The module lets you create the connection between the two systems transferring the corresponding data.

How to import attributes, attribute values, and attribute sets to Magento 2 via ODS files?

If your attributes, attribute values, and attribute sets are stored in an ODS file, you can leverage the Improved Import & Export Magento 2 extension to transfer the data to your e-commerce website, updating the corresponding databases. By default, Magento 2 works with CSV files. With our module, you exceed the existing limitations by adding support for other file formats.

How to import attributes, attribute values, and attribute sets to Magento 2 via XLSX files?

If your attributes, attribute values, and attribute sets are stored in an XLSX file, you can leverage the Improved Import & Export Magento 2 extension to transfer the data to your e-commerce website, updating the corresponding databases. By default, Magento 2 works with CSV files. With our module, you exceed the existing limitations by adding support for other file formats.

How to import attributes, attribute values, and attribute sets to Magento 2 via JSON files?

If your attributes, attribute values, and attribute sets are stored in a JSON file, you can leverage the Improved Import & Export Magento 2 extension to transfer the data to your e-commerce website, updating the corresponding databases. By default, Magento 2 works with CSV files. With our module, you exceed the existing limitations by adding support for other file formats.

How to import attributes, attribute values, and attribute sets to Magento 2 via compressed files?

If attributes, attribute values, and attribute sets are stored in an archive, you can also transfer them to Magento 2 with the help of the Improved Import & Export extension. But it should be a ZIP or TAR file that contains a CSV, XML, ODS, XLSX, or JSON file.

How to import attributes, attribute values, and attribute sets to Magento 2 from Google Sheets?

Use the Improved Import & Export extension and follow the guidelines described in this article to import attributes, attribute values, and attribute sets to Magento 2 from Google Sheets. You need to specify the corresponding table as your import source, providing its URL.

How to import attributes, attribute values, and attribute sets to Magento 2 from Dropbox?

In addition to Google Sheets, the Improved Import & Export module lets you transfer attributes, attribute values, and attribute sets to Magento 2 from Dropbox. Your data should be stored in CSV, XML, ODS, XLSX, or JSON. Note that files of these types can be compressed in a ZIP or TAR format.

How to import attributes, attribute values, and attribute sets to Magento 2 from Google Drive?

In addition to Google Sheets and Dropbox, the Improved Import & Export module lets you transfer attributes, attribute values, and attribute sets to Magento 2 from Google Drive. Your data should be stored in CSV, XML, ODS, XLSX, or JSON. Note that files of these types can be compressed in a ZIP or TAR format.

How to use product import to mass update attributes in Magento 2?

Some techniques let you mass update attributes in Magento 2 by transferring other entities, such as products. However, we recommend you to use the Improved Import & Export extension to update attributes, attribute values, and attribute sets. The extension lets you update them in bulk, applying changes straight to the attributes you need to edit. Select attributes as your import entity and choose the add/update import job behavior. As a result, you will update attributes in Magento 2 in bulk without using product import.

How to import csv with several attributes to Magento?

The Improved Import & Export extension provides the ability to import a CSV file with several attributes to Magento 2. At the same time, it is possible to leverage other file formats, including XMl, XLSX, ODS, and JSON, to do that. And if your attributes, attribute values, and attribute sets are stored in Google Sheets, the module can also transfer them to your e-commerce website. Besides, you can create an API connection to import any entity to Magento 2 from any external point.

How to import attribute values into Magento 2?

As we’ve already mentioned, the default Magento tools let you import neither attributes nor their values. However, you may attain the necessary features with Improved Import & Export. The extension lets you both transfer attribute values to your Magento 2 installation as well as map them to the existing records. Thus, you teach the system with what attribute values to replace the unsupported data.

Where are yes and no attributes stored in the Magento import CSV?

You can find the yes/no attributes in the Magento 2 product attributes import table. The corresponding file shows their exact position. Take a look at our Google Sheet Master Table.

How to import yes/no attributes to Magento?

The Improved Import & Export module supports all attributes. Thus, you can use the module to import yes/no attributes to Magento 2.

How to remove attribute values on catalog import to Magento 2?

It is possible to delete attribute values during the Magento 2 import by adding option:delete_values to your import file. Add the attribute values you want to delete to this column. Note that the attribute itself stays untouched. For example, you can remove green, red, yellow, or other similar values for the attribute ‘color’.

How to export product attributes in Magento 2?

The Improved Import & Export extension provides the ability to export attributes, attribute values, and attribute sets from Magento 2. You only need to create a new export job where you choose the corresponding export entity and configure other transfer parameters.

Discover more from WHO WILL CARE eCommerce

Subscribe now to keep reading and get access to the full archive.

Continue reading