> For the complete documentation index, see [llms.txt](https://docs.messageflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.messageflow.com/contacts/contact-segmentation/dynamic-segments-messageflow-segments/creating-a-new-dynamic-segment.md).

# Creating a new dynamic segment

1. Go to the **Contacts -> MessageFlow Segments** tab.
2. Click the **+ New dynamic segment** button in the upper right corner.

<figure><img src="/files/NcasnjEii4L009bdmRxr" alt=""><figcaption></figcaption></figure>

4. **Basic Information:**

* **Group name:** Enter a unique and easily identifiable name for your segment (required field).
* **Description:** Add an optional description to clarify the segment's purpose.

<figure><img src="/files/4dTLO7bN6qHZVkE6Lp9T" alt=""><figcaption></figcaption></figure>

4. **Condition Configuration:**

* **Logic within a condition group:** Within a single group (e.g., "Segment 1"), decide whether contacts must meet **all** of the defined conditions or **any** of them.
* **Defining a single condition:**
  * **Data type:** Choose the data source for the condition. \
    (Check [MessageFlow Segments](/advanced-features/messageflow-segments.md#how-dynamic-segments-work-data-sources)).
  * **Operator:** Select a logical operator (e.g., Equals, Contains, Before). The available operators depend on the selected data type.
  * **Value:** Enter the value to compare against.

<figure><img src="/files/wewjKeasadNJEY0TYKdb" alt=""><figcaption></figcaption></figure>

* **Adding more condition groups:** You can add more independent condition groups (e.g., subsegment or "Segment 2") and connect them to the first group using **and** / **or** logic.

<figure><img src="/files/L2xJ0oukSzTaIZSmk3rq" alt=""><figcaption></figcaption></figure>

5. After configuring all conditions, click **Create** to save the dynamic segment definition.

### **Using Dynamic Segments**

* **For panel campaigns only:** Defined dynamic segments can only be used as target groups for campaigns (email, SMS, push) created and sent from the MessageFlow panel.
* **On-the-fly generation:** The actual list of contacts meeting the segment's criteria is dynamically generated the moment you select the segment as the target for a campaign and initiate the send.
* **No API access:** It is not possible to retrieve the list of contacts belonging to a dynamic segment via the API to target campaigns initiated from external systems.

### **Detailed Segmentation Operators**

Below is a list of available operators for each data type.

* **Custom Fields (contact attributes):**
  * **Text:** `equals`, `is not equal to`,  `starts with`, `ends with`, `contains`, `doesn't contain`, `has no value`.
  * **Number:** `=`, `>`, `<`, `between`, `has no value`.
  * **Date:** `equals`, `not equals`, `is not equal to`, `before`, `after`, `between`,`has no value`.
  * **Boolean (true/false):** `is true`, `is false`, `has no value`.
* **Website Visits:** *(Note: Please confirm the specific criteria with our support team).*
* **System Events:**
  * **Event occurred:** `PushClick`, `MailClick`, `SmsClick`, `MailOpen`.
  * **Event did not occur:** `PushClick`, `MailClick`, `SmsClick`, `MailOpen`.
* **Custom Events (API):** *(Note: The available criteria depend on the events and their attributes you send. Please confirm the details with our support team).*
