# Create Segment

> Create a segment to group customers who share something in common, such as their language, the pages they visited, a detail your app saves about them, or where they are.

A segment is a group of customers who match the criteria you choose. You can then target that group with campaigns in Engage.

Use cases include:

* Re-engaging customers who haven't opened the app in a while
* Sending localized messages based on the language on the customer's phone
* Reaching customers on a particular plan or loyalty tier
* Promoting a local offer to customers in one country, region or city

### Where to Access

1. Go to the **Twinr Dashboard**.
2. Click the **Segments** icon in the left panel.
3. On the **Segments** page, click **Create segment**.

![The Create segment panel with a segment name and the All or Any choice](https://help.twinr.dev/assets/segment-create-drawer.png)

## Form Fields

**Segment name**

* **Required field**
* Only you see this. Use it to pick the audience in Engage (e.g., _Spanish speakers_).

**Customers that meet All / Any of the following criteria**

* **All** — Customers must match every criterion
* **Any** — Customers can match one or more criteria

**Criteria**

Click **Add criteria** to add a criterion, then click **Select a segment type** to choose what it checks. You can add as many criteria as you need. Once a segment has more than one, each criterion has a remove button.

![The list of segment types](https://help.twinr.dev/assets/segment-criteria-types.png)

## Segment Types

### Device language

The language set on the customer's phone. Useful for sending localized messages.

**Options:**

* **Contains** or **Does not contain**
* Select one or more languages (e.g., `EN`, `FR`, `ES`)

### App session

Customers who opened the app during a period of time. Ideal for re-engagement campaigns or reminders.

**Options:**

* **Before** a date
* **After** a date
* **Between dates**
* **Within last** _X_ days, weeks, months or years
* **Not within last** _X_ days, weeks, months or years

### Last seen

Customers who last opened the app within a range of days. Enter **From (days ago)** and **To (days ago)**; for example, from 7 to 30 days ago reaches customers who haven't opened the app this week but did this month.

### Page visited

A page the customer opened in the app.

**Options:**

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

### Customer detail

A detail your app saves about the customer, like their type or plan. Your website saves these details through the JS Bridge; see [Save details about a person](https://help.twinr.dev/js-bridge/track-events-and-users#save-details-about-a-person).

1. Click **Select a customer detail** and pick one from the list. Each detail shows its type: **Text**, **Number**, **Date** or **Yes/no**.
2. Choose how to compare it. The choices depend on the type:

| Type   | Choices                                                         |
| ------ | --------------------------------------------------------------- |
| Text   | **Equals**, **Does not equal**, **Contains**, **Is set**        |
| Number | **Equals**, **Does not equal**, **Greater than**, **Less than**, **Is set** |
| Date   | **On**, **Not on**, **After**, **Before**, **Is set**           |
| Yes/no | **Is**, **Is not**, **Is set**                                  |

3. Enter the value. For text details, **Common values** suggests values at least 5 customers share as you type, with how many customers have each one.

**Is set** matches customers who have this detail, whatever its value.

![A Customer detail criterion with common values suggested](https://help.twinr.dev/assets/segment-customer-detail.png)

> **Note:** Only details your app has saved appear in the list. If the list is empty, your app hasn't saved any customer details yet.

### Location

The country, region or city where the customer last used the app.

1. Choose **Country**, **Region** or **City**.
2. Choose **Is any of** or **Is none of**.
3. Click **Select countries** (or regions, or cities) and pick one or more places. You can search the list.

Each customer's latest location is used. The lists show only places where at least 5 customers are. Customers whose location isn't known match **Is none of**.

> **Note:** Location is estimated from the customer's internet address, so it's approximate. Someone using a VPN may appear somewhere else.

## Audience Size

While you build a segment, the **Audience size** panel at the bottom shows how many customers match it and how many of them can get push notifications. It updates as you edit.

![A Location criterion for India with the audience size below](https://help.twinr.dev/assets/segment-location-audience.png)

Once all inputs are added, click **Create segment** to save the segment.

> 🎉 You'll now see the new segment listed on the Segments page and available for targeting in Engage.

Source: https://help.twinr.dev/user-segments/create-segment
