event

Discount Calculated

Published when a discount has been calculated for a cart.

EventBroker:Kafka

Overview

DiscountCalculated is published by the Promotion ServicePromotion ServiceServicev1.0.0Evaluates promotion rules and calculates the discount that applies to a cart. Receives discount requests and publishes t...Publishesdiscount-calculatedSubscribescalculate-discountOwnershopping-platformMapRepoView docs after evaluating the promotion rules for a cart. 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 uses the result to price the cart, and other systems can consume it for analytics.

Architecture diagram

Event-driven architecture documentation: Acme Inc

JSON Schema

6 properties

Emitted when a discount has been calculated for a cart

eventIdstring<uuid>
required
occurredAtstring<date-time>
required
cartIdstring<uuid>
required
discountinteger
required

Total discount applied, in minor units (e.g. cents)

Minimum: 0
currencystring
required
Match pattern: ^[A-Z]{3}$
appliedPromotionsarray[string]

Identifiers of the promotions that were applied