Value For Status Attribute Contains Incorrect Value: How To Fix Error During Magento 2 Import

- E-Commerce, Magento 2, Our extensions

Magento 2 Development; Magento 2 tutorial

When you are trying to manage a standard import process into Magento 2, you may face lots of issues and inconveniences. For instance, we’ve already described how to fix ‘General System Exception Happened’ Error and eliminate it with the minimum effort. Today, we’d like to draw your attention to another issue – the ‘Value For Status Attribute Contains Incorrect Value’ error. The following article sheds light on how to fix it, prevent multiple import issues, and make data transfers more user-friendly.

Let’s explore an example to make things clear. Shivika Sharma posted a question on Stack Exchange where he described the following situation. There is an import file in a CSV format that contains about 6000 products. Even though all the fields are validating correctly, there is one issue related to the product_online status attribute.

Keeping its value blank for all the products leads to correct validation. But when you put 1 or 0 values to apply enabled or disabled statuses, the system displays the following error:

How to Fix Value For Status Attribute Contains Incorrect Value Error

We’ve just faced a situation when an incorrect attribute value prevents the import process. Usually, third-party attributes cause headaches, but values can also become a problem. So, how to fix the ‘Value For Status Attribute Contains Incorrect Value’ error?

You need to specify correct attribute values. In the case of Magento 2, you can use the following two designations to indicate the product status either: 1 or 2. Specify 1 in the product_online field to enable a product. Use 2 to make it disabled.

How to Prevent Value For Status Attribute Contains Incorrect Value Error

Unfortunately, you may face lots of other issues caused by incorrect attributes and values. To prevent them, we recommend you to make all import files compatible with other Magento 2 import requirements.

The Complete Guide to Magento 2 Product Import

Magento 2 Product Import Export Tutorial

First of all, check our complete guide to the Magento 2 product import. It covers all aspects of this procedure. First of all, you will discover what you should know before importing to Magento 2. We even shed light on how to edit a CSV file.

Next, there are two similar sections dedicated to the opposite processes. First of all, you will learn how to export products in Magento 2. Next, we will guide you through the import process.

If you want to prevent the ‘Value For Status Attribute Contains Incorrect Value’ error, explore the CSV file structure thoughtfully: there is a dedicated chapter in the guide.

Next, it discusses various nuances of importing different products-related data: tier prices, advanced pricing, configurable products, custom options, product stocks, etc.

Furthermore, the guide also touches on the topic of customers import/export in Magento 2. Customers, their attributes, addresses, and other nuances are discussed in the chapter.

Magento 2 Sample Import Files on GitHub

Next, when you are familiar with various nuances of import and export procedures, you should explore the latest samples of import files. Check the link above to download the latest update from our GitHub page. You will find the following files there:

  • attributes – this file contains product attributes as well as attribute sets and groups. Available in three formats: CSV, XML, and XLSX;
  • advanced_pricing – a native Magento 2 file composition for importing tier prices. Available in CSV, XML, XLSX, and JSON formats;
  • cart_price_rules – a sample file for importing cart price rules to Magento 2 (you need the Improved Import and Export extension to import them). Available in CSV, XML, and JSON formats;
  • categories – a sample file for importing Categories to Magento 2  (you need the Improved Import and Export extension to import them). Available in CSV, XML, XLSX, and JSON formats;
  • cms_pages – a sample file with CMS blocks that can be imported to Magento 2  (you need the Improved Import and Export extension to import them). Available in CSV, XML, XLSX, and JSON formats;
  • Customer_addresses, customers_and_addresses,  and customers_main – native Magento 2 file compositions for importing customers and corresponding data. Available in CSV, XML, and JSON formats;
  • customer_finance – a Magento 2 Cloud and Commerce file with store credit and reward point balance updates. Available in CSV, XML, and XLSX formats.
  • fixed_product_tax – a native Magento 2 file for importing products with the Magento 2 Fixed Product Tax attribute. Available in CSV, XML, and JSON formats.
  • orders – a sample file with order import to Magento 2. Available in CSV and XML formats.
  • products_all_types – a sample file which lists ALL product types for Magento 2 import. Available in CSV, XML, XLSX, and JSON formats..

For more data file samples, visit our GitHub page following the link above.

How to Prevent Other Import Errors

Magento 2 mysql data import

To prevent other import errors and export problems that occur when you use the default Magento 2 tools, we recommend you to replace them with the Improved Import & Export Magento 2 extension. The module not only saves the aforementioned ‘General System Exception Happened’ issue but also automates data transfers, solves problems of different attributes and values, and adds multiple new ways of importing and exporting data. Below, we shed light on the corresponding features.

Get Improved Import & Export Magento 2 Extension

Improvements For Default Import & Export

Magento 2 oracle import

As we’ve already mentioned, our extension is designed to revamp the default import and export tools completely. It not only solves or prevents various import errors but also increases the speed of updates as well as adds multiple features that improve your admin experience related to data transfers.   

Extended Connectivity Options

The first enhancement we’d like to draw your attention to is a bunch of connection options provided by the Improved Import & Export plugin. Our extension supports a plethora of connections suitable for the most complicated integrations. Your Magento 2 website and external systems can be easily combined with the help of data files, intermediary services, or API integrations.

Multiple File Standards

Since the Magento platform works with CSV files only, you cannot connect it to most external systems without converting data files into suitable formats. And you might have already faced a situation when format swapping is required during every update which is very time-consuming. But our module fixes the problem.

The Improved Import & Export Magento 2 extension significantly extends the number of supported file formats. In addition to CSV, it lets you work with XML, JSON, ODS, and Excel files. Thus, you can forever forget about converting them to CSV or vice versa. With our module, you can effortlessly transfer data in these formats. Furthermore, it lets you apply all the import/export features to all supported standards!

Multiple File Sources

At the same time, you can choose one of several supported file sources. The Improved Import & Export Magento 2 plugin extends the flexibility of every integration with the help of the following connection points:

  • FTP/SFTP. Use a local or remote server to exchange data between your store and an external platform.
  • Dropbox. Use a Dropbox account for the same purpose.
  • URL. Use a direct URL address to run import processes.

And don’t forget that the Improved Import & Export Magento 2 extension unpacks compressed data automatically. If an update is archived, you don’t have to extract it manually. Our module will do all the work for you.

Direct Connections

If your business case prevents you from using files to establish a connection, the Improved Import & Export Magento 2 extension offers a reliable replacement of the default algorithm. You can connect to an external system directly creating a direct API connection between Magento 2 and any third-party platform that also support this type of integration. To build a bridge between the two systems, the extension lets you use REST, SOAP, or GraphQL APIs.

Intermediary Services

If neither API connections nor file transfers are helpful, use various intermediary services – online sheets. Currently, the Improved Import & Export Magento 2 module provides the ability to leverage the three following platforms: Google Sheets, Office 365 Excel, or Zoho Sheet. Below, you can see how to transfer between your store and an external system using Google’s solution:

Magento 2 Google Sheet import

Automated Import & Export Processes

As we’ve already mentioned, you have to repeat the same import and export procedures every time a new update is provided or required. It is necessary to run them manually, which is a time-consuming routine. What alternative solutions do we offer? The Improved Import & Export Magento 2 extension provides two different approaches to making every data transfer automated. You can either create an update schedule or choose an event that will be used as a trigger.

Schedules

Schedule-based updates are very straightforward and intuitive. The Improved Import & Export Magento 2 extension uses cron to empower this feature. You can specify a custom update period in the extension’s admin utilizing the default cron syntax. Alternatively, it is possible to select one of the predefined intervals, which are fully customizable.

At the same time, it is possible to create profiles that have no schedules for single data transfers and asynchronous updates. In some situations, you will need to import data only one time or do that in a random order.

And don’t forget that every scheduled profile can be launched manually. If your partner delays an update, you won’t need to wait until the next planned import event. Hit a few buttons, and the Improved Import & Export will do everything for you. The following illustration shows how to configure a schedule:

Events

Events represent an alternative way of automating import and export processes. You can even use them to enable updates in real time. It is only necessary to select a trigger when configuring a certain import or export job. Any event can get this role. For instance, a customer places an order can be a trigger that launches an order data export to an external system, so the data is transferred in real time.

The Improved Import & Export Magento 2 extension supports both system events and custom processes as triggers. And it is possible to increase their efficiency by specifying specific conditions. For further information, follow this link: How to Run Magento 2 Import or Export After Specific System Event or Process.

Advanced Mapping Features

Another issue that interrupts import and export processes is different attribute standards. Since external systems store data in their own ways, it is not possible to transfer information between them automatically. It is always necessary to modify the external output matching it to Magento 2 requirements.

Luckily, the Improved Import & Export Magento 2 module allows you to forget about that headache. Our extension offers advanced mapping functionality that substantially simplifies all the related processes and lets you solve problems caused by different attribute standards within a few clicks. With the plugin, you can modify not only third-party attributes but also their values effectively addressing the “Value For Status Attribute Contains Incorrect Value” problem. Furthermore, you can use the created matching schemes for further import/export processes.

Mapping Presets

The Improved Import & Export Magento 2 extension offers the easiest way of solving the problem of different data attribute standards. The module provides a bunch of mapping schemes that can be applied to third-party attributes just within a few clicks. You only have to select a preset suitable for your business case.

Thus, the Improved Import & Export Magento 2 module provides the ability to match the external attributes to ones used in Magento 2 in a few clicks. Select a mapping scheme, and let the module scan the input data, analyze attributes, and matches all third-party designations to the corresponding ones used internally. Everything is as simple as shown below:

Matching Interface

If a necessary preset is absent, the Improved Import & Export Magento 2 extension lets you match attributes manually. The module offers a special interface where you can easily do all the work instead of editing data files. The editing process is reduced to selecting a third-party designation and specifying the appropriate internal one in front of it. Remember that it is necessary to repeat the procedure for every external attribute just like shown below:

Also, note that the grid above contains a column where you can specify hardcoded attribute values. The third column is called “Default Value” and allows setting a value provided to all items related to the attribute.

Let’s assume that you need to import products from different store views to a single one. With the Improved Import & Export extension, it is possible to link them to the same destination via the hardcoded value functionality. Set the corresponding hardcoded value for the appropriate attribute to transfer all products to the necessary store view.

Attribute Values Mapping

Now, let’s return to the key topic of this article – the ability to fix the “Value For Status Attribute Contains Incorrect Value” error. The Improved Import & Export Magento 2 extension lets you do that right in your Magento 2 interface. Since the similar functionality is possible for both attributes and their values, you can freely replace unsupported designations with the required ones.

The Improved Import & Export Magento 2 extension uses the same algorithm for modifying the external data as we’ve just described. The module provides a powerful feature that is easy to master and use. The offered attribute values mapping is much faster than doing everything manually in a data file. You no longer need to apply changes to each product individually working right with attribute values instead. More information is available here: Attribute Values Mapping.

Attribute Values Editing

For the further simplification of your admin duties, we’ve introduced the ability to edit attribute values in bulk. With the Improved Import & Export Magento 2 module, you can freely use one of the following rules:

  • Add a prefix;
  • Add a suffix;
  • Split attribute values;
  • Merge attribute values.

The plugin lets you combine them and create special conditions to increase the efficiency of applied changes. For further information, read this article: How to Modify Attribute Values During Import and Export in Magento 2.

Category Mapping

And when it comes to product import, the Improved Import & Export Magento 2 extension also solves various issues. For instance, you can freely map categories when importing products from external catalogs. Instead of applying changes to each imported product individually – a time-consuming procedure in the admin interface – you can match the external categories to the ones used internally during the import process:

And it is possible to create new categories on the fly as well. With our module, it is only necessary to select a parent category and specify the name of a new one. For further information, follow this link: Category Mapping.

Attributes On The Fly

And the absence of attributes won’t bother you if you use the Improved Import & Export Magento 2 extension. It is no longer a problem since our module allows you to create attributes on the fly. All the necessary parameters can be specified using the following general form:

Attribute|attribute_property_name:attribute_property_value|…

For further information, follow this link: Product attributes import.

The video below shows the Improved Import & Export Magento 2 extension in action:

Final Words

You can see that solving the “Value For Status Attribute Contains Incorrect Value” error is no longer a problem. It is only necessary to specify the correct attribute values. And you know where to find them and how to add the proper designations to the update file. Of course, it is possible to do everything manually, but it is like sending a letter to your business partner from a post office instead of sending an email from your smartphone. Thus, the Improved Import & Export Magento 2 extension introduces the easiest way of solving our issue along with lots of other problems that occur while your transfer data between your e-commerce store and external platforms. For further information about the module, follow the link below and contact our support.  

Get Improved Import & Export Magento 2 Extension