Read time: 2 minutes
Last edited: Mar 18, 2020
This topic explains how to use a flag's Variations tab to create and edit your feature flag's variations and outlines the different types of flag variations.
LaunchDarkly supports different flag types.
- Boolean flags have two settings:
- Multivariate flags have multiple settings that let you define different variations. Those settings include strings, numbers, JSON objects, or JSON arrays.
To learn more about creating different types of flags, read Creating a feature flag.
In the Variations tab, you can add, edit, or delete variations of existing flags.
Boolean flags never need variations, because they can only be set to
false. Multivariate flags, however, can be configured in many ways to create custom experiences or reactions.
Here are the flag modifications you can do in the flag's Variations tab:
- Boolean flags: you can edit each variation’s name and description.
- Multivariate flags: you can edit any variation’s value, name, and description. You can also add and delete variations for a multivariate flag.
When you add, edit, or delete a feature flag's variations, the change impacts environments within the project.
When you delete a variation, custom rules that return that variation are also deleted. If a custom rule has a percentage rollout, the rollout for that variation is set to zero. If the default rule returns the deleted variation, it will be changed to return the
off variation instead.
When you create a feature flag, some of its variations are designated as default variations. A flag's default variations are the variations that are served when a flag is on or off unless you specify otherwise.
For example, a boolean flag could have
false set as its default off variation and
true set as its default on variation. A multivariate flag could have
variation 1 set as its default off variation and
variation 2 set as its default on variation, with
variation 3 and
variation 4 configured to appear in other, more specific circumstances, such as when a user is based in a specific region or has a certain email address.
Default variations are designated automatically every time you create a feature flag. You can accept the default variations or change them. When you do this and click Save Flag, the flag is created across all environments in your project with these variations set as its
You can change a flag's default variations from the Variations tab. Update the default variations in the "Defaults for new environments" section. Subsequent environments you create also use the flag's default values. If you change the default variations and then create a new environment, however, the environment you create will use the updated default variations.