This chapter covers importing product options in the v2 product experience. See Importing Variants, Images, and Other Complex Attributes for information on importing options in the v3 experience.

Importing your options is an efficient way to handle the sometimes lengthy task of adding product options to each of your products. You can also control the action that happens when a particular option is selected through the use of rules.

This chapter will walk you through creating product options and rules by importing a CSV file. These instructions assume you are familiar with importing base products via CSV, and know how product options and option sets work.

Only the following option types can be created through a CSV import:

  • Checkbox
  • Multiple Choice
  • Product Pick List
  • Color Swatch
 

Importing Options and Rules

To create options and rules via a CSV import, you first need to export the product(s) that will be receiving them. Make a copy of the export so that you have a backup in case you need to return to your original setup.

In the CSV file, add a new row directly under a product for each option it will have. If you plan on using rules with your options, add a row for each rule under each option.

Create a new row underneath a base product to add options via CSV.

In the new rows, fill out the columns using the following format:

Column NameFormat
Item TypeUse SKU to create options. Use Rule to create rules.
Product IDThis column must be left blank when used with SKU or rule. See the screenshot below for an example.
Product NameSee Product Name: Option or Product Name: Rule.
Option SetThe name of the option set that will contain the option(s).
Product Code/SKUThe unique product code an option or combination of options will have.
Also used to assign rules to an option or combination of options.

Once you have made your changes, import your updated file into your store. The below example will show this process in action by adding the following options and rules to an existing product:

  • Size options labeled M, L, and XL, using the rectangle multiple choice option type. As an example, the medium size option uses the following format: [RT]Size=M
  • Two color options labeled Blue and Red, with the hex code for each color, using the color swatch option type. As an example, the blue color option uses the following format: [CS]Color=Blue:#123c91
  • A rule that will change the price of the product to $15.00 when the XL option is selected. This can be seen as [FIXED]15 in the example.

An example CSV with SKU and Rule rows

This CSV example will also assign SKUs to each option combination, and create a new option set labeled Apparel that will contain the Size and Color options. Here is how the options will look on the storefront:

CSV-generated options on the storefront

 

Product Name: Options

To specify which type of option you are importing, you will need to format your Product Name column with the required format for that option type. Some options may require specific information such as a URL or color hex code. If your SKU should have more than one option applied, separate them with a comma. For example, use [RT]Size=Small,[CS]Color=Blue:#0099CC to combine the small size and blue color options.

Option TypeFormatExample
Checkbox[C]OptionName=Yes or [C]OptionName=No[C]Free gift?=Yes
Multiple ChoiceRadio — [RB]OptionName=Value
Select (dropdown) — [S]OptionName=Value
Rectangle — [RT]OptionName=Value
[RB]Size=Small
[S]Size=Small
[RT]Size=Small
Product Pick ListWith Photos — [PI]OptionName=Product Name
Without Photos — [P]OptionName=Product Name
[PI]Add a sample?=Earl Grey sample
[P]Add a sample?=Earl Grey sample
SwatchColor — [CS]OptionName=Value:#hexcode
Texture — [CS]OptionName=Value:http://yourstore.com/product_images/ import/image-name.jpg
[CS]Color=Silver:#cccccc
[CS]Pattern=Plaid:http://domain.com/product_images/import/plaid.jpg

Note that for Product Pick List options, the Item Type should always be SKU.

The maximum option name length is 255 characters, and you can have a maximum of 250 option values per option. 

The Product Name of an existing option cannot be updated via CSV. Changing an option's name in your CSV will result in a new option being created upon import. Update option names in the control panel or via the API.

If you are creating a texture swatch by CSV import, upload the image to product_images/import in WebDAV or you will need to create the swatch manually. The file name in the CSV must match exactly, or the swatch will not be added.

 

Product Name: Rules

To control the action that happens when a particular option is selected (rule), you will need to format the appropriate Column with the required format for that rule type. You will need to add a row directly under each option that will have a rule. To create rules that apply to all options in an option set, you can manually create an Option Set rule.

Rule TypeColumnFormatExample
Adjust PricePrice[ADD]# — add an amount
[REMOVE]# — remove an amount
[FIXED]# — specify an amount
[ADD]25
[REMOVE]30%
[FIXED]15
Adjust WeightProduct Weight[ADD]# — add an amount
[REMOVE]# — remove an amount
[FIXED]# — specify an amount
[ADD]3
[REMOVE]5
[FIXED]10
Make Unavailable for PurchaseAllow PurchasesN — don't allow purchases
Y — allow purchases
 
Hide This OptionProduct Visible?N — Hide this option on the product page
Y — Option still visible on the product page
 
Show a Different ImageProduct Image File - 1

Full image URL

OR

Image file name

http://yourstore.com/content/filename.jpg

filename.jpg

*Each option can have a maximum of 1 image.

Stop Processing RulesStop Processing RulesY — stop processing rules 

Note that for “Adjust Price” rules, you can add % to the number to add/remove/fix a percentage instead of a flat dollar amount. “Adjust Weight” rules will use the weight unit selected in your store settings.

When creating “Make Unavailable for Purchase” rules via CSV, there is no option to customize the default unavailable message on product pages. Create these rules manually for more control.

Image files for “Show a Different Image” rules must already be online or uploaded to your product_images/import or content folders before import. They can also be uploaded to the Image Manager. Keep in mind the file name can only be used for image files uploaded to your product_images/import folder.

 

Conclusion

With the v2 Products experience, you can create products with a variety of attributes from the control panel, by importing a CSV, or via the API. Product options allow you to organize different qualities, such as size or color, into option sets and apply special rules that allow you to create the ideal storefront experience for your products.

While the v2 experience provides you with the tools you need to build your catalog, you may be interested in the updated features available in the v3 experience, such as the single-page product edit area, variant and modifier options, and access to Multi-Storefront features. If so, see our guide to Migrating from the Legacy Product Experience for a detailed comparison of the two experiences and a walkthrough of how to upgrade to v3.