Loyalty Service
Awards loyalty points when orders complete and reverses them when orders are cancelled. Owns the points ledger and customer balances.
Overview
The Loyalty Service consumes Order CompletedOrder CompletedEventv1.0.0Published when an order has been fulfilled and completed.
Ownerordering-platformSchemaMapView docs and Order CancelledOrder CancelledEventv1.0.0Published when an order has been cancelled.
Ownerordering-platformSchemaMapView docs from the Ordering domain. It records points in the Loyalty DatabaseLoyalty DatabaseContainerv1.0.0PostgreSQL database that holds the loyalty points ledger and each customer's points balance.Ownercustomer-platformMapView docs and publishes Loyalty Points EarnedLoyalty Points EarnedEventv1.0.0Published when a customer earns loyalty points for a completed order.
Ownercustomer-platformSchemaMapView docs or Loyalty Points ReversedLoyalty Points ReversedEventv1.0.0Published when loyalty points are removed from a customer because the order that earned them was cancelled.
Ownercustomer-platformSchemaMapView docs so that promotions and customer notifications can react.
Responsibilities
| Area | Description |
|---|---|
| Earning | Awards points on Order CompletedOrder CompletedEventv1.0.0Published when an order has been fulfilled and completed. Ownerordering-platformSchemaMapView docs and emits Loyalty Points EarnedLoyalty Points EarnedEventv1.0.0Published when a customer earns loyalty points for a completed order. Ownercustomer-platformSchemaMapView docs. |
| Reversal | Removes points on Order CancelledOrder CancelledEventv1.0.0Published when an order has been cancelled. Ownerordering-platformSchemaMapView docs and emits Loyalty Points ReversedLoyalty Points ReversedEventv1.0.0Published when loyalty points are removed from a customer because the order that earned them was cancelled. Ownercustomer-platformSchemaMapView docs. |
| Persistence | Reads from and writes to the Loyalty DatabaseLoyalty DatabaseContainerv1.0.0 |