# Assignment Rule

The assignment rule is a tool that helps match customer chats with the right agents based on their expertise to handle the query. When a customer starts a conversation with the bot, you can add filters to assign the chat to an agent who should handle the chat, add labels and tags to the conversation, and group customers into different segments based on their characteristics.

<figure><img src="/files/u7LcMh9LCVYBNjlB6Hfn" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Assign chat, segments, and tags automatically to the agent/chat as per the assignment rule.
{% endhint %}

## How It Works:

Click **Create Rules** and add all the relevant filters as per your choice to make a rule. Your rule will be stored in the system, and AI will take that into consideration while assigning a chat to an agent.

You can also use this interface to access **Agent Assist**, a powerful tool that automates key customer interactions. It can handle welcome messages, let customers know when agents are unavailable, and even apply auto-closure rules for prompt assistance.

{% content-ref url="/pages/T6vahSaGdzdmUTbK3zPt" %}
[Agent Assist](/chatman-enterprise-whatsapp-platform/settings/inbox-settings/agent-assist.md)
{% endcontent-ref %}

### Create an Assignment Rule

1. Head over to rules page and tap 'Create Rules'.

<figure><img src="/files/qEs9UPL90BX0ckwsJKAt" alt=""><figcaption></figcaption></figure>

2. Provide a name to the rule.

<figure><img src="/files/ZUc3hKU3iNqpyWVTyuHF" alt=""><figcaption></figcaption></figure>

3. Add conditions based on which the chat will be assigned to the agent. In Chatman, conditions can be set based on: Message Content, System Attributes, Custom Attributes, User Tags, Conversation Labels, and User Creation Type. Further, you get options 'Is, Is Not, Starts with, Ends with, Contains, Does Not Contains', helping in narrowing down the application of the 'Assignment Rule.'

Let's say you want to create rules for only those customers whose message content is: buy, order, or purchase. How do you do that?&#x20;

Select the 'message content', then opt for 'Is' and enter the value as 'buy'. Repeat the same for entering the values 'order' and 'purchase.&#x20;

Make sure you turn the 'AND' to 'OR' by tapping on otherwise the rule won't be applied until the customer messages all three words.&#x20;

<figure><img src="/files/jZLUwqaXiwPAsPg1ycCx" alt=""><figcaption></figcaption></figure>

4. This step includes assigning the chat to the agent concerned. It's advisable not to randomly assign every time. Not every agent is skilled at solving all kinds of problems. Think about what the rule is being created for and then accordingly assign it to the agent.

<figure><img src="/files/tdKKf8PNFgI9mTWVBRvV" alt=""><figcaption></figcaption></figure>

5. Lastly, you can assign conversation labels, tags, and segments for all those customers who has been part of the assignment rule.

<figure><img src="/files/iMieLqTToqJbAtawHHR5" alt=""><figcaption></figcaption></figure>

6. Tap 'Confirm' to make the rule.

<figure><img src="/files/7W8fCio09YfBz80GIYc1" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Rules, once made, can't be customized**.
{% endhint %}


---

# 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.makerobos.com/chatman-enterprise-whatsapp-platform/chatman-functions/assignment-rule.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.
