Help Center
English
Contents

Import and export product attributes

Use CSV files to create or update attributes and their options.

Attribute CSVs use one row per option. In a create file, repeat the Slug on each option row so the rows form one attribute; enter Name and Sub Type on the first row. In an update file, repeat the ID on each option row. Exports include a Revision alongside attribute and option IDs and the editable fields.

Import modes

Attribute CSVs run in one of these modes. Import creates new attributes with their options. Update attributes changes only the editable attribute-level fields (name, slug, description, and sort order) and does not touch options. Update options changes only the options and leaves the attribute-level fields alone. Each mode changes only its own columns. An Update attributes file can keep the option columns of an export: values that match your store are ignored, and a changed option value is reported as an error. In an Update options file, a changed attribute field is reported as an error.

Create imports

Create imports need a Name, Slug and at least one option for each attribute. Unlike the form, a create CSV does not generate a missing slug: the rows of one attribute are grouped by their Slug, so a row without one belongs to no attribute. An empty option value is generated from its label. Choose Standard, Swatch or Image in Sub Type; swatches need Option Color, and image options need Option Image URL.

Optional columns: Description and Sort Order set the attribute's description and position on its first row, and Option Sort sets each option's position within its attribute. Without Sort Order, the attribute goes after the last one; an option without Option Sort keeps its position in the file. Option labels must be unique within an attribute, ignoring case. Attribute names follow the same rule as in the editor: a name another attribute already uses, as its name or as its translation in a language where this attribute would show it, is reported as a row error.

csv
NameSlugSub TypeOption LabelOption ValueOption Color
ColorcolorswatchRedred#ef4444
colorBlueblue#3b82f6

The preview names any column the import doesn't read and ignores it, for example a translation column such as "Name (fr)". Import translations with the translations CSV.

Update imports

Update files require the ID and Revision from a recent export. If the attribute changed since that export, its rows fail; export again and review your edits. Update attributes changes name, slug, description and sort order without touching options; a blank cell keeps the current value, and __CLEAR__ in Description clears it. Update options changes existing options by Option ID and adds an option when Option ID is blank; omitted options stay in place. A blank Option Value or Option Sort keeps the option's current value, and a new option without Option Sort goes after the last one. Sub Type cannot change, a slug change is blocked while products or a storefront filter use the attribute, and the value of an option that variants use cannot change. An attribute takes its fields from its first row. Later rows can repeat them, as an export does, or leave them blank; a later row with a different value is reported as an error. A changed Option Label retitles automatically named variants in the background after the job, as a change in the editor does; a label that would make such a title too long is reported as a row error. One exception: if a file renames options of two attributes that the same variant uses and only the two new labels together make its title too long, no row is refused and that variant keeps its old title. Rename such options in two imports, the second after the first has finished, or shorten the labels.

csv
IDRevisionOption IDOption LabelOption ValueOption Color
72026-09-23T12:00:00Z41Crimsonred#dc2626
72026-09-23T12:00:00ZGreengreen#22c55e
Run and review a job

From Catalog > Attributes in Store Admin, choose Import, Update attributes, Update options or Export. The preview lists every change and every error; fix or remove the rows with errors before you start the job. Then open Attribute Bulk Jobs to review failed rows or download the completed export.

Images

Option Image URL is only valid for image attributes. External option image URLs are imported during the job; an image identical to a file already in Media is linked to that file instead of being stored again. Import and update require product write plus file write permission for option image URLs. Exporting Option Image URL or Option Image Site URL requires product read plus file read permission.

CSV file format

CSV files use UTF-8. Exports start with a byte order mark (BOM) so spreadsheet apps recognize the encoding, and imports accept files with or without one. A file with text that isn't valid UTF-8, such as one saved in another encoding, is rejected with the line of the first problem. Save it as UTF-8 (in Excel, CSV UTF-8) and upload it again.

A problem with the whole file, such as a missing required column, a column named twice or a file over the size or row limit, is listed in the preview on row 1, the header row, like a row error. Fix the file and upload it again.

A value that starts with =, +, @ or %, or with a tab or line break, is exported with an apostrophe in front so spreadsheet apps show it as text instead of running it as a formula. So is a value that starts with -, except a plain number such as -12.50, which stays a number. A value that really starts with an apostrophe is exported with a second one. Importing the file removes the added apostrophe, so these values come back unchanged.

A value that is exactly __CLEAR__ is also exported with an apostrophe in front, and so is none in a column where it clears a value, such as Quantity Pricing. On import it is read as that text, not as an instruction to clear a value. In other columns none is exported as it is.

Was this page helpful?