> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/members-and-activity/members/segments/creating-segments.md).

# Creating Segments

Learn how to create dynamic or static segments and import a custom member list into a static segment.

Segments let you group members for targeting, reporting, and automation. You can create a **dynamic segment** that updates automatically, or a **static segment** based on an imported CSV file. Dynamic segments built only from custom attribute conditions are [live](/members-and-activity/members/segments.md#how-segments-stay-up-to-date) — they update within seconds.

## Step-by-step instructions

Follow these steps to create a new segment in your Open Loyalty environment:

{% stepper %}
{% step %}
**Open the Segments section**

In the left-hand navigation, go to **Members** and click **Segments**.
{% endstep %}

{% step %}
**Add a new segment**

Click **Add segment** in the top-right corner.
{% endstep %}

{% step %}
**Choose the segment type**

Under **Type**, select one of the two cards:

* **Dynamic segment** — membership updates automatically based on the conditions you define.
* **Static segment** — a fixed list of members imported from a CSV file.
  {% endstep %}

{% step %}
**Fill in the basic settings**

Under **Basic settings**, enter the **Segment name** (required) and, optionally, a **Segment description**.

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-fb6ef7e71b94f70a6446075165f60b0e1e32e7f2%2Fimage.png?alt=media)
{% endstep %}

{% step %}
**Add conditions**

Under **Conditions**, click **Create condition**. A searchable picker opens, grouped into categories such as **Popular conditions**, **Member details**, **Purchase transaction**, **Custom fields** and **Custom event**. Pick a condition.

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-48f7798fa4aef576dbaa4b24851439dc2d906711%2Fimage.png?alt=media)

Fill in the condition's fields and click **Save condition**.

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-e81ccb702870d0cbde2d6a4d7b54d596fd8e4060%2Fimage%20\(903\).png?alt=media)

{% hint style="success" %}
To make a **live segment**, which updates within seconds instead of every 10 minutes, use only the **Members with custom attribute** and **Members with custom attribute value** conditions (under **Member details**). See [How segments stay up to date](/members-and-activity/members/segments.md#how-segments-stay-up-to-date).
{% endhint %}
{% endstep %}

{% step %}
**Set the condition logic**

Conditions are grouped into rules:

* **'OR' Condition** adds another condition to the same rule — a member must meet **at least one** condition in the rule.
* **+ 'AND' Condition** adds another rule — a member must meet **every** rule.

{% hint style="info" %}
Use **AND** when the segment should stay narrow. Use **OR** when it should stay broad.
{% endhint %}
{% endstep %}

{% step %}
**Set the segment status**

Under **Segment status**, switch on **Active**. Members are recalculated only while the segment is active.
{% endstep %}

{% step %}
**Save the segment**

Click **Create segment** to finish.
{% endstep %}
{% endstepper %}

### Import a custom member list into a static segment

Use a static segment when you want to upload a fixed list of members from a CSV file.

{% stepper %}
{% step %}
**Create a static segment**

Start by creating a new segment and selecting **Static segment** as the type.
{% endstep %}

{% step %}
**Start the CSV import**

Open the static segment. On an empty static segment, click **Import .CSV**.

If the segment already has members, its member list is shown with a **Replace members by CSV** button instead. Click it and confirm **Are you sure you want to replace the list?** (all current members are removed) to open the import.

The import supports up to **500,000 customers**.

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-2e8a9dfd261163b87131809191dae5e5c5cdeb4e%2Fimage.png?alt=media)
{% endstep %}

{% step %}
**Select the identification factor**

Choose the value that will identify members in the file.

This must match the data included in your CSV.

![](https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-b7ddfeec3d17e9475c7332957c13392d2c752efc%2Fimage.png?alt=media)
{% endstep %}

{% step %}
**Upload the file**

Import the CSV file using the identification factor selected in the previous step.
{% endstep %}

{% step %}
**Check the import status**

Track the upload under **Admin Panel** → **Imports/Exports**.

The segment usually updates in about **10 minutes**.
{% endstep %}
{% endstepper %}

## Final tips

{% hint style="warning" %}
Uploading a new CSV replaces the current list in the static segment. Include existing members again if you want to keep them.
{% endhint %}

{% hint style="warning" %}
Activate the segment before uploading the CSV file.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.openloyalty.io/members-and-activity/members/segments/creating-segments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
