Magento 2 Product Import Guide

To import products in magento 2 follow below steps:

Step 1: Login to admin panel and go to System -> Data Transfer -> Import.

Step 2: Select Products from Entity Type.

Step 3: Select an import behavior from the options Add / Update, Replace or Delete.

Step 4: Select your CSV file. Use the Select File to Import option and then click on Check Data if there is any error then it will appear as a message(“Following Error(s) has been occurred during importing process:”) or if the data is correct, start importing products by clicking on Import.

CSV File Structure

CSV file structure for Magento 2 product import and detailed description of its columns.

1.) sku – a unique product identifier used as a key product attribute in the Magento 2 core. It is required for all products and must be unique for each product. sku can be included both digits and letters without separate spaces with underscores (_) and dashes (-).

2.) store_view_code – an associated store display code. The column can be empty if a partner store/website has a single child element.

3.) attribute_set_code – a product attribute set code. Create and configure an attribute set before importing products into Magento 2. It should appear as an attribute set name that includes capital letters (for example, “Default“, “Men Fashion“, etc.)

4.) product_type – the type of an imported product it uses only lowercase letters (simple, configurable, etc.)

5.) categories – The categories of products in Magento 2 differ from those used in Magento 1, where category identifiers separated by commas are used. In Magento 2, full names of assigned categories are required, including the full path. In addition, the assigned categories must be separated by (|or , ). For example, “Default Category / Gadgets | Default Category / Gadgets / Smartphone” means that the product must be assigned to the Gadgets and Smartphone categories. The last one is a subcategory of Gadgets.

6.) product_websites – a website code of the associated product. Use only lowercase letters (e.g. “base”).

7.) name – Enter the product name.

8.) description Enter the product description.

9.) short_description Enter the short description of a product. Both description and short description could include valid HTML tags.

10.) weight – Enter the weight of a product. It required using the following format 1.00000.

11.) product_online – To enable or disable products. Use 1 for enable or 0 for disable respectively.

12.) tax_class_name Enter a product tax class. It allows using capital later and spaces, like in Magento 2 backend (e.g. “Taxable Goods”, “None”).

13.) visibility – The visibility of a product (e.g. “Catalog”, “Not Visible Individually”, “Catalog, Search” etc.).

14.) price Enter the price of a product (e.g. 100.00).

15.) special_price – Enter the special price of a product (e.g. 99.99).

16.) special_price_from_date –Enter the time when Magento starts using a special price instead of a default one (e.g. ‘2020-01-01 12:00:01’).

17.) special_price_to_date – Enter the time when Magento stops using a special price (e.g. ‘2020-01-05 12:00:00’).

18.) url_key – Enter the URL key of the product. In the case of an empty field, a value is generated automatically based on the product name.

19.) meta_title – Enter the meta title of a product.

20.) meta_keywords – Enter the product meta keywords.

21.) meta_description – Enter the product meta description.

22.) base_image Enter the main product’s image and its path. It should be uploaded to  /pub/media/import. The path of /sample_data/m/b/sample.jpg has the following structure: /pub/media/import/sample_data/m/b/sample.jpg. In addition, you can use a direct URL of an image, such as http://yoursite.com/images/sample_image.jpg.

23.) base_image_label – a label of a base product image.

24.) small_image – a name and a path related to a small product image. Should be also uploaded to /pub/media/import. The path of /sample_data/m/b/sample.jpg has the following structure: /pub/media/import/sample_data/m/b/sample.jpg. In addition, you can use a direct URL of an image, such as http://yoursite.com/images/sample_image.jpg.

25.) small_image_label a label of a small product image.

26.) thumbnail_image – a name and a path related to a thumbnail product image. Should be uploaded to /pub/media/import as well. The path of /sample_data/m/b/sample.jpg has the following structure: /pub/media/import/sample_data/m/b/sample.jpg. In addition, you can use a direct URL of an image, such as http://yoursite.com/images/sample_image.jpg.    

27.) thumbnail_image_label – a product thumbnail label

28.) created_at Enter the time when a product was created by using the following format: mm-dd-yyyy hh-mm-ss (e.g. 10/25/2020 3:34:00 AM). If the field is empty, the date and time of database records are used.

29.) updated_at – Enter the time when a product was updated in. Use the following format: mm-dd-yyyy hh-mm-ss (e.g. 10/25/2020 3:34:00 AM). If the field is empty, the date and time of database records are used.

30.) new_from_date – Enter the sets a product as “new” from the specified date. Use the following format: mm-dd-yyyy hh-mm-ss (e.g. 10/25/2020 3:34:00 AM).

31.) new_to_date Enter the stops displaying a product as “new” from the specified date. Use the following format: mm-dd-yyyy hh-mm-ss (e.g. 10/25/2020 3:34:00 AM).

32.) display_product_options_in – It is a new feature introduced in Magento 2 which specifies a place on a product page where a block with options should be displayed (e.g. “Block after Info Column”, “Product Info Column” ).

33.) map_price – The minimum price of a product.

34.) msrp_price – The product’s MSRP price.

35.) map_enabled – To enable/disable a product’s minimum price.

36.) gift_message_available – shows that a gift message is available and will be displayed for a particular product.

37.) custom_design – The custom design of a product page.

38.) custom_design_from – The starting date for a custom design of a product page.

39.) custom_design_to End date for a custom design of a product page.

40.) custom_layout_update – A custom XML layout for a product page.

41.) page_layout The product page layout (e.g. 1 Column). If empty the field is empty, a default product layout is used.

42.) product_options_container – The product options container.

43.) msrp_display_actual_price_type  a type of a product’s MSRP price.

44.) country_of_manufacture – Enter the country of origin.

45.) additional_attributes – import of customized product options and data related to a simple product associated with a configurable product. An example value for a simple product associated with a configurable product: “color = Red, has_options = 0, required_options = 0, size = 32” (The color attribute is “Red”, the simple product has options in Magento 2: has_options = 0 – no option required, the size attribute value is 32). An example value for a product configurable in Magento 2: “has_options = 1, required_options = 1” (The product has required options, the product’s simple SKU is associated in the _associated_sku column).

46.) qty – Enter the quantity of a particular product in stock.

47.) out_of_stock_qty Enter an out of the stock quantity of a particular product.

48.) use_config_min_qty – use minimum quantity value from config.

49.) is_qty_decimal Set 1 if a quantity can be decimal.

50.) allow_backorders To enable or disable backorder set 0 or 1 respectively.

51.) use_config_backorders – To enable or disable use a default system value for back-order options (enable / disable) set it to 0 or 1 respectively.

52.) min_cart_qty – Enter the minimum required quantity of a product in the shopping cart.

53.) use_config_min_sale_qty – use a default config value for determining a minimum quantity of a sale product.

54.) max_cart_qty – Enter the maximum quantity of a product in a shopping cart.

55.) use_config_max_sale_qty – The default config value to determine the maximum quantity of a product in a shopping cart.

56.) is_in_stock – Enter 1 for the product is in stock, 0 for the product is out of stock.

57.) notify_on_stock_below –  Enter the minimum product quantity to get a notification about a low stock level.

58.) use_config_notify_stock_qty – The default system value for a product’s low stock notification.

59.) manage_stock To control a stock quantity of a product set 1. By setting 0 you allow  Magento 2 to consider a product that has an unlimited stock level.

60.) use_config_manage_stock – Use the default system configuration value for stock management.

61.) qty_increments – The product quantity increment.

62.) use_config_enable_qty_inc Use the default store configuration value to enable a product quantity increment.

63.) enable_qty_increments – To enable or disable set 1 or 0 to enable or disable product quantity increment respectively.

64.) is_decimal_divided To enable set 1 if a product quantity increment can be decimal.

65.) deferred_stock_update – To enable or disable deferred stock update set 1 or 0 to enable or disable respectively.

66.) use_config_deferred_stock_update – To enable or disable use config deferred stock update set 1 or 0 to enable or disable respectively.

67.) website_id It is an associated product website ID.

68.) related_skus The related products SKUs separated with the help of commas (e.g. EG-EG001_Group,15-EG002,25-EG0014-5,37-EG0258).

69.) crosssell_skus – The cross-sale products SKUs separated with the help commas (e.g. EG-EG001_Group,15-EG002,25-EG0014-5,37-EG0258).

70.) upsell_skus The upsells products SKUs separated with the help of comma (e.g. EG-EG001_Group,15-EG002,25-EG0014-5,37-EG0258).

71.) hide_from_product_page – In this section, you can hide the product from page.

72.) custom_options – In the custom options we can specify a custom name, type, required, price, price_type,option_title.

73.) bundle_price_type – In this field, we have to specify bundle price type like dynamic or fixed.

74.) bundle_sku_type – In this field, we have to specify bundle SKU type like dynamic or fixed.

75.) bundle_price_view – In this field, we have to specify the bundle price view like the Price range.

76.) bundle_weight_type – In this field, we have to specify bundle weight type like fixed.

77.) bundle_values – The bundle values are name, type, required, sku, price, default_qty, price_type, name (e.g. name=Bundle Option One1,type=select,required=1,sku=24-WG085,price=15.0000,default=0,default_qty=1.0000,price_type=fixed|name=Bundle Option).

78.) associated_skus – The associated SKUs are given as (e.g. 24-WG085=5.0000,24-WG086=5.0000).