Skip to content

Commit 23e0a0e

Browse files
committed
Revert "Revert predef variations docs (#666)"
This reverts commit 6a2732c.
1 parent 6a2732c commit 23e0a0e

15 files changed

Lines changed: 242 additions & 1 deletion

website/docs/advanced/migration-from-launchdarkly-translation.mdx

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ we are happy to raise your limits temporarily so you can fully explore the produ
349349
There is no way to emulate this behavior in ConfigCat, so a placeholder value is used as follows:
350350
<ul>
351351
<li>boolean flag: `false`</li>
352-
<li>string flag: `""` (empty string)</li>
352+
<li>string flag: `"_"`</li>
353353
<li>json flag: `"null"`</li>
354354
<li>number flag: 0</li>
355355
</ul>
@@ -718,6 +718,39 @@ we are happy to raise your limits temporarily so you can fully explore the produ
718718
Comma is replaced with semicolon in comparison value list items.
719719
</td>
720720
</tr>
721+
722+
<tr id="translation-issue-T028">
723+
<td>T028</td>
724+
<td>🔴&nbsp;HIGH</td>
725+
<td>
726+
A feature flag variation value was changed.
727+
</td>
728+
<td>
729+
LaunchDarkly allows variation values that are not valid in ConfigCat. More specifically, the empty string in the
730+
case of string feature flags.
731+
</td>
732+
<td>
733+
Problematic variation values are changed into valid ConfigCat values, and if necessary, they are made unique by
734+
adding a number suffix.
735+
</td>
736+
</tr>
737+
738+
<tr id="translation-issue-T029">
739+
<td>T029</td>
740+
<td>🔵&nbsp;LOW</td>
741+
<td>
742+
A feature flag variation name was changed.
743+
</td>
744+
<td>
745+
LaunchDarkly may allow longer variation names than ConfigCat. Also, LaunchDarkly enforces looser rules than
746+
ConfigCat with regard to variation name uniqueness.
747+
</td>
748+
<td>
749+
Names that are too long are truncated at the maximum length. Then the effective name (the truncated name or,
750+
if no name is specified, the variation value) is checked for conflicts, and if necessary, it is made unique
751+
by adding a number suffix.
752+
</td>
753+
</tr>
721754
</tbody>
722755
</table>
723756

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
id: predefined-variations
3+
title: Predefined Variations
4+
description: Learn about free-form values and predefined variations in ConfigCat, how they differ, and when to use each approach for managing feature flag values.
5+
---
6+
7+
ConfigCat supports two value-modes for feature flags: _free-form values_ and _predefined variations_. This guide explains the differences between these approaches and helps you choose the right one for your use case.
8+
9+
10+
## Overview
11+
12+
In ConfigCat, you can configure feature flags to operate in either of these modes:
13+
14+
- **Free-form values** - Allows arbitrary feature flag values. You can set served values to any value.
15+
- **Predefined variations** - Constrains feature flag values to a set of variations specified beforehand. You can select served values from a dropdown.
16+
17+
<p>
18+
<img src="/docs/assets/predefined-variations/usage_192dpi.png" alt="Clone feature flag" width="1366" height="768" decoding="async" loading="lazy" />
19+
</p>
20+
21+
## Free-form values
22+
Free-form values are the traditional, unrestrictive mode that lets you enter a feature flag's exact value each time you set it.
23+
24+
<p>
25+
<img src="/docs/assets/predefined-variations/free-form-create_192dpi.png" alt="Clone feature flag" width="1366" height="768" decoding="async" loading="lazy" />
26+
</p>
27+
28+
### Characteristics
29+
30+
- **Direct Input**: You type or input the value directly when setting up flag rules
31+
- **Ad-hoc Definition**: Values are defined on-the-fly as needed
32+
- **No Reusability**: Each value must be entered separately for each rule
33+
- **Simple Setup**: Straightforward for basic use cases
34+
- **Flexible**: Any valid value can be entered at any time
35+
36+
### Use cases
37+
38+
Free-form values work well when you have simple, one-off configurations where feature flag values are unique and unlikely to be reused. They're ideal when you need quick setup without upfront planning, especially when working with primitive values like booleans or simple strings and numbers. This approach is also suitable when values change frequently or unpredictably.
39+
40+
41+
42+
## Predefined variations
43+
44+
Predefined variations allow you to define a set of reusable values upfront when creating a feature flag. These variations can then be selected from a dropdown when setting up flag rules. Each variation consists of three fields:
45+
46+
<p>
47+
<img src="/docs/assets/predefined-variations/predefined-variations-create_192dpi.png" alt="Clone feature flag" width="1366" height="768" decoding="async" loading="lazy" />
48+
</p>
49+
50+
### Variation fields
51+
52+
| Field | Description |
53+
|-------|-------------|
54+
| Served value | **Required.** The actual value that feature flag evaluation will return in your application when this variation is selected. |
55+
| Display name | Optional. A human-readable identifier for the variation displayed in the dropdown. If not provided, a string representation of the served value is displayed instead. |
56+
| Hint | Optional. Additional context or description to explain when or why to use this variation. It will be visible as a tooltip. |
57+
58+
### Characteristics
59+
60+
- **Defined at Creation**: Variations must be defined when creating the feature flag
61+
- **Reusability**: Define once, use multiple times across flag rules
62+
- **Consistency**: Ensures the same values are used throughout your configuration
63+
- **Dropdown Selection**: Choose from predefined options instead of typing
64+
65+
### Use cases
66+
67+
Predefined variations are ideal when you have a standard set of values used across multiple rules, especially when consistency is critical for things like color schemes, API endpoints, or configuration objects. They work well when multiple team members need to understand what each value represents and you want to prevent typos or invalid values. This approach is particularly valuable when complex values like JSON objects need to be reused, when you need to provide guidance on when to use specific values, and when values are known upfront and relatively stable.
68+
69+
70+
## Converting between free-form values and predefined variations
71+
72+
ConfigCat provides an easy way to convert feature flags between free-form values and predefined variations.
73+
74+
### Converting to predefined variations
75+
76+
When you convert a feature flag from free-form values to predefined variations, ConfigCat automatically collects all currently used values from your existing flag rules. These collected values are presented as suggested variations, but you can modify their display names and hints, or even add new variations.
77+
78+
The conversion doesn't affect your deployed applications.
79+
80+
### Converting to free-form values
81+
82+
When you convert a feature flag from predefined variations to free-form values, the actual values from variations are extracted and feature flag values are updated to use the values directly. Display names and hints are irreversibly deleted, leaving only the values.
83+
84+
The conversion doesn't affect your deployed applications.
85+
86+
## Working with predefined variations
87+
88+
### Creating a feature flag with predefined variations
89+
90+
When creating a new feature flag, you can choose between free-form values and predefined variations.
91+
92+
### Managing predefined variations
93+
94+
You can add/remove/modify predefined variations for a feature flag by clicking the related button in any served value dropdowns or by clicking the **Manage predefined variations** item in the kebab (3 dots) menu of the feature flag.
95+
96+
<p>
97+
<img src="/docs/assets/predefined-variations/manage_192dpi.png" alt="Clone feature flag" width="1366" height="768" decoding="async" loading="lazy" />
98+
</p>
99+
100+
You can create additional variations as needed at any time. However, you can only remove a predefined variation if it is not currently in use.
101+
102+
You can modify the display name and hint of predefined variations at any time, but you can only change the served value of a predefined variation if it is not currently in use.
103+
104+
## Variation ID vs predefined variations
105+
106+
ConfigCat also has a feature called _Variation ID_, but this is different from predefined variations, as it is designed primarily for analytics and A/B testing integrations. It is a hashed identifier of the feature flag's served value.
107+
108+
However, since predefined variations require unique served values, there is an inherent connection between the two concepts: a Variation ID uniquely identifies a predefined variation.
109+
110+
Therefore, if you enable the Variation ID feature in your product's preferences as explained [here](../variation-id-for-analytics/#how-to-access-variation-ids), the **Manage predefined variations** dialog will also display the Variation IDs corresponding to the variations.
111+
112+
:::tip
113+
Learn more about Variation ID [here](../variation-id-for-analytics).
114+
:::
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
id: variation-id-for-analytics
3+
title: Variation ID for analytics
4+
description: Learn about how to utilize the Variation ID to enrich feature flag evaluation events.
5+
---
6+
7+
To support working with feature flags, especially A/B testing and analytics, ConfigCat provides an auto-generated identifier called Variation ID for each distinct served value. This identifier is particularly useful when integrating with analytics tools.
8+
9+
## What is a Variation ID?
10+
11+
The _Variation ID_ is a hashed version of the feature flag's served value. For feature flags with lengthy values (such as JSON objects), the Variation ID provides a shorter, more manageable identifier that can be sent to analytics platforms, instead of the full value.
12+
13+
## How to access Variation IDs
14+
15+
You can view Variation IDs on the ConfigCat Dashboard by enabling the **Show Variation IDs to support A/B testing** setting. Learn more about this setting <a href="https://app.configcat.com/product/preferences" target="_blank">here</a>.
16+
17+
## Variation ID vs. PredefinedVariationID
18+
19+
:::note
20+
`Variation ID` (for analytics) is different from `PredefinedVariationID` available in the Public Management API:
21+
22+
`Variation ID` is a hashed identifier of the feature flag's served value, used for analytics and A/B testing integrations. This is what you send to analytics tools like Amplitude, Google Analytics, Mixpanel, and Segment.
23+
`PredefinedVariationID` is the resource identifier in the ConfigCat Public Management API that can be used to reference a specific predefined variation when managing feature flags programmatically. Read more at [Predefined variations](/advanced/predefined-variations).
24+
:::
25+
26+
## Using Variation IDs with analytics integrations
27+
28+
When integrating ConfigCat with analytics platforms, you can send the Variation ID along with (or instead of) the feature flag value. This is especially recommended for text feature flags with lengthy values (such as JSON configurations), maintaining consistent identifiers across analytics reports, and simplifying A/B test analysis.
29+
30+
For detailed integration instructions, see the documentation of
31+
- [Amplitude integration](/integrations/amplitude),
32+
- [Google Analytics integration](/integrations/google-analytics),
33+
- [Mixpanel integration](/integrations/mixpanel),
34+
- [Segment integration](/integrations/segment).

website/docs/integrations/amplitude.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ you have to send the `user_id` property as well to identify your user. You can u
253253
:::note
254254
For Text feature flags with lengthy values (e.g., JSON), send the `variationId` instead of the `value` as the `variant` to Amplitude.
255255
The `variationId` is a hashed version of the feature flag value, accessible on the ConfigCat Dashboard by enabling the _Show VariationIDs to support A/B testing_ setting. Learn more [here](https://app.configcat.com/product/preferences).
256+
257+
For more information about Variation IDs, see [Variation ID for analytics](/advanced/variation-id-for-analytics).
256258
:::
257259

258260
4. Deploy your application and wait for feature flag evaluations to happen so Experiments in Amplitude could be populated.

website/docs/integrations/google-analytics.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ While our documentation primarily provides code examples for JavaScript-based SD
7676

7777
:::note
7878
For Text feature flags with lengthy values (e.g., JSON), send the `variationId` instead of the `value` as the `exp_variant_string` to Google Analytics. The `variationId` is a hashed version of the feature flag value, accessible on the ConfigCat Dashboard by enabling the _Show VariationIDs to support A/B testing_ setting. Learn more [here](https://app.configcat.com/product/preferences).
79+
80+
For more information about Variation IDs, see [Variation ID for analytics](/advanced/variation-id-for-analytics).
7981
:::
8082

8183
4. **Deploy your application** and wait for feature flag evaluations to occur. This process might take 1-2 days for the `experience_impression` events to populate in Google Analytics.

website/docs/integrations/mixpanel.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ you have to send the [distinct_id](https://docs.mixpanel.com/docs/tracking-metho
259259
:::note
260260
For Text feature flags with lengthy values (e.g., JSON), send the `variationId` instead of the `value` as the `Variant name` to Mixpanel.
261261
The `variationId` is a hashed version of the feature flag value, accessible on the ConfigCat Dashboard by enabling the _Show VariationIDs to support A/B testing_ setting. Learn more [here](https://app.configcat.com/product/preferences).
262+
263+
For more information about Variation IDs, see [Variation ID for analytics](/advanced/variation-id-for-analytics).
262264
:::
263265

264266
4. Deploy your application and wait for feature flag evaluations to happen so Experiments in Mixpanel could be populated.

website/docs/integrations/segment.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ you can integrate with other languages by sending an event to Twilio Segment wit
421421
:::note
422422
For Text feature flags with lengthy values (e.g., JSON), send the `variationId` instead of the `value` as the `value` to Twilio Segment.
423423
The `variationId` is a hashed version of the feature flag value, accessible on the ConfigCat Dashboard by enabling the _Show VariationIDs to support A/B testing_ setting. Learn more [here](https://app.configcat.com/product/preferences).
424+
425+
For more information about Variation IDs, see [Variation ID for analytics](/advanced/variation-id-for-analytics).
424426
:::
425427

426428
4. Deploy your application and wait for feature flag evaluations to happen so feature flag evaluation events can be sent to Twilio Segment.

website/docs/main-concepts.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ A _Feature Flag_ is a _Setting_ of type Bool.
2828
| Whole Number | Integer | Any whole number within the range of `Int32`. |
2929
| Decimal Number | Double | Any decimal number within the range of `double`. |
3030

31+
### Free-form values vs predefined variations
32+
33+
ConfigCat supports two value-modes for feature flags:
34+
- **Free-form values**: Allows you to enter a feature flag's exact value each time you set it. Best for simple, one-off configurations or quick experiments.
35+
<p>
36+
<img src="/docs/assets/predefined-variations/free-form-create_192dpi.png" alt="Clone feature flag" width="1366" height="768" decoding="async" loading="lazy" />
37+
</p>
38+
- **Predefined Variations**: Allows you to define a set of reusable values upfront when creating a feature flag. These variations can then be selected from a dropdown when setting up flag rules. Choose this mode to ensure consistency across rules, prevent typos in complex values (like JSON configurations), and provide self-documenting configurations for your team.
39+
<p>
40+
<img src="/docs/assets/predefined-variations/predefined-variations-create_192dpi.png" alt="Clone feature flag" width="1366" height="768" decoding="async" loading="lazy" />
41+
</p>
42+
43+
:::tip
44+
Learn more about [predefined variations](/advanced/predefined-variations), including when to use this value-mode, how to convert between the two value-modes, and best practices.
45+
:::
46+
3147
## Config
3248

3349
A _Config_ is a collection of _Settings_. _Configs_ help you organize settings around topics, or around your software components. A _Config_ is like an online version of a traditional config file.

website/docs/news.mdx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,38 @@ Here, you'll find all the latest updates, enhancements, and new features we've a
1010

1111
{/* This page must be in sync with the news page on the Dashboard: https://github.com/configcat/app/blob/master/src/app/home-module/news/news.component.html */}
1212

13+
## Predefined variations are here!
14+
15+
#### Feb 19, 2026
16+
17+
You asked for a structured way to reuse feature flag values, so we built **predefined variations**.
18+
19+
Instead of typing the same values again and again, define them once.
20+
Then select them from a dropdown when you build targeting rules.
21+
22+
Small change. Big difference.
23+
24+
This helps teams:
25+
- Keep values consistent across environments and rules
26+
- Prevent typos and invalid values
27+
- Reuse complex values such as JSON objects
28+
- Add clear labels and hints for teammates
29+
30+
You stay in control.
31+
32+
You can also convert existing flags from free-form values to predefined variations, and back, without breaking your applications in production.
33+
34+
Predefined variations are available in all plans.
35+
They extend ConfigCat's powerful targeting capabilities without adding complexity.
36+
37+
Learn more in the [Predefined Variations documentation](./advanced/predefined-variations.mdx).
38+
39+
<p>
40+
<img src="/docs/assets/predefined-variations/usage_192dpi.png" alt="Predefined variations" width="1366" height="768" decoding="async" loading="lazy" />
41+
</p>
42+
43+
---
44+
1345
## Feature flag evaluation in GitHub Actions
1446

1547
#### Feb 2, 2026

website/sidebars.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const docs: SidebarConfig = [
3535
],
3636
},
3737
'advanced/data-governance',
38+
'advanced/predefined-variations',
3839
{
3940
label: 'Targeting',
4041
type: 'category',
@@ -58,6 +59,7 @@ const docs: SidebarConfig = [
5859
'targeting/feature-flag-evaluation',
5960
],
6061
},
62+
'advanced/variation-id-for-analytics',
6163
'advanced/caching',
6264
'advanced/troubleshooting',
6365
'zombie-flags',

0 commit comments

Comments
 (0)