# 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 XML format, if variants are already nested within a product element, you can specify a [Variant Element](https://help.stockeo.solvenium.com/format/xml#variant-element) instead of 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="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-bb18838f0b91ff1886a13a1b2d63f10fe979b5fc%2Fimport-variants-mapping.png?alt=media" 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="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-4d8c91ef2ea738e94cef32cd2ecbecc11c63f2ea%2Fimport-variants-result-2.png?alt=media" alt=""><figcaption><p>Imported product - T-Shirt with 6 variants</p></figcaption></figure>

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-ff8023437b9afdfe6e9eaacc91659782626283c7%2Fimport-variants-result-1.png?alt=media" alt=""><figcaption><p>Imported product - Hoodie with 3 variants</p></figcaption></figure>
