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

# Creating a New Dynamic Segment

To create a new dynamic segment, follow these steps:

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

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

3. Enter the following:

* **Group Name**: Specify the name of the segment.
* **Description** (optional): Add a description to help identify the segment.

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

4\. In the **Segment 1** section, select the conditions that contacts must meet:

* Choose whether contacts must meet **all** or **any** of the specified conditions.

5. Configure the criteria:

* **Data Type**: Select the type of data you want to segment by:
  * **Custom Fields**: These are data directly assigned to a contact's profile, which you store in EmailLabs. They can be standard fields (e.g., email address, name, city, tags assigned to the contact) or your own custom-defined fields with additional information (e.g., customer status, last purchase date, preferences – if previously imported or sent via API).
  * **Visits**: These relate to contacts' activity on your website, such as visited subpages or viewed products. To use this type of data, prior integration of a website activity tracking mechanism (web tracking) with EmailLabs is necessary.
  * **Events**: These represent specific occurrences or contact interactions. They can be:
    * **EmailLabs System Events**: Automatically recorded events related to your campaigns sent from EmailLabs, e.g., email open, link click.
    * **Custom Events** (sent via API): Any other events you send to EmailLabs from your external systems (e.g., CRM, e-commerce, loyalty system) using the API. These could be, for example, a purchase made, an abandoned cart, an application login, or achieving a specific status in a loyalty program.
* **Operator**: Select the comparison method (e.g., Equals, Contains, Starts with, Is greater than, etc.), which depends on the chosen data type.
* **Value**: Specify the value to which the contact's data will be compared.
* Add a sub-segment (if required): You can nest conditions by creating sub-segments with their own logic (**and / or**) for more advanced segmentation.

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

Optionally, add another segment to include additional criteria.

6\. Once all criteria are configured, click the **Create** button to save the dynamic segment.
