> ## Documentation Index
> Fetch the complete documentation index at: https://docs.instantcampaign.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Segments

> Build rule-based groups of contacts from profile data, list status, email engagement, form submissions, events and purchase goals.

A **segment** is a saved set of rules. Every contact that matches the rules is a member, and membership changes as your data changes. Nobody is added to a segment by hand.

Use segments to:

* Target a campaign, on their own or together with lists, narrow a campaign ("Newsletter, but only people who opened in the last 90 days"), or exclude people from it. See [Send a campaign](/guides/audience-and-campaigns/send-campaign).
* Filter the contacts table with one click on a segment chip.
* Start or branch automations. See [Automation triggers](/guides/audience-and-campaigns/automation-triggers).

## Create a segment

<Steps>
  <Step title="Open the builder">
    Go to **Contacts → Segments** and click **Create Segment**. The **+ Segment** chip at the end of the segment chips on the contacts table also takes you to the Segments page.
  </Step>

  <Step title="Name it">
    Enter a **Name** (required) and an optional **Description**.
  </Step>

  <Step title="Add rules">
    Under **Filter Rules**, pick a field, an operator and a value for each rule. Use **Add condition** to add a rule to a group, and **Add Condition Group** to start a new group. Click the **AND**/**OR** pill between rules or groups to switch it.
  </Step>

  <Step title="Check the preview">
    The **Filter logic:** line spells out the combined rules. **Sample Contacts** shows a few matching contacts and the total.
  </Step>

  <Step title="Save">
    Click **Create Segment** (or **Update Segment** when editing). Membership is calculated as soon as you save.
  </Step>
</Steps>

<Tip>
  Describe the audience in plain words in the **AI Segment Builder** box, for example "active subscribers who joined in the last 30 days", and click **Generate**. The rules are filled in for you to review and edit before you save.

  You can also start from the **Segments** page: click **Ask AI**, describe the audience in the chat, and click **Apply** on a suggestion. A new segment opens with the suggested name and rules, ready to review and save. Nothing is saved until you click **Create Segment**.
</Tip>

If the rules contradict each other (always 0 contacts), always match everyone, or contain redundant rules, a **Rule Issue Detected** dialog appears. Choose **Go back and fix** or **Save anyway**.

A segment needs at least one complete rule. A segment with no rules matches nobody.

## Available rules

### Profile

| Field                                                                                          | Operators                                                                 |
| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **Contact status**                                                                             | Equals, Not Equals, Is one of (Active, Unsubscribed, Bounced, Complained) |
| **Email Address**                                                                              | Equals, Not Equals, Contains, Does not contain, Starts with, Ends with    |
| **First Name**, **Last Name**                                                                  | Equals, Not Equals, Contains, Is set, Is not set                          |
| **Phone**, **Job title**, **Company**                                                          | Equals, Contains, Is set, Is not set                                      |
| **Source**                                                                                     | Equals, Not Equals, Is set, Is not set                                    |
| **Country**, **Language**                                                                      | Equals, Not Equals, Is one of, Is set, Is not set                         |
| Your [custom fields](/guides/audience-and-campaigns/custom-fields), shown as **Name (custom)** | Depends on the field type (see below)                                     |

### Dates

**Date Added**, **Subscription Date** and **Last Activity** support: Before (date), After (date), On (date), In the last N days / weeks / months, Not in the last N days, More than N days / weeks / months ago, Is today, Is yesterday, This week, This month. **Last Activity** also supports Is set and Is not set.

Last activity is updated by email engagement, form submissions and recorded events.

### Lists and segments

| Field                        | Operators                        | Notes                                                         |
| ---------------------------- | -------------------------------- | ------------------------------------------------------------- |
| **List Membership**          | Is in list, Is not in list       | Counts only contacts **Subscribed** to the list               |
| **List subscription status** | Is, Is not                       | Pick a list and a status: Subscribed, Pending or Unsubscribed |
| **Segment membership**       | Is in segment, Is not in segment | Build on another segment                                      |

### Engagement and behaviour

| Field                            | Operators                                                                                        | Value                                                           |
| -------------------------------- | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- |
| **Email Engagement**             | Opened, Clicked, Did not open, Did not click                                                     | A campaign, or **Any campaign**. For clicks, optionally a link. |
| **Form Submission**              | Has submitted, Has not submitted, Submitted in the last N days, Not submitted in the last N days | A form, or **Any form**                                         |
| **Custom Event**                 | Has occurred, Has not occurred, Occurred in the last N days, Occurred more than N times          | The event name, typed exactly                                   |
| **Goals (purchases, sign-ups…)** | See [Goal (RFM) rules](#goal-rfm-rules)                                                          | Goal type, amount and time window                               |

#### Clicked a specific link

With **Email Engagement → Clicked** and a campaign selected, the link box lists every link in that campaign's email, including links nobody has clicked yet. Choose **Any link in this campaign**, pick a link, or choose **Another URL…** and paste one.

Links are matched by destination. Tracking parameters such as `utm_*` are ignored, so a URL copied from a report matches the same clicks as one picked from the list. Parameters that identify the link, such as `?product=42`, still count.

<Tip>
  On a campaign's analytics page, the top-links table has a **Segment people who clicked this** action. It creates this rule for you.
</Tip>

### Goal (RFM) rules

Goals are conversions such as purchases and sign-ups. They are recorded as [events and goals](/guides/audience-and-campaigns/events-and-goals). The **Goals** field supports recency, frequency and monetary rules:

| Operator                                       | Matches contacts whose…                |
| ---------------------------------------------- | -------------------------------------- |
| **total value is at least** / **is less than** | summed goal value is ≥ / \< the amount |
| **count is at least** / **is less than**       | number of goals is ≥ / \< the count    |
| **average value is at least**                  | average goal value is ≥ the amount     |
| **largest value is at least**                  | single largest goal is ≥ the amount    |
| **last one within (days)**                     | most recent goal is within N days      |
| **last one more than (days) ago**              | most recent goal is older than N days  |

Choose a goal type (Purchase, Subscription, Lead, Sign-up, Booking, Trial, Other) or **Any goal**. For the value and count operators, **in last … days** limits the window. Leave it blank for all time. The "less than" operators also match contacts with no goals at all.

Example segments:

* **VIP**: Purchase, total value is at least 1000 in the last 365 days, AND Purchase, count is at least 5
* **At risk**: Purchase, total value is at least 500, AND Purchase, last one more than 90 days ago

### Custom field operators

| Field type | Operators                                                        |
| ---------- | ---------------------------------------------------------------- |
| Text       | is, is not, contains, starts with, ends with, is set, is not set |
| Number     | equals, not equals, greater than, less than, is set, is not set  |
| Boolean    | is (True/False), is set, is not set                              |
| Date       | before, after, in the last (days), is set, is not set            |
| Select     | is, is not, is set, is not set                                   |

## Keep segment counts current

Membership is stored, not worked out each time you look. It is recalculated:

* when you save the segment's rules
* when you click **Refresh** on the segment's card on the **Segments** page
* when you click the refresh icon (**Recompute now**) on the segment's chip on the contacts table

Both refresh controls rebuild membership and update the count, and need permission to edit segments. Hover a chip to see when it was last recomputed.

The stored membership is what the segment's count, its chip filter on the contacts table and **Segment membership** rules in other segments use.

<Note>
  Campaigns don't wait for a recompute. When you send from the send wizard, each segment's rules are checked at that moment, whether the segment targets the campaign, narrows it or excludes people. The wizard's count is worked out the same way, so it can differ from the count on the segment's card until you click **Refresh**.
</Note>

Each segment is given a colour automatically. The colour is used for its chip on the contacts table, its badge on contact rows, and in the send wizard.

## The Segments page

**Contacts → Segments** works like the [Lists page](/guides/audience-and-campaigns/lists#the-lists-page):

* The **Folders** panel on the left shows your segment folders. Select a folder to see the segments filed in it, or **All segments** to see every segment.
* The search box finds segments by name, description or folder name, across every folder.
* The icons at the top right switch between list view (a table with **Rules**, **Contacts**, **Updated**, **Folder**, and **Edit** / **Refresh** icons) and card view.
* Drag the line beside the folder panel to change its width.

## Organise segments in folders

Click **New folder** in the **Folders** panel to create a folder. Hover over a folder to add a subfolder, rename it or delete it. Move a segment by dragging its card or row onto a folder, or by choosing a folder in its **Folder** dropdown. Drag a folder onto another folder to nest it.

Deleting a folder removes the folder and its subfolders. The segments inside them move up a level. No segment is deleted.

Segment folders are separate from [list folders](/guides/audience-and-campaigns/lists#organise-lists-in-folders). Folders don't change who is in a segment.

## Edit or delete a segment

On **Contacts → Segments**, click **Edit** (or **View** if your role can't edit segments) to open the builder, or the trash icon to delete it. Deleting a segment doesn't delete any contacts.

## Troubleshooting

<AccordionGroup>
  <Accordion title="A Custom Event rule matches nobody">
    The event name must match exactly, including dots, slashes and capitals: `order.completed` doesn't match `order_completed`, and an event from Segment named `Order Completed` must be typed with its capitals and space. Copy the name from the contact's **Activity** tab or **Analytics → Website Events**.
  </Accordion>

  <Accordion title="The chip count and the Segments page count differ">
    Both show the stored membership, but each page shows the count from when it was loaded. Click **Refresh** on the segment's card, or the chip's refresh icon, then reload the other page.
  </Accordion>

  <Accordion title="A List Membership rule misses some members">
    It only counts contacts who are **Subscribed** to the list. Use **List subscription status** to target **Pending** or **Unsubscribed** list members.
  </Accordion>
</AccordionGroup>
