Targeting Features
Targeting lets you control which users see which variants based on user attributes. You can target by any attribute you pass from your application — user role, subscription tier, region, signup date, and more.
How Targeting Works
When evaluating a feature, you pass a user object containing a unique ID and any attributes. Featureflow evaluates rules from top to bottom and returns the variant for the first matching rule.
The Failover Rule
Every feature has a failover rule — the catch-all "else" rule at the bottom. If no other rules match, users receive the variant defined in this rule.

Creating Rules
- Click Add Rule — a new rule panel appears above the failover rule
- Select a target attribute (e.g.,
tier,user_role,country) - Choose a comparator — options vary by data type (text, number, or date)
- Enter the value(s) to match against
- Select the variant or split to return when the rule matches
- Click Save Targeting
Multiple Conditions
Use the + and - buttons to add multiple conditions to a rule. All conditions within a rule are evaluated with AND logic — all must match for the variant to be returned.
Rule Order
Rules are evaluated top to bottom. The first matching rule wins. Drag rules to reorder them.

Passing User Attributes
To use targeting, pass user attributes when evaluating features in your application:
var user = {
id: 'user-123',
attributes: {
name: 'john',
tier: 'gold',
user_role: 'pvt_tester'
}
}
FeatureFlowUser user = new FeatureflowUser(userId)
.withAttribute("user_role", "pvt_tester")
.withAttribute("tier", "gold")
.withAttribute("tenure_years", 10)
.withAttribute("signup_date", new DateTime());
The attributes you pass become available as targeting options in the dashboard.