Core conceptsFeature flags and activation strategies
A segment is a reusable collection of strategy constraints. Feature flags have one or more activation strategies that define how and when a feature is shown, for example, to a percentage of users, to a specific group, or only in certain environments.
Segments make these strategies easier to manage. Instead of repeating the same rules in multiple places, you can define a segment once and reuse it across any number of feature flags or release templates.
Segments let you describe groups of users or contexts. You can use them to define conditions such as users in a specific country or region, users on mobile devices, or internal users or testers.
Segments stay in sync across activation strategies and any updates propagate automatically to all strategies that use them. This makes them ideal for grouping larger releases together, for example, enabling or disabling a collection of flags at the same time using time-based constraints.
All constraints in a segment must match for the segment to evaluate to true.
If an activation strategy includes both segments and individual constraints, all of them must evaluate to true for the strategy to activate.
An empty segment always evaluates to true. Use caution when creating or applying segments that don’t include any constraints, as you may unintentionally enable a feature for all users.
Before you begin, make sure you have permissions to manage segments in your project. If your project requires change requests, your changes to segments need to go through the same approval process before they go live.
To create a segment:
userId, appName, region) or create a new one.is one of or starts with).
To use a segment in a feature flag’s activation strategy:
You can also add segments to strategies defined inside release templates.
You can only delete a segment that isn’t in use. Open the segment and check Used in to see which flags and strategies reference it.
If a segment is referenced in an open change requests, first edit, apply, or reject that change request.
If a segment is used by an archived feature flag, you can still delete it. Deleting the segment removes it from the archived flag’s strategies.
Before you begin, make sure you that have permissions to manage segments in your project. If your project requires change requests, deleting segments also need to go through the same approval process.
To delete a segment:
0 projects and 0 feature flags.Segments are powerful but can become complex. Each constraint and value in a segment adds data that must be stored, synced, and evaluated at runtime. Keeping segments a manageable size ensures that evaluations stay lightweight and that your SDKs can respond instantly—even at scale.
The combined number of values across all constraints in a single segment is limited by your plan:
You can attach up to five segments to a single activation strategy. This limit applies per strategy, not per feature flag. If a flag includes two strategies, each one can have up to five segments.
If you’re self-hosting, you can configure segment limits with environment variables.
Segments follow the same performance principles as individual constraints. When targeting large audiences or using many values, keep payloads small and rely on higher-level attributes instead of long inclusion lists. For practical guidance on optimizing performance, see Using Unleash with large constraints.