Skip to content

How do I manage a product's variants?

Understand the difference between a variant group and its values (Size, Colour), and the full flow for creating a product with variations, from the group through to saving.

Updated on August 10, 2026

View as Markdown

A variant group is a product attribute, for example Size or Colour. The values are the different options for that attribute, for example S, M and L for Size. This distinction underpins everything else in this article: once it is clear, you can create a product with one or several variant groups end to end, in a single go.

Group or value: the most common confusion

A group is an attribute. A value is an option of that attribute.

  • The right approach: one group named Size, with the values S, M and L added inside it. Three distinct variants are represented, one per value.
  • The trap: creating three separate groups, one named S, one named M, one named L. Sweb then treats them as three different attributes of the same product, and represents a single variant combining them all ("S / M / L") instead of three distinct variants.

If your product has several attributes (Size and Colour, for example), that is when you create two groups, one per attribute, each with its own values.

Creating a product with variants

From Inventory > Products, click Add product, fill in the Product name, then scroll down to the Variants section.

  • Click Add variant to create your first group (the button becomes Add group for the following ones).
  • Fill in the Option name: Size, Colour, Format and so on.
  • Add the Option values one by one, typing a value then pressing Enter, or separate them with commas to add them all at once.
  • Click Save option.

On mobile, the same form opens in a dedicated panel rather than inline.

As soon as a group has a name and at least one value, a table appears at the bottom of the product form with one row per value, and the Cost, SKU, Barcode and stock fields disappear from the top of the form. With two completed groups (Size and Colour, for example), Sweb combines each value of one with each value of the other, and you can group the table by attribute to read it more easily.

Fill in the Cost, SKU, Barcode and On hand stock of each variant directly in that table: these fields save normally, like any other field in the form. The next section details exactly what is saved variant by variant.

The Save product button becomes active when two conditions are met: at least one group has a name and a value, and every row in the table has a cost. While a cost is missing, a message under the button tells you what to fix. This is deliberate: in variant mode the Cost field at the top of the form no longer exists, so the table's costs are the product's only prices, and the price shown in the catalogue is that of the cheapest variant. The product and all its variants are then saved in a single operation: either everything is created, including every variant, or nothing is. If two variants share the same SKU, for example, neither is saved, the product is not half created, and an error message points you to the conflicting SKU.

The variant table fields

FieldEditable per variant?What it is for
CostYesThe purchase or production cost specific to that variant, which can differ from one size or colour to another.
SKUYesThe internal reference for that specific variant, so you can find it easily in your catalogue.
BarcodeYesThe barcode (EAN-13) specific to that variant, useful when selling at the register.
On handYesWhat you physically hold for that specific variant. Entered at creation, then editable afterwards just like for a product without variants.
AvailableNo, calculated automaticallyWhat can still be sold for that variant. Set at the first restock, after the product is created.
CommittedNo, calculated automaticallyWhat is already earmarked for a planned use on that variant. Set at the first restock, after the product is created.
UnavailableNo, calculated automaticallyWhat can no longer be used for that variant, shown in red as soon as there is any. Set at the first restock, after the product is created.

Understanding the quantities shown

Every product, with or without variants, shows the same four quantities.

  • On hand: what you physically hold.
  • Available: what can still be sold.
  • Committed: what is already earmarked for a planned use.
  • Unavailable: what can no longer be used, shown in red as soon as there is any.

For a product without variants, the form only asks for the Available and On hand stock at creation: committed and unavailable are then calculated automatically as stock movements happen. For a product with variants, only the On hand stock is entered at creation, variant by variant (see the table above): Available, Committed and Unavailable are then calculated the same way, from the first restock onwards.

Special cases

You created one group per value instead of one group per attribute. Delete the extra groups with the bin icon, keep a single group, rename it with the name of the attribute concerned (Size, Colour and so on), then add the values you had scattered across the deleted groups.

You do not sell variations, just a simple product. Do not create any variant group: the Cost, SKU, Barcode and stock fields stay directly on the product form, without going through the table, and your product saves normally.

The Cost field disappeared from the top of the form. That is expected as soon as a variant group exists, completed or not: the cost is then entered variant by variant in the table rather than once at the top. The Save product button stays disabled while no group has a name and at least one value, and while a row in the table has no cost. If you did not want variants, delete the group or groups with the bin icon: the Cost field, and the rest of the Inventory section, reappears at the top of the form.

You want to sell several sizes or colours. Refer to the "Creating a product with variants" section above: each group (Size, Colour and so on) and each combination is configured directly in the same form, in a single product creation.

Related articles

Was this article helpful?

Didn't find your answer? Contact support: hello@sweb.so