Finance System
Internal BookWorm workflow system that coordinates post-checkout basket cleanup and order notifications through Durable Task Scheduler; it does not process payments.
System Purpose & Boundary
The Finance System coordinates post-checkout basket cleanup, bounded retry timers, and order lifecycle notification requests within the OrderingDomainv1.0.0OrderingCreates durable Orders from a buyer's current basket, locks purchase-time pricing, and owns order lifecycle transitions ...Ownercommerce-fulfillment-teamDiagramOpen docs domain. It reacts to checkout and order-status events emitted by Order SystemSystemv1.0.0Order SystemInternal system that creates and manages accepted customer Orders, preserving purchase-time items and prices while ownin...Ownercommerce-fulfillment-teamDiagramOpen docs and orchestrates follow-up actions across Cart SystemSystemv1.0.0Cart SystemInternal system that owns customer-scoped baskets throughout the pre-order journey, including basket management, Catalog...Ownercommerce-fulfillment-teamDiagramOpen docs and Notification SystemSystemv1.0.0Notification SystemInternal platform system that consumes order commands, renders email templates, and submits messages over SMTP. Ownerplatform-engineering-teamDiagramOpen docs. Authorizing or settling payments, exposing customer-facing APIs, and owning authoritative Order status are explicitly out of scope.
Despite its name, the Finance System does not process payments or own Order truth. Order SystemSystemv1.0.0Order SystemInternal system that creates and manages accepted customer Orders, preserving
purchase-time items and prices while ownin...Ownercommerce-fulfillment-teamDiagramOpen docs remains the sole authority for Order aggregates and business status (New, Completed, Cancelled). Finance orchestration timeouts or cancellations never automatically cancel an Order in Ordering.
Contained Capabilities
| Service / Agent | Role in System | Primary Data Store | Interaction Style (Sync / Async) |
|---|---|---|---|
| Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs | Runs one durable saga instance per Order to coordinate basket cleanup retries and lifecycle email commands | Azure Durable Task Scheduler | Async (Kafka triggers & publishers) |
External Interactions & Trust Boundaries
- Ordering integration: Consumes User checked outEventv1.0.0User checked outReports that an Order was placed and its checkout details are ready for Finance coordination. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs, Order completedEventv1.0.0Order completedReports that an Order transitioned from New to Completed. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs, and Order cancelledEventv1.0.0Order cancelledReports that an Order transitioned from New to Cancelled. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs from Order SystemSystemv1.0.0Order SystemInternal system that creates and manages accepted customer Orders, preserving purchase-time items and prices while ownin...Ownercommerce-fulfillment-teamDiagramOpen docs, and reports basket-cleanup outcomes via Acknowledge basket deletion completedCommandv1.0.0Acknowledge basket deletion completedReports Finance's successful basket-cleanup outcome to Order API without changing the Order's business status. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs and Handle basket deletion failedCommandv1.0.0Handle basket deletion failedReports Finance's failed basket-cleanup outcome so Order API can soft-delete the affected Order. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs.
- Shopping integration: Issues Place orderCommandv1.0.0Place orderShared Finance order-placement command consumed by Notification to render and submit a new-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs to Cart SystemSystemv1.0.0Cart SystemInternal system that owns customer-scoped baskets throughout the pre-order journey, including basket management, Catalog...Ownercommerce-fulfillment-teamDiagramOpen docs to clear the submitted basket and consumes Basket deletion completedEventv1.0.0Basket deletion completedIndicates that Basket successfully deleted the submitted basket during checkout cleanup. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs or Basket deletion failedEventv1.0.0Basket deletion failedIndicates that Basket could not delete the submitted basket during checkout cleanup. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs.
- Notification integration: Dispatches Place orderCommandv1.0.0Place orderShared Finance order-placement command consumed by Notification to render and submit a new-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs, Send order completed notificationCommandv1.0.0Send order completed notificationShared Finance completion command consumed by Notification to render and submit a completed-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs, and Send order cancelled notificationCommandv1.0.0Send order cancelled notificationShared Finance cancellation command consumed by Notification to render and submit a canceled-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs to Notification SystemSystemv1.0.0Notification SystemInternal platform system that consumes order commands, renders email templates, and submits messages over SMTP. Ownerplatform-engineering-teamDiagramOpen docs for customer email rendering and SMTP delivery.
- Bounded retries: Durable timers retry basket cleanup up to 3 attempts on a 30-minute interval before marking the orchestration instance cancelled. - Shared placement command: Because both Cart SystemSystemv1.0.0Cart SystemInternal system that owns customer-scoped baskets throughout the pre-order journey, including basket management, Catalog...Ownercommerce-fulfillment-teamDiagramOpen docs and Notification SystemSystemv1.0.0Notification SystemInternal platform system that consumes order commands, renders email templates, and submits messages over SMTP. Ownerplatform-engineering-teamDiagramOpen docs consume Place orderCommandv1.0.0Place orderShared Finance order-placement command consumed by Notification to render and submit a new-order email. Ownerplatform-engineering-teamSchemaDiagramOpen docs, timeout retries can trigger duplicate placement email attempts.
System Visualizations
System Context
Component Topology
Architecture Decisions
Architecture Decision Records (7)
Decisions that apply to this Finance System. Search, filter by status, or sort by clicking a column.Related Documentation
- User CheckoutFlowv1.0.0User CheckoutAn authenticated customer checks out a persisted basket through Ordering API; Finance coordinates asynchronous basket cl...Ownercommerce-fulfillment-teamView flowOpen docs — End-to-end checkout and post-checkout coordination flow.
- Order Lifecycle and Status TransitionsFlowv1.0.0Order Lifecycle and Status TransitionsCheckout creates a New Order owned by Ordering API, Finance coordinates post-order cleanup and notifications, and explic...Ownercommerce-fulfillment-teamView flowOpen docs — Order status transitions and saga separation.
- domains/bookworm/subdomains/ordering/guides/02-understand-order-and-finance-status — Lifecycle separation between Order status and Finance orchestration.