Knowledge base
Guides
Academy
Video tutorials
Try searching for:
Recently viewed articles:

Table of contents

Case study 6: Adding product attributes with import

This article is part of the catalog import and export section and guides you through adding attributes to your products in bulk with a CSV file.

You can import new products with attributes like UPC or Brand, or you can import attributes for products that already exist in your store. If a product already exists in your store, you can add attributes to it without having data on the product they belong to in the file.

In this section, you’ll learn how to import new attributes to products that already exist in your store.

You can create the attributes you need beforehand in Settings → Product types or you can simply import the file that contains columns dedicated to these attributes along with the attribute values. In this case, new attributes will be created in your store automatically.

In our example, we’ll add four new product attributes to two existing store products (their SKUs are A0001 and A0002):

UPC attribute (12345678901 and 12345678902) and Brand attribute (“Surf Paradise”) will be added to both products, and custom “Color” attribute (Blue) along with a custom “Country of origin" (Canada) attribute will be added only to the second product.

You can compile your file in any spreadsheet editor (or in a plain text editor). In our example, we’ll use Google Sheets.

To create an import file:

  1. Open your spreadsheet editor.
  2. Enter “type” in the first cell. Then enter “product” in the row below it:

    create_an_import_file__3_.png

    Now you’ve specified that the second row is about a product.
  3. In the next column, enter “product_sku” and the SKU of the first product (“A0001”):

    Catalog_import_case_studies__8_.png

    Now the attribute data listed in this row will be added to a product with this specific SKU.
    Optionally, you can add the “product_internal_id” column and the ID of the product, or you can use both the ID and SKU columns to specify the product your attributes must be assigned to.
  4. Then add the “product_upc” column to the file header and enter “12345678901” as its value for the “product” row:

    Catalog_import_case_studies__32_.png

    This way, you specify UPC for the first product.
  5. Next, similarly, enter the “product_brand” column and the “Surf Paradise” value for it.
  6. Congrats! You have entered all the data you need for the first product (the one with “A0001” SKU).
    Now add a new “product” row. It will be dedicated to the second product:

    Catalog_import_case_studies__29_.png

  7. Enter “A0002” for the “product_sku” column in the new “product” row, then enter “12345678902” for “product_upc” and “Surf Paradise” for “product_brand”.
  8. Next, you’ll need to create columns for your custom product attributes by replacing the {Attribute name} part in the generic “product_attribute_{Attribute name}” column name.
    So you need to add the “product_attribute_Color” column to the file header and “Blue” as the row value. This way, you will specify that you want your second product to have the custom “Color” attribute with the “Blue” value:

    Catalog_import_case_studies__9_.png

  9. Similarly, enter “product_attribute_{Country of origin}” and “Canada”.
    Curly brackets {} help import attribute names that consist of several words.
  10. Now save/download the file as .csv to your device. In Google Sheets, you can do it by going to File → Download → Comma Separated Values (.csv).

That’s it! You’ve compiled a CSV file for four different attributes that must be added to the two products that already exist in your store (you can find the “product_attributes” file in the article attachments):

Catalog_import_case_studies__11_.png

After you upload this file on the Catalog → Data Import & Export page, these attributes will be added to your products. Here’s how they will look for the second product on the Attributes tab in your store admin:

Catalog_import_case_studies__33_.png

If you don’t see new attributes, try refreshing the page.
If products in your store already have some attributes, then new attributes from the import file will be created in addition to them. Existing attributes with the same name will be updated.

Now you can choose any attributes you need for your catalog and follow these instructions step by step to compile your own CSV file.

See the list of available product attribute columns

If later you need to update attributes that exist in your store, you can simply edit the file and add new values for them or create a new file from scratch.

Was this article helpful?

Awesome! Thanks for your feedback!

Thanks for your feedback!

Sorry about that! What went wrong?
0 out of 0 found this helpful
10
We use cookies and similar technologies to remember your preferences, measure effectiveness of our campaigns, and analyze depersonalized data to improve performance of our site. By choosing «Accept», you consent to the use of cookies.
Accept cookies Decline