Link Search Menu Expand Document

Flag variations

This page explains what flag variations are and how you can use flag variations in your feature flags.

Overview of flag variations

Feature flags can have multiple variations. A variation is a possible value for your feature flag. When a flag is loaded in your application, it will resolve to one of the variations.

For example, a simple feature flag for a feature toggle has two variations, one variation for the feature enabled and one variation for the feature disabled.

Another example is a feature flag with three variations, each representing a different hex color.

Variation types

Flag variations can have the following types:

  • boolean: true or false
  • number: any numbers, integers or decimals
  • string: any text

Flags with boolean variations always have two variations: true and false.

Flags with number or string variations can have more than two variations.

Tip: You can store JSON or other structured data in a string variation.

Adding and removing variations

You can add additional variations to an existing flag.

You can remove variations from an existing flag. This is only allowed if the variation is not in use.

Modifying existing variations

The value of an existing variation can be modified.

Note that variations are shared across environments. If you need to change a variation in a specific environment, add a new variation instead.


© 2020 AppFlags