Architecture
Data Flow
How a request moves from ERP event through the webhook, into the workflow engine, and back to the dashboard.
The happy path — purchase order approval
Here is an example of how an ERP-shaped supply chain event flows through EasyFlow end to end. The example uses a purchase order raised in SAP, but the same path applies to any supported source that sends a normalized event.
Step 1 — Inbound event
An operator raises a PO in SAP. SAP triggers an outbound webhook, or n8n's scheduled workflow detects the new PO in the next polling cycle (every 5 minutes).
The n8n workflow maps SAP's field names (PurchaseOrder, OrderQuantity, Supplier) to EasyFlow's standard format and POSTs to /api/webhooks/inbound/{tenant_id}.
The webhook endpoint validates the X-Webhook-Token header, normalises any remaining SAP field aliases, and publishes a purchase_order_created event to RabbitMQ. Returns 202 Accepted immediately.
Step 2 — Workflow execution
The RabbitMQ worker picks up the purchase_order_created message and loads the tenant's active workflow definition for this event type.
The workflow engine validates the definition — checking for cycles, missing assignments, and unreachable nodes.
The first step (Request) is marked complete. The engine identifies the next step (Approval) and its assignee based on the workflow definition and the PO's value.
The worker publishes a notification event. The notification service sends an email or Slack message to the approver with a direct link to the approval screen.
Step 3 — Dashboard update
The manager sees the pending approval in their Operations dashboard. They see the PO details, the supplier, the quantity, and the deadline.
The approval action is posted to the API. The engine marks this step complete and moves to the next node in the workflow graph.
If all steps complete, the workflow is marked done. The procurement officer sees the approved status. The worker can optionally hand the completion back to an external system through a connector or follow-up automation.
Prometheus counters increment for workflow completions. The dashboard shows updated counts, average approval times, and pending queues.