Segments
Reusable user groups for targeting
Segments are named groups of users defined by targeting rules. Instead of repeating complex conditions across multiple flags, define them once as a segment.
Why Segments?
Without segments, you repeat rules everywhere:
With segments:
Update the segment once, all flags update.
Common Segments
Internal Users
Beta Testers
Enterprise Customers
Nordic Region
Creating Segments
- Navigate to Segments in your project
- Click Create Segment
- Give it a key (e.g.,
beta-users) - Define the conditions
- Save
Using Segments in Rules
In the flag rule editor, add a condition:
You can combine segment checks with other conditions:
Segment Scope
Segments are scoped to a project. If you need the same segment in multiple projects, create it in each project.
Evaluation
When a flag rule references a segment, Flipswitch:
- Loads the segment's conditions
- Evaluates them against the user's context
- Returns true if the user matches, false otherwise
This happens server-side during flag evaluation. No extra API calls needed.