# MessageFlow Segments

MessageFlow Segments are an advanced tool that allows you to automatically and continuously group contacts based on their attributes, behaviors, and interactions with your campaigns. Unlike static segmentation, a dynamic segment is not a fixed list but a set of rules. The recipient list is regenerated at the moment a campaign is sent, ensuring it is always up-to-date.

{% hint style="warning" %}
**Important Information:** The MessageFlow Segments service, especially its use of Custom Events sent via API, is an **add-on feature** and may be subject to additional charges.
{% endhint %}

## **Key benefits of MessageFlow Segments:**

* **Real-time targeting:** Reach recipients based on their recent actions, such as abandoning a cart or clicking a specific link.
* **Automated recipient group creation:** A once-defined segment will always contain an up-to-date list of contacts who meet the criteria, with no need for manual imports.
* **Advanced personalization:** Create highly precise recipient groups based on complex combinations of declarative and behavioral data.

## How dynamic segments work: data sources

Our segmentation engine can build criteria based on four main data categories:

### **Declarative Data (Contact Fields)**

All standard and custom attributes assigned to a contact's profile, such as `Email`, `MobilePhone`, `FirstName`, `CreateTime`, or custom fields like `Customer_Status`.

### **Website Activity (Visits)**

Data on contacts' interactions with your website where the MessageFlow tracking script is implemented. Examples include the URL of a visited page or the number of visits.

{% hint style="info" %}
*Note: Please confirm the functionality and availability of this feature with our support team or your account manager)*
{% endhint %}

### **MessageFlow System Events**

Events automatically generated by the platform in response to contact interactions with your campaigns, e.g., `MailOpen`, `MailClick`, `SmsClick`.

### **Custom Events (via API)**

The most advanced option, allowing you to send any events from your systems (e.g., CRM, e-commerce) to MessageFlow via a dedicated API. This enables you to segment recipients based on events like `product_purchased`, `plan_upgraded`, or `last_login_date`, along with all the attributes of those events.

## Creation and Configuration

For detailed instructions on creating and configuring dynamic segments, please refer to the [creating-a-new-dynamic-segment](https://docs.messageflow.com/contacts/contact-segmentation/dynamic-segments-messageflow-segments/creating-a-new-dynamic-segment "mention")


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.messageflow.com/advanced-features/messageflow-segments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
