Try it

Product attributes and variants

Sortyra team · · 7 min read

Attributes (also called parameters) are a product's properties, such as colour, size, weight or capacity. Variants are versions of the same product that differ in one of these attributes – a T-shirt in five sizes or a tent in two colours. In a feed they are written in their own fields, so the shop and comparison sites can use them.

Attributes: the label on the box

When you pick up a box with a sleeping bag in a shop, you will find a table on the side: weight 1.4 kg, comfort temperature 5 °C, length 220 cm, filling hollow fibre. These are attributes – specific properties of the product, each with a name (“Weight”) and a value (“1.4 kg”).

Attributes are not the same as a description. A description is continuous text for people. An attribute is a short, precisely named piece of data that a computer can work with too – for example, to sort, filter or compare products.

Variants: T-shirts on one rail

Now imagine a rail with one model of T-shirt. It hangs there in sizes S, M, L and XL, each in black and in blue. It is still the same T-shirt, but each item is slightly different. These versions are called variants.

With variants:

  • Each variant is a separate item. It has its own code, its own EAN, its own availability and sometimes its own price (XL may cost more).
  • Variants are linked by a shared group code. This shared label is called an item group or variant group code – it tells the shop and the channels that the items are the same model.
  • Variants differ in their variant attributes – most often colour, size, capacity, length or pack weight.

A product without variants is sometimes called a simple product.

What attributes and variants look like in a feed

This is how one T-shirt variant might look in a feed for a price comparison site. The attributes are written as name–value pairs, and the variants are linked by the ITEMGROUP_ID field:

<SHOPITEM>
  <ITEM_ID>TR-100-M-BLK</ITEM_ID>
  <ITEMGROUP_ID>TR-100</ITEMGROUP_ID>
  <PRODUCTNAME>Brezina Basic T-shirt black M</PRODUCTNAME>
  <EAN>8581234560017</EAN>
  <PARAM>
    <PARAM_NAME>Size</PARAM_NAME>
    <VAL>M</VAL>
  </PARAM>
  <PARAM>
    <PARAM_NAME>Colour</PARAM_NAME>
    <VAL>black</VAL>
  </PARAM>
  <PARAM>
    <PARAM_NAME>Material</PARAM_NAME>
    <VAL>100% cotton</VAL>
  </PARAM>
</SHOPITEM>

In a feed for Google, the most common attributes have their own fields with fixed names:

<item>
  <g:id>TR-100-M-BLK</g:id>
  <g:item_group_id>TR-100</g:item_group_id>
  <g:color>black</g:color>
  <g:size>M</g:size>
  <g:gender>male</g:gender>
  <g:age_group>adult</g:age_group>
</item>

And in a spreadsheet (CSV), variants are often written so that each row is one variant and a “parent” column says which model it belongs to:

code;parent;name;colour;size;price
TR-100-S-BLK;TR-100;Brezina Basic T-shirt;black;S;14.90
TR-100-M-BLK;TR-100;Brezina Basic T-shirt;black;M;14.90
TR-100-XL-BLK;TR-100;Brezina Basic T-shirt;black;XL;16.90

Feed formats are explained in more detail in Feed types.

What attributes and variants are for

  • Filters in the shop and on comparison sites. A customer ticks “capacity 40–50 l” or “colour blue” and sees only the matching products. Without attributes, your product is simply missing from the filter.
  • Comparing offers correctly. A comparison site needs to know that you are offering the T-shirt in size M, not XL. Variant attributes help match the offer correctly (more in Product matching on comparison sites).
  • Channel requirements. For clothing and footwear, Google requires colour, size, gender and age group in many countries. Fashion comparison sites almost always need this data.
  • A clear product page. The shop shows one model with a choice of colour and size instead of ten separate products.
  • Better texts and ads. Attributes can be used to build an informative title, for example “Horalka Light sleeping bag 220 cm, 5 °C”.

How it works in practice

Most problems arise when combining feeds from different suppliers. One sends the colour as “Colour: Black”, another as “color: black”, and a third has it only in the product title. To standardise them:

  1. Find out which attributes your feeds contain and how often they are filled in.
  2. Standardise attribute names. “Colour”, “colour”, “Color” and “Farbe” should be a single “Colour” attribute.
  3. Standardise values. “40L”, “40 l” and “40 litres” are the same thing. Choose one way of writing it – ideally the number, a space and the unit.
  4. Fill in missing attributes. They are often hidden in the title or description (“…sleeping bag, 220 cm, down to 5 °C…”) and can be extracted from there.
  5. Check the variants. Each variant must have a unique code and the correct group code. Variants of one model must have the same group code.
  6. Decide what goes to which channel. Not every attribute is useful everywhere – don't send an internal warehouse code to a comparison site.

What to watch out for

  • Variants without their own code or EAN. If all sizes have the same code, the channel treats them as one product and throws away or overwrites the others.
  • One EAN for a whole range. Some suppliers give all sizes the same EAN. The comparison site then merges different sizes into one product page. It is better not to send such an EAN to comparison sites.
  • A changing group code. The group code must be stable. If it changes with every feed update, the channel keeps seeing new products.
  • The same title for all variants. It is worth adding the distinguishing attribute to the variant's title (“black M”), so it is clear what the customer is buying.
  • Attributes as one long text. The channel won't split “Colour: black, Size: M, Material: cotton” in a single field. Each attribute belongs in its own field or its own pair.
  • Different units. Weight sometimes in grams and sometimes in kilograms breaks both filtering and sorting.

How Sortyra helps

When you connect a source, Sortyra recognises fields as well as attributes written as name–value pairs, and it groups variants – whether the supplier links them with a shared group code, sends them as separate items with a reference to a parent or puts them in the title as "Product|Variant". Variants nested inside a product (in XML as well as JSON, for example in the product list of a Shopify store) are imported as separate products with their own code, price, stock and EAN, linked into one group; product options such as "Size: M" become variant attributes. For a source you already have, variants are split only after you confirm it in the source details – see Source settings. On the Fields and values page (the Input menu) you can see how attributes are filled in, which values they contain and how many products have them. In the Attribute normalisation section you standardise names and values from different suppliers (for example “Barva” → “Farba”), and with the + Rule button you create a rule from a value. AI content can fill in missing attributes from the title and description – you review the result before it is used. Find out more about editing on the Rules page.

Frequently asked questions

What is the difference between an attribute and a variant?

An attribute is a property of a product, such as colour or weight. A variant is a separate version of a product that differs from the other versions of the same model in one attribute, such as size.

What is item_group_id?

It is a shared code given to all variants of one model. It tells Google and other channels that T-shirts in different sizes belong together.

Does every variant need its own EAN?

Yes, if the manufacturer has assigned one. Every sellable variant (for example each size and colour) should have its own EAN and its own product code.

Why doesn't my product appear in a filter on a comparison site?

Most often because the attribute is missing, has a different name from the one the comparison site expects, or its value is written differently from other products. Check both the name and how the value is written.

Can I extract attributes from the product description?

Yes. If the details are clearly stated in the description, they can be moved into separate attributes. It is a good idea to check the result so that no wrong value ends up in an attribute.

Try it on your own feed