# Segments

\[Contact Tag] *exists*A Segment is a set of Contacts that are grouped based on certain criteria using filters. Segments are used for categorizing Contacts for broadcasts and can be found in the Contacts Module. They are publicly shared and can be viewed by all users with access to the Contacts Module.

{% hint style="info" %}
[Custom Inbox](https://docs.is-messenger.com/ismessenger/contact-and-messages/contact-search-and-custom-inbox) is no longer linked between the Messages Module and Contacts Module. Custom Inbox now only exists in the Messages Module.
{% endhint %}

### Creating a Segment <a href="#creating_a_segment" id="creating_a_segment"></a>

{% hint style="info" %}
You can create a **maximum of 500** Segments in your Workspace.
{% endhint %}

**Step 1:** In your Workspace, go to **Contacts** > click the **+ Add Segment** button

{% hint style="info" %}
A Segment can also be created by clicking the Filter icon when all Contacts are selected.
{% endhint %}

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2F2yrAXiHvf1Ex8z2oqyYX%2F1.gif?alt=media&#x26;token=c34fae76-05c2-4b2d-b261-2d11b8ffaacb" alt=""><figcaption></figcaption></figure>

**Step 2:** Enter a name for your new Segment and click **Save**

{% hint style="danger" %}
A Segment must have a unique name to prevent broadcast failure.
{% endhint %}

### **Add Filters to your New Segment**

**Step 1:** Select your newly created Segment from the left side menu > Click the filter icon; a sidebar will appear on the right side.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FL7UobdGvS0v7qlhPVSHE%2Fopen-filter.gif?alt=media&#x26;token=1398db7e-7c5d-43dd-844e-19f4099b57c2" alt=""><figcaption></figcaption></figure>

**Step 2:** Filter your Segment by adding conditions or groups. Use Category and Operator fields based on your criteria. Contacts that fulfill the criteria will appear in the Contact list.

**Step 3:** To save your Segment, click the **Update Segment** button.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FlF3uH6huQngiDWs22rYd%2F3.gif?alt=media&#x26;token=a275262f-3ba0-4054-b6e6-d5d666e28e7f" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
All the created Segments will appear on the left in the list of Segments. The numbers beside the Segment name indicate the number of Contacts in the Segment.
{% endhint %}

### Editing a Segment <a href="#editing_a_segment" id="editing_a_segment"></a>

To edit a Segment with different criteria, click the Segment number/action icon > **Edit** or click on the filter icon for the selected Segment. You can edit the conditions as needed and also save the edited version as a new Segment.

{% hint style="info" %}
The number displayed on the filter icon indicates how many filters have been applied to that Segment.
{% endhint %}

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FVfRY2N29SubGUBIwTQum%2F4.gif?alt=media&#x26;token=6c53c0da-5888-4361-abe3-5a22c66b6337" alt=""><figcaption></figcaption></figure>

### Renaming a Segment <a href="#renaming_a_segment" id="renaming_a_segment"></a>

To rename a Segment, click the action icon and select **Rename.**

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2F0edsooc42jVx7JYb8QAA%2F5.gif?alt=media&#x26;token=7da95677-d7ee-4e29-af6e-780eec1bc766" alt=""><figcaption></figcaption></figure>

### Deleting a Segment <a href="#deleting_a_segment" id="deleting_a_segment"></a>

To delete a Segment, click the action icon and select **Delete**.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FamT4ibN8JBGOoPrjsnk4%2F6.gif?alt=media&#x26;token=3d02971c-3ae7-4011-9684-58b565ac4854" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Deleting a Segment is permanent and cannot be recovered!
{% endhint %}

### Default Segments <a href="#default_segments" id="default_segments"></a>

Several default Segments are available in all workspaces. These Segments are automatically added, but they can be edited, renamed, or deleted like any other Segments.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2Fr7h6mHlRASrpPLoeTRqw%2FScreenshot%202023-03-29%20131350.png?alt=media&#x26;token=0249db01-582c-4ed3-afae-660bdfcefbf5" alt=""><figcaption></figcaption></figure>

| Name                         | Filter                                                            |
| ---------------------------- | ----------------------------------------------------------------- |
| Contacts created <7 days ago | \[Contact Field - Created At] *is less than (time)* \[7 days ago] |
| Contacts inactive >30 days   | \[Time since last incoming message] *is more than* \[30 days ago] |
| Contacts with tags           | \[Contact Tag] *exists*                                           |
| Country known                | \[Contact Field - Country] *exists*                               |
| Language known               | \[Contact Field - Language] *exists*                              |

### FAQ and Troubleshooting <a href="#faq_and_troubleshooting" id="faq_and_troubleshooting"></a>

**How does a Contact automatically enter or exit a Segment?**

Segments are automatically updated (enter or exit) whenever a Contact fits certain criteria based on filters set for the Segment. This is an expected behavior due to the dynamic nature of Segments.

**Example:**

Segment A has a filter that includes Contacts with a Tag called "Promotion". At any time this Tag is added to a Contact, the Contact will automatically enter the Segment. Conversely, at any time the Tag is removed, the Contact will automatically exit the Segment.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.is-messenger.com/ismessenger/modules/contacts/segments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
