system

Inventory System

Internal system that tracks stock and reserves it for orders. It is the source of truth for available inventory and confirms whether stock can be reserved.

SystemInternal

Overview

The Inventory System owns stock levels at Acme Inc. During checkout it receives Reserve InventoryReserve InventoryCommandv1.0.0Command to reserve stock for the items in a checked-out cart. Ownerordering-platformSchemaMapView docs and confirms whether stock is available — replying with Inventory ReservedInventory ReservedEventv1.0.0Published when stock has been successfully reserved for an order. Ownerfulfilment-platformSchemaMapView docs or Inventory UnavailableInventory UnavailableEventv1.0.0Published when stock could not be reserved for an order. Ownerfulfilment-platformSchemaMapView docs. It also handles Release InventoryRelease InventoryCommandv1.0.0Command to release a previously held inventory reservation. Ownerfulfilment-platformSchemaMapView docs (when a reservation is no longer needed) and serves Get Stock LevelGet Stock LevelQueryv1.0.0Query to fetch the current available stock level for a product. Ownerfulfilment-platformSchemaMapView docs lookups from the Inventory DatabaseInventory DatabaseContainerv1.0.0PostgreSQL database that is the system of record for stock levels and reservations.MapView docs.

Context Diagram

How this system relates to the other systems around it.

Resource Diagram

The services, data stores and messages that make up this system.

What’s inside

ComponentTypeResponsibility
Inventory ServiceInventory ServiceServicev1.0.0The system of record for stock. Reserves and releases inventory, serves stock-level queries, and publishes events when s...Publishesinventory-reserved, inventory-unavailableSubscribesreserve-inventory, release-inventory +1Ownerfulfilment-platformMapRepoView docsServiceReserves and releases stock, serves stock-level queries, and publishes inventory events.
Inventory DatabaseInventory DatabaseContainerv1.0.0PostgreSQL database that is the system of record for stock levels and reservations.MapView docsData storePostgreSQL system of record for stock levels and reservations.

Messages this system publishes