Most products are available in a variation of sizes or colors. Salesforce B2C Commerce represents all variations as a single product, called a variation master.
Each
variation master has variation attributes that determine how a product varies. For example, a
shirt variation master can have size and color as variation attributes. A shoe variation master
can have size, color, and width as variation attributes.

A variation master represents all
possible variations, a variation group represents a subset of variations, and a variation
product is a single product that can be sold.
A variation group represents a subset of
values, such as all blue shirts in any size.
A variation product is a single product with
specific values for all variation attributes. For example, a shirt that is blue and size 1. A
variation product is a real product that has attributes in addition to the variation attributes,
such as SKU, name, description, images, and price.
With variation
products, you can:
- Define variation values per product master
- Overwrite the localized display names of variation values per
master
- Control the sort order of variation values per master
- Visualize variation values in the storefront (for example,
color swatches and Scene7 URLs)
Variation masters, variation groups, and variation products are all separate
product types. However, variation groups and variation products
must be associated with a master product. In most cases, you don't want to sell all possible
variation products. You create variation products for each product that you want to sell and
assign them to the variation master. For example, you might only want to sell size 2 and 3 in
red and blue. You must create four variation products (red-2, red-3, blue-2, blue-3) and assign
them to the variation master.
It isn't possible to purchase a master product, because it
includes all possible variants. A variation group can be purchased as a product, but can
function similarly to a product set, in which the products to purchase are the individual
variation products in the group.
Variation Attribute Values
While all products might share an
attribute, such as color, the actual values of the attribute might differ, depending on the
product, because not all products are available in the same colors.
You define the
variation products for a master by creating a variation attribute. A variation attribute uses an
attribute definition, such as color, and a list of values for that attribute, such as red, blue,
and green.
If you define a shared variation attribute, you can use the same values for any
number of products. If you define a local variation attribute, the values are only available in
the product in which they are defined.

Variation masters A and B use the Winter Colors
shared variation attribute values. Variation master C has a local variation attribute with a
different color set that can only be used with that product. Shared variation attributes are
defined at the catalog level. Each product master can only have one set of values for each
variation attribute. For example, one set of colors for the product. For this reason, you can
only select one variation attribute (Winter Colors) based on a specific attribute definition
(color) for a Variation Master.
To create two master products that
share variation values and one with unique variation values:
- Select Administration > System Objects >
Product, make sure there is a color attribute definition for the product system
object and create it if necessary.
- Select site > Merchant Tools >
Products and Catalogs > Variation Attributes > catalog,
create a variation attribute that uses the color attribute definition and at least one color
value.
- Select site > Merchant Tools >
Products and Catalogs >Products, select a Variation Master. Click the
Variations tab and click Lock.
- In the Variation Attributes section, click the ellipsis (...).
Select the shared attribute you created and click Apply.
- Select site > Merchant Tools >
Products and Catalogs >Products, select a Variation Master. Click the
Variations tab. The product must be a different variation product
from the one you previously edited.
- In the Variation Attributes section, click the ellipsis (...).
Select the shared attribute you created and click Apply.
- Select site > Merchant Tools >
Products and Catalogs >Products, select a Variation Master. Click the
Variations tab and click Lock. The product
must be a different variation product from the ones you previously edited.
- Click New.
- On the New Local Variation Attribute page, add a local variation attribute and click
Apply.
At the end of this example, the first two master products you edited share the
same color variations and the last master product has different color variations.
Assigning Variation Products to Variation Masters and Variation
Groups
You can assign existing products to a variation master as variation products.
If you unassign variation products from a master product, they become simple products in
B2C Commerce. If you delete the master, the variation products become simple products again. You can
also assign variation products to and from variation groups. The variation products must already
be assigned to the product master that the variation group is associated with.
Visualizing Products with Images and Swatches
You can visualize
products in several ways:
- Variation master image and swatches - this represents all variations using a single
image.
- Variation group image without swatches - this represents a subset of variations using a
single image, usually based on color. This is useful, because it lets you show the image
for all products available in the group, rather than a single product variation, as is the
case for slicing. In this case, you show one image for a black t-shirt in all sizes, rather
than a black t-shirt in a particular size, as you would with slicing.
- Variation group image with swatches - this represents a subset of variations using a
single image, usually not based on color. For example, you might show a different image for
a t-shirt based on a size range: children's, petite, missus, and plus size. In this case,
you show one image for each size range of t-shirt in all sizes and represent additional
colors as swatches.
- Variation product image with slicing- separate product images for each variation product
assigned to the category, whether it is the all the variations in the product master or the
variations assigned to one or more variation groups.
Slicing versus variation Groups
Slicing and
variation groups both let you control how products appear in your storefront.
Some
differences between slicing and variation groups:
- Slicing determines size as well as color, so if availability of the specific slice
(color: black, size 10) was zero, the product becomes unavailable on the site, even if there
were other sizes in that color available.
- Colors not visible for category position for variation products used in slices. This
makes it more complicated to adjust the category position of variations in your category
landing pages.
- You have to slice in each category, with variation groups you can put the group in each
category.
Note: Slicing is most useful if you want to show images based on one variation
attribute only (by color) and don't care about position of the variation product on the page.
Also if you don't intend to use variation products in content slots or recommendations. You can
use variation groups to specify a single variation product if you want to add that to content
slots and recommendations, but it isn't usually as useful as specifying multiple sizes in the
variation group.
Additional Information
See Search for information on variation
products relative to search and navigation.
You can
import variation product data using
catalog.xsd.
Important: In the template logic
you can use the attributes and access all product features for each variation. Typically, the
variation model works best if products vary with the same attributes. For example, when shirts
vary from one another in size and color.
Important: Variation master products
can't be purchased. Only variation products can be purchased. However, the master product must
be assigned to a category or the variation product can't be ordered, even if the variation
product is assigned to categories and appears in the storefront. The master must have a category
assignment because attributes are associated with the master, not on the
variation.