Skip to content
FlagSwiftDocs

Segments

Build reusable groups of people, accounts and devices to target with flags.

What this page is for#

A segment is a named audience such as beta testers or enterprise accounts. Add a segment to a flag's targeting and everyone in it gets the flag. Change the segment once and every flag that uses it follows.

In the console it lives at /segments. You see it in the sidebar when your role has segments.read.

What you can do#

  • Create a segment

    Set a name, a key and a description, then list users, accounts and devices, one per line.

  • Add rules

    A person is in the segment when they match any rule, and every condition inside a rule must hold.

  • Include other segments

    Tick other segments so everyone in them is also in this one.

  • Choose a scope

    A new segment belongs to the whole organization by default, so flags in any project can use it. Choose One project and pick a project to limit it to that project's flags. The list shows each segment's scope, and the scope filter narrows it.

  • Sort the list

    Click the Name, Key, Scope, Members, Rules, Used in or Updated header to sort; click again to reverse, and a third time to clear the sort.

  • Edit or delete

    Each row shows its member counts and how many flags use it (the Used in column), with edit and delete buttons. An edit updates every project whose flags use the segment.

Good to know#

  • Create, edit and delete need segments.create, segments.update and segments.delete.
  • Flags refer to a segment by key, so the key cannot be changed after creation.
  • A segment that is used by a flag or another segment cannot be deleted. Remove it from them first.
  • The scope is fixed when the segment is created and cannot be changed. An organization-wide segment can include only organization-wide segments. A project segment is deleted with its project.