> For the complete documentation index, see [llms.txt](https://help.stockeo.solvenium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.stockeo.solvenium.com/data-mapping/variants.md).

# Variants

{% hint style="info" %}
Creation of variants is available only in the Create mode, when you import new products.
{% endhint %}

To group multiple variants into a single product, you need to configure at least two fields:

1. **Variant Group** - a field that has the same value for all variants of a specific product, usually the product name, parent SKU, or parent ID
2. **Variant Option** - a property that distinguishes variants, e.g. color, size, material

If your products have more than one feature that determine variants, you can add more variant options.

{% hint style="info" %}
In JSON and XML formats, if variants are already nested within a product object or product element, you can specify them using the [Variants Path](/data-mapping/format/json.md#variants-path) (for JSON) or [Variant Element](/data-mapping/format/xml.md#variant-element) (for XML) instead of the Variant Group.
{% endhint %}

#### Example

Assume you want to import a CSV file with the following columns:

* sku
* name
* color
* size
* price

| sku  | name    | color | size | price |
| ---- | ------- | ----- | ---- | ----- |
| TSRS | T-Shirt | Red   | S    | 25.00 |
| TSRM | T-Shirt | Red   | M    | 25.00 |
| TSRL | T-Shirt | Red   | L    | 25.00 |
| TSGS | T-Shirt | Green | S    | 25.00 |
| TSGM | T-Shirt | Green | M    | 25.00 |
| TSGL | T-Shirt | Green | L    | 25.00 |
| HDBS | Hoodie  | Blue  | S    | 55.00 |
| HDBM | Hoodie  | Blue  | M    | 55.00 |
| HDBL | Hoodie  | Blue  | L    | 55.00 |

To import these items as products with variants, you need the following mapping:

* Title: name
* SKU: sku
* Variant Group: name
* Variant Option 1
  * Name: Color
  * Value: color
* Variant Option 2
  * Name: Size
  * Value: size
* Price: price

<figure><img src="/files/EAKE8EZP5S2VuM1dd30B" alt=""><figcaption><p>CSV data mapping to import variants with color and size options</p></figcaption></figure>

Running the automation on the example CSV file will create 2 products:

* T-Shirt (6 variants)
  * Red / S
  * Red / M
  * Red / L
  * Green / S
  * Green / M
  * Green / L
* Hoodie (3 variants)
  * Green / S
  * Green / M
  * Green / L

<figure><img src="/files/3884Z4gukyhOoKgpHsaJ" alt=""><figcaption><p>Imported product - T-Shirt with 6 variants</p></figcaption></figure>

<figure><img src="/files/8ecPP9t04cuQV3pWOhpt" alt=""><figcaption><p>Imported product - Hoodie with 3 variants</p></figcaption></figure>
