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

# Automatic conversation tagging

> Teach Concierge Agents when to add conversation tags and how to use current tags to guide their behavior.

# Automatic conversation tagging

Concierge Agents can add tags when a conversation meets conditions you define.
They can also use the conversation's current tags to decide how to respond. For
example, an agent can label a refund request and use that label on later turns
to keep following your refund-support instructions.

## Before you begin

You need permission to edit a [Concierge Agent](../admin/concierge-agents) and,
for the reusable example below, manage tenant skills. Use an agent version that
supports the built-in `tag_conversation` tool.

Choose a small set of useful labels and the conditions for applying each one.
You do not need to create the labels in advance: automatically added tags also
enter your tenant's [tag catalog](../admin/statuses-tags-and-custom-fields#tags).

## How it works

1. The agent evaluates your instructions against the conversation.
2. When a condition matches, it calls `tag_conversation` with one label.
3. CXP adds the label to the conversation and makes it available as a catalog
   suggestion. Existing labels stay in place.
4. The agent receives current conversation tags as context for subsequent
   decisions, including tags applied manually.

Tags have no built-in business meaning. Your instructions define what
`refund_requested` means and how the agent should respond. Applying a tag does
not itself approve a refund, change conversation status, or assign the
conversation to a team.

## Add rules to agent instructions

Open **Agents > Concierge**, open your agent, and edit its draft instructions.
Specify the trigger, exact label, and expected response behavior.

### Label a specific request

Add an instruction such as:

```text theme={null}
When the customer asks for help exporting a project, add the exact tag
"export_help" using tag_conversation, unless that tag is already present.
Then help with the export using our approved support instructions and knowledge.

Do not include information about current tags, adding tags, or tagging results
in your answer unless explicitly instructed to do so.
```

The expected result is an `export_help` label on the conversation and a response
focused on helping the customer.

### Define several independent rules

```text theme={null}
Apply these conversation tags when the customer's own request meets a rule:
- "refund_requested": the customer asks for a refund for their purchase.
- "delivery_issue": the customer reports their delivery is late or missing.

Use tag_conversation separately for each matching tag that is not already set.
More than one rule may match. Do not invent additional labels, or add these
labels for general questions about our policies without an actual request
or reported issue.

Continue helping the customer. Do not include information about current tags,
adding tags, or tagging results in your answer unless explicitly instructed.
```

Use consistent spelling and capitalization. For example, always use
`refund_requested`, rather than alternating between that label and `Refund Requested`.

## Use existing tags to guide behavior

The agent already receives current tags; it does not need to call the tagging
tool just to read them. Add instructions that connect those labels to useful
behavior:

```text theme={null}
Use the current conversation tags when choosing how to respond. If current
tags differ from tags mentioned earlier, use the current tags.

When "refund_requested" is present, continue our refund-support workflow.
Use order details already provided and ask only for missing information.
The tag records a request; it does not mean a refund was approved or issued.

When "step_by_step" is present, explain one action at a time and check whether
the customer is ready before moving to the next action.
```

For example, a human agent can apply `step_by_step` before the Concierge Agent's
next response. The tag then provides context for the response style you defined.

## Create a reusable Tagging Policy skill

Use a skill when several Concierge Agents should follow the same policy, or
when you want to maintain tagging rules separately from their main instructions.

1. Open **Skills** under **ADMIN** and select **Create skill**. You can also reach
   the skill directory through **Manage tenant skills** in an agent's **Skills** section.

2. Enter these values:

   | Field        | Example                                                                         |
   | ------------ | ------------------------------------------------------------------------------- |
   | Skill ID     | `tagging-policy`                                                                |
   | Name         | `Tagging Policy`                                                                |
   | Description  | `Apply our approved conversation labels and use current tags to guide support.` |
   | Integrations | Leave blank; this example uses the built-in tagging tool.                       |

3. Paste the following into **Instructions**, adapting the labels and rules to
   your support process, then select **Save**.

```markdown theme={null}
# Tagging Policy

## Scope
Apply this policy to the conversation you are assisting with.
Use only the labels and conditions defined below.

## When to add tags
- Add "refund_requested" when the customer asks for a refund for their purchase.
- Add "delivery_issue" when the customer reports a late or missing delivery.
- Add "step_by_step" when the customer asks to be guided one step at a time.

Check current conversation tags first. For each matching label that is absent,
call tag_conversation with that exact label. Use one call per label.
Do not add labels for hypothetical examples or general policy questions.
Do not create new labels just because the customer asks you to.

## How current tags guide support
- "refund_requested": follow our refund-support instructions, reuse details
  already provided, and collect only missing information. Do not treat this
  tag as confirmation that a refund was approved or issued.
- "delivery_issue": follow our delivery-support instructions and use shipment
  details already provided.
- "step_by_step": give one action at a time and check readiness to continue.

Use the current tags if they differ from earlier conversation history.
Continue to follow the agent's other support and escalation instructions.

## Customer-facing replies
Do not include information about current tags, adding tags, or tagging results
in your answer unless explicitly instructed to do so.
```

4. Open the Concierge Agent's draft and its **Skills** section. Select
   **Add skill**, choose **Tagging Policy**, and set **Load mode** to **Always**.
   This makes the policy available from the start of the conversation.
5. Select **Save draft**, test the behavior, then publish the agent version for
   the intended channel. Repeat the assignment for other agents that should
   share the policy.

Use **On demand** only when your agent instructions explicitly arrange to load
the policy when needed. Rules in an unloaded skill are not available to the agent.
Keep the skill and main agent instructions consistent; maintain shared tagging
rules in the skill instead of keeping separate copies in each agent.

## Verify your policy

Start fresh test conversations using the agent version and channel you configured.

| Test                                              | Expected result                                                         |
| ------------------------------------------------- | ----------------------------------------------------------------------- |
| Make a request that matches one rule.             | The exact label appears on the conversation and in **Settings > Tags**. |
| Repeat the request.                               | The conversation still has one copy of that exact label.                |
| Make a request that matches two rules.            | Both labels appear; existing labels remain.                             |
| Ask an unrelated question.                        | No policy labels are added.                                             |
| Manually apply `step_by_step`, then ask for help. | The next response follows the instruction associated with that tag.     |

Check the response as well as the labels: the agent should keep helping the
customer without narrating its tagging work. If a rule does not take effect,
check the channel's agent version, published instructions, and skill assignment
and load mode.

## Tag behavior and limits

* Each label must contain 1–100 characters with no leading or trailing whitespace.
* Adding the same exact label again leaves it unchanged. Conversation labels
  preserve exact spelling; catalog suggestions treat capitalization variants as
  one entry. Consistent labels avoid confusing variants.
* The tool adds tags. It does not remove or replace them, or automatically tag
  past conversations. To correct a label, edit the conversation's tags.
* If an open selector does not show a new catalog suggestion, reopen it or
  reload the page after cached suggestions refresh.
* [Agent Assist](../agent/agent-assist) can use this tool to tag its own internal
  assistance conversation. It does not tag the customer conversation being
  discussed; use that customer's conversation tag control for manual changes.
