> For the complete documentation index, see [llms.txt](https://help.twinr.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.twinr.dev/segmentation/create-segment.md).

# Create Segment

These segments help you personalize push notifications, in-app messages, and analytics reporting. You can use conditions like device language, app sessions, and page visits to filter your audience with flexible **AND**/**OR** logic.

Use cases include:

* Targeting cart abandoners
* Re-engaging users inactive for X days
* Sending localized messages based on user language
* Notifying users who visited a specific page before a sale

### Where to Access

To create a user segment:

1. Go to the **Twinr Dashboard**.
2. Click on the **User Segment** icon from the left panel.
3. On the **Segments** page, click **➕ Create Segment**.

### Create Segment Interface

You’ll now see the **Create Segment** form.

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

## Form Fields

**Customer Segment Name**

* **Required field**
* Enter a descriptive name (e.g., *Cart Abandoners - English*)

**Match Logic Dropdown**

* You can choose between:
  * **ALL** — All criteria must match (**MUST HAVE**)
  * **ANY** — At least one condition must match (**MAY HAVE**)

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

### Criteria Types

Click on **“Select a segment type”** to choose from 3 available types:

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

### Device Language

Target users based on the default language set on their device. This is useful for sending localized or language-specific push notifications.

**Example Use Cases:**

* Send French-only promos to users with **language = FR**
* Notify English and Spanish users about a multi-language feature

**Options:**

* **Contains / Not Contain**
* Select one or more languages (e.g., `EN`, `FR`, `ES`, etc.)

### App Sessions

Target users based on when they were active in your app. This is ideal for re-engagement campaigns or last-minute reminders.

**Example Use Cases:**

* Reach users who haven't opened the app in the **last 7 days**
* Send alerts to users who **visited before a specific campaign date**

**Options:**

* **Before** a specific date
* **After** a specific date
* **Between** two dates
* **Within last** *X* days
* **Not within last** *X* days

### Page Visited

Target users who have (or haven’t) visited a specific page or section within your app. You can match exact paths or flexible patterns.

**Example Use Cases:**

* Notify users who visited `/shop` but didn’t purchase
* Promote a collection to users who viewed `/summer-sale`

**Options:**

* **Visited** or **Not Visited**
* Match Type:
  * **Equals** (exact match)
  * **Contains** (any part of the path)
  * **Starts With** (prefix)
  * **Ends With** (suffix)
* Enter any valid app page URL path (e.g., `/cart`, `/product/123`)

Once all inputs are added click the **+ Create Segment** button to save the segment.

> 🎉 You’ll now see the new segment listed in the Segments dashboard and available for Push Notification targeting.
