isketch Templates Convert Format Open the editor

Event-driven checkout

7 shapes and 7 connections, sketched in isketch.

Open this template

Event-driven checkout place order record OrderPaid CartEmptied Cart service Holds the open cart Checkout Creates the order, pending Payment Provider call, retries Ledger Money movements, immutable Event bus OrderPaid, CartEmptied Mailer Receipt and confirmation Stock Reserves on OrderPaid

The .flow source

The whole template as text: copy it, keep it in your repo, hand it to an agent.

examples/templates/event-checkout.flow
title: Event-driven checkout
note: Cart to paid, as events between services.

cart = process "Cart service" -- Holds the open cart
checkout = process "Checkout" -- Creates the order, pending
payment = process "Payment" -- Provider call, retries
ledger = database "Ledger" -- Money movements, immutable
bus = data "Event bus" -- OrderPaid, CartEmptied
mailer = process "Mailer" -- Receipt and confirmation
stock = process "Stock" -- Reserves on OrderPaid

cart -> checkout : place order
checkout -> payment
payment -> ledger : record
payment -> bus : OrderPaid
bus -> mailer
bus -> stock
bus -> cart : CartEmptied