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

# Tags and segments

> Tags are labels you stick on a contact; segments are saved filters that rebuild themselves every time you use them.

Tags and segments look like the same idea — two ways of grouping people — and they behave
completely differently.

A **tag** is a fact stored on the contact. You attach it, it stays there until someone
removes it, and you can see it on the contact's profile.

A **segment** is a saved question, not a saved answer. It stores the criteria — stage, tags,
how long since the contact last did anything — and runs them fresh against your contacts
every time you open it or broadcast to it.

## A segment is a filter, not a list

This is the thing most people get wrong on day one, so read it before you build anything.

There is no "add this contact to a segment" action anywhere in DMLY, because segments have
no members to add. Membership is worked out at the moment you use the segment. That means:

* **Segments change on their own.** Tag someone **VIP** tomorrow and they are in your VIP
  segment tomorrow, without you touching the segment.
* **People fall out silently.** A segment built on `Inactive ≥ <days>d` loses a contact the
  moment they reply to you. A broadcast you scheduled last week does not go to the people who
  matched last week — it goes to whoever matches when it sends.
* **You cannot freeze a segment.** If you need a fixed group that will not shift underneath
  you — "everyone who came to the October open day" — use a **tag**. A tag is the only thing
  in DMLY that holds still.

<Note>
  If a segment is a saved question, tags are the best answers to give it. Most useful segments
  are mostly tag criteria.
</Note>

## Tags

A tag is a name and a colour. Any contact can have any number of them.

### Create and apply tags

You don't create tags up front — you create them by using them. On the **New contact** and
**Edit contact** form, type a name into the tag picker and press enter and the tag is created
and attached in one move (**Type a new tag name and press enter to create it.**). The **Add
tag** box on a contact's profile takes a new name the same way.

Segments are the exception: their tag pickers only offer tags that already exist, so typing a
new name there creates nothing.

Tags get onto contacts several ways:

* **On the contact.** Open the contact and use **Add tag** in the tag editor.
* **On the contact form.** **New contact** and **Edit contact** both have a tag picker.
* **From a CSV import.** The `tags` column accepts several tags separated by a pipe or a
  comma — `VIP|Buyer`. Missing tags are created during the import. See
  [Import contacts from CSV](/contacts/import-csv).
* **From an automation.** The **Add a tag** action tags a contact as it moves through a flow.
* **From the AI agent.** Its **Add tags** tool can tag a contact mid-conversation.
* **From DMLY itself.** The **Unsubscribe** tag is applied for you — see below.

Tags are also readable and writable through the [API](/api-reference/introduction).

### Manage tags

**Contacts → Manage tags** opens your workspace's tag list, where you rename a tag, change
its colour, or delete it. Tags belong to the Workspace, so every channel and every team
member shares the same list.

To bulk-create tags, go to the **Tags** tab of your workspace **Settings**, where **Import
CSV** and **Download sample** live.

Deleting a tag removes it from every contact that has it — the confirmation says so:
`Delete "<tag name>"? It will be removed from all contacts.` Because segments are
re-evaluated every time they run, any segment built on that tag starts behaving differently
straight away.

### The Unsubscribe tag

Every workspace starts with one tag it did not create: **Unsubscribe**. You cannot rename or
delete it (**This tag is required for opt-out compliance and can't be renamed.**), because
DMLY drives it automatically.

When a contact replies `STOP`, DMLY marks them opted out **and** applies the **Unsubscribe**
tag. Resubscribing them removes the tag again. The tag is a mirror of the opt-out so you can
see it on the profile and exclude it in a segment.

<Warning>
  The tag follows the opt-out, not the other way round. Putting the **Unsubscribe** tag on
  someone by hand does **not** opt them out — it just labels them. The opt-out itself only
  happens when the contact replies with an opt-out keyword such as `STOP`, or when an
  automation runs an **Unsubscribe Contact** node. The
  [Suppressions](/contacts/data-and-privacy) view is where you review who is opted out and
  reverse it with **Unblock** or **Resubscribe** — it cannot opt anyone out.
</Warning>

You don't have to exclude opted-out contacts by hand: broadcasts, sequences and automations
already skip them. Excluding the tag is belt and braces, not a requirement.

## Segments

Segments live at **Contacts → Segments** — *Reusable audiences for broadcasts, built from
stage, tags and recency.*

### What a segment can filter on

Exactly four things. There is nothing else in a segment definition — no lifecycle stage, no
custom field, no source.

| Field                                  | What it does                                                                                                     |
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **Contact stage**                      | Only contacts in one [pipeline stage](/contacts/pipeline-stages). Leave it on **Any stage** to ignore stage.     |
| **Contact tags**                       | *Contacts that have all the selected tags are included.* Pick two tags and a contact needs **both**, not either. |
| **Exclude contacts with tags**         | *Contacts with any of these tags are removed from the segment.* One match is enough to drop someone.             |
| **Number of days since last activity** | Only contacts quiet for that long or longer — `days or more`.                                                    |

<Tip>
  **Contact tags** is an AND, not an OR. If you want "VIP **or** Regular", that is two
  segments — or one tag applied to both groups.
</Tip>

### Create a segment

<Steps>
  <Step title="Open Segments">
    Go to **Contacts → Segments** and select **New segment**.
  </Step>

  <Step title="Name it">
    Fill in **Segment name**. Name it after the question it asks — "VIPs, not lapsed" beats
    "Segment 2" when you are picking a broadcast audience three months from now.
  </Step>

  <Step title="Set the criteria">
    Choose a **Contact stage**, pick **Contact tags** the contact must all have, add any
    **Exclude contacts with tags**, and set **Number of days since last activity** if you want
    a recency rule.
  </Step>

  <Step title="Create it">
    Select **Create**. The segment appears in the list with its criteria and a live
    contact count.
  </Step>
</Steps>

<Note>
  The count beside a segment is *contacts in this channel* — it is scoped to the channel you
  are currently in, not your whole Workspace. The same segment can show a different number
  after you switch channels. Nothing is wrong; it is counting a smaller pool.
</Note>

### Use a segment

* **In a broadcast.** This is what segments are for — pick the segment as the audience and it
  resolves to real contacts at send time. See [Broadcast audiences](/broadcasts/audiences).
* **On the contacts list.** Select **Filters** on **Contacts**, then use the **Segment**
  dropdown to filter the list through a saved segment, so you can look at exactly who a
  broadcast would reach before you send it.

Editing a segment changes every future use of it. Deleting one (**Delete segment**) removes
the saved question only — no contact is touched.

## Which one do I want?

<Columns cols={2}>
  <Card title="Use a tag" icon="tag">
    For a fact about a person that you decide: **VIP**, **Colour client**, **Came to the open
    day**, **Prefers mornings**. Tags are permanent until removed, and they are what segments
    are built out of.
  </Card>

  <Card title="Use a segment" icon="filter">
    For a group defined by a rule you will reuse: "VIPs in the Engaged stage who haven't
    messaged in 60 days". It stays correct as people move, without maintenance.
  </Card>
</Columns>

<Accordion title="My segment is suddenly empty (or much smaller)">
  A segment is only ever as good as the tags underneath it. Check, in order:

  * **Contact tags is an AND.** Two tags means contacts need both. This is the usual cause.
  * **A tag was deleted** in **Manage tags**. Renaming is safe — segments match tags by
    identity, not by name.
  * **Days since last activity** is doing its job — contacts who replied recently no longer
    match an inactivity rule.
  * **The count is channel-scoped.** Switch channel and the number changes.
</Accordion>

<Accordion title="Someone who should be in my broadcast didn't get it">
  Segments decide who *matches*. They do not decide who is *reachable*. A contact can match
  your segment perfectly and still be skipped at send time because they opted out, were
  blocked, or have no open messaging window on that channel. Check the contact's profile and
  the [Suppressions](/contacts/data-and-privacy) view, then
  [WhatsApp rules and limits](/channels/whatsapp-limits).
</Accordion>
