Feature Flag Dependencies
Feature flag dependencies allow you to create targeting rules based on the evaluation results of other feature flags. This enables you to build complex flag relationships and control feature rollouts based on other features.
How Feature Flag Rules Work
The Feature flag option is similar to Prerequisites, as both are based on other feature flags' evaluations. The difference is in when they're evaluated:
- Prerequisites are checked at the beginning of the evaluation order (step 2)
- Feature flag rules are checked within Custom Rules (step 4)
The rule's condition is satisfied if the user is evaluated with the expected variation on the specified feature flag.
Example: Flag Dependency
Consider you created a custom rule within the Feature flag context. If the referenced flag returns the True variation, the user will receive the value-4 variation for the current flag.
The image below shows this configuration:

When defining targeting rules based on other feature flags, consider the impact on performance. If a flag has many dependencies, evaluating one flag may also evaluate many other flags, potentially affecting the evaluation duration and the client's network load.
Common Use Cases
- Progressive feature rollout - Enable advanced features only when basic features are enabled
- Example:
analytics_enabled = True→ Enableadvanced_analytics
- Example:
- Feature bundling - Group related features together
- Example:
premium_ui = Enabled→ Enabledark_mode
- Example:
- Gradual migration - Control multiple flags based on a master flag
- Example:
new_architecture = True→ Enablenew_api,new_cache, etc.
- Example:
- A/B test variations - Different flag behavior based on experiment assignment
- Example:
experiment_group = VariantA→ Showfeature_v2
- Example:
- Safety controls - Disable dependent features when parent feature is off
- Example:
payment_processing = Disabled→ Disablesubscriptions,checkout
- Example:
Prerequisites vs Feature Flag Rules
Understanding when to use each:
| Feature | Prerequisites | Feature Flag Rules |
|---|---|---|
| Evaluation Order | Step 2 (early) | Step 4 (with custom rules) |
| Failure Behavior | Returns OFF variation | Continues to next rule |
| Use Case | Hard dependencies | Conditional targeting |
| Multiple Conditions | Must ALL pass (AND) | Can combine with other conditions |
When to Use Prerequisites
Use prerequisites when a flag must not be evaluated unless other flags return specific values. If any prerequisite fails, the flag immediately returns the OFF variation.
When to Use Feature Flag Rules
Use feature flag rules when you want to conditionally target based on other flags, but still allow evaluation to continue if the condition isn't met (e.g., fall through to other rules or the default rule).
Combining with Other Conditions
You can combine feature flag conditions with user attributes, user segments, and date conditions to create sophisticated targeting strategies.
Example: Show advanced_dashboard only if:
premium_subscription = Active(Feature flag rule)- AND
app_version >= 2.0.0(User attribute) - AND user is in
Beta Testerssegment (User segment)
Best Practices
- Avoid circular dependencies - Don't create loops where Flag A depends on Flag B, and Flag B depends on Flag A
- Limit dependency depth - Keep dependency chains short (2-3 levels max) for better performance
- Document relationships - Use flag descriptions to note dependencies
- Monitor performance - Track evaluation times for flags with many dependencies
- Consider prerequisites first - Use prerequisites for true hard dependencies, feature flag rules for conditional logic