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

# Customer groups

> Organize and segment your customers with customer groups.

Customer groups let you segment your customers into named cohorts you define yourself. Unlike companies or tenants, which map to who a customer works for, groups are free-form: you create them for your own operational reasons, and a customer can belong to more than one at the same time.

The most common case is when you need a cross-cutting slice of your customer base that has nothing to do with company structure. A beta tester at Acme Corp and a beta tester at Initech belong to different companies but the same group.

## When to use them

Some examples of how teams use groups in practice:

* Beta programs, to flag customers trialing a feature before its general release
* VIP or strategic accounts that need faster response times or a dedicated agent
* Pilot cohorts in a structured onboarding or evaluation period
* Internal test users, so your own team's threads don't pollute your queue metrics
* Language or regional segments, to route threads to the right agent
* Churn-risk accounts flagged by your CSM team

## Setting up groups

Go to **Settings → Customer Groups**. Each group has a name (shown in the UI), a key (a short slug used to identify the group in the API, like `beta-testers`), and a color for the sidebar.

## Adding customers to a group

There are three ways.

**Manually from a thread:** open the thread, find the customer panel in the sidebar, and use the group picker.

**Via workflow rules:** add "Add customer to customer group" as a workflow action. You can then automatically group customers based on triggers, like tagging anyone who contacts you through a specific Slack channel, without writing any code.

**Via the API:** the `addCustomerToCustomerGroups` mutation assigns a customer to one or more groups in a single call. Use this to keep group membership in sync with an external system, like updating groups whenever a plan changes in a billing platform. See the [API docs](/docs/graphql/customers/customer-groups) for the full setup.

## Filtering threads by group

Each group shows up in your sidebar as a named filter with a live count of open threads. If you want to focus on all open threads from your beta cohort, it is one click.

## Deleting groups

You cannot delete a group that still has members. Remove all customers from the group first, then delete it from Settings.
