Loyalty Account¶
aggregate-root loyalty
Account used to track loyalty participation state, balances, benefits, and point activity.
Business Purpose: Support loyalty enrollment, benefit calculation, point issuance, point redemption, and customer loyalty state.
Aliases: customer-loyalty-account
Identity¶
| Type | Field | Description |
|---|---|---|
global |
loyalty-account-id |
Globally unique loyalty account identifier, stable for the lifetime of the account. |
Attributes¶
| Attribute | Description |
|---|---|
loyalty-account-id Loyalty Account ID |
Stable loyalty account identifier. |
customer-id Customer ID |
Related customer reference. |
status Status |
Current loyalty account state. |
points-balance Points Balance |
Current points balance when applicable. |
updated-at Updated At |
Date and time when the loyalty account was last updated. |
Lifecycle¶
created → active → updated → suspended → closed
Invariants¶
stable-loyalty-account-id— Loyalty account ID must remain stable for the lifetime of the account.non-negative-balance— Loyalty account point balance must not be negative.
Relationships¶
| Type | Target |
|---|---|
belongs-to |
customer customer |
contains |
loyalty-transaction loyalty-transaction |
Events¶
| Event | Classification | Terminal |
|---|---|---|
LoyaltyPointsCalculated |
calculated | — |
LoyaltyPointsIssued |
transitioned | — |
LoyaltyPointsRedeemed |
transitioned | — |
LoyaltyBenefitsCalculated |
calculated | — |
Used by Capabilities¶
- loyalty Loyalty
Used by Applications¶
- Loyalty Platform
loyalty-platform
Semantic Constraints¶
| Constraint | Type | Rule |
|---|---|---|
loyalty-account-belongs-to-customer |
association |
A Loyalty Account must be owned by exactly one Customer. |
loyalty-account-in-loyalty-domain |
domain-containment |
The Loyalty Account is owned by the Loyalty domain. |
Note
Existing legacy model also contains loyalty-member; OBJ-001 target structure includes loyalty-account but not loyalty-member.
Referenced by APIs¶
| Endpoint | Method | Role | Capability |
|---|---|---|---|
/loyalty/accounts/{id}/points |
POST | response |
loyalty |
/loyalty/accounts/{id}/redemptions |
POST | response |
loyalty |
/members/{id}/earn |
POST | response |
loyalty |
/members/{id}/redeem |
POST | response |
loyalty |
/members/{id}/balance |
GET | response |
loyalty |