The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.
Dev guideRecipesAPI ReferenceChangelog
Dev guideAPI ReferenceRecipesChangelogUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Use mutual exclusion

Describes using mutually exclusive groups to ensure that users do not see overlapping experiments that apply to different flags in Optimizely Feature Experimentation.

In Optimizely Feature Experimentation, experiments can overlap—a single user may be exposed to multiple experiments at the same time. Mutually exclusive experiments prevent this by ensuring a user only enters one experiment from a given group. By default, Feature Experimentation hashes a unique, random value per experiment to determine user entry, and these values are independent across experiments. If you need to guarantee that a user only participates in one of several experiments, use an exclusion group. For information, see How bucketing works.

Exclusion groups implementation

In Optimizely Feature Experimentation projects, you can make two or more experiments mutually exclusive using exclusion groups. Exclusion groups do not require any SDK changes. The Decide method automatically evaluates whether an experiment is in a group and assigns users to the appropriate experiment and variation.

If you want to implement exclusion groups using the Feature Experimentation UI instead, see Mutual exclusion overview.

Create an exclusion group

📘

Note

Start all experiments in an exclusion group at the same time. Do not add or remove running experiments from an exclusion group because it may have unintended effects on your results. For more best practices, see Best Practices - Mutually Exclusive Experiments.

Use the Create an Exclusion Group endpoint.

Add an experiment to an exclusion group

  1. Get your experiment rule's ID – Use the Fetch the Rule for a Ruleset in an Environment endpoint to retrieve your experiment rule's ID.
  2. Update the exclusion group – Find the exclusion group you want to update, add the stringified rule ID to the group's rules object, then use the Update Exclusion Groups endpoint to save the change.

Remove an experiment from an exclusion group

  1. Get your exclusion groups – Use the List Exclusion Groups endpoint to view all exclusion groups in your project.
  2. Update the exclusion group – Remove the experiment rule's ID from the rules object, then use the Update Exclusion Groups endpoint to save the change.

Archive and unarchive an exclusion group

Archive

Use the Archive Exclusion Groups endpoint.

Unarchive

Use the Unarchive Exclusion Groups endpoint.

Bucketing

The following table shows how exclusion groups can interact with other bucketing methods. For more detail, see How bucketing works.

Bucketing

Comment

Exclusion groups evaluate before this user bucketing method:

  • Traffic allocation

Exclusion groups evaluate after these user bucketing methods:

  • Set Forced Variation (setForcedVariation method)
  • User allowlisting
  • User profile service
  • Audience targeting
🚧

Important

If multiple bucketing methods apply to the same user, the method evaluated first takes priority. For information, see the end-to-end bucketing workflow in How bucketing works.