Configure feature flag targeting

5 minute read

Configure targeting rules, rollout strategies, and conditional logic to control which users receive specific features and when they receive them.

Targeting enables gradual rollouts, user segmentation, and scheduled releases based on user properties, target groups, and complex conditional logic.

Prerequisites

Before configuring flag targeting, ensure you have:

  • A feature flag already created in your application.

  • Application linked to one or more environments.

  • Understanding of your user properties and target groups if using advanced targeting.

For guidance on creating flags, refer to Create and manage feature flags.

Enable flag configuration

Activate flag configuration to make targeting rules functional in the selected environment.

  1. Navigate to Feature management and select your application.

  2. Select the target environment from the environment options.

  3. Locate the flag you want to configure and select the vertical ellipsis icon (⋮).

  4. Select Configure.

  5. Toggle the Configuration status to On to enable the flag configuration.

    When configuration status is On, the flag follows your targeting rules. When Off, the flag serves the default value written in your application code.

The configuration status applies only to the selected environment, allowing different targeting behavior across development, staging, and production.

Configure basic targeting rules

Create conditional logic to control flag behavior based on user attributes and application state.

Add property-based rules

Target users based on built-in or custom properties such as location, device type, or user attributes:

  1. Access the flag configuration interface as described above.

  2. Select Add new rule and choose Property.

  3. Configure the property condition:

    1. Select a Property name from available built-in or custom properties.

    2. Choose an Operator such as "equals", "contains", "greater than", or "in list".

    3. Enter or select the target Value for comparison.

  4. Set the outcome values:

    1. Configure the THEN value (what happens when the condition is true).

    2. Configure the ELSE value (what happens when the condition is false).

  5. Select Save configuration to apply the rule.

Example property rule

A rule targeting users in specific regions might use: - Property: country - Operator: in list - Value: ["US", "CA", "UK"] - THEN: true (enable feature) - ELSE: false (disable feature)

Add target group rules

Target predefined user segments using target groups:

  1. Select Add new rule and choose Target group.

  2. Configure the target group condition:

    1. Choose from Matches options (any group, all groups, or none).

    2. Select one or more target groups from Select one or more groups.

  3. Set the THEN/ELSE values based on target group membership.

  4. Save the configuration.

Target groups provide reusable user segments that can be shared across multiple flags, simplifying management of complex user categorizations.

Add flag dependency rules

Create dependencies where one flag’s behavior affects another:

  1. Select Add new rule and choose Flag.

  2. Configure the flag dependency:

    1. Select the Flag name to depend on.

    2. Choose specific Variants if the dependency flag uses string or number variations.

  3. Set outcomes based on the dependency flag’s current state.

  4. Save the configuration.

Flag dependencies enable coordinated feature releases where related functionality activates together.

Create nested conditions

Combine multiple conditions within single rules for complex targeting logic.

Add nested conditions to existing rules

Enhance rules with additional conditional logic:

  1. Access an existing rule configuration.

  2. Select Add condition within the rule block.

  3. Choose the condition type:

    • Property: Add unlimited additional property conditions.

    • Target group: Add one target group condition per rule.

    • Flag: Add one flag dependency per rule.

  4. Configure the new condition using the same process as basic rules.

Manage rule complexity

Keep nested conditions manageable:

  • Reorder rules: Drag rules using the six-dot handle (⋮⋮) to prioritize evaluation order.

  • Reset configuration: Select Reset to restore the flag configuration to its last saved state.

  • Test rule logic: Verify complex rules work as expected in development environments before production deployment.

Rules evaluate in order from top to bottom, with the first matching condition determining the flag’s behavior.

Configure gradual rollouts (split releases)

Control feature exposure to specific percentages of your user base while maintaining consistent user experiences.

Set up percentage-based rollouts

Configure flags to serve different values to specific user percentages:

  1. Access flag configuration and select Add new rule if adding to existing rules, or configure directly if this is the primary behavior.

  2. Choose Split from the value options.

  3. Configure split percentages:

    • Boolean flags: Adjust the split between True and False values.

    • String/Number flags: Distribute percentages across all defined variations.

  4. Adjust percentages using:

    • Up/down arrow controls for incremental changes.

    • Direct numeric entry for precise values.

      Total percentages must equal 100%. Set variations to 0% to exclude them from the split.
  5. Select Save configuration to apply the split settings.

Maintain user experience consistency

Split releases use algorithmic consistency to ensure users receive the same flag value across sessions:

  • Each flag has a unique seed to prevent statistical bias between flags.

  • The SDK combines the seed with a stickiness property (default: rox.distinct_id) to generate consistent hash values.

  • Users consistently receive the same flag value unless you modify the split percentages.

Best practices for production splits: - Never decrease the True percentage of Boolean flags in production to avoid user experience inconsistencies. - Safely increase percentages to expand feature availability while maintaining existing user experiences. - Test split changes in staging environments before applying to production.

Modify stickiness properties

Customize which user attribute determines split consistency:

  1. Access flag configuration and select the vertical ellipsis icon (⋮) in the upper right.

  2. Select Flag settings.

  3. Choose a Stickiness property from available options:

    • distinct_id (default): Device-specific consistency using UUID.

    • userId: User-specific consistency across devices.

    • account_id: Account-level consistency for all users in an organization.

    • Custom properties: Any defined user property.

  4. Select Save configuration.

Stickiness properties are environment-specific, allowing different consistency behavior across deployment stages.

Configure scheduled releases

Automate feature rollouts at specific dates and times using Boolean flag scheduling.

Set up time-based rollouts

Schedule feature activation for predetermined percentages of users:

  1. Access flag configuration for a Boolean flag.

  2. Choose Scheduled from value options (available in THEN/ELSE sections for conditional rules).

  3. Configure the schedule:

    1. Select or enter the target timezone.

    2. Set initial schedule: defaults to 0% True at current time, 100% True five minutes later.

    3. Modify percentages and timing as needed.

  4. Adjust schedule timing:

    • Date selection: Select date field or calendar icon to choose specific dates.

    • Time selection: Enter times directly or use clock icon for five-minute increment selection.

  5. Add multiple schedule points:

    1. Select Add row to create additional schedule entries.

    2. Each new row defaults to 0% True five minutes after the previous entry.

      Schedule dates and times must occur sequentially - each new entry must be later than the previous one.
  6. Select Save configuration or Save and activate configuration.

Manage scheduled rollouts

Monitor and adjust scheduled releases:

  • Multiple schedules: Configure complex rollout patterns with multiple percentage increases over time.

  • Timezone handling: Ensure schedules account for user location and business requirements.

  • Activation: Enable flag configuration status (On) for schedules to take effect.

Example schedule: Release to 25% of users on Monday, 50% on Wednesday, and 100% on Friday, allowing feedback collection between stages.

Clone configurations between environments

Copy targeting configurations from one environment to another to maintain consistency across deployment stages.

Copy environment configurations

Replicate successful targeting setups across environments:

  1. Select the vertical ellipsis (⋮) next to the flag you want to clone.

  2. Select Environment from the options to clone the configuration for that environment to another environment or environments.

  3. Select Clone configuration.

  4. Select the environment(s) you want to clone to, or select Select all.

  5. Review and modify any environment-specific settings as needed in the target environment.

Validate cloned configurations

Ensure cloned configurations work appropriately in the target environment:

  • Property availability: Verify that custom properties used in rules exist in the target environment.

  • Target group definitions: Confirm target groups are defined consistently across environments.

  • Flag dependencies: Check that dependent flags exist and behave correctly in the target environment.

  • Testing: Validate complex rules work as expected before enabling in production.

Cloning reduces configuration effort while allowing environment-specific customizations for different deployment stages.