No results for ""
EXPAND ALL
  • Home
  • API docs

Segment targeting

Read time: 2 minutes
Last edited: Jul 31, 2024

Overview

This topic explains how to control which segments receive a variation of a feature flag.

Target segments

Segments are lists of contexts that you can use to manage flag targeting behavior in bulk. You can target segments to release features to groups of contexts or end users at once.

We recommend using a segment when you want to target the same group of contexts using multiple flags. You can target the segment in each flag, rather than recreating a targeting rule or set of rules for many flags.

To target segments:

  1. From the flag's targeting page, click the + Add rule button, or + between existing rules, and select "Target segments":
The "+ Add rule" menu, with "Target segments" called out.
The "+ Add rule" menu, with "Target segments" called out.
  1. (Optional) Enter a name for the rule.
  2. In the Operator menu, select whether you want contexts in these segments or not in these segments to match the targeting rule.
  3. In the Segments menu, enter or select the segments you want to target.
  4. (Optional) Click the + to add additional clauses to your targeting rule.
  5. In the Rollout field, select the variation to serve, or set a percentage rollout.

Here is an example of a targeting rule for segments:

A targeting rule for segments.
A targeting rule for segments.

To reference this rule when working with other members of your organization, click the link icon to copy a link to this rule.

To learn more, read Segments.