- **Context:** It is 5x cheaper to keep an existing customer than to acquire a new one. A loyalty program incentivizes repeat purchases. - **Problem:** There is currently no mechanism to reward frequent buyers or high-volume sellers. - **Acceptance Criteria:** - Implement a `RewardPoints` entity linked to the User profile. - Create a listener for `order.completed` events that calculates and grants points (e.g., 10 points per $1 spent). - Build a redemption logic where points can be converted into `DiscountCoupons` or applied directly to the `Checkout` flow to reduce the final total.
RewardPointsentity linked to the User profile.order.completedevents that calculates and grants points (e.g., 10 points per $1 spent).DiscountCouponsor applied directly to theCheckoutflow to reduce the final total.