CRM · Customer loyalty — rewards
Issue a reward to a customer against a campaign and then redeem, un-redeem or resend it, with code, validity window and exchange date on show.
| Area | CRM |
| Routes | crm.users.edit |
| Centre modules | rewards |
| Staff levels | root · admin · manager · crmmanager · crmoperator · weboperator |
| Models | campaign · reward |
| UI label | ticket.rewards |
| Coverage | 4 use cases · 2 happy · 5 failure |
How it works
Four distinct mutations, each with its own success and error message: redeem, unredeem, resend and cancelReward. submitReward wraps reward.validate() in an explicit promise so a missing campaign or expiry date rejects before the request. activeCampaigns limits issuance to currently running campaigns. The presence of an unredeem action means redemption is reversible — important for till mistakes.
Use cases
Why someone opens this (4)
- Handing a customer their prize at the desk and marking it redeemed.
- Reversing a redemption that was registered by mistake.
- Resending a reward code the customer never received.
- Issuing a goodwill reward outside the normal earning rules.
Path map
flowchart LR F(["Customer loyalty — rewards"]):::feat F --> H1["Reward issued and redeemed"]:::ok F --> H2["Redemption reversed"]:::ok F -.-> X1["Campaign or expiry missing"]:::bad F -.-> X2["Redeem fails"]:::bad F -.-> X3["Un-redeem fails"]:::bad F -.-> X4["Resend fails"]:::bad F -.-> X5["Cancel fails"]:::bad classDef feat fill:#157068,stroke:#157068,color:#ffffff,font-weight:bold classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13
Happy paths
Reward issued and redeemed
- Operator picks an active campaign and an expiry (
validUntil) and submits the reward.- Validation passes and the reward is created with a code.
- Later the operator opens the redeem modal and confirms.
reward.redeem-successis shown and the exchange date is recorded.
Redemption reversed
- Operator opens the un-redeem modal on a redeemed reward and confirms.
reward.unredeem-successis shown and the reward becomes redeemable again.
Failure paths
Campaign or expiry missing
Cause —
campaignorvalidUntilblank.What happens —
error.reward.campaign.required/error.reward.validUntil.required; the promise rejects with the model errors.
Redeem fails
Cause — API error or reward already redeemed/expired.
What happens —
reward.redeem-error(‘please retry later’).
Un-redeem fails
Cause — API refuses the reversal.
What happens —
reward.unredeem-error.
Resend fails
Cause — Mail dispatch error.
What happens —
reward.resend-error.
Cancel fails
Cause — API error on delete.
What happens — Bare
.catch(() => {})— silent.
QA checklist
Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.
- ✅ Reward issued and redeemed
- ✅ Redemption reversed
- ⛔ Campaign or expiry missing
- ⛔ Redeem fails
- ⛔ Un-redeem fails
- ⛔ Resend fails
- ⛔ Cancel fails
Implementation
Translation keys (14)
Key English ticket.rewardsRewards reward.campaignReward activity reward.codeCode reward.valid-fromValid from reward.valid-untilValid until reward.exchanged-atRedemption date reward.redeem-successThe reward has been redeemed succesfully reward.redeem-errorThere has been an error with redeeming the reward, please retry later reward.unredeem-successThe reward has been unredeemed succesfully reward.unredeem-errorThere has been an error with unredeeming the reward, please retry later reward.resend-successThe reward has been resend succesfully reward.resend-errorThere has been an error with the resent of the reward, please retry later error.reward.campaign.requiredActivity is required error.reward.validUntil.requiredThe expiration date is required
Related
- Same area — Customer list & filtering · Customer create & edit · Customer deletion with unsubscribe notice · Customer CSV export with column picker · Customer CSV import · Children CSV import · AI natural-language customer filter · Save current filters as a segment · Segment list, refresh & export · Segment builder with automatic tag actions · Segment categories · User tags (user types) · Customer receipts tab & ticket-stamp generation · Customer loyalty — raffle tickets · Customer loyalty — cards & stamps · Customer loyalty — coupon exchanges · Customer children (dependants) · Receipt verification queue · Store list, filters & exports · Store create & edit · Store CSV import · Store labels (store types) · Customer action log (dormant)
- Shares data with — Activity list & duplication · Activity editor (loyalty mechanics, rules & targeting) · Activity report & PDF · Activity campaigns (programme grouping) · Proposal editor (content, coupon, push, AI images) · Push notification editor (scheduling, geofencing, deep links) · App button manager (MOFs)
- Behind the same module — Activity editor (loyalty mechanics, rules & targeting)
Generated from doc/feature-inventory.json · id crm-customer-loyalty-rewards · commit 276788ca6