> 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

The Create Segment feature allows you to define and target specific groups of users based on their behavior, session activity, and device preferences.

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="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2FgNNNJ5xOoAGXDLQeT2g9%2FScreenshot%202025-08-01%20at%202.07.03%E2%80%AFPM.png?alt=media&amp;token=4c1396bd-7d4d-4cf6-907b-ac6ef1017627" 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="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2FjQLnmQRnvIJbG5vtEKk3%2FScreenshot%202025-08-01%20at%202.40.06%E2%80%AFPM.png?alt=media&amp;token=9549c432-55b1-4ca3-ab7f-0169aaef8c8f" alt=""><figcaption></figcaption></figure>

### Criteria Types

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

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2FJl5zWL4SiQBvU8LU8nmV%2FScreenshot%202025-08-01%20at%202.38.32%E2%80%AFPM.png?alt=media&amp;token=e9f19cb1-1499-4b9a-b937-716b66d0893d" 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.
