> For the complete documentation index, see [llms.txt](https://upgrade-platform.gitbook.io/upgrade-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://upgrade-platform.gitbook.io/upgrade-documentation/6.6/working-with-segments.md).

# Working with Segments

## Overview

Segments are a way to create reusable lists of users and group for inclusion or exclusion in experiments and feature flags. A segment consists of one or more **lists** which can each be of one of three types:

* individual - a list of user ids
* group - a list of group ids (for a specific group type)
* segment - another already-defined segment

## Create a segment

To create a new segment click on the 'Add Segment' button. You'll supply a name, an optional description, an app context from available contexts, and optional tags. These values can be edited later.

<figure><img src="https://content.gitbook.com/content/9J1rtgIsHaRPXmHp08EB/blobs/DNjrIJYTp4VuretpozHe/Screenshot%202025-05-29%20at%204.34.11%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

When you hit 'Create' a new segment will be created, with an empty '**Lists**' list.

<figure><img src="https://content.gitbook.com/content/9J1rtgIsHaRPXmHp08EB/blobs/aenp6Gpn9kR94SU2feQ3/Screenshot%202025-05-29%20at%204.36.56%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

## Add lists

When you click 'Add List' you'll need to choose the list type.

<figure><img src="https://content.gitbook.com/content/9J1rtgIsHaRPXmHp08EB/blobs/61LTWMZg9kuzU7KUujkJ/Screenshot%202025-05-29%20at%204.44.12%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

For type 'Segment', you'll choose one from a list of available segments that have already been created in your segment's context. Adding a list of type 'Segment' will include all the users and groups (and segments) in the selected segment's lists.

For type 'individual' or any of the 'Group:...' types, you'll add the ids to be included in the 'values' field - either by typing them in individually or uploading a csv file.

<figure><img src="https://content.gitbook.com/content/9J1rtgIsHaRPXmHp08EB/blobs/hk79rZElgw1gr5iiUoSJ/Screenshot%202025-05-29%20at%204.52.26%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

This lists now appear on the segment's page, from which you can edit/view/delete them. You can also import and export lists (json format),

<figure><img src="https://content.gitbook.com/content/9J1rtgIsHaRPXmHp08EB/blobs/45YyorEF6CriYq3h8lc0/Screenshot%202025-05-29%20at%205.17.11%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

and perform similar actions for the entire segment.

<figure><img src="https://content.gitbook.com/content/9J1rtgIsHaRPXmHp08EB/blobs/xW45Y5G2mWt3Ekv7tc4M/Screenshot%202025-05-29%20at%205.03.00%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

## Using Segments

To use a segment for inclusion in, or exclusion from, a feature flag or experiment, see the instructions for adding inclusions and exclusions of type 'segment' in [Creating an Experiment](/upgrade-documentation/6.6/creating-an-experiment/inclusion-and-exclusion.md) or [Creating a Feature Flag](/upgrade-documentation/6.6/creating-a-feature-flag.md).&#x20;

When a segment is used in any experiments or feature flags, those usages will show up in the 'Used By' tab of the segment's page.

<figure><img src="https://content.gitbook.com/content/9J1rtgIsHaRPXmHp08EB/blobs/XxAjY1bReeDX8URiDDw7/Screenshot%202025-05-29%20at%205.12.22%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>
