How to Modify Attribute Values During Import and Export in Magento 2

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

Let’s suppose that you need to upload a data file to your Magento 2 installation, but it contains attribute values that you don’t use. By default, the only way to complete the import implies editing the data file manually and replacing the unsupported values. However, there is a better way to achieve the same goal. You need to install the Improved Import & Export Magento 2 extension. This module provides the ability to modify attribute values right in your Magento 2 administration. Furthermore, you need to create a scheme and the plugin will apply it to further transfers. Both import and export processes are covered! 

The following article describes how to modify attribute values during the import & export processes using the Improved Import & Export extension. Below, we not only shed light on the corresponding features but also provide several ways to simplify data transfer procedures even more.

Modify Attribute Values for Import and Export Processes in Magento 2

It is not a secret that Magento 2 doesn’t let you import/export attributes, but you can quickly get the missing functionality by installing the Improved Import & Export Magento 2 extension. The module enables the import of attributes, attribute sets, and attribute values via CSV, XML, JSON, ODS, and Excel files. The same is about export procedures.

In addition to the plane import/export processes, the module lets you modify attribute values making them more suitable for your e-commerce needs. And it is not mapping: attribute values modification is an entirely different procedure that dramatically extends the plugin’s existing attribute import/export flexibility.

For instance, the attribute value you’d like to change is “red”. You want to change it to “dark-red” for all products. The Improved Import & Export Magento 2 extension lets you create a rule that adds “dark” to all “red” attribute values. Thus, you can change the attribute value for thousands of products within just a few clicks.

Multiple rule combinations can be created using the selection of various rules. You can modify attribute values in Magento 2 in the following way:

  • Affixation – add a prefix, suffix to SKU and other attributes. Specify conditions to attach text to the beginning and end of a value.
  • Data Split – split data from one block to multiple blocks of different products;
  • Data Merge – combine data from various blocks in one if necessary;
  • RegEx – Manipulate the values in the source file using RegEx.

Pros

What are the positive aspects of this feature?

  • You don’t need to spend weeks changing attribute values manually.
  • It is possible to avoid multiple mistakes caused by manual editing.
  • You do everything within an intuitive interface.

Cons

What about the drawbacks?

If installing a third-party extension is a drawback for you than you know one. If not, we don’t know what to discuss here.

Alternative Approach

As mentioned above, you can always change attributes manually as an alternative approach to the one described above, but get ready to waste tons of time and face mistakes caused by the human factor multiplied by the dull repetitive routine. Thus, we recommend you to use the Improved Import & Export Extension instead.

Get Improved Import & Export Magento 2 Extension

Improved Attribute Import/Export Functionality

Magento 2 mysql data import

Now, let’s take a look at core features related to the import/export of attributes, attribute sets, and attribute values provided by the Improved Import & Export Magento 2 extension. The module lets you create the following things when you import attribute data:

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

As for the update functionality of the Improved Import & Export Magento 2 module, it allows refresh data for:

  • Attribute labels using a store view as a basis;
  • Attribute option values utilizing a store view as a basis.

And don’t forget about the corresponding export options. You can even leverage export processes by specific attribute sets. Let’s proceed to other features since there are many more exciting options we’d like to draw your attention to.

Create attributes on the fly

First of all, it is necessary to say a few more words about the ability to create attributes on the fly during import. The feature is based on the ability to replace a standard attribute name in an attributes column with all data necessary to create an attribute there. Thus, you should specify an attribute set, frontend labels, scopes, and multiple other parameters there to create new attributes on the fly during the update. The general format of an attribute creation column looks as follows:

As you can see, a pipe symbol – “|” – is used for separating values. ALWAYS start the new attribute column with ‘attribute’ to help the Improved Import & Export extension understand that it should deal with a new attribute. The column name with the new attribute may have the following appearance:

For further information, proceed to the official manual of the Improved Import & Export extension here: Product attributes import. You will find out how to compose a new attribute and see the attribute value reference table explained.

Attribute import & export file formats

The Improved Import & Export Magento 2 extension extends the default support for file formats. While Magento relies on CSV as its core data transfer standard and multiple third-party extensions add XML to the game, our plugin does a much better job. In addition to CSV and XML, the Improved Import & Export Magento 2 module allows importing attributes via JSON, ODS, and Excel files. The same is about export processes. You can freely leverage the same standards for transferring data between your e-commerce store and external systems.

And there is no need to convert XML, JSON, ODS, or Excel files to CSV to import attributes or other entities to your store. At the same time, you can create output that is more suitable for the needs of an external platform by exporting attributes or other data via one of the formats mentioned above. 

Attribute import & export file sources

In addition to the supported file formats, we should say a few words about file sources the Improved Import & Export Magento 2 extension works with. The module allows transferring attributes via data files using such destinations as:

  • FTP/SFTP. This file source provides two options. First of all, you can import/export attribute data files from/to your local server. Of course, this option is not suitable for all integration so that we’ve decided to extend it with the support for remote servers. Use one to transfer data between your e-commerce store and an external platform.
  • Dropbox. A Dropbox account can be leveraged for the same purposes as well. Freely transfer attributes, attribute sets, and attribute values between two systems using it.
  • URL. Direct URL uploads are another essential feature of the extension. You can import attribute data via a direct link.

Note that all compressed data is extracted automatically during the import procedure.

Attribute import & export without files

There are several more ways to import/export attribute data avoiding file transfers. First of all, you can import attributes, attribute sets, and attribute values from Google Sheets. The example of the Google Sheets data import looks as follows:

Magento 2 Google Sheet import

Another way to avoid files is represented with the SOAP API, REST API, and GraphQL API integrations. The Improved Import & Export Magento 2 extension lets you create a connection between your Magento 2 store and an external system using one of these standards.  

Advanced Usability

Below, you will find core usability improvements of the extension. We describe two important aspects of the Improved Import & Export Magento 2 extension: Mapping and Scheduling. Let’s take a look at the first one.

Mapping

Unfortunately, you cannot just take attributes of one system and move them to Magento 2. Since different platforms use different data standards, the direct connection is impossible. However, you can solve the problem in two ways.

The default solution is based on manual data file editing. You have to spend hours modifying attributes of the external system to make them suitable for the requirements of Magento 2. You not only spend lots of time but can also make mistakes since this routine requires extra concentration. Thus, it is necessary to spend even more time looking for errors. And don’t forget that the number of product attributes may be vast so that you’ll need weeks to edit all of them and weeks to find possible mistakes.

Luckily, there is a more efficient solution represented in the Improved Import & Export Magento 2 extension. With the module’s convenient mapping interface, you can match any third-party attributes to Magento 2 attributes without headaches. A user-friendly tool is available right in the Magento admin so that you don’t need to edit data files manually.

It is also worth mentioning that the necessity to repeat data files editing is eliminated. The Improved Import & Export Magento 2 module lets you create individual mapping schemes that serve corresponding integrations during further updates.

And this is how attributes are matched in case of the Improved Import & Export Magento 2 extension:

But we have to point you to another usability improvement. To simplify attribute matching, we’ve created mapping presets – predefined mapping schemes that eliminate the necessity to create any custom matches. Just select a scheme suitable for your business needs, and the Improved Import & Export extension will do everything for you just like in the following example:

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

Schedules

Usually, you don’t need to import/export attributes regularly so that scheduling is not necessary for this type of data transfers, but you can leverage it in case of other updates. With the Improved Import & Export extension, you can create any custom schedule since the module supports cron updates. Neither the default Magento tools nor most third-party extensions let you automate the process of import/export so that it is a substantial competitive advantage of our module as well as an essential usability improvement.

You can create any custom schedule via the standard cron syntax. Configure update time that is most suitable for your e-commerce needs. If you don’t want to deal with customizations, feel free to select one of the predefined intervals. The Improved Import & Export Magento 2 module lets you customize them if necessary.

At the same time, you can create jobs suitable for a manual run only. They are especially useful for importing/exporting attributes, attribute sets, and attribute values or other infrequent updates. It is also necessary to mention that you can launch any update manually in an asynchronous mode. If an import process is scheduled for Friday, but it is Monday now, and the update is crucial, you don’t need to create a new import job – launch the existing one asynchronously. Below, you can see how to configure a schedule of updates:

Note that all usability improvements are fully compatible with all entities, file formats, file sources, and alternative ways of import/export. More features of the Improved Import & Export extension are described here:

Conclusions

The Improved Import & Export extension dramatically extends the default opportunities introduced in Magento 2. Furthermore, the module provides features that are not offered by most competitors. And the ability to import/export attributes and edit their values is one of them. For any further information about the module, follow this link:

Get Improved Import & Export Magento 2 Extension

Improved Import & Export FAQ

Let’s take a look at other nuances of the improved import and export processes.

Which data sources does Improved Import & Export support?

The module lets you transfer data files between your e-commerce store and external systems via direct file uploads, FTP/SFTP servers, Google Drive, OneDrive, DropBox, or direct URL uploads. You can also leverage Google Sheets and REST/SOAP APIs. Each exchange point provides the same conditions for modifying attributes and attribute values.

Which file types does Improved Import & Export for Magento 2 support?

The Improved Import & Export extension lets you transfer the following files: CSV, XML, XLSX, ODS, and JSON. You can also import them as ZIP and TAR archives. Each file type provides the same conditions for modifying attributes and attribute values.

How to import and export data files in Magento 2 automatically?

As we’ve mentioned above, you enable the import of data that contains unsupported attributes and values to Magento 2 with the help of Improved Import & Export. If you need to transfer such files between Magento 2 and third parties on a regular basis automatically, the Improved Import & Export extension lets you use a cron scheduler. You only need to create or select a schedule of updates. Next, the plugin will do everything for you.

How to import and export third-party attributes and values via ODS files to Magento 2?

Improved Import & Export lets you move all entities via ODS files even if they contain attributes and attribute values that should be modified. Therefore, there is no need to convert them to CSV to fit the Magento 2 requirements. You can also export data using this file format.

How to import and export third-party attributes and values via XLSX files to Magento 2?

Improved Import & Export lets you move all entities via XLSX files even if they contain attributes and attribute values that should be modified. Therefore, there is no need to convert them to CSV to fit the Magento 2 requirements. You can also export data using this file format.

How to import and export third-party attributes and values via XML files to Magento 2?

Improved Import & Export lets you move all entities via XML files even if they contain attributes and attribute values that should be modified. Therefore, there is no need to convert them to CSV to fit the Magento 2 requirements. You can also export data using this file format.

How to import and export third-party attributes and values via JSON files to Magento 2?

Improved Import & Export lets you move all entities via JSON files even if they contain attributes and attribute values that should be modified. Therefore, there is no need to convert them to CSV to fit the Magento 2 requirements. You can also export data using this file format.

How to import and export third-party attributes and values in compressed files to Magento 2?

Improved Import & Export lets you move compressed files of certain formats if they contain attributes and attribute values that should be modified. Therefore, there is no need to unpack them and convert them to CSV. Your compressed files should be CSV, XML, XLSX, ODS, or JSON

How to import data with third-party attributes and values to Magento 2 from Google Sheets?

If your update that contains attribute values that should be modified is stored in Google Sheets, the Improved Import & Export module lets you move it to your e-commerce website without creating any files. It is also possible to export data to Google Sheets from Magento 2 with the help of our module. No files are necessary too.

How to import and export data files between Magento 2 and Dropbox?

The Improved Import & Export module lets you transfer data tables between Magento 2 and Dropbox via CSV, JSON, ODS, XML, or XLSX files and ZIP or TAR archives. You can use this file storage to export data files. The same conditions for modifying attributes and attribute values are presented.

How to import and export data files to Magento 2 from Google Drive?

The Improved Import & Export module lets you leverage Google Drive to transfer data files with third-party data between Magento 2 and external systems via CSV, JSON, ODS, XML, and XLSX files. If you apply compression, your archives should be in a ZIP or TAR standard. The same conditions for modifying attributes and attribute values are presented.

How to import and export data between Magento 2 and external systems via API?

The Improved Import & Export extension also lets you create API connections to transfer any data between your e-commerce website and external systems. Each import and export job provides a section where you specify the parameters necessary to sync the two objects. And you can freely apply all the extension’s mapping features to the data you transfer via API. The same conditions for modifying attributes and attribute values are presented.