Priority-based targeting gives you precise control over the order in which targeting rules are evaluated, ensuring the right users get the right experience.
Targeting rules (criteria) are evaluated in order based on their priority value:
- Lower priority numbers are evaluated first
- First matching rule determines the outcome
- Enables complex targeting scenarios with predictable results
Without priority control, rule evaluation order is unpredictable. With priorities, you can ensure:
- Premium users always get premium features
- Regional rules override global defaults
- Specific segments get targeted experiences before falling back to defaults
Without Priority:
Rule A: Beta users → enabled (100%)
Rule B: Premium users → variant-premium
Problem: Premium users who are also beta users might match either rule randomly.
With Priority:
Priority 0: Premium users → variant-premium (100%)
Priority 1: Beta users → enabled (100%)
Result: Premium users always match first, even if they're also in beta program.
- Navigate to your feature
- Go to the environment's targeting rules
- Drag and drop rules to reorder them
- Rules at the top have lower priority (evaluated first)
- Rules at the bottom have higher priority (evaluated last)
- Click Edit on a targeting rule
- Set the Priority field (0, 1, 2, etc.)
- Lower numbers = higher priority (evaluated first)
- Click Save
- New rules automatically get the next available priority number
- Existing rules maintain their relative order when adding new ones
Serve different variants to overlapping user segments.
Priority 0: Enterprise customers → premium-features (100%)
Priority 1: Team plan users → standard-features (100%)
Priority 2: Individual users → basic-features (50%)
Priority 3: Everyone else → disabled
Why it works: Enterprise customers get premium features even if they also match "Team plan" criteria.
Roll out features by region with fallback.
Priority 0: region=US → enabled (100%)
Priority 1: region=EU → enabled (75%)
Priority 2: region=APAC → enabled (50%)
Priority 3: All others → enabled (10%)
Why it works: US users always get the feature, other regions have gradual rollouts.
Ensure VIPs always get special treatment.
Priority 0: userId in VIP_LIST → variant-vip (100%)
Priority 1: tier=premium → variant-premium (100%)
Priority 2: tier=standard → variant-standard (50%)
Priority 3: Everyone else → control (10%)
Why it works: VIP users get special variant regardless of their tier.
Allow manual overrides for specific users.
Priority 0: userId in BETA_TESTERS → enabled (100%)
Priority 1: tier=enterprise → enabled (50%)
Priority 2: All others → disabled
Why it works: Beta testers always get access, even if they don't have enterprise tier.
Run experiments while excluding certain users.
Priority 0: userId in EXCLUSION_LIST → disabled
Priority 1: region=US → variant-a (33%), variant-b (33%), control (34%)
Priority 2: All others → disabled
Why it works: Excluded users never participate in the test.
Place most specific rules at lower priority numbers (top), general rules at higher numbers (bottom).
✅ Good:
Priority 0: userId=specific-user → variant-a
Priority 1: tier=premium → variant-b
Priority 2: All users → control
❌ Bad:
Priority 0: All users → control
Priority 1: tier=premium → variant-b // Never evaluated!
Priority 2: userId=specific-user → variant-a // Never evaluated!
Leave gaps between priority numbers for future insertions.
✅ Good: 0, 10, 20, 30 (can insert 15 between 10 and 20)
❌ OK but limiting: 0, 1, 2, 3
Add clear descriptions to each rule explaining why it has that priority.
After reordering rules, test with sample user contexts to verify expected behavior.
Periodically review priority order to ensure it still matches your business logic.
FluxGate's UI makes priority management intuitive:
- Grab the handle icon on the left of each rule
- Drag up or down to reorder
- Drop in the desired position
- Priority numbers update automatically
- Rules are displayed in evaluation order (top to bottom)
- Priority numbers are shown for reference
- First matching rule is highlighted during simulation
- Changes propagate to edge servers immediately
- No deployment required
- Users see updated behavior within seconds
When evaluating a feature for a user:
- Sort Rules: All targeting rules sorted by priority (ascending)
- Iterate: Check each rule in order
- Match Test: Does user's context match rule conditions?
- First Match: If yes, return the result (variant or boolean)
- Stop: Evaluation stops, remaining rules ignored
- No Match: If no rules match, feature is disabled
Symptom: Rule appears correct but never returns expected result.
Possible causes:
- Higher priority rule matches first
- User context doesn't actually match conditions
- Rollout percentage excludes this user
Solution:
- Check rules with lower priority numbers
- Verify user context values
- Test with 100% rollout to eliminate percentage issues
Symptom: User gets unexpected variant.
Possible causes:
- Higher priority rule specifies different variant
- Multiple rules match, first one wins
Solution:
- Review all rules with priority < current rule
- Ensure only intended rule matches user
- Adjust priorities if needed
Symptom: Drag-and-drop doesn't work.
Solution:
- Ensure you're in edit mode
- Check browser console for errors
- Refresh page and try again
- Use manual priority field as fallback
Migrate users from old to new experience gradually.
Priority 0: rollout_group=early_adopters → new_experience (100%)
Priority 1: Random 25% → new_experience (25%)
Priority 2: Everyone else → old_experience
Over time, increase Priority 1 rollout: 25% → 50% → 75% → 100%
Test in one region before expanding.
Week 1:
Priority 0: region=US-WEST → new_version (10%)
Priority 1: All others → old_version
Week 2:
Priority 0: region=US-WEST → new_version (50%)
Priority 1: region=US-EAST → new_version (10%)
Priority 2: All others → old_version
Serve different experiences to different user personas.
Priority 0: persona=developer → dev_focused_ui
Priority 1: persona=designer → design_focused_ui
Priority 2: persona=manager → analytics_focused_ui
Priority 3: Everyone else → default_ui
- Feature Variants - Using variants with priorities
- Edge Server API - How evaluation works
- Analytics Dashboard - Monitor rule performance