Skip to main content

Segments

What is a Segment

A segment is a group of users that share certain characteristics. In the context of feature flags, a segment can be used to determine which group of users should have access to a particular feature or version of a feature.

Segment Rules

Segments are created by defining a set of rules that use an attribute, an operation, and a value.

These rules are used to determine which users belong to a particular segment.

For example, let's say you have a rule that says:

"Users whose 'location' attribute starts with 'US' belong to the segment 'US users'."

In this example, the attribute is "location", the operation is "starts with" and the value is "US". If a user's location attribute is "US-New York", they would be considered part of the 'US users' segment.

String Rules

String rules are rules where the atribute is a string. The available operations for string rules are:

  • Equals
  • Not equals
  • Contains
  • Starts with
  • Ends with

Number rules

Number rules are rules where the atribute is a number. The available operations for number rules are:

  • (less than) <
  • (Less or equal than) <=
  • (Equal) =
  • (Not equal) !=
  • (Greather or equal than) >=
  • (Greather than) >