Skip to content
D2 templates

Event-driven order flow

Order created → Payment → Inventory → Shipping, all via events.

Template previewD2
G web web api api web->api bus bus api->bus order.created payment payment bus->payment inventory inventory bus->inventory shipping shipping bus->shipping payment->bus payment.captured inventory->bus stock.reserved shipping->bus label.created customer customer shipping->customer email

What this template contains

Source
10 lines

Make it your own.

web -> api
api -> bus: order.created

bus -> payment
payment -> bus: payment.captured

bus -> inventory
inventory -> bus: stock.reserved

bus -> shipping
shipping -> bus: label.created

shipping -> customer: email

bus.shape: queue