# RevCent MCP Guide: `CancelTrial`

Brief AI/MCP-focused guide for cancelling a Trial in RevCent.

---

## Related Documentation

| Guide | Link | Why It Matters |
|---|---|---|
| Trial Overview | `https://revcent.com/documentation/markdown/mcp/operation/OverviewTrial.md` | Broad explanation of Trial creation, Product-level trial settings, automatic expiration, trial expiration payments, shipping, tax, salvage, AI workflows, and reporting. |
| GetTrial | `https://revcent.com/documentation/markdown/mcp/operation/GetTrial.md` | Retrieve the Trial before and after taking action. |
| GetTrials | `https://revcent.com/documentation/markdown/mcp/operation/GetTrials.md` | Bounded operational Trial retrieval. Not for reporting or metrics. |
| SearchTrials | `https://revcent.com/documentation/markdown/mcp/operation/SearchTrials.md` | Search for Trials when the Trial ID is unknown, then use `GetTrial`. |
| Product Overview | `https://revcent.com/documentation/markdown/mcp/operation/OverviewProduct.md` | Explains Product-level Trial settings such as `trial_days`, `price_trial`, and `trial_shipping_setting`. |
| BigQueryRunQuery | `https://revcent.com/documentation/markdown/mcp/operation/BigQueryRunQuery.md` | Correct operation for Trial reporting, metrics, aggregation, and data mining. |
|


---

## Operation Summary

Operation:

```text
CancelTrial
```

Title:

```text
Cancel A Trial
```

Purpose:

```text
Cancel a Trial using the Trial ID.
```

Critical behavior:

```text
CancelTrial also cancels any Subscription associated with the Trial.
```

This is a consequential lifecycle operation and should only be used with explicit confirmation.

---

## When to Use

Use `CancelTrial` when:

- the customer requests Trial cancellation,
- support confirms a Trial should be stopped,
- the merchant explicitly wants the Trial cancelled,
- a retention workflow has ended and cancellation is confirmed,
- a business rule requires cancellation of the Trial and associated Subscription.

Examples:

```text
Customer asks to cancel before the Trial expires.
Support cancels a Trial after verifying customer identity.
Merchant cancels a Trial due to fraud/risk/business rules.
```

---

## When Not to Use

Do not use `CancelTrial` when:

- the user wants to expire the Trial early with payment,
- the user wants to extend the Trial,
- the user wants to shorten the Trial,
- the Trial should simply expire automatically,
- the user only wants to view Trial details,
- the user wants reporting or metrics,
- the user has not confirmed cancellation and related Subscription impact.

Correct alternatives:

| User Intent | Correct Operation |
|---|---|
| Expire Trial immediately / convert now | `ExpireTrial` after confirmation. |
| Extend Trial | `ExtendTrial`. |
| Shorten Trial | `ShortenTrial`. |
| Let Trial expire normally | Do nothing; RevCent expires automatically. |
| View Trial | `GetTrial`. |
| Trial reporting | `BigQueryRunQuery`. |

---

## Subscription Impact

The live operation description states:

```text
CancelTrial will also cancel any subscription that is associated with the trial.
```

AI/MCP must make this clear before running the operation.

Before cancellation, check related Subscription IDs from `GetTrial` where available.

If a Subscription is associated, ask for explicit confirmation that cancelling the Subscription is intended.

---

## Input Schema

Required:

| Field | Type | Description |
|---|---:|---|
| `trial_id` | string | 20-character Trial ID. |

Example:

```json
{
  "trial_id": "TTTTTTTTTTTTTTTTTTTT"
}
```

---

## Output Schema

Successful output can include:

| Field | Type | Description |
|---|---:|---|
| `api_call_id` | string | 20-character API call ID. |
| `api_call_unix` | integer | Unix timestamp when the API call was initiated. |
| `code` | integer | API response code. `1` indicates success. |
| `trial_id` | string | 20-character Trial ID. |
| `result` | string | Result message. |

---

## Recommended Workflow

```text
1. Retrieve the Trial with GetTrial.
2. Verify correct Trial ID and customer.
3. Review active state, start date, end date, and expired date.
4. Review related Subscription IDs.
5. Explain that CancelTrial also cancels any associated Subscription.
6. Confirm the user/customer truly wants cancellation.
7. Call CancelTrial.
8. Retrieve the Trial again with GetTrial to verify.
9. Retrieve related Subscription if needed to verify cancellation impact.
10. Send cancellation confirmation email or internal notification where appropriate.
```

---

## Cancel vs Expire

Do not confuse cancellation with expiration.

| Operation | Meaning |
|---|---|
| `CancelTrial` | Cancels the Trial and any associated Subscription. |
| `ExpireTrial` | Manually expires the Trial immediately before the official expiration date, potentially triggering payment/lifecycle behavior now. |
| Automatic expiration | RevCent expires the Trial on its scheduled expiration date. |

If the user wants to stop the Trial and associated Subscription, use `CancelTrial`.

If the user wants to convert/end the Trial early with payment, use `ExpireTrial`.

If no special action is needed, let RevCent expire the Trial automatically.

---

## Customer-Facing AI Safety

If `CancelTrial` is exposed through a customer-facing AI flow, such as a chatbot or AI Voice Agent:

```text
Verify the visitor is related to the Trial before discussing details or taking action.
```

Use a secondary value from the retrieved Trial record, such as customer email or phone.

Cancellation should require explicit confirmation because it may cancel an associated Subscription.

Do not cancel a Trial based only on a visitor-provided Trial ID, name, email, or search term.

---

## Best Practices

1. Use `GetTrial` before cancellation.
2. Confirm the correct customer and Trial.
3. Check whether a Subscription is associated.
4. Explicitly warn that associated Subscriptions are cancelled too.
5. Require clear confirmation before running `CancelTrial`.
6. Use `GetTrial` after cancellation to verify.
7. Retrieve related Subscription if needed.
8. Use Email Templates or internal notifications to confirm cancellation where appropriate.
9. Use BigQuery for reporting/metrics, not cancellation operations.

---

## Common Mistakes to Avoid

Do not:

- cancel without retrieving the Trial first,
- forget that associated Subscriptions are cancelled too,
- use cancellation when early expiration/conversion is intended,
- use cancellation when extension/shortening is intended,
- cancel based only on public visitor input,
- skip customer identity verification in customer-facing AI flows,
- use `CancelTrial` for reporting or analytics,
- cancel without explicit confirmation.

---

## Final AI/MCP Instruction

Use `CancelTrial` only when the user explicitly wants to cancel a Trial.

Always retrieve the Trial first, verify the customer and current state, and warn that any Subscription associated with the Trial will also be cancelled. Require explicit confirmation before running the operation.


---
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.