In the following article, you will discover a universal algorithm for solving Magento 2 errors caused by incorrect attribute values. We focus on the ‘Value For Attribute Contains Incorrect Value’ issue to illustrate the entire scope of problems merchants usually face.
Let’s assume that your import file contains multiple products with numerous attributes, each of which follows the strict Magento requirements. However, there is a record with invalid values. As a result, the error mentioned above displays. It doesn’t let you transfer the entire table with product data.
Below, you will find out how to address this problem. Furthermore, we also shed light on how to prevent it and avoid unpleasant situations with your future data updates. Since our solution incorporates the Improved Import & Export module, you will discover its features below. Besides, we elucidate how to prevent other import issues with the help of our plugin. If you are looking for a more specific case of this issue, check this article: Value For Status Attribute Contains Incorrect Value: How To Fix Error During Magento 2 Import.
Table of contents
‘Value For Attribute Contains Incorrect Value’ Error
For instance, you have an import file that contains multiple products. All attributes are suitable for Magento requirements (if not, check this article: How to Run Magento 2 Import if Required Columns Are Missed). All the fields are validating correctly, but there is one issue related to a product attribute. Keeping its value incorrect for at least one product leads to the interruption of the import process. So how to fix the problem?
How to Fix ‘Value For Attribute Contains Incorrect Value’ Error
In a situation when an incorrect attribute value prevents the import process, you have to replace it with a supported one. Usually, third-party attributes cause headaches, but their values can also cause multiple headaches. So, how to fix the ‘Value For Attribute Contains Incorrect Value’ error?
Find an attribute, which contains an incorrect value, and replace it. That’s it. In the case of the status attribute mentioned above, it is necessary to use the following two designations to indicate the product status: 1 or 2. To enable a product, use 1. To disable it – type 2 in the corresponding field. If you use 1 and 0 instead, it will prevent the import process.
How to Prevent ‘Value For Attribute Contains Incorrect Value’ Error
Since you may face lots of issues caused by incorrect attributes and values, it is a good idea to prevent them. To achieve this goal, you have to make all import files compatible with the Magento 2 import requirements. Follow the link below for further information.
The Complete Guide to Magento 2 Product Import
In this guide to the Magento 2 product import, you will discover all nuances of a standard import procedure including recommendations on how to edit a CSV file. Export processes are covered in the article as well.
To prevent the ‘Value For Attribute Contains Incorrect Value’ error, explore the CSV file structure thoughtfully. There is a separate chapter in the guide. It shows the necessary attributes and lists their values. Furthermore, the article discusses various nuances of importing different product-related data including tier and advanced pricing, custom options, configurable products, product stocks, etc. Even customers, their attributes, addresses, and other nuances of corresponding import processes are discussed in the article.
Magento 2 Sample Import Files on GitHub
A single article is never enough to figure out the correct structure of an import document if you don’t get a sample file. When you are familiar with various nuances of import procedures, explore the latest examples of import files. The link above will lead you to our GitHub page where you can download the latest sample import files for Magento 2. The following files are available there:
- attributes – in this file, you will find product attributes and attribute sets/groups. It is provided in three formats: CSV, XML, and XLSX;
- advanced_pricing – check this native Magento 2 file composition to find out how to import tier prices. Provided in CSV, XML, XLSX, and JSON formats;
- cart_price_rules – a sample file with cart price rules suitable for Magento 2 (you will need the Improved Import and Export extension to import them). Provided in CSV, XML, and JSON formats;
- categories – this file shows how to organize Categories before importing them to Magento 2 (the Improved Import and Export extension is required to import them). Provided in CSV, XML, XLSX, and JSON formats;
- cms_pages – here, multiple CMS blocks are prepared for importing into Magento 2 ( the Improved Import and Export extension is required to import them). Provided in CSV, XML, XLSX, and JSON formats;
- Customer_addresses, customers_and_addresses, and customers_main – these are the native Magento 2 file compositions that teach how to import customers and corresponding data. Provided in CSV, XML, and JSON formats;
- customer_finance – and this one is a Magento 2 Cloud and Commerce file which stores credit and reward point balance updates. Provided in CSV, XML, and XLSX formats.
- fixed_product_tax – if you are going to import products with the Magento 2 Fixed Product Tax attribute, check this file. Provided in CSV, XML, and JSON formats.
- orders – a sample Magento 2 order import file. Provided in CSV and XML formats.
- products_all_types – a sample file with ALL product types for Magento 2 import. Provided in CSV, XML, XLSX, and JSON formats..
You can find more samples on our GitHub page by following the link above.
How to Prevent Other Import Errors
To prevent other import and export issues caused by the default Magento 2 tools and limitations, we recommend you to use the Improved Import & Export Magento 2 extension. The module not only saves the aforementioned ‘General System Exception Happened’ issue but also replaces the default data transfer mechanisms and provides tons of improvements. Thus, it automates data transfers, provides efficient mapping, and adds multiple new ways of importing and exporting data. Below, you will find its core features described.
Get Improved Import & Export Magento 2 Extension
Improvements For Default Import & Export
With the Improved Import & Export Magento 2 extension, you will completely revamp the entire import and export mechanisms of Magento 2. As we’ve already mentioned, our module is designed to make the standard processes better increasing their usability and efficiency. The extension not only solves or prevents various import errors but also speeds up updates, adds multiple features, improves admin experience, etc.
Extended Connectivity Options
One of the most important enhancements is the ability to connect your e-commerce website with external platforms in various new ways. The Improved Import & Export extension supports a plethora of connections suitable for the most complicated integrations. It works with multiple file standards, intermediary services, and API connections. Your Magento 2 website and external systems can be easily synchronized in the following ways.
Multiple File Standards
Unfortunately, the Magento platform works with CSV files only, but you can connect it to other external systems using different standards via Improved Import & Export. Thus, our extension eliminates the necessity to convert data files to/from CSV as a part of every update.
With the Improved Import & Export Magento 2 extension, you can dramatically extend the number of supported file formats. The standard CSV functionality is enhanced with the support for XML, JSON, ODS, and Excel files. There is no need to convert them to CSV or vice versa since our module lets you effortlessly transfer data in these formats applying all the import/export features to all files!
Multiple File Sources
To extend the flexibility of file transfers, we’ve added several additional file sources that simplify the way you exchange data between your e-commerce website and external systems. The Improved Import & Export Magento 2 plugin allows leveraging the following connection points:
- FTP/SFTP. Use a local or remote server to exchange data.
- Dropbox. Use a Dropbox account for the same purpose.
- URL. Use a direct URL address for import purposes.
It is also necessary to mention that the Improved Import & Export Magento 2 extension unpacks compressed data automatically. It is no longer a problem if an update is archived. With our plugin, you don’t have to extract it manually since it will do all the work for you during the import process.
If file transfers are not the best possible option, you can still rely on the Improved Import & Export Magento 2 extension since it offers a reliable replacement of the default algorithm. The module allows connecting to an external system directly via API. To build a bridge between your e-commerce website and external platforms, our module provides the ability to use REST, SOAP, or GraphQL APIs.
But there are situations when neither API connections nor file transfers are helpful. How to establish a connection in these conditions? The Improved Import & Export Magento 2 extension lets you use various online sheets. Currently, the module provides the ability to leverage the following platforms: Google Sheets, Office 365 Excel, or Zoho Sheet. Below, you can see how to import data from Google’s solution:
Automated Import & Export Processes
The second vital update to the default import and export processes provided by our module is the ability to automate everything. Yes, you no longer need to repeat the import process every time a new update file is provided. The Improved Import & Export Magento 2 extension offers several ways of achieving this goal. You can either create an update schedule or choose an event that will be used as a trigger.
Let’s take a look at schedule-based updates first. Being very straightforward and intuitive, they introduce a simple way of automating your routine. The Improved Import & Export Magento 2 extension provides the ability to use the default cron syntax to empower this feature. You can specify a custom update period or select one of the predefined intervals, which are fully customizable.
Profiles with no schedules can be created as well. You can use them for single data transfers or asynchronous updates. So if you will need to import data only one time or do that in a random order, the Improved Import & Export Magento 2 extension provides all the necessary features.
It is also necessary to mention that every scheduled profile can be launched manually. If a new update file is provided after a planned import event, you don’t need to wait for the next one. Instead, upload the data manually before the next scheduled process. The following illustration shows how to configure a schedule:
The second possible way of automating data transfers is based on events and triggers. Use them to enable real-time updates. Select a trigger when configuring a certain import or export job. You can assign it to any event, so even a customer placing an order can trigger any process, such as order data export to an external system. Thus, the data is transferred in real time.
Note that with the Improved Import & Export Magento 2 extension, you can create triggers on top of both system events and custom processes. Create specific conditions to increase their efficiency. For further information, follow this link: How to Run Magento 2 Import or Export After Specific System Event or Process.
Advanced Mapping Features
And our module offers lots of mapping features that dramatically simplify every update. There is a huge issue that interrupts import and export processes – it is different attribute standards caused by the fact that external systems store data in their own ways. As a result, it is not possible to transfer information between them automatically, until you modify the external output matching it to Magento 2 requirements.
But the Improved Import & Export Magento 2 module changes everything. It allows you to forget about that headache due to the advanced mapping functionality that radically simplifies all the related processes. Furthermore, you can solve problems caused by different attribute standards within a few clicks. And don’t forget that our plugin allows modifying not only third-party attributes but also their values, so “Value for attribute contains incorrect value” errors can be easily prevented. And any created matching scheme can be utilized for further data transfers.
The easiest solution to the problem is represented by mapping schemes that can be applied to third-party attributes just within a few clicks. The Improved Import & Export Magento 2 extension provides a list of presets for particular integration. Select one suitable for your business case and let us do everything for you.
Our module provides the ability to match the external attributes to ones used in Magento 2 in a few clicks. By selecting a mapping scheme, you let our module scan the input data, analyze attributes, and match all third-party designations to the corresponding ones used internally. The process is illustrated below:
In case you cannot find a preset suitable for your particular integration, we provide the ability to apply changes to the imported data right in your Magento admin. You still match attributes manually but in a way more intuitive manner. The Improved Import & Export extension offers a special interface for doing that work so that there is no need to modify data files in an editor. Select a third-party designation and specify the appropriate internal one in front of it. Repeat the procedure for every external attribute. The following gif shows how to do that:
In the grid above, there is a column for specifying hardcoded attribute values. It is called “Default Value” and designed to set a value provided to all items related to the attribute. Thus, if you are importing products from different store views to a single one, the Improved Import & Export extension lets you link them to the same destination via the hardcoded value functionality. You only need to set the corresponding hardcoded value for the appropriate attribute, and the plugin will transfer all products to the necessary store view.
Attribute Values Mapping
Now, we have to say a few more words related to the key topic of this article – the ability to fix the “Value For Attribute Contains Incorrect Value” error. As it was just mentioned, the Improved Import & Export Magento 2 extension lets you match attribute values right in the Magento admin. The similar functionality is possible for both attributes and their values, so you can freely replace unsupported designations with the required ones in a matter of seconds.
The same algorithm for modifying attributes and values is used. The extension offers a powerful feature that is easy to master and use. It is much faster than doing everything manually in a data file. Furthermore, you no longer need to apply changes to each product individually. Instead, the Improved Import & Export Magento 2 extension allows working right with attribute values. More information is available in this article: Attribute Values Mapping.
Attribute Values Editing
To simplify your admin routine even more, the Improved Import & Export Magento 2 extension includes the ability to edit attribute values in bulk. Our plugin lets you use one of the following rules:
- Add a prefix;
- Add a suffix;
- Split attribute values;
- Merge attribute values.
Feel free to combine them as well as specify conditions to increase the efficiency of applied changes. For further information, follow this link: How to Modify Attribute Values During Import and Export in Magento 2.
Another mapping feature is related to categories. If you import product data from external systems, it may contain categories that are not available in your catalog. With the Improved Import & Export Magento 2 module, it is possible to match them to the ones used internally right during the import process. The procedure looks as follows:
Besides, you can create new categories on the fly. The process consists of two steps:
- Select a parent category;
- Specify the name of a new one.
For further information, follow this link: Category Mapping.
Attributes On The Fly
As for the absence of attributes, it will no longer bother you if you use the Improved Import & Export Magento 2 extension. Our module provides the ability to create attributes on the fly. Specify all the necessary parameters via the following general form:
You can find more details about this feature here: Product attributes import.
Check the video below to see the Improved Import & Export Magento 2 extension in action:
Hope that solving the “Value For Attribute Contains Incorrect Value” error is now a piece of cake. With the Improved Import & Export Magento 2 extension and our recommendations, you can easily find third-party designations and replace them with the internal ones most efficiently. For further information about our plugin, follow the link below and contact our support.
Get Improved Import & Export Magento 2 Extension
Magento 2 Attribute Values Import FAQ
Let’s take a look at other nuances of importing and exporting attribute values in Magento 2 with the help of the Improved Import & Export Magento 2 extension.
How to import and export attribute values to Magento 2 automatically?
If you need to transfer attribute values to or from Magento 2 on a regular basis, it is necessary to install a third-party tool. Unfortunately, the default import/export solutions don’t let you create import jobs that run on schedule. Therefore, we recommend you use the Improved Import & Export extension to import attribute values to Magento 2 automatically. The extension leverages cron so that you can create a schedule of updates. Next, the module does everything for you importing and exporting data at a specified time. Also, you can match unsupported values to ones Magento 2 allows, preventing the problem mentioned above.
How to import and export attribute values to Magento 2 from external systems?
As we’ve just illustrated, the default Magento 2 import mechanism blocks the import of third-party data that doesn’t follow the system’s requirements. However, the Improved Import & Export extension is always at your disposal. The module lets you create a mapping scheme matching not only attributes but also their values. Consequently, any external data is easily adapted to the native standards of your e-commerce website. The most intriguing aspect is that you do everything right in your admin. It is also possible to apply mapping to export processes to generate the output your partners require. Thus, the Improved Import & Export extension lets you freely transfer unsupported attribute values to your website and create a proper output that your partners require.
How to import and export attribute values to Magento 2 via API?
You need to use the Improved Import & Export Magento 2 extension to import attribute values to Magento 2 via API. Our extension lets you create the connection between the two systems transferring any data, including attribute values. Any import job provides an interface where you can specify the parameters necessary to put the two systems together. Note that it is possible to create a bi-directional API connection with our module. As for transferring unsupported attribute values, the plugin lets you leverage its mapping functionality for API connections.
How to import and export attribute values to Magento 2 via ODS files?
If attribute values are stored in an ODS file, you no longer need to convert it to a CSV file to fit the Magento 2 requirements. With the Improved Import & Export Magento 2 extension, it is possible to import ODS files to your ecommerce website without any necessity to run the conversion. You can also export attribute values using this file format.
How to import and export attribute values to Magento 2 via XLSX files?
If the attribute values are stored in an XLSX file, you no longer need to convert it to a CSV file to fit the Magento 2 requirements. With the Improved Import & Export Magento 2 extension, it is possible to import XLSX files to your ecommerce website without any necessity to run the conversion. You can also export attribute values using this file format.
How to import and export attribute values with custom attributes to Magento 2 via JSON files?
If the attribute values are stored in an ODS file, you no longer need to convert it to a CSV file to fit the Magento 2 requirements. With the Improved Import & Export Magento 2 extension, it is possible to import JSON files to your ecommerce website without any necessity to run the conversion. You can also export attribute values using this file format.
How to import attribute values to Magento 2 via compressed files?
If the attribute values are stored in a compressed file, you can also transfer it to Magento 2 with the help of the Improved Import & Export extension. However, there are two requirements to follow. Firstly, your file archive should be in a ZIP or TAR format. Secondly, the compressed data should be stored in a CSV, XML, ODS, XLSX, or JSON file.
How to import attribute values to Magento 2 from Google Sheets?
If your attribute values are stored in Google Sheets, it is no longer a problem. There is no need to export them from the service and then transfer the output to Magento 2. The Improved Import & Export lets you move the corresponding information straight from Google Sheets to your e-commerce website. It is only necessary to specify the address of the corresponding data table.
How to import and export attribute values to Magento 2 from Dropbox?
In addition to Google Sheets, the Improved Import & Export module lets you transfer attribute values to Magento 2 from Dropbox. Your data should be stored in CSV, XML, ODS, XLSX, or JSON. If it is a compressed file, it should be in a ZIP or TAR format. You can use this file storage as your export destination.
How to import and export attribute values to Magento 2 from Google Drive?
In addition to Google Sheets and Dropbox, the Improved Import & Export module lets you leverage Google Drive to transfer attribute values to Magento 2. Your data should be stored in CSV, XML, ODS, XLSX, or JSON. If it is a compressed file, it should be in a ZIP or TAR format. You can use this file storage as your export destination.