> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paylead.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# Segments

> Everything you do with audience Segments in Shift: request one from Paylead, assign Consumers to it, check membership, and target an Offer at it.

export const RequiredRoles = ({roles}) => <Note>
    <strong>Required Shift role:</strong> {roles}. See <a href="/program/shift/access-and-roles">Users management</a> for the full role matrix.
  </Note>;

<RequiredRoles roles="Consumer support, Offers" />

Assigning Consumers to a Segment happens in the **Segments** section and needs **Consumer support**. Targeting an Offer at a Segment happens in the Offers section and needs **Offers**.

A [Segment](/glossary#segment) is a group of [Consumers](/glossary#consumer) defined by criteria you established. You use Segments to target your [Offers](/glossary#offer) at a specific audience instead of your whole Consumer base. A single Consumer can belong to several Segments at once.

Segments are what you reach for when an Offer should not go to everyone: a welcome Offer for Consumers who joined this quarter, a win-back Offer for dormant accounts, a premium rate reserved for one customer tier. Without a Segment, every published Offer is visible to your whole Consumer base.

## Create a Segment

Paylead creates the Segments of your [Program](/glossary#program). Ask for one from the **Support** button in Shift, with the audience you want to define, and the Segment appears in **My account** > **Segments**, one row per Segment.

A Segment carries only a name and an identifier. The criteria behind it stay in your systems, so defining an audience shares no personal data with Paylead.

That list is where you read the values you need:

| Column | What it is | Where you use it |
| - | - | - |
| **ID** | The Segment's identifier, the `slug` of the assignment file. | The second field of every line in the CSV below. |
| **Name** | The readable label. | The entry you pick in the **Segments** field when publishing an Offer. |
| **Consumers** | How many Consumers the Segment currently holds. | A quick check that an import landed. |

The last column of each row holds **⬇ Download the list**, which exports the Segment's members as a CSV. See [Download a Segment's members](#download-a-segments-members).

## Assign Consumers to a Segment

You populate a Segment by uploading a CSV file.

<Steps>
  <Step title="Open the import modal">
    In **My account** > **Segments**, click **Assign consumers**.
  </Step>

  <Step title="Prepare your CSV file">
    Create a text file that starts with the header line `consumer_id;slug`, then holds one line per Consumer assignment. Each line holds two fields separated by a semicolon, in this order: the Consumer ID, then the Segment ID. For example:

    ```csv theme={null}
    consumer_id;slug
    consumer-001;standard-users
    consumer-002;premium-users
    consumer-001;winter-promo
    ```

    The same Consumer (here `consumer-001`) can appear on several lines to join several Segments. The modal shows this template, and **⬇ Download the .csv template** gives you a ready-made file to fill in.

    A file without the header line is still processed: Shift shows a warning and imports it anyway.

    You build the left column from your own customer base, with the same [Consumer](/glossary#consumer) IDs your bank passed to Paylead. The right column is the **ID** column of the Segments list.
  </Step>

  <Step title="Upload the file">
    In the modal, click **Select a file** and choose your CSV file. Shift checks the file in the browser and, if every line passes, uploads it straight away, with no confirmation step.

    If any line fails the check, nothing is uploaded: the modal lists the offending lines and offers **Close** to abandon the import, or **Start again** to pick another file.
  </Step>

  <Step title="Follow the import">
    The import runs in the background. Open the **Imports tracking** tab, next to **Segments**, to follow it. See [Track an import](#track-an-import).
  </Step>
</Steps>

The import resynchronizes a Consumer's whole membership rather than adding to it: the lines you upload for a Consumer become their complete list of Segments. To drop one Segment while keeping the others, list the Segments to keep and omit the one to remove. To remove a Consumer from every Segment at once, add a line with the Consumer ID followed by a semicolon and no Segment ID:

```csv theme={null}
consumer-001;
```

<Warning>
  A removal applies as soon as the file passes the format check, and it cannot be undone. Re-read a removal file before you select it, and keep the assignment file that rebuilt the membership.
</Warning>

<Tip>
  For real-time programmatic assignment instead of a manual upload, use the public API. See the [Consumer lifecycle](/program/user-journey/guides/manage-consumers) guide.
</Tip>

## Track an import

The **Imports tracking** tab lists the imports triggered over the last 24 hours, one row per file. It refreshes on its own while an import is still running; **Refresh** reloads it on demand, and the time of the last refresh sits beside that button. **Assign consumers** is also available here.

| Column | What it shows |
| - | - |
| **Import** | The import's identifier. |
| **Status** | `Waiting`, `Running`, `Done`, or `Failed`. |
| **Triggered** | When the file was uploaded. |
| **Completed** | When the import finished. Empty while it runs. |
| **Result** | The number of lines imported (`ok`) and rejected (`KO`), plus the error message of a failed import. |
| **Report** | **⬇ Report** downloads the detailed report of the import, as a JSON file. |

Open the report when **Result** shows `KO` lines, then upload a corrected file.

## Download a Segment's members

In the Segments list, click **⬇ Download the list** on a Segment's row. Shift downloads a CSV of the Consumers in that Segment, named `<segment ID>_consumers.csv`. A large Segment is prepared in the background: Shift tells you so, and the file downloads once it is ready.

## Check a Consumer's Segments

A Consumer's Segment membership is shown on their profile. In the [Consumers](/program/shift/browse-consumers) section, open a Consumer and read the **Segments** box in the Consumer details: it lists every Segment that Consumer currently belongs to, up to 10 before the list folds.

The box is hidden when the Consumer belongs to no Segment, and when Segments are not enabled on your Program.

To audit a Segment's full membership, [download its members](#download-a-segments-members).

## Target an Offer at a Segment

Segments are applied when you publish an Offer. In the Offer configuration window, the **Segments** field appears when Segments are enabled on your Program, and stays greyed out until Paylead has created your first one. You pick Segments by **Name**, and you can pick several.

Next to the field sits a counter of two numbers separated by a slash, tooltipped **Audience**. It refreshes every time you change the selection:

* The **left** number is how many Consumers the Offer would reach with the Segments currently selected.
* The **right** number is the audience the Campaign reaches with no Segment filter at all.

So `0 / 4,571` means your selection matches none of the 4,571 Consumers the Campaign could otherwise reach, and publishing as-is would show the Offer to nobody.

On a Voucher Offer, the **Segments** field has no counter. See [Publish an Offer](/program/shift/publish-offers) for that form.

See [Publish an Offer](/program/shift/publish-offers) for the full Offer configuration flow, including how the Segment field fits into the other Offer settings.

## What's next

<CardGroup cols={2}>
  <Card title="Publish an Offer" icon="tag" href="/program/shift/publish-offers">
    Create a Consumer-facing Offer from a Campaign and target it at a Segment.
  </Card>

  <Card title="Brands" icon="store" href="/program/shift/brands">
    Look up the details of the Brands in your catalog.
  </Card>
</CardGroup>
