---
title: Create flag variations
slug: feature-experimentation/docs/create-flag-variations-end-user
docTags: 
createdAt: 2026-08-05T20:39:52.000Z
---

- Optimizely Feature Experimentation

A flag variation is a reusable group of flag [variable](docId\:eH-UMm_rOn_GdGDGLV6__) values (also called remote feature configuration or remote variables) that let you avoid hard-coding values in your code. Instead of waiting for a deployment, you can group them in a flag variation and then update them remotely in the Optimizely Experimentation application.

Optimizely Feature Experimentation dynamically assigns those variable values to your flag based on your flag rules. For information, see [Flag variations](docId\:wv71tx5QYHzUqm-snbQFC).

## Create flag variations

You can create flag variations using the Feature Experimentation UI or the Feature Experimentation REST API.

### Prerequisite

You must create [variables in the flag](docId\:eH-UMm_rOn_GdGDGLV6__) before assigning them to a variation.

### Use the Feature Experimentation UI

1. Go to **Flags** and select a flag.
2. Click **Variations**.
3. Click **Add variations**.
4. Configure the variation.
   1. Enter a **Name**.
   2. Enter a **Key**. You cannot change the **Key** after you save the variation.
   3. (Optional) Enter a **Description**.
   4. Configure the **Variables** for the variation.
   5. (Optional) Upload an image of the variation in the **Screenshot** field. See [Add an image to a variation](docId:1SuXkSw8NF-GUN82Bcwqz).
5. Click **Save**.

![screenshot of the Variations page where Add Variations, the Configure Variation panel fields, and Save are highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/9YpemnJON7ED7ipAn6Q-A_create-flag-variation-using-fx-ui.png)

:::hint{type="info"}
**Note**

When you create a flag, Feature Experimentation generates the default **On** and **Off** variations.

You cannot delete the **Off** variation.
:::

### Understand the Off variation

In Feature Experimentation, the **Off** variation is a unique state where you explicitly disable the feature for users. Unlike other variations (such as a, b, c, d) that typically return `enabled: true`, the **Off** variation always returns `enabled: false`.

However, this does not exclude users from tracking. Users assigned to the **Off** variation are still tracked, which you can verify through the `ruleKey` in the decision response.

### Variation behaviors

**Off variation**

- `enabled` **response** – `false`
- **Included in datafile** – No
- **Access method** – REST API only

**Baseline (non-Off) variation**

- `enabled` **response** – `true`
- **Included in datafile** – Yes
- **Access method** – Datafile and REST API

The `decision.enabled` flag does not indicate whether a variation is a baseline. Baselines are not included in the datafile but are accessible through the REST API.

If you do not use the **Off** variation, `feature.enabled` always returns `true`. Conversely, if you assign the **Off** variation, it returns `false`.

The **Off** variation affects tracking and decision responses. Although **Off** is excluded from the datafile, it remains part of the experiment logic and is accessible through API calls.

### Use the Optimzely Feature Experimentation REST API

You can use the [Optimizely Feature Experimentation REST API Variation endpoints](docId\:nlpLH68UDS55-E-saZFOn) to manage your variations. See the [Create a new Variation endpoint](docId:7b0zEkMP9GV4G1vum_dex) for information.

## Brainstorm variation ideas with Optimizely Agent Platform

You can brainstorm with [Agent Platform](docId\:IzAAN1fw7whD1HB4iODAB) to automatically create variations in Feature Experimentation. But, before doing so, [Configure Feature Experimentation for Optimizely Agent Platform](docId\:ttsUwHVA7PytfZEdvOtiJ).

To brainstorm with Mark, complete the following steps in Feature Experimentation:

1. Go to **Flags** and select a flag.
2. Click **Variations** and click **Brainstorm** to open [Mark chat](docId\:D4so1bF9qRiudPoWx2hr8).

![screenshot of the Variations page where Brainstorm is highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/hcujKUrGCnWfCqggebU3z_click-brainstorm-from-variations-page.png)

3. Enter the hypothesis you want to test and click **send** (or press Enter). Mark returns suggestions for variations. See [Design an effective hypothesis](docId\:A8ewMTwBn94nWlQwot7BY).
4. Click on a variation.

![screenshot of Mark chat where a hypothesis is entered and a suggested variation is highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/H-m1mbTO9w7zCSKGA2SP7_enter-hypothesis-and-select-suggested-variations.png)

5. Review and update the variation details pre-filled by Mark.
6. Click **Save** to create the variation.

![screenshot of the Configure Variation panel where Mark pre-fills the variation details and Save is highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/-85TrRTLV1dzR3A3L-cLy_review-suggested-variation-and-click-save.png)

7. (Optional) Return to Mark chat and click on a variation and repeat steps 5 and 6 to create additional variations.

:::hint{type="info"}
**Note**

If you use Opti ID, administrators can turn off generative AI in the Opti ID Admin Center. See [Turn generative AI off across Optimizely applications](docId\:X5U0kKD2azV5cIdNqwGNj).
:::

## Add an image to a variation

You can attach a screenshot or mockup to a variation so reviewers see what users experience in each variation. Each variation holds one optional image. Every rule that serves the variation displays the image.

Variation images accept the following files:

- **File types** – `.png`, `.jpeg`, `.gif`, and `.svg`
- **File size** – Up to 5 MB

Complete the following steps to add an image from the **Variations** page:

1. Go to **Flags** and select a flag.
2. Click **Variations**.
3. For the variation you want to illustrate, click **Upload** in the **Screenshot** column.

![screenshot of the Variations page where Upload is highlighted in the Screenshot column](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/quW7GYV3A0jz0x9oJCG4n_click-upload-screenshot.png)

4. Select an image file from your device.
5. Click **Save**.

![screenshot of the Configure Variation panel where the uploaded image displays in the Screenshot field and Save is highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/2PicOqhupOJ1DOU0ZyONU_click-save-variation.png)

To add the image while you create or edit a variation, use the **Screenshot** field in the **Configure Variation** panel.

After you save, a preview of the image displays in the **Screenshot** column. Open the variation and click **Preview screenshot** to open the full-size image.

![screenshot of the Configure Variation panel where Preview screenshot is highlighted in the Screenshot field](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/MwBnZQsxB9wdghEtD3xvv_click-preview-screenshot.png)

To change or remove the image, click **Replace screenshot** or **Remove screenshot**.

To view the image from a rule, select the environment and click the rule. Then click **View image** for the variation.

![screenshot of the rule Variations list where View image is highlighted for a variation](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/emeatFjev5egunwrA14PY_click-view-screenshot-from-a-rule.png)

Changes display in the [Change History](docId\:CvMxeG8fRRnvPX_fCGIJK).

## Delete variation

To delete a variation, go to **Flags >** select a flag **> Variations**. For the variation you want to remove, click **Delete variation**. Click **Save**.

You can also delete a variation by clicking **Delete variation** on the **Configure Variation** page. Click **Save**.

![screenshot of the Variations page and the Configure Variation panel where Delete variation is highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/S_EyLukvVgOpxm5AaAU1r_click-delete-or-open-variation-click-delete.png)

Click **Undo** on each variation before clicking **Save** to undo the deletion. You can click **Revert** to undo all changes.

:::hint{type="info"}
**Note**

You cannot delete the **Off** variation.
:::

## Implement flag variations

You deliver flag variations through [flag rules](docId:-yq2-thNRv7-SgwCXpG90) to control the end-user's experiences. Flag rules can be a [targeted delivery](docId:_BjMxuGwwlVrhkNcx2kzm), an [A/B test](docId:8pnfCv-sR37goLcxTtCPv), or a [Multi-armed bandit optimization](docId\:F5-ZUIoxCu2_XRy26tO-b).

In the [Optimizely Experimentation application](https://app.optimizely.com), you see flag variations, which let you group and reuse variable values.

In your code implementation, you can use the returned `OptimizelyDecision` variation key to execute code conditionally. But, to take full advantage of variables, you must get the values of the variation's variables directly.

See the [Implement flag variation](docId\:nmipY0LAkbpzTcsggjlPn) in the developer documentation for code samples.
