# RevCent MCP Guide: `RemoveCustomerFromGroup`

AI/MCP-focused guide for removing a Customer from 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
RemoveCustomerFromGroup
```

Title:

```text
Remove Customer From Group
```

Purpose:

```text
Remove a Customer from one or more Customer Groups.
```

Customer Groups can affect segmentation, access rules, marketing workflows, support routing, AI workflows, and reporting classification. Removing a Customer from a group should be intentional.

---

## When to Use

Use `RemoveCustomerFromGroup` when:

- the user explicitly wants the Customer removed from one or more groups,
- the Customer and target Customer Group IDs are known,
- group membership is incorrect or no longer applies,
- the user understands the workflow/segmentation effects.

---

## 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 remove the Customer from. |

Example:

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

---

## 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. Review current customer groups.
3. Confirm which Customer Group IDs should be removed.
4. RemoveCustomerFromGroup.
5. GetCustomer again to verify group membership.
```

---

## Safety Guidance

Removing a Customer from 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 removing 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 `RemoveCustomerFromGroup` when the user explicitly wants to remove a Customer from 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.