> For the complete documentation index, see [llms.txt](https://themochi-app.gitbook.io/mochi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://themochi-app.gitbook.io/mochi-docs/feature-and-settings/tags.md).

# Tags

Tags let you organize and categorize your leads with custom labels. Use them to track lead types, interests, sources, or anything relevant to your sales process.

## Creating Tags

{% stepper %}
{% step %}
Go to **Settings → Tags**
{% endstep %}

{% step %}
Click **Create Tag**
{% endstep %}

{% step %}
Enter a tag name
{% endstep %}

{% step %}
Choose an icon
{% endstep %}

{% step %}
Select a **tagging method** — AI or Pattern
{% endstep %}

{% step %}
Save
{% endstep %}
{% endstepper %}

## Tagging Methods

When creating a tag, you choose how it gets automatically applied to leads. You can also always apply any tag manually.

### AI Tagging

Uses AI to evaluate conversations and decide when to apply the tag.

{% stepper %}
{% step %}
Select **AI** as the tagging method
{% endstep %}

{% step %}
Write a prompt describing when this tag should be applied
{% endstep %}

{% step %}
AI evaluates new conversations against your prompt and applies the tag when it matches
{% endstep %}
{% endstepper %}

**Example:** Create a tag called "High Intent" with the prompt: "Apply when the lead asks about pricing, availability, or expresses urgency to get started."

Auto-tagging runs periodically on new conversations and can also be triggered manually.

### Pattern Matching

Uses keyword phrases and/or regex to tag messages based on exact content. More predictable than AI — you define exactly what to look for.

When creating a pattern tag, you configure:

**Who sent the message:**

* **Setter** — Only match messages sent by your team
* **Lead** — Only match messages from the lead
* **Either** — Match messages from anyone

**Match mode:**

* **All phrases** — Every phrase must appear in a single message
* **Any phrase** — At least one phrase needs to match

**Phrases:** Add one or more phrases to match against. Each phrase has a match type:

* **Exact match** — The phrase must appear as a whole word in the message (e.g., "ok" won't match inside "booking")
* **Close match** — More flexible. Matches direct substrings, synonyms, and similar word overlap

**Options:**

* **Case sensitive** — Off by default. Turn on if capitalization matters.
* **Match entire message** — When on, the full message must match the phrase exactly, not just contain it.

**Regex (Advanced):** For complex patterns, you can provide a raw regex expression. When set, the regex is used instead of phrase matching. Mochi validates your regex to prevent invalid or unsafe patterns.

**Test your pattern:** Before saving, test your pattern against sample text or real messages from your inbox. The tester highlights which parts of the message matched so you can fine-tune your configuration.

**Backfill:** When you create a pattern tag, Mochi scans your existing messages and applies the tag retroactively. You'll see a progress indicator while the backfill runs.

## Manual Tagging

Apply tags to leads manually from:

* The **Lead detail panel** in the Inbox
* The **Leads page** when viewing a lead
* **Bulk actions** — select multiple leads and apply tags at once

## Filtering by Tags

Once you have tags on your leads, use them to filter:

* **Leads page** — Filter the lead list by one or more tags
* **Dashboard** — Some metrics can be filtered by tag
* **Inbox** — Find conversations for leads with specific tags

## Managing Tags

* **Edit** — Change the tag name, icon, tagging method, or configuration
* **Delete** — Remove a tag entirely (removes it from all leads too). You'll be asked to confirm before deletion.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://themochi-app.gitbook.io/mochi-docs/feature-and-settings/tags.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
