CH17-03: Target Architecture for Workflows, Queues, and Inventory Visibility
Goal
This section sketches a target Azure architecture for inventory and fulfillment automation. It shows how workflow orchestration, durable messaging, operational stores, dashboards, alerts, and integration boundaries work together.
The previous section named the states the business must trust. This section turns those states into an architecture.
The Short Version
Back-office architecture needs durable flow, visible state, and controlled integration.
For this chapter, do not start by asking, Which Azure service should I use? Start by asking what the operational work needs:
A way to accept order, return, and demand signals without blocking the storefront.
A way to track long-running workflow state.
A way to send reliable commands to inventory, warehouse, carrier, supplier, finance, and support systems.
A way to publish status changes and alerts.
A way for operators and support teams to see what happened and what needs action.
Azure services are useful when they match those jobs.
A Target Architecture
Here is a practical starting pattern.
Storefront, order, return, and demand signals
|
v
Event routing and durable command queues
|
v
Workflow orchestration
|
+-- Inventory service and operational store
+-- Warehouse integration boundary
+-- Carrier integration boundary
+-- Supplier and purchasing integration boundary
+-- Finance, refund, and adjustment boundary
|
v
Operational dashboards, alerts, analytics, and exception queues
This is not a product diagram yet. It is a responsibility diagram. The exact services depend on the workload, but the responsibilities are stable.
Where Azure Services Fit
The following table maps common Azure capabilities to the jobs they perform in this architecture.
| Architecture Job | Azure Capability | Why It Fits |
|---|---|---|
| Durable command messaging | Azure Service Bus queues or topics | Holds work reliably, supports competing consumers, dead-letter handling, and decoupled processing. |
| Event routing | Azure Event Grid | Routes event notifications such as status changes to interested subscribers. |
| Long-running workflow | Azure Logic Apps or Azure Durable Functions | Coordinates multi-step processes, waits, retries, approvals, and integration calls. |
| Custom processing | Azure Functions, Azure Container Apps, or App Service | Runs handlers, APIs, validation logic, and integration adapters. |
| Operational data | Azure SQL Database, Cosmos DB, or another fit-for-purpose store | Tracks inventory, workflow state, exceptions, and queryable operational views. |
| Secrets and identities | Microsoft Entra ID, managed identities, and Azure Key Vault | Controls access to APIs, secrets, certificates, and sensitive operations. |
| Monitoring and alerts | Azure Monitor, Application Insights, and Log Analytics | Observes workflow health, latency, failures, queue depth, and customer-impacting incidents. |
| Analytics views | Microsoft Fabric, Synapse, or data lake patterns where appropriate | Supports reporting, planning, forecasting, and operational analysis. |
You do not need to use every service in every design. The point is to choose services by responsibility. A simple workflow might use Service Bus and Functions. A more integration-heavy workflow might use Logic Apps. A process that needs custom stateful orchestration might use Durable Functions. A high-volume operational service may run in Container Apps or App Service.
Decoupling The Storefront
The storefront should not directly call every back-office system during checkout.
Instead, the customer-facing path should record the business intent and hand off durable work. For example:
Checkout accepts order
-> order record is created
-> order event or command is emitted
-> fulfillment workflow reserves and allocates inventory
-> warehouse and carrier steps continue asynchronously
-> customer status updates as milestones complete
This keeps checkout responsive while still preserving accountability. The order does not vanish into an invisible background job. It becomes a workflow with state, correlation identifiers, retry behavior, and dashboards.
Workflow, Queue, Or Event
These terms are easy to blur, so separate them by job.
| Mechanism | Good For | Not Enough When |
|---|---|---|
| Event | Announcing that something happened. | A specific receiver must complete a business command reliably. |
| Queue | Holding durable work for a processor. | The business needs visibility across many steps, waits, and decisions. |
| Workflow | Coordinating a long-running process. | The step itself needs custom compute, data access, or integration logic. |
A back-office design often uses all three. An order event may start a workflow. The workflow may place commands on queues. Handlers may publish events when state changes. Dashboards may read the workflow and operational stores.
Operational Stores And Dashboards
A back-office architecture needs two kinds of data views.
The system-of-record view protects important state transitions such as reservations, allocations, returns, adjustments, and approvals. It should be designed for correctness, concurrency control, access control, and audit.
The operational visibility view helps teams see what is happening: queue depth, delayed orders, failed warehouse updates, stale supplier feeds, carrier errors, exception counts, stockout risk, and customer-impacting incidents. It may be fed by events, logs, workflow state, and operational stores.
Both views matter. If the system records correct state but operators cannot see risk, recovery will be slow. If dashboards are fast but state is untrustworthy, the business will make bad decisions quickly.
Example: Order Fulfillment Flow
An order event arrives after checkout.
The fulfillment workflow starts with the order identifier and correlation identifier.
The inventory service attempts reservation using an idempotent command.
The allocation step chooses a warehouse based on stock, delivery promise, capacity, and cost.
A warehouse task is created through an integration boundary.
A carrier label request is sent through a carrier adapter.
Customer notification is triggered when milestone events occur.
If a step fails, the workflow retries, pauses, compensates, or sends the item to an exception queue.
Dashboards show order progress, stuck steps, failed integrations, and customer-impacting delays.
The important design choice is not simply use a queue. The important design choice is that every step has state, ownership, and a recovery path.
Common Mistakes
Using a simple queue when the business process needs visible workflow state. Queues hold work, but they do not automatically explain where a long-running order is stuck.
Calling every back-office system directly from checkout. This couples customer latency to slow or fragile operational dependencies.
Treating events as commands. An event says something happened; a command asks a specific responsibility to do work.
Omitting dashboards and replay paths from the design. Production operations need investigation and controlled recovery, not only automated retries.
Choosing Azure services by name instead of by responsibility.
If Someone Asks You
What would an Azure back-office automation architecture include?
It would separate the storefront request path from operational fulfillment work. I would use durable messaging for commands, event routing for status changes, workflow orchestration for long-running processes, operational stores for trusted inventory and exception state, integration boundaries around warehouse, carrier, supplier, finance, and support systems, and Azure monitoring for dashboards and alerts. The design should make state, failure, ownership, and recovery visible.
What You Should Remember
Durable operational work needs both messaging and state visibility.
Questions to Check Your Understanding
When is a workflow engine more useful than a plain queue?
What systems should be behind API boundaries?
Which operational dashboards are needed from day one?