About This Article
When points are converted by mistake or an order is cancelled, coupons need to be invalidated and points returned. This article explains the coupon management features and cancellation mechanism.
Coupon Management Overview
Scenarios Requiring Management
| Scenario | Required Response |
|---|---|
| Customer converted by mistake | Cancel coupon, return points |
| Order cancelled (unused) | Cancel coupon, return points |
| Order cancelled (used) | Return points only (coupon already used) |
| Suspected fraud | Invalidate coupon, investigate |
| Expiration check | List display, send reminders |
Information Available to Administrators
Admin screen features: Search (customer ID/coupon code), Filter (all/unused/used)
| Code | Customer | Amount | Status | Action |
|---|---|---|---|---|
| 70934-AB12CD | Yamada Taro | ¥500 | Unused | [Cancel] |
| 70934-XY34ZW | Yamada Taro | ¥1000 | Used | - |
| 12345-CD56EF | Suzuki Hanako | ¥300 | Expired | - |
Cancellation Feature
Cancellation Flow Overview
Admin selects coupon to cancel
Confirm coupon is unused (used coupons cannot be cancelled)
Delete/invalidate coupon via Shopify Admin API
Restore deducted points via POS API
Update status in customer's coupon info
Email notification of cancellation and point refund
Detailed Flow Diagram
Select target coupon from admin screen
Unused → Continue / Used → Error "Already used"
DELETE /admin/discount_codes/[id] → Code becomes unusable
POST /customers/[id]/points/add → Add deducted amount to restore balance
status: "active" → "cancelled", record cancelled_at
"Your coupon has been cancelled" "500 points have been refunded"
Record all operations for audit
Cancellation Conditions
Conditions for Cancellation
| Condition | Cancellation | Reason |
|---|---|---|
| Unused, within validity | Possible | Not yet used |
| Used | Not possible | Discount already applied |
| Expired | Not possible | Already invalidated |
| Already cancelled | Not possible | Prevent duplicate processing |
Handling Used Coupons
Scenario: Order was cancelled
| Timing | Situation | Response |
|---|---|---|
| At order | Coupon used → Marked 'used' in Shopify, 500 yen discount applied | Cancellation not possible at this point |
| Order cancelled | Cancel coupon → Cannot (used) | Return points → Handle manually separately |
Resolution:
- Admin manually grants points in POS
- Grant reason: "Refund due to order cancellation"
- Record in history
Note: Automation possible, but recommend manual review for point returns on order cancellation to prevent fraud
Point Refund Mechanism
Refund Process Details
Cancellation info: Coupon code: 70934-AB12CD-500, Points used: 500pt, Customer ID: 12345
| POS API Call Field | Value |
|---|---|
| Endpoint | POST /customers/12345/points/add |
| amount | 500 |
| reason | Refund due to coupon cancellation |
| reference | CANCEL-70934-AB12CD-500 |
| Balance Change | Points |
|---|---|
| Pre-conversion balance | 1250pt |
| Post-conversion balance | 750pt |
| Post-refund balance | 1250pt ← Restored |
Refund Traceability
Customer 12345 point history:
| DateTime | Change | Reason |
|---|---|---|
| 1/15 10:00 | -500pt | Coupon conversion (AB12CD) |
| 1/20 15:00 | +500pt | Cancellation refund (AB12CD) ← Can be linked |
Point: Reference code links conversion and refund, verifiable for audit consistency
Customer Notification
Cancellation Notification Email Content
Subject: Your coupon has been cancelled
| Notification Content | Details |
|---|---|
| Recipient | Yamada Taro |
| Cancelled coupon code | 70934-AB12CD-500 |
| Amount | 500 yen off |
| Issue date | January 15, 2024 |
| Refunded points | 500pt |
| Current balance | 1,250pt |
Footer: Please contact us if you have any questions.
Operational Considerations
Cancellation Permission Management
| Role | Permission | Reason |
|---|---|---|
| General staff | View only | Prevent mistakes |
| Store manager | Can cancel | Needed for store response |
| EC admin | Can cancel | Needed for online response |
| System admin | All | Emergency response |
Recording Cancellation Reasons
Fields to enter at cancellation:
| Field | Content | Required |
|---|---|---|
| Cancellation reason | Customer request / Order cancelled / Correction of erroneous issuance / Other | Required |
| Detail memo | Free text | Optional |
| Staff name | Auto-recorded | Auto |
Record example: cancelled_by: "Yamada Hanako", cancelled_at: "2024-01-20T15:00:00Z", reason: "Customer request", note: "Said they converted by mistake"
Benefits of This System
For Operations
- Flexible response to errors and cancellations
- All operations recorded for audit compliance
- Permission management prevents fraud
For Customers
- Peace of mind knowing mistakes can be cancelled
- Points reliably refunded
- Status visible through notifications