How to import data into a list property on entities
Learn how to swiftly import list data
Last updated
Learn how to swiftly import list data
Last updated
In a previous tutorial, How to import products, we imported a collection of jackets. This time around we want to populate a List property on these products with new data.
To do this we will be using the excel spreadsheet shown below. The first line contains the headers ProductName, Color, Color Area and Writing which will be used to map to the product and List property.
To start importing you choose the excel spreadsheet with the data you want to import, in this tutorial the spreadsheet is called "ColorListImportForJackets.xlsx".
Next you need to choose the correct Import type. When importing data into list properties on products, variants, variant groups or categories the 'List property import' type is used.
While it is possible to include media assets when importing, this will not be covered in this guide. For this reason we leave 'Include media' unticked and 'Select media folder' empty.
Having chosen the correct file and import type you can click the "Upload"-button to start the import.
Having clicked the "Upload"-button you are presented with a new page. This is where you will map your excel columns to data fields on entities.
You will need to choose the correct Entity type; Categories, Products, Variants or Variant groups.
In this guide we are importing data into List properties on products, so we choose 'Products' in the 'Entity type' dropdown, but the process for all entities are almost entirely similar from here.
Choose the List attribute you are importing data into, in this tutorial we are importing data into 'Design'.
Now you have to choose the import action, you can choose between:
Replace - Replace all rows with the rows in your file
Add/update - Update existing rows in the data or add new ones that are not already there
Delete matches - Delete rows that match the selected row key(s) (No rows are updated or added)
In this tutorial we want to add new ones from our file, so we choose 'Add/update'.
For Product Key(s) you need to choose the column in the excel spreadsheet which is used to identify the product each row in the sheet maps to. In this tutorial we map from the 'ProductName' column to the 'ProductName' data field.
It is possible to add extra keys if needed.
Having added the keys you need you can click the green "Next"-button in the bottom-right corner.
Having clicked the "Next"-button you are presented with the final mapping page. This is where excel columns are mapped to the attributes in the list.
In this tutorial we have three column, each corresponding to an attribute in a complex list attribute.
As we have chosen the import action 'Add/update', we need to choose the columns to use for matching existing rows. In this tutorial we choose that 'Color' and 'Color Area' together is the key, so we choose them as our row keys.
At this point you are shown a 'Review changes'-page. This page will show you the amount of new and updated list attributes.
Subattributes that will be changed are colored green to easily distinguish between attributes that will remain the same and attributes that will change.
Having reviewed the changes you can choose to approve the changes you are satisfied with. Only approved records will be commited.
When you have approved the records you want to keep, click the "Commit Import"-button in the bottom-right corner to finalize the import.