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.

AreaCRM
Routescrm.users.edit
Centre modulesrewards
Staff levelsroot · admin · manager · crmmanager · crmoperator · weboperator
Modelscampaign · reward
UI labelticket.rewards
Coverage4 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

  1. Operator picks an active campaign and an expiry (validUntil) and submits the reward.
  2. Validation passes and the reward is created with a code.
  3. Later the operator opens the redeem modal and confirms.
  4. reward.redeem-success is shown and the exchange date is recorded.

Redemption reversed

  1. Operator opens the un-redeem modal on a redeemed reward and confirms.
  2. reward.unredeem-success is shown and the reward becomes redeemable again.

Failure paths

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


Generated from doc/feature-inventory.json · id crm-customer-loyalty-rewards · commit 276788ca6