# How to set up a variant model

## Setting up a variant model

To set up a variant, you need add it to an existing product structure. For this example we will be using the product structure "Demo Structure" from the tutorial:[How to set up and edit a product model](/tutorials/guides/how-to-use-product-structures/how-to-set-up-and-edit-a-product-model.md).

<figure><img src="/files/6M6HyAYgFpB6Qmxnbvxo" alt=""><figcaption><p>Product structures page</p></figcaption></figure>

When configuring the product model, toggle the "Has variants" option to enable the variant model in the product structure. As shown below, a new variant model option appears under the product model configurations.

<figure><img src="/files/XfL43gdAIzzxGPQ6kCS2" alt=""><figcaption><p>General settings</p></figcaption></figure>

Click on the variant model title to expand and view the various setup options. Now navigate to "Model setup".

### Model setup

<figure><img src="/files/Rt2uy1zHQ2z7yxRqYr86" alt=""><figcaption><p>Variant data model setup</p></figcaption></figure>

From here you can configure the data model for variants using this product structure. The process is identical to setting up the data model for products and you can read [here](/tutorials/guides/how-to-use-product-structures/how-to-set-up-and-edit-a-product-model.md#model-setup) how that works in detail.

Below you can see an example of what a data model for variants could look like.

<figure><img src="/files/JsipUs4zA68AGjNejgUH" alt=""><figcaption><p>Example of variant data model</p></figcaption></figure>

In the setup we have added a dynamic tab "General" and a dynamic section "Basic information", that contains three properties of type 'attribute'. Each variant in this example will have their own SKU, Color and CostPrice.

Once done click on the option "Wizard setup" to continue to the next step in the variant model setup.

### Wizard setup

<figure><img src="/files/RXZE20yfEoKr3zfAX1Uh" alt=""><figcaption><p>Wizard step setup</p></figcaption></figure>

Just like when setting up a product model, the wizard setup is optional. However, it can be beneficial to others using the PIM when needing to add or copy new entities. In the case with variant model, you only have the option to set up a "Model creation flow" to guide users when creating a new variant.&#x20;

Configuring a wizard setup in a variant model, is done the same way as in product model. Click [here](/tutorials/guides/how-to-use-product-structures/how-to-set-up-and-edit-a-product-model.md#wizard-setup) to see the wizard setup in the product model.

<figure><img src="/files/ZEco0DTeRjRdnlzn7psi" alt=""><figcaption><p>Wizard step example</p></figcaption></figure>

In the example above a flow is created and the three attributes from the variant data model are added as mandatory.

From here proceed to display settings.

### Display settings

<figure><img src="/files/jVczsWe4p2C83OLnR7aG" alt=""><figcaption><p>Display settings setup</p></figcaption></figure>

Here you can configure the thumbnails for variant using this product structure. In this example we will not be giving each variant a thumbnail.

Once done configuring display setting continue to the next step, identifiers.

### Identifiers

<figure><img src="/files/TUGht6EYpnif1T0GCjeW" alt=""><figcaption><p>Identifiers setup</p></figcaption></figure>

When done configuring the identifiers, move on to the final step, variation definitions.

### Variation definitions

When configuring a variation definition, you can add a variation definition by clicking the "Add Variation Definition" button. While it is optional, we advise setting up variant definitions, as variants created without a definition can make it hard to differentiate between them as they will be rendered without a name.

<figure><img src="/files/v5O8L8rEG0yr4tajeoX6" alt=""><figcaption><p>Variation definitions setup</p></figcaption></figure>

When clicking the "Add variation definition"-button you will be presented with a collapsed and empty variation definition. Click on it to expand it and see the fields to configure.&#x20;

To configure a variation definition you must choose the defining attributes for the variations following this product structure. In the example below variants are set to be defined by their color.&#x20;

An alias is also given as a unique identifer for the definition. You can also give it a name to make it easier for other PIM users to differentiate between the definitions. In the example the defintion was named "Product w. color variations".

<figure><img src="/files/pd5EFjT32yCYIgmxOtEN" alt=""><figcaption><p>Example of variation definition setup</p></figcaption></figure>

When defining variation, select the attributes for the variant data model that will be used to render each variants name. In the example above, variant names are created using their SKU and color. Ensure the name pattern aligns with the number of attributes in the "Name attributes" field.

You can choose to define attributes that are always shown. This is helpful if you have multiple variation definitions set up but want a defining attribute to be always available, regardless of the variation definition.

Once you're satisfied with the setup, click the "Save" button in the bottom right corner to store your newly created variant model.

{% hint style="warning" %}
When using variation definitions, it is important to add a 'variation definition selector' property to the product model. This allows you to choose the variation definition to use for variants of a product.
{% endhint %}


---

# 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://docs.struct.com/tutorials/guides/how-to-use-product-structures/how-to-set-up-a-variant-model.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.
