ExampleAddedItemToCartv0.0.1
Holds information about what the user added to their example shopping cart.
You are currently viewing an old version of this event (0.0.2).Read latest version →
When firing this event make sure you set the `correlation-id` in the headers. Our schemas have standard metadata make sure you read and follow it.
Details
This event can be triggered multiple times per customer. Everytime the customer adds an item to their example shopping cart this event will be triggered.
We have a frontend application that allows users to buy things from our store. This front end interacts directly with the Basket Service to add items to the cart. The Basket Service will raise the events.
Consumer / Producer Diagram
flowchart LR
l-Basket_Service[Basket Service]:::producer-->ExampleAddedItemToCart[ExampleAddedItemToCart]:::event
classDef event stroke:#a463fd,stroke-width: 4px;
classDef producer stroke:#75d7b6,stroke-width: 2px;
classDef consumer stroke:#818cf8,stroke-width: 2px;
ExampleAddedItemToCart[ExampleAddedItemToCart]:::event-->r-Data_Lake[Data Lake]:::consumer
click l-Basket_Service href "/services/Basket Service" "Go to Basket Service" _self
click r-Data_Lake href "/services/Data Lake" "Go to Data Lake" _self
click ExampleAddedItemToCart href "/domains/ExampleShopping/events/ExampleAddedItemToCart" "Go to ExampleAddedItemToCart" _self
ExampleAddedItemToCart Schema (json)
{
"$id": "https://example.com/ExampleAddedItemToCart.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ExampleAddedItemToCart",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"properties": {
"correlationId": {
"type": "string",
"description": "The ID of the user"
},
"domain": {
"type": "string",
"description": "The domain of the event"
},
"service": {
"type": "string",
"description": "The name of the service that triggered the event"
}
},
"required": [
"correlationId",
"domain"
]
},
"data": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"description": "The ID of the user"
},
"itemId": {
"type": "string",
"description": "The ID of the example shopping item"
},
"quantity": {
"type": "number",
"description": "How many items the user wants to add to their example shopping cart",
"minimum": 1,
"maximum": 100,
"default": 1
}
}
}
}
}Last updated on 2022/12/23