> For the complete documentation index, see [llms.txt](https://help.botpenguin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.botpenguin.com/ai-agents/prompts-and-tools/manage-contact-group.md).

# Manage Contact Group

The Manage contact groups tool lets your AI agent put a contact in a contact group, move it or take it out.

The Group Assignment tool lets your AI agent put a contact in a contact group, move it or take it out. You add it on the Prompt & Tools page, choose which actions the agent may use, and tell the agent when to use it.

***

### Prerequisites

* An AI agent. See Create your first AI Agent.
* Edit access to AI Agents.

***

### Key definitions

| Term               | Meaning                                                               |
| ------------------ | --------------------------------------------------------------------- |
| Tool               | Something your agent can use to take an action.                       |
| Action             | One thing a tool can do. You turn each action on or off with Allowed. |
| Usage instructions | Your words that tell the agent when to use the tool and what to do.   |

***

### What the Manage Contact Groups tool can do

| Action       | What it does                                 |
| ------------ | -------------------------------------------- |
| Assign group | Adds the contact to a group.                 |
| Update group | Moves the contact from one group to another. |
| Remove group | Takes the contact out of a group.            |

The agent uses the contact groups you created in the Inbox.

***

### Steps

1. Open **Prompt & Tools** under Setup in the AI Agent sidebar. Click **Add tool**. In the Add tools window, find **Group Assignment**. You can search for it, or look under Internal tools. Click it.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FXYJcFJkgFupyYmnsn8JT%2Fimage.png?alt=media&amp;token=3214f6be-a84f-4d19-8fb8-2e86d505a0f4" alt=""><figcaption></figcaption></figure>

2. Turn on the actions you want the agent to use. A counter shows how many are allowed. The agent uses only the actions that are allowed. Under "How should the agent use Group Assignment?", write when the agent should use the tool and what it should do. This is required.

![Turn on actions and write the usage instructions for Group Assignment](https://content.gitbook.com/content/APDb8cKQtGlIAfgHjcsQ/blobs/f6WetepcxxFRF2Urvj1k/images/group-assignment-step-2.png)

3. Click **Save changes**. The tool now shows under Connected tools with an Active label. Click **Done** to close the window, then click **Update** to save the page.

### Example usage instructions

> Use Manage contact groups to sort customers into the contact groups created in the Inbox.
>
> Add to group: When a customer matches a group, add them to it. For example, add customers who say they want to buy to the "Interested" group. Use only the groups that already exist. Never create a new group.
>
> Move to group: When a customer's situation changes, move them to the new group. For example, move a customer from "Interested" to "Premium" after they pay. Check which group they are in first.
>
> Remove from group: Only when the customer clearly no longer belongs in the group, or asks to be removed. Do not remove them for any other reason.
>
> Rules: Never tell the customer which groups exist or which group they are in unless they ask. If the tool gives an error, do not tell the customer. Carry on helping them. Never say a customer was added, moved or removed until the tool confirms it.

Write your own in the same way: say when to use the tool, then what to do.

***

### Change or remove the tool

Under Connected tools, click the gear icon to open the tool's settings again. Click the delete icon to remove it. You are asked to confirm. Deleting removes the tool and its usage instructions from the agent.

***

### Common errors

<details>

<summary>The agent does not use the tool</summary>

Check that the tool shows Active under Connected tools. Check that the action you need is allowed. Make your usage instructions clearer about when to use the tool.

</details>

<details>

<summary>I cannot save the tool</summary>

The usage instructions are required. Fill them in.

</details>

<details>

<summary>What happens if I delete the tool?</summary>

The agent can no longer use it, and its usage instructions are removed. Text about the tool in your prompt stays, so remove it too.

</details>

***

### Support

Still not working? Write to us at <support@botpenguin.com>. We will reach out to you within 24 hours.
