Once you create a feature flag, you can define treatments, individually target users for certain treatments, and manage your targeting rules. This allows you to roll out features for internal testing, betas, or limiting exposure within your production environment.
To define your treatments, do the following:
- From the left navigation, click Feature flags. The feature flag list view appears. You can either:
- Click the Create feature flag button to create a new feature flag.
- Select an already created flag.
- The following page appears:
Note: If you already have rules set up, those appear on the Definitions tab automatically.
From here, fill in the following fields.
Setting up treatments
In the Treatments area, do the following:
- Enter the name of each treatment and optionally enter a description.
- Optionally, click Add treatment to add additional treatments.
- Select the treatment that is served to everyone if the feature flag is killed and to all traffic not exposed to this feature flag. This is also known as the default treatment.
Setting up dynamic configuration
In the Dynamic configuration area, optionally define custom JSON or Key-value pairs to dynamically configure components of your feature.
Setting up targeting
In the Target area, you can do the following:
In the Individual targets area, click the Add new individual target button to assign the desired individual users or segments (e.g., a QA team, internal team, or a limited beta) to a selected treatment. There is a 500 key limit so we suggest creating a segment if there is a need to individually target a large amount of keys.
In the Targeting rules area, you can:
- Limit the exposure to traffic to customers by selecting a percentage of traffic that goes through the targeting rules. These are the customers exposed to the experiment. Those not exposed get the default treatment.
- Target specific subsets of your customers based on a specific attribute (e.g., location or last-login date). These subsets are placed in specific treatments or, based on the percentages you select, we take these subsets and randomly distribute customers within each subset between your treatments.
In addition, you can serve treatments to customers who aren’t assigned a treatment in the sections above. The Serve selection either places customers into a treatment or randomly distributes them between your treatments or variations based on percentages you decide.
Setting the alert baseline treatment
In the Set alert baseline treatment area, select a baseline treatment that is used for your alert policies. The alert baseline treatment is always defined for any feature flag in the targeting rule.
Rules evaluation order
The rules are evaluated in the following order:
- The first evaluation is against the individual target section. Customers and segments listed in this section receive the specified treatment.
- The second evaluation is against the traffic allocation. If limit exposure is set to 100%, we continue to the targeting rules section. If limit exposure less than 100%, we allocate a percentage of your traffic to the default treatment selected in the user interface or into the targeting rules and default rule.
- The third evaluation is against the targeting rules. The conditions are structured as layered if/else statements and are meant to be readable in nature. They are evaluated in order and when a condition is met, the evaluation stops.
- The fourth evaluation is against the default rule. The remaining traffic is allocated based on the distribution set in the default rule.