Promotion Service
Evaluates promotion rules and calculates the discount that applies to a cart. Receives discount requests and publishes the calculated result.
Overview
The Promotion Service is the heart of the Promotion System. It receives Calculate DiscountCalculate DiscountCommandv1.0.0Command to calculate the discount that applies to a cart.
Ownershopping-platformSchemaMapView docs requests from the Cart SystemCart SystemSystemv1.0.0Internal system that owns the customer's shopping cart and the checkout flow. It is the source of truth for cart content...Ownershopping-platformMapView docs, evaluates the applicable rules from the Promotion DatabasePromotion DatabaseContainerv1.0.0PostgreSQL store of promotion and discount rules.MapView docs, and publishes a Discount CalculatedDiscount CalculatedEventv1.0.0Published when a discount has been calculated for a cart.
Ownershopping-platformSchemaMapView docs event with the result.
Responsibilities
| Area | Description |
|---|---|
| Discount calculation | Handles Calculate DiscountCalculate DiscountCommandv1.0.0Command to calculate the discount that applies to a cart. Ownershopping-platformSchemaMapView docs and evaluates promotion rules. |
| Rules | Reads promotion and discount rules from the Promotion DatabasePromotion DatabaseContainerv1.0.0 |
| Event publishing | Emits Discount CalculatedDiscount CalculatedEventv1.0.0Published when a discount has been calculated for a cart. Ownershopping-platformSchemaMapView docs with the calculated result. |