Variation Groups

A variation group is a group of variation products that shares a common attribute, such as color or size.

A variation group is a product type that represents a subset of variation products that are part of a variation master. For example, a variation group can be all blue variation products of any size that belong to the master product or all size 1 and blue variation products of any width.

It isn't possible to create a variation group that includes more than one value of a variation attribute. For example, you can't create a variation group that contains both blue and orange variation products. However, you can add multiple variation groups to a product set and have a single image for the product set that represents both groups.

A variation group is assigned to a master product. It isn't possible to assign a variation group to more than one master product. If the master product ceases to be a master product or is deleted from the system, related variation groups are deleted.

Variation products are assigned to variation groups. Deleting or unassigning a variation group doesn't affect the variation master it's assigned to or the variation products assigned to it.

Note: Because variation groups enable you to control search results more accurately, slicing (defined for variation attributes or overridden in category assignments) is disabled if at least one variation group is assigned to your master product. However, you can use variation groups to determine whether products use images or swatches instead of using slicing.
The variation group derives its inventory from the collection of SKUs associated with the group. A variation group can have its own SKU assigned to it. A variation group is mutually exclusive with other product types (product set, bundle, master product, item). However, a variation group can be a set product or a bundled product.

Using Variation Groups

You can:
  • import variation groups through the standard catalog import process. Salesforce B2C Commerce supports the variation group product type in the Catalog.xsd schema. B2C Commerce supports merge-mode for imports.
  • create variation groups by at least one variation attribute for a given variation master
  • search to find all variation groups
  • assign a variation group to a content slot.
    Note: When a variation group is assigned to a content slot and the shopper clicks it, the shopper is taken to the product detail page for the variation master. The product detail page shows the selected attributes of the variation group with an appropriate image, similar to the way product sets are merchandised.
  • assign a category position to a variation group, which allows you to show all red handbags before all gold handbags.
  • assign a variation group to a category or subcategory regardless of the primary category and storefront category that the variation master is assigned to, which lets you sell all red variation products in any size to a holiday category.
  • assign a variation group to a promotion.
  • assign a variation group to a product set, which lets you create outfits in specific colors, with specific products that can be sold in any size.
  • control storefront search behavior through search preferences for products that have variation groups configured
B2C Commerce:
  • disables slicing when variation groups exist for a master product, but only for that product. You can still use slicing for all other products.
  • uses attribute value fallback to include variation groups, which means that B2C Commerce first checks that an attribute value is set for the variation product, then the variation group product, and finally the master product.
  • collects active data for variation groups. Active data for a variation group is an aggregation of the variation products contained in the group.

You can also use the B2C Commerce Script API to show variation groups in landing pages, category pages, and customized search experiences.

Enable Variation Groups

To enable variation groups:

  1. Enable “Merged/individual Display Setting for Variation Groups" at site: Administration > Global Preferences > Feature Switches.
  2. For keyword searches, enable the Merged Variation Group Display mode at Merchant tools > Site Preferences > Search Preferences.
  3. For Catalog Navigation, set the Variation Group Display mode at Products and Catalogs > Catalogs > catalog > Edit > Category Attributes.
    • Merged—combines results to display as the master item.
    • Individual —displays results as individual hits.

Create a Variation Group

You can import variation groups or create variation groups.

To create a variation group:

  1. Select site > Merchant Tools > Products.
  2. Search for the variation master product that you want to create a variation group for.
  3. On the Products page General tab, click the Variations tab.
  4. To edit the product, click Lock.
    Note: It isn't possible to create variation groups unless the product is locked.
  5. Add variation products and configure values for all variation attributes. You must have created these values to select them for variation groups.
  6. Under Variation Groups, enter a unique ID for your variation group and click Add. Take note of any warnings that appear before clicking OK to continue.
    Note: You can also clone an existing variation group and then edit it by clicking Clone.
  7. Select a value for at least one variation attribute.
  8. Click Apply.
  9. To display the list of SKUs assigned to the variation group, click the group ID.
  10. To edit the variation group, click Lock on the General tab.
  11. Arrange your variation group in the order in which you want it to inherit properties. See the section on property inheritance for more information.
  12. In the Searchable list, select the sites where you want to be able to search for the variation group.
  13. In the Online list, select the site that contains the category where you want to see the variation group. Click Apply.
  14. Click the Categories tab.
  15. To assign the variation group to the categories in which you want it to appear, click Edit Categories. To save any changes, click Apply.
  16. Position the variation group order in the category using category position or drag and drop.
  17. Reindex the product index.

To create a variation group through import/export:

  1. Add a <variation-groups> element as the child of the <product> element in the catalog.xsd.
<catalog [...]>
    <product product-id="VariationGroupID">
        [...]
    </product>

    <product product-id="MasterID">
        <variations>
            <variants>
                [...]
            </variants>
            <variation-groups>
                <variation-group product-id="VariationGroupID" />
                [...]
            </variation-groups>            
        </variations>
    </product>
</catalog>

Delete or Unassign a Variation Group

You can temporarily disable a variation group for a product by unassigning it from the product. If you unassign a variation group, the variation group is not removed from B2C Commerce and it can be cloned or assigned again.

If you delete a variation group, the variation group is removed. Deleting a variation group doesn't affect the variation master product or the variation products.

Variation Groups and Categories

A variation group can be assigned to any category, just like other products:

Variation Groups and Property Inheritance

The sorting order of Variation Groups on the Variations tab is used for the attribute inheritance lookup. If the variation product doesn't define its own value for an attribute, the value is first retrieved from other variation groups of the same variation master (sorted by position). If the value isn't provided by one of the variation groups, the value is retrieved from the variation master

Variation Group Pricing, Inventory, and Purchasing

Variation groups can have a SKU assigned to them. That SKU must be unique across all products in a catalog.

Variation groups don't have an inventory record. Inventory is calculated as the sum of all inventory records from the variation products in the group.

Pricing and Promotions

Variation groups can be assigned to promotions and adjust pricing through promotions.

However, variation groups can't have prices assigned in Business Manager. In this way, variation groups are similar to product sets.

Important: While it's technically possible to assign prices to the SKU of a variation group through the import, such prices have no effect in B2C Commerce.

In the API, the ProductPriceModel returned for a variation group represents the price of all the variants contained in the group, creating a price range. When determining the prices for variants in a variation group, B2C Commerce first checks the variation product and if no price is defined, falls back to the variation master. The fallback doesn't consider any prices assigned to the variation group.

API Support

The B2C Commerce Script API supports variation groups as follows:
  • dw.catalog.Variant class has attribute fallback behavior to first obtain attributes from (one or more) assigned variation groups and then from the variation master.
  • dw.catalog.VariationGroup class has attribute fallback behavior to obtain attributes from variation master, when the attribute isn't specified by the variation group.
  • dw.catalog.Product class checks if the product is of type variation group through the public boolean isVariationGroup(); method.
  • dw.catalog.Product class returns all assigned variation groups of a master product through the public Collection getVariationGroups(); method.
  • dw.catalog.ProductVariationModel class returns all assigned and online variation groups of the corresponding master product via the public Collection getVariationGroups(); method.
  • dw.catalog.ProductVariationModel class returns configured variation values for variation group products via the public ProductVariationAttributeValue getVariationValue( Product variantOrVariationGroup, ProductVariationAttribute attribute ); method.
When reading attribute values, there is a fallback from variation product to master product in the case the variant doesn't define an attribute value. There is no fallback from variation product to variation group if the variation product doesn't define an attribute value. However, there is a fallback from variation group to master product in case the variation group doesn't define an attribute value.