Cancel subscription
cancel_subscriptionCancel a subscription. Sets status='canceled', canceled_at, cancellation_category, cancellation_reason. Writes a subscription_events row of type 'canceled' with a negative mrr_delta. Trigger drops account.current_arr_cents. Returns a suggestion to set account.lifecycle_stage='churned' if this was the last active subscription. DESTRUCTIVE: confirm with the user first, then call again with confirm: true.
When to use: Customer cancellation. Always capture the cancellation_category for retention analysis.
Example: Acme cancelled — they consolidated to a competitor. Cancel the subscription effective today.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | A uuid. | |
| confirm | No | Boolean (true/false). | |
| canceled_at | Yes | Must match /^\d{4}-\d{2}-\d{2}$/. | |
| opportunity_id | No | A uuid. | |
| cancellation_reason | No | Free-text reason in the customer's words, stored on the subscription and as the 'canceled' event's note; cancellation_category is the coded bucket. | |
| cancellation_category | Yes | Defaults: price | product_fit | competitor | no_decision | business_change | support | consolidation | other. A workspace admin may rename or add values — see the live set in propose_updates' workspace.enum_values, or an admin's describe_schema. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| account | No | ||
| canceled | No | ||
| guidance | No | ||
| subscription | No | ||
| requires_confirm | No |