For the complete documentation index, see llms.txt. This page is also available as Markdown.

Creating segments

Learn more about segments in Reflag

What segments are

Segments are reusable audiences built from companies, users, or both together.

You build them from filters such as company lists, user lists, company attributes, user attributes, flag access, and flag metrics.

Use segments when you want to save an audience once and reuse it across multiple flags in access rules.

Create a segment

  1. Open Segments in the sidebar.

  2. Click Add filter +.

  3. Add the conditions for the companies, users, or combined audience you want to include.

  4. Save the segment.

Choose segment conditions

Each segment uses one or more conditions. Add as many conditions as you need.

Condition types

You can build a segment from these condition types:

  • Company attribute — match company data such as plan IS 'pro'

  • User attribute — match user data such as role CONTAINS 'admin'

  • Company list — search by company name or paste company IDs

  • User list — search by user name or paste user IDs

  • Flag access

    • Is enabled

    • Is not enabled

  • Flag metric

    • Track count

    • Exposure count

    • First track

    • Last track

  • Segment

    • In segment

    • Not in segment

Using flag filters to create segments

How conditions work

All conditions in a segment must match.

That means segment conditions work like AND.

You can combine company conditions and user conditions in the same segment.

Common examples

  • Pro customers — Company attribute: plan IS 'pro'

  • Admin users at beta companies — User attribute: role CONTAINS 'admin' and Segment: In segment 'Beta customers'

  • Companies with access to a flag — Flag access: [Flag name] is enabled

Available operators

Operators depend on the condition type:

  • Any

    • Is

    • Is not

    • Has any value

    • Has no value

  • Text

    • Contains

    • Does not contain

  • List

    • Is any of

    • Is not any of

  • Number

    • Less than

    • Greater than

  • Boolean

    • Is true

    • Is false

  • Date

    • Less than X days ago

    • More than X days ago

    • Before date X

    • After date X

  • Flag access

    • Is enabled

    • Is not enabled

  • Segment

    • In segment

    • Not in segment

Save and reuse the segment

After you save a segment, you can reuse it in flag access rules and rollout workflows.

You can create as many segments as you need.

Saving a segment

Last updated

Was this helpful?