Cancellation notification sent to customer
Why it matters
A customer who cancels an order — or whose order is admin-cancelled — and receives no email confirmation is left wondering whether the cancellation actually went through. Without notification, they may place a duplicate order, not monitor their bank account for the refund, or contact support unnecessarily. If the admin cancels an order on behalf of a customer (for a fraud flag, inventory issue, or address problem), the customer deserves immediate notification with context. The iso-25010:2011 reliability dimension: the cancellation event occurred in the system but the customer has no evidence of it.
Severity rationale
Low because cancellation notification failures inconvenience customers and increase support volume without creating financial or security risk.
Remediation
Add a cancellation email call to the cancellation handler at app/api/orders/[id]/cancel/route.ts, fired after the successful transitionOrder call.
// After transitionOrder(orderId, 'cancelled', ...) in app/api/orders/[id]/cancel/route.ts:
await sendCancellationEmail({
to: order.user.email,
orderNumber: order.id,
refundExpected: order.total > 0,
refundTimelineDays: REFUND_WINDOW_DAYS,
supportUrl: 'https://yoursite.com/support',
})
Add sendCancellationEmail to lib/email/order-emails.ts and ensure the admin cancellation path also sends the same notification.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Order Management Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · reliability — Reliability — fault tolerance / notification delivery
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ecommerce-order-management·automated