On this page

Flag Dependencies

Flag dependencies define relationships between flags to enforce evaluation order. Amplitude passes the result of each flag's evaluation to all subsequent evaluations to decide whether dependent flags evaluate based on the result of the dependency.

Flag dependencies help implement:

Flag prerequisites

Flag prerequisites

Available for flags and experiments.

Flag prerequisites is a generic implementation of flag dependencies that lets any flag or experiment depend on any other flag or experiment. Prerequisite evaluation can check specific variants or target users that the prerequisite flag or experiment didn't include.

Use flag prerequisites to:

  • Actively develop large feature releases with many developers and teams.
  • Build provisioning for users to primary SKUs with add-ons.
  • Simplify complex feature flag logic in code.
  • Build complex hierarchies of mutually exclusive experiments that start at different times.

For more information, go to Flag Prerequisites.

Mutual exclusion groups

Mutual exclusion group

Available for experiments only.

A mutual exclusion group ensures that your users only join a single experiment. In Experiment, a mutual exclusion group defines multiple slots, each with a percentage of traffic allocated to that slot. The mutual exclusion group is a flag with a variant for each slot. Experiments in the group add a dependency on one or more variants of the mutual exclusion group flag.

Amplitude doesn't return the variant result of a mutual exclusion group's evaluation and doesn't assign it as a user property.

For more information, go to Set up and run mutually exclusive experiments.

Holdout groups

Holdout groups

Available for experiments only.

A holdout group withholds a percentage of traffic from a group of experiments to measure the long-term and combined impact of multiple experiments. Experiment implements a holdout group with a flag that has two variants: holdout and on. Amplitude allocates the holdout percentage defined at group creation to the holdout variant. Experiments in the group depend on the holdout group's on variant.

Amplitude doesn't return the variant result of a holdout group's evaluation, but assigns it as a user property to enable holdout analysis.

For more information, go to Holdout Groups.

Local evaluation SDK support

Amplitude SDKs support flag dependencies (mutual exclusion and holdout groups) starting at the versions listed below.

Older local evaluation SDK versions

Earlier local evaluation SDK versions don't consider mutual exclusion or holdout groups. Two experiments in a mutual exclusion group that an old local evaluation SDK version evaluates aren't mutually exclusive.

Was this helpful?