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

Segment targeting

Read time: 2 minutes
Last edited: Nov 13, 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 tab, 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.
  6. (Optional) Click + Add rollout to create a progressive rollout or guarded rollout for this rule.
  7. Click Review and save.

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 three-dot overflow menu and choose Copy link to rule.

To learn more, read Segments.