# RevCent MCP Guide: `AddCustomerToGroup`

AI/MCP-focused guide for adding a Customer to one or more Customer Groups.

---

## Related Documentation

| Guide | Link | Why It Matters |
|---|---|---|
| Customer Overview | `https://revcent.com/documentation/markdown/mcp/operation/OverviewCustomer.md` | Broad overview of Customer records, customer lifecycle, related records, customer cards, groups, and customer-facing AI safety. |
| GetCustomer | `https://revcent.com/documentation/markdown/mcp/operation/GetCustomer.md` | Retrieve the Customer before and after customer mutation operations. |
| SearchCustomers | `https://revcent.com/documentation/markdown/mcp/operation/SearchCustomers.md` | Locate a Customer when the Customer ID is unknown. |
| GetCustomers | `https://revcent.com/documentation/markdown/mcp/operation/GetCustomers.md` | Bounded operational Customer retrieval. Not for reporting/metrics. |
| BigQueryRunQuery | `https://revcent.com/documentation/markdown/mcp/operation/BigQueryRunQuery.md` | Correct operation for customer reporting, metrics, aggregation, and data mining. |


---

## Operation Summary

Operation:

```text
AddCustomerToGroup
```

Title:

```text
Add Customer To Group
```

Purpose:

```text
Add a Customer to one or more Customer Groups.
```

Customer Groups can be used for segmentation, support workflows, access rules, marketing workflows, reporting classification, AI workflows, or internal organization.

---

## When to Use

Use `AddCustomerToGroup` when:

- the user explicitly wants the Customer added to one or more groups,
- the Customer and target Customer Group IDs are known,
- the Customer's grouping should affect segmentation, workflows, or internal organization,
- AI/MCP has verified the correct Customer and groups.

---

## Input Schema

Required fields:

| Field | Type | Required | Description |
|---|---:|---:|---|
| `customer_id` | string | Yes | 20-character Customer ID. |
| `customer_group` | array | Yes | Array of 20-character Customer Group IDs to add the Customer to. |

Example:

```json
{
  "customer_id": "CCCCCCCCCCCCCCCCCCCC",
  "customer_group": [
    "GGGGGGGGGGGGGGGGGGGG",
    "HHHHHHHHHHHHHHHHHHHH"
  ]
}
```

---

## Output Schema

Successful output can include:

| Field | Description |
|---|---|
| `api_call_id` | 20-character API call ID. |
| `api_call_unix` | Unix timestamp when the API call was initiated. |
| `code` | API response code. `1` indicates success. |
| `customer_id` | 20-character ID returned by the operation. |
| `result` | Result message. |


---

## Recommended Workflow

```text
1. GetCustomer to verify the Customer.
2. Confirm current customer groups.
3. Confirm target Customer Group IDs.
4. AddCustomerToGroup.
5. GetCustomer again to verify group membership.
```

---

## Safety Guidance

Adding a Customer to a group can affect segmentation, automation, eligibility, AI workflows, marketing, internal workflows, or reporting classification.

Before running, confirm:

- correct Customer,
- correct Customer Group IDs,
- user intent,
- whether group membership has business consequences.

---

## Customer-Facing AI Verification Warning

Customer operations can expose or modify sensitive customer, contact, address, payment, group, purchase, subscription, trial, refund, fraud, chargeback, note, and lifecycle context.

If this operation is used inside a customer-facing AI flow, such as:

- AI Voice Agent,
- public chatbot,
- customer portal assistant,
- SMS assistant,
- any visitor-facing AI workflow,

AI/MCP should verify that the visitor is actually the customer, or is otherwise authorized, before providing information, modifying customer data, adding cards, changing status, or changing group membership.

Recommended rule:

```text
Do not act on a Customer record in a public-facing flow based only on visitor-provided input.
```

Use a secondary value from the retrieved RevCent Customer record, such as customer email, customer phone, or another record-backed value.

Safe customer-facing flow:

```text
Visitor provides customer/account input
    ↓
AI locates/retrieves the Customer
    ↓
AI verifies a secondary value from the retrieved Customer record
    ↓
AI confirms the requested action
    ↓
Only then performs the operation
```

For consequential actions, require explicit confirmation immediately before running the operation.


---

## Reporting Guidance

This operation is not a reporting or analytics operation.

Do not use customer mutation operations or customer lookup/search operations for:

- reporting,
- metrics,
- aggregation,
- data mining,
- segmentation reports,
- customer lifetime value reports,
- customer counts,
- broad analysis,
- bulk retrieval.

Use:

```text
BigQueryRunQuery
```

for those purposes.

If AI/MCP intended to use operational customer actions or lookup actions for reporting and then realizes `BigQueryRunQuery` is correct, it does not need to tell the user. It should simply run `BigQueryRunQuery`.


---

## Final AI/MCP Instruction

Use `AddCustomerToGroup` when the user explicitly wants to add a Customer to one or more Customer Groups. Provide `customer_id` and a `customer_group` array of Customer Group IDs, then verify with `GetCustomer`.


---
Document Parent Directory
* [Operations](https://revcent.com/documentation/markdown/mcp/operation/index.md) - AI/MCP details and overviews for operations available within the RevCent MCP.