Manage product variants

  • Updated

Product variants are a set of products that are available with multiple characteristics or "variants." This construct is commonly used for products, such as a toolbox, that can be purchased in a variety of colors and sizes with each of these color/size combinations resolving to a unique SKU or product ID.

Within Optimizely Configured Commerce, the configuration of these parts is divided into two sections: variant types and variant products.

Variant types

The variant type represents the group products as a whole. Products with the same traits are assigned to a variant type, such as "Toolbox."

Variant traits

A variant type consists of different features or variant traits, such as Size and Color.

Variant trait values describe the specific options within a trait. For Color, the variant trait values might be Yellow, Blue, and Red.

If you want to add new variant trait values in bulk using a spreadsheet, make sure the columns are as follows: Value, Description, Sort Order, Unselected Value, Display Trait Style, Style Trait.Style Class and Style Trait.Name, where Style Trait.Style Class is the variant type and Style Trait.Name is the variant trait.

Create variant types

  1. Go to Admin Console > Catalog > Variant Types.
  2. Click +Variant Type.
  3. Enter the Name and optional description for the variant type on the Details tab.
  4. Deactivate the Active toggle if you do not want the variant type to be active.
  5. Click Save or Save & Add New to continue adding variant types.

Create variant traits

  1. Go to Admin Console > Catalog > Variant Types.
  2. Click the Edit icon beside the variant type for which you want to add traits.
  3. Click the Traits tab.
  4. Click +Variant Trait to add a variant trait to the variant type.
  5. Enter the Name and Sort Order. If desired, enter a Description, a default Unselected Value, and a Display Trait Style.
  6. Click Save or Save & Add New to continue adding variant traits.

Create variant trait values

  1. Go to Admin Console > Catalog > Variant Types.
  2. Click the Edit icon beside the variant type for which you want to add traits.
  3. Click the Traits tab.
  4. Click the Edit icon beside the variant trait for which you want to add values.
  5. Click the Values tab.
  6. Click +Variant Trait Value to add values for your variant trait.
  7. Enter a Value and Sort Order. If desired, enter a description, toggle the Default Value, and select a Swatch Style of Color or Image.
  8. Click Save or Save & Add New to continue adding variant trait values.

Variant products

Parent products

The parent product is a generic or "dummy" product which does not resolve to a SKU or part ID in the ERP database. Because this parent is a placeholder, you do not need to add pricing or track inventory. The parent product does, however, need images and other content as it is the product that displays on the product list pages and the product detail page before any styles are chosen. Using the Toolbox example, the parent product is labeled "Hero Toolbox" and has an image displaying all three toolbox options.

Custom availability messages do not appear on the parent product when viewing the product listing page (PLP) and product display page (PDP).

Child products

Child products, which represent a single SKU or part ID in the ERP database, are then assigned to the parent product. The child products embody each unique combination of the Size and Color variant trait values. Optimizely recommends that each parent product have a maximum of 100 styled child products.

Browse and purchase variant products

Variant products are displayed within the category to which the parent product has been assigned.

The product detail page displays the product like the standard product detail page but with dropdown lists, buttons, or grids that allow customers to select the variant traits for products.

After selecting variant trait values from the dropdown lists, the page updates and displays any content populated for the child product for that combination of options.

The dropdown lists are also sensitive to whether or not a product has been defined for a specific combination of variant trait values. For example, if a product has not been defined for green/medium, the medium option will not be available within the dropdown list when the color green is selected. The opposite also holds true. Clicking a link to a product variant from the following places directs customers to the product detail page of the product with the options for the child product selected.

Search for and view product variant detail pages

When searching for an exact match of a variant child product number, even if the search terms are also present or directly match another product's data fields, the product detail page loads with the child product variants selected. Direct matches on variant part numbers may occur in the following fields:

  • Product Number
  • Product Title
  • Model Number
  • SKU
  • UPC
  • UNSPSC
  • Manufacturer Item

If a user selects more than one child product within a parent, only the parent product detail page loads.

When a user clicks the link to a child product from autocomplete, the parent product detail page loads with the variants for the child product selected. When the user enters a product number using the Quick Order form, the search results includes child products.

A link to a product variant from the following places directs customers to the product detail page with the options for the child product selected:

  1. Cart
  2. Order confirmation
  3. Order history 
  4. Sales quote request confirmation
  5. List detail page
  6. Quote details (sales rep)
  7. Job quote details
  8. "Share with friend" email
  9. Recently viewed widget
  10. Related products widget
  11. Recently purchased widget

Work with variant product parent-child relationships

The section below describes how to associate child products to a parent product and assign their variant trait values. Child products should have pricing, content, and images before setting them as variant products.

Create a parent product

The parent product is a placeholder to which the child products are associated. The parent product does not represent a part stored within your ERP system and should be set up as such:

  1. Go to Admin Console > Catalog > Products.
  2. Click Add Product to create a new product record.
  3. Enter data in the Product Number and Product Title fields in the Details tab. Ensure the ERP Managed and Track Inventory toggles are set to Off.
  4. Click Create Revision in the Content tab to add a description of the parent product. Click Source to add more formatting or customization, if needed.
  5. Add one or more sets of Small/Medium/Large images for the product set in the Images tab.
  6. Click Save.
  7. Assign the product to a category within the Category tab.
  8. Click Save.

Add a variant class to a parent product

  1. Go to Admin Console > Catalog > Product.
  2. Locate the parent product from the record list and click Edit.
  3. Select the Variants tab and select a variant type using the Variant Type dropdown list.
  4. Click Save in the secondary header.

Assign child products to a parent product

  1. Go to the Variants tab of the parent product, and click Assign Child Variants.
  2. Select the products that will be child products of the parent.
  3. Click Assign.
  4. Click Done.
  5. Click Save to save the child product association, and click the X to exit the assignment screen.
  6. Click Save in the secondary header.

Rebuilding the Product Search Index is required before the variant products will be available on the website.

Assign default child variant

Configured Commerce first looks for the default child product, but if it cannot locate a defined value at the product level, it then uses the variant trait to define the default child variant. You may also use Optimizely Product Information Management (PIM) or another PIM system that lets you set the default variant. Follow these steps to set the default child variant in Configured Commerce:

  1. Go to the Variants tab of the parent product.
  2. Select from the Default Child Product dropdown. You will see a list of currently assigned child products. If you select a value that is not from the list of assigned products, a warning displays.
  3. Click Save.

Enable nested documents

Extensive use of variant products and restriction groups can lead to incorrect facet counts on the PLP in some scenarios. The 'Enable Nested Documents' setting allows you to get improved results in these rare cases. This setting is toggled to 'No' by default. 

  1. Go to Admin Console > Administration > Settings > Search.
  2. Toggle Enable Nested Documents to Yes.
  3. Click Save.

You must rebuild the product index after changing this setting.