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

Creating segments

Read time: 3 minutes
Last edited: Oct 03, 2024

Overview

This topic explains how to create rule-based, smaller list-based, larger list-based, and synced segments. To learn about the differences between these, read Segment types.

Create rule-based and smaller list-based segments

To create a new rule-based or smaller list-based segment:

  1. Navigate to the Segments list.
  2. Click Create segment. The "Create a segment" dialog appears.
  • If you're on an Enterprise plan, choose Rule based-segments or List-based segments.
  • If you're on a Developer or Foundation plan, or on an older Pro plan, continue entering the segment's details.
  1. Give your segment a human-readable Name.
  2. Enter a Key for your segment. This field auto-populates based on the segment name, but you can change it if you like.
  3. (Optional) Add a Description.
  4. (Optional) Select or create Tags. Tags help you identify segments used by different teams or for different purposes within your organization.
  5. If you chose List-based segments in step 2, under "How many individual targets will be in your list?" select 15,000 or fewer:
A portion of the "Create a segment" dialog, showing a question about the size of the list-based segment.
A portion of the "Create a segment" dialog, showing a question about the size of the list-based segment.
  1. Click Save segment. The segment's Targeting tab appears.

After you create the segment, you can add contexts in the following ways:

Create larger list-based segments

Before you create a larger list-based segment, you must create a comma-separated values (CSV) file containing the list of context keys you wish to include.

The CSV file has the following requirements:

  • All of the contexts in the CSV file must be of the same context kind.
  • The context keys must be in the first column of the CSV file.
  • The CSV file must not contain a header row.
  • The CSV file must not exceed 40MB in size.
  • The CSV file must not contain more than 1 million contexts.
    • If you want to add more than 1 million contexts, you can use the "Merge" option with multiple sequential file uploads. To learn more, read Segments with existing contexts.
    • You must upload multiple CSV files one at a time, as you cannot perform concurrent imports within a single environment.

To create a new larger list-based segment:

  1. Navigate to the Segments list.
  2. Click Create segment. The "Create a segment" dialog appears.
The "Select a segment kind" step of the "Create a new segment" dialog
The "Select a segment kind" step of the "Create a new segment" dialog
  1. In the "Select a segment kind" step, choose List-based segments. The "Enter segment details" step appears.
  2. Give your segment a human-readable Name.
  3. Enter a Key for your segment. This field auto-populates based on the segment name, but you can change it if you like.
  4. (Optional) Add a Description.
  5. (Optional) Select or create Tags. Tags help you identify segments used by different teams or for different purposes within your organization.
  6. Under "How many individual targets will be in your list?", select "More than 15,000":
A portion of the "Create a segment" dialog, showing a question about the size of the list-based segment.
A portion of the "Create a segment" dialog, showing a question about the size of the list-based segment.
  1. Select the Context kind from the menu.
  2. Click Save segment. The segment's Targeting tab and the "Upload CSV" dialog appear.
  3. In the "Upload CSV" dialog, click Select file to browse for a CSV file that lists context keys for the selected context kind in its first column.
  4. Click Upload file.

The import process begins in the background. When the import completes successfully, you receive an email notification. Depending on the number of contexts in the CSV, this may take several minutes or hours.

Alternatively, you can click Cancel from the "Upload CSV" dialog and upload your CSV at a later time.

You can also use the REST API: Create big segment import

Create synced segments

To learn how to create synced segments, read Segments synced from external tools.