# RevCent MCP Guide: `ShortenTrial`

Brief AI/MCP-focused guide for shortening 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
ShortenTrial
```

Title:

```text
Shorten A Trial
```

Purpose:

```text
Shorten a Trial by a specified number of days using the Trial ID.
```

Use `ShortenTrial` when the business intentionally wants to reduce the remaining Trial period without necessarily expiring it immediately.

Shortening a Trial may cause the expiration date to move earlier and may cause payment/lifecycle events to happen sooner.

---

## When to Use

Use `ShortenTrial` when:

- a Trial was created with too many days,
- support intentionally reduces the Trial length,
- the customer asks for an earlier conversion but not necessarily immediate expiration,
- internal policy requires a shorter Trial period,
- a merchant wants to adjust a specific Trial's end date sooner.

Examples:

```text
Shorten a Trial by 3 days after correcting an accidental extension.
Shorten a Trial by 7 days to match a negotiated customer agreement.
```

---

## When Not to Use

Do not use `ShortenTrial` when:

- the user wants to expire the Trial immediately,
- the user wants to cancel the Trial,
- the user wants to extend the Trial,
- the Trial can simply expire on schedule,
- the user wants reporting or metrics.

Correct alternatives:

| User Intent | Correct Operation |
|---|---|
| Expire immediately / convert now | `ExpireTrial` after confirmation. |
| Cancel Trial | `CancelTrial` after confirmation. |
| Extend Trial | `ExtendTrial`. |
| View Trial | `GetTrial`. |
| Trial reporting | `BigQueryRunQuery`. |

---

## Input Schema

Required:

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

Optional:

| Field | Type | Description |
|---|---:|---|
| `days` | integer | Number of days to shorten the Trial period by. |

Example:

```json
{
  "trial_id": "TTTTTTTTTTTTTTTTTTTT",
  "days": 3
}
```

Although the schema only marks `trial_id` as required, AI/MCP should generally provide `days` because the operation's purpose is to shorten by a specified number of days.

---

## 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, current end date, days remaining, and related subscription/payment context.
4. Confirm the number of days to shorten.
5. Explain that shortening may cause expiration/payment/lifecycle events to occur earlier.
6. Require explicit confirmation.
7. Call ShortenTrial with trial_id and days.
8. Retrieve the Trial again with GetTrial to verify updated timing.
9. Notify the customer/internal team if appropriate.
```

---

## Shorten vs Expire

Do not confuse `ShortenTrial` with `ExpireTrial`.

| Operation | Meaning |
|---|---|
| `ShortenTrial` | Reduces the Trial period by a specified number of days. |
| `ExpireTrial` | Immediately expires the Trial before its official expiration date. |

If the user wants the Trial to end right now and trigger expiration/payment behavior, use `ExpireTrial` with explicit confirmation.

If the user wants the end date moved earlier by a number of days, use `ShortenTrial`.

---

## Customer-Facing AI Safety

If `ShortenTrial` is used through a customer-facing AI flow, verify the visitor is related to the Trial first.

Recommended verification:

```text
GetTrial
    ↓
Verify customer email, phone, or another secondary value from the retrieved Trial record
    ↓
Only then discuss or change Trial timing
```

Do not shorten a Trial based only on visitor-provided search input without verifying identity/relationship.

---

## Best Practices

1. Use `GetTrial` before shortening.
2. Confirm the exact number of days.
3. Confirm the Trial is the correct customer's Trial.
4. Explain that shortening may make payment/lifecycle events happen earlier.
5. Use `ShortenTrial` only for intentional customer/support/business reasons.
6. Use `GetTrial` after shortening to verify the result.
7. Use `ExpireTrial` instead only if immediate expiration is truly intended.
8. Use BigQuery for reporting/metrics, not Trial mutation operations.

---

## Common Mistakes to Avoid

Do not:

- shorten the wrong Trial,
- omit `days` when the intended reduction is known,
- use `ShortenTrial` when immediate expiration is intended,
- shorten without understanding payment/lifecycle timing impact,
- use shortening as a substitute for cancellation,
- use shortening as a reporting operation,
- expose Trial details in public AI flows without verification.

---

## Final AI/MCP Instruction

Use `ShortenTrial` to intentionally reduce a Trial period by a specified number of days.

Retrieve the Trial first, confirm the customer and requested number of days, explain lifecycle impact where relevant, run `ShortenTrial`, then retrieve the Trial again to verify.


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