# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.stockeo.solvenium.com/data-mapping/variants.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
