HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Interactions between flag rules

Describes flag rules and how they interact for Optimizely Full Stack Flags version.



This topic is most useful if you run experiments and need an in-depth understanding of how your audiences bucket into both experiments and deliveries.

Use rules to refine and target those who see a flag. You can configure the following types of rules:

  • Targeted Delivery
  • Experiment (A/B test)

Currently, you can have only one experiment for a flag, and it must be the first evaluated rule. See note on beta feature below. This means that if you create targeted delivery rules and an experiment rule for the same flag, Optimizely first evaluates a user to see if they qualify for the experiment's audience conditions and traffic. If they do not qualify, then Optimizely evaluates them next for the delivery rule(s).


Beta Feature

Having multiple rules per flag is currently in Beta. If you would like to be added to the beta, please reach out to your customer support representative.

Rulesets and audiences

If you define multiple overlapping audiences in your flag rules, then note that users "move down" multiple rules differently for experiments than for deliveries. In brief:

  • For experiments, users can still move down to the next rule if they fail traffic bucketing.
  • For deliveries, users "fall through" to the Everyone Else rule if they fail traffic bucketing. They move down to the next rule only if they fail audience conditions.