> ## Documentation Index
> Fetch the complete documentation index at: https://moengage-unity-sdk-initialization-split.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Types of Segments

> Explore all segment types in MoEngage: file, rule-based, affinity, custom, RFM, and warehouse segments — with links to detailed setup guides.

MoEngage provides several segment types to cover different use cases and data sources. Each type is suited to a particular kind of audience-building scenario.

## File Segment

A file segment is a static list of users uploaded as a CSV file. Use this when you have a fixed list of users that you want to target — for example, users migrated from another platform or a list from an offline database.

[Learn how to create File Segments.](/user-guide/segment/segment-operations/file-segments)

## Rule-Based (Filter) Segment

A rule-based segment is defined by conditions applied to user attributes, events, and event attributes. MoEngage evaluates these rules against your data to produce a dynamic group of users. The segment membership updates as user data changes.

[Learn how to create Rule-Based Segments.](/user-guide/segment/segment-operations/rule-based-filter-segments)

## Affinity Segment

An affinity segment targets users based on behavioral patterns and preferences within your app — for example, users who predominantly listen to a specific music genre, or users who book rides between certain hours at least 40% of the time.

[Learn how to create Affinity Segments.](/user-guide/segment/segment-operations/affinity-segments)

## Custom Segment

A custom segment is a saved and named segment query that can be reused across multiple campaigns, flows, and analytics pages. Custom segments can combine file segments, rule-based segments, and other custom segments.

[Learn how to create and manage Segments.](/user-guide/segment/segment-operations/manage-segments)

## RFM Segment

RFM (Recency, Frequency, Monetary) segments automatically group users by their transaction behavior — how recently they engaged, how often, and how much they spent. MoEngage generates RFM segments automatically once you configure the model, placing users into buckets such as Loyal, Promising, At Risk, and others.

[Learn how to use RFM Segments.](/user-guide/segment/segment-operations/rfm-segments)

## Warehouse Segment

A warehouse segment lets you build an audience directly from your data warehouse — BigQuery, Snowflake, or Redshift — without copying data into MoEngage. Use this when your segmentation logic depends on proprietary scores or data that lives exclusively in your warehouse.

<Note>
  Warehouse Segments do not require an SDK or API integration with MoEngage. If you have not yet integrated the MoEngage SDK, Warehouse Segments are a way to start creating audiences immediately.
</Note>

[Learn how to create Warehouse Segments.](/user-guide/segment/segment-operations/warehouse-segments)

## Segment Processing

Segmentation computation timing varies by campaign type.

**One-time and periodic campaigns**: Segment membership is computed at the scheduled execution time, in seconds.

**Event-triggered campaigns**: Segment membership can be defined in three layers:

### Trigger Criteria

This layer qualifies users in real time based on their actions or inaction. You can include use cases like cart abandonment directly in the trigger criteria.

### User Properties

User property evaluation for segment membership in event-triggered campaigns happens in real time.

### Past Behavior Segmentation

#### Real-Time Segment Evaluation

Segments using data within the last 30 days — user attributes, user events, event attributes, and event duration — are evaluated in real time. This is available for Push, Email, SMS, WhatsApp (all event-triggered), In-Apps, On-Site Messaging, Personalize, and Flows.

#### Precomputed Segments

For historical event data beyond 30 days, MoEngage uses precomputed segments. Segment membership is calculated ahead of time (from 30 minutes to a few hours, depending on configuration), giving users a real-time experience at the moment of the event trigger.
