> For the complete documentation index, see [llms.txt](https://help.usejimo.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.usejimo.com/docs/analyze/users-and-segments/audience/segments/create-a-segment.md).

# Create a segment

**Dashboard path:** [Users & Segments > Audience > Segments](https://i.usejimo.com/segments) > **+ New Segment**

***

## Create a segment

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

Click **+ New Segment** in the top-right corner of the Segments page to open the creation screen.

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

{% hint style="info" %}
**You build first, you name it last.** Unlike most creation flows, the name, description and icon are not asked upfront: they come in a modal when you hit **Save**. Start from the audience you want, not from the label.
{% endhint %}

***

### The condition builder

The builder lets you define any audience from your user data. It is the exact same tool used on the [Users tab filter](https://help.usejimo.com/docs/analyze/users-and-segments/users#filtering-the-user-list) or in the [Who section](/docs/publish/target-right-people-who.md#specific-users-recommended) to target a specific audience on the fly.

**+ Add** offers two things, and the difference is the whole model.

* **Add a rule**: one condition. An attribute, an operator, a value.
* **Add a group**: a container holding several conditions, combined together, that then combines with the rest.

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

#### Available categories

The builder exposes up to **9 condition categories**, but not all appear by default. Some are **dynamic**: they only show up when at least one attribute or event of that category exists in your project.

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

{% tabs %}
{% tab title="Always visible" %}

| Category                                                          | What it covers                                                                          |
| ----------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| <mark style="background-color:$warning;">**From Jimo SDK**</mark> | Native Jimo attributes fields: Name, Email, Last activity, Created, Sessions, Tags      |
| <mark style="background-color:orange;">**User Segments**</mark>   | Nested segments: allow dependencies, unions and intersections between existing segments |
| <mark style="background-color:cyan;">**Experiences**</mark>       | User interactions with Jimo experiences (seen, completed, answered with…)               |
| {% endtab %}                                                      |                                                                                         |

{% tab title="Visible when data exists" %}

| Category                                                               | Appears when                                                                                                                                                            |
| ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="background-color:$danger;">**Custom Attributes**</mark>   | At least one [custom attribute](/docs/analyze/users-and-segments/data-management/attributes/create-a-custom-attribute.md) has been pushed via the SDK or an integration |
| <mark style="background-color:$success;">**No-code Events**</mark>     | At least one [no-code event](/docs/analyze/success-tracker/events.md) or Jimo native event has been logged                                                              |
| <mark style="background-color:pink;">**Tags**</mark>                   | At least one [tag](/docs/analyze/users-and-segments/data-management/tags.md) has been created                                                                           |
| <mark style="background-color:purple;">**Segment.io Traits**</mark>    | [Segment.io integration](https://help.usejimo.com/docs/integrations/segment.io) is connected and has sent identify traits                                               |
| <mark style="background-color:violet;">**Segment.io Events**</mark>    | [Segment.io integration](https://help.usejimo.com/docs/integrations/segment.io) is connected and has sent track events                                                  |
| <mark style="background-color:$warning;">**Hubspot attributes**</mark> | [Hubspot integration](/docs/integrations/hubspot.md) synchronized custom attributes                                                                                     |
| <mark style="background-color:red;">**Posthog events**</mark>          | [Posthog integration](https://help.usejimo.com/docs/integrations/posthog) is connected and has sent events                                                              |
| <mark style="background-color:blue;">**Mixpanel events**</mark>        | [Mixpanel integration](/docs/integrations/mixpanel.md) is connected and has sent events                                                                                 |
| <mark style="background-color:$info;">**Jimo API events**</mark>       | At least one event has been ingested via Jimo's [server-side API](/docs/integrations/server-side-events.md)                                                             |
| {% endtab %}                                                           |                                                                                                                                                                         |
| {% endtabs %}                                                          |                                                                                                                                                                         |

{% hint style="warning" %}
On a fresh project, only Attributes and Experiences are usable out of the box. Custom Attributes and Events unlock the real segmentation power — push them early via the [SDK](https://help.usejimo.com/docs/for-developers/for-developers/sdk-guides/setup-the-segmentation) or [integrations](https://help.usejimo.com/docs/integrations/integration-setup) to expand what you can target.
{% endhint %}

{% hint style="info" %}
**Attributes vs Properties**: The Users filter labels the native attribute category as "Properties". The Segments builder labels it as "Attributes". These refer to the same thing — the user's list of native attributes. See [User attributes](https://help.usejimo.com/docs/analyze/users-and-segments/users/attributes) for the full reference.
{% endhint %}

#### Combining conditions with AND / OR

Conditions within the same group are connected by **AND** (green connector on the left). Separate groups are connected by **OR** (orange connector).

<figure><img src="/files/5ZhfQ0z8xXPY5KGGt9fI" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Start from the sentence, not from the builder.** Write down who you want in plain language first, then reproduce it. People who build rule by rule end up with audiences they cannot explain.
{% endhint %}

To see how this comes together, walk through a concrete example.

<details>

<summary><strong>Example</strong> — Building an AND/OR segment from scratch</summary>

#### **Target audience:**&#x20;

Users with a proper `Name` AND a proper `Id` AND either a native `Email` OR an `external_email` custom attribute.

#### Formula:

&#x20;`Name AND Id AND (Email OR external_email)`

#### Build steps:

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

**1) Add the first condition (Name)**

Click **Add...** and pick `Attributes > Name > is not empty`. The builder automatically creates the first main group around this condition with a default **AND** connector.

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

**2) Add the second condition (Id)**

Click **Add...** inside the same group and pick `Attributes > Id > is not empty`. The condition joins the existing group under the same **AND** connector.

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

**3) Add a nested logic group**

Click **Add...** and pick **New logic group**. A nested sub-group is created inside the main group.

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

**4) Add the first alternative (Email) inside the group**

Inside the new group, click **Add...** and pick `Attributes > Email > is not empty`. The condition is added under an AND connector by default.

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

**5) Switch the group to OR connector**

As new nested groups are created with a default **AND** connector. Click the connector and switch it to **OR**.

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

**6) Add the second alternative (external\_email)**

Still inside the OR group, click **Add...** and pick `Custom Attributes > external_email > is not empty`. The condition joins the first one inside the OR group.

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

#### Final structure:

```
AND — Name is not empty
AND — Id is not empty
AND — [ OR — Email is not empty
        OR — external_email is not empty ]
```

All three top-level conditions must be true (Name, Id, and at least one of the two emails) for a user to match the segment.

</details>

#### Managing logic groups

As your segment grows, you will want to group, ungroup, and reorganize conditions. There are two levels of controls.

**On a single rule**, the **...** menu offers:

| Action              | Effect                                                                   |
| ------------------- | ------------------------------------------------------------------------ |
| **Turn into group** | Promotes the rule into a container, so you can add conditions next to it |
| **Duplicate**       | Copies the rule                                                          |
| **Remove**          | Deletes just that rule                                                   |

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

**On a group**, hovering reveals three action icons in its top-right corner.

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

|                                 Icon                                | Action                                        | Effect                                                              |
| :-----------------------------------------------------------------: | --------------------------------------------- | ------------------------------------------------------------------- |
| <img src="/files/p4NLc3zVSDkXVJmMcdO1" alt="" data-size="original"> | Nest the selected conditions into a sub-group | Creates a new AND/OR layer around them                              |
|                   ![](/files/Onh7t17uyAxdmYOrw0pv)                  | Flatten a sub-group back into its parent      | Moves the conditions up one level                                   |
| <img src="/files/vbQpi2CbmgnWdD8yUA0v" alt="" data-size="original"> | Delete the entire group                       | Removes **all nested conditions plus the group's AND/OR connector** |

{% hint style="danger" %}
**Do not confuse the two delete actions:**

* **Trash icon (on a group)**: wipes out the whole group — every nested condition and the AND/OR logic — in one click.

  <figure><img src="/files/hHYp49q1U3bp00MB9q87" alt=""><figcaption></figcaption></figure>
* **X cross (at the end of a condition block)**: removes only that single condition, leaves the surrounding group intact.

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

Both are irreversible until you re-add the conditions manually. When in doubt, use the X cross to remove conditions one by one.
{% endhint %}

<details>

<summary><strong>Example</strong> — Restructuring the previous segment</summary>

*Continuing from the segment built in the previous section, suppose you now want a different audience.*

#### New target audience:&#x20;

Users with a proper `Id` AND either `Name`, native `Email`, or `external_email`.

#### New formula:

&#x20;`Id AND (Name OR Email OR external_email)`

**Starting state** (from the previous example):

```
AND — Name is not empty
AND — Id is not empty
AND — [ OR — Email is not empty
        OR — external_email is not empty ]
```

#### Restructure steps:

**1) Wrap everything in a new top-level group**

* Hover the outermost group and click the **Turn into a group** icon
* The whole current segment becomes nested inside a new top-level AND group, giving you a place to add the Id condition separately later

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

**2) Switch the middle group to OR**

* Click the connector of the middle group (the one that used to be the main group)
* Toggle it from **AND** to **OR**

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

**3) Move the Id condition out**

* Inside the middle group, click the **X cross** at the end of the `Id is not empty` condition to remove just that condition (the group itself and the other conditions stay untouched)
* At the new top level, click **Add...** and re-add `Attributes > Id > is not empty`

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

After this step the structure is:

```
AND — Id is not empty
AND — [ OR — Name is not empty
        OR — [ OR — Email is not empty
                OR — external_email is not empty ] ]
```

**4) Ungroup the redundant OR nesting**

* The middle group now has two consecutive OR layers nested inside each other (the outer OR with Name, and the inner OR with Email/external\_email)
* Since stacked ORs produce the same result, hover the innermost group and click the **Ungroup** icon
* The two email conditions are lifted one level up and join Name under a single OR

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

#### Final structure:

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

```
AND — Id is not empty
AND — [ OR — Name is not empty
        OR — Email is not empty
        OR — external_email is not empty ]
```

The segment now matches users with a valid Id plus at least one of Name, Email, or external\_email.

</details>

***

### Read the count

Under the builder, **N users found** with the matching users listed. It recomputes as you edit.

<figure><img src="/files/9cb9obkjLyr5KTVfG2Dk" alt=""><figcaption></figcaption></figure>

Use it as a sanity check, not just as a number: if the count is 0, or suspiciously round, or equal to your whole base, the rule does not say what you think it says.

This is how you verify that your segment catches the users you intended, before saving.

***

### Save it

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

**Save** opens a modal asking for the identity of the segment.

<figure><img src="/files/0qQZqvqhFQoUzxY9OGKh" alt=""><figcaption></figcaption></figure>

| Field           |                                                                                                                                 |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Icon**        | The visual marker shown next to the name in the [list](/docs/analyze/users-and-segments/audience/segments.md#the-segments-list) |
| **Name**        | Required                                                                                                                        |
| **Description** | Optional, and the one people skip                                                                                               |

> **Tip:** Prefer explicit names like "Paying users, active last 30d" over "Segment 1". Use the description to note the intent ("For monthly activation tours") or the data sources it relies on.

The description is not decoration. It is what the next person reads in the [library](/docs/analyze/users-and-segments/audience/segments.md) to decide whether to reuse your segment or build yet another one.

Once saved, you are redirected to the segments list where your new segment appears with its audience count already computed.

***

#### Related pages

* [Segments](/docs/analyze/users-and-segments/audience/segments.md): the library
* [Segment details](/docs/analyze/users-and-segments/audience/segments/segment-details.md): edit, duplicate, delete, and target with it
* [Filter users](/docs/analyze/users-and-segments/audience/users/filter-users.md): the same engine, in exploration mode
* [Attributes](/docs/analyze/users-and-segments/data-management/attributes.md): define what you can filter on
* [Success Tracker](/docs/analyze/success-tracker.md): create the no-code events that unlock the Events category
