BitFlowBook a Free Audit
Case Study · Logistics & Global Trade

20+ SAP processes, orchestrated by Camunda, running in production.

A global produce exporter ran its export supply chain on manual SAP updates. We replaced hours of re-keying with event-driven orchestration that reacts in seconds and fixes most of its own errors.

20+Processes automated
95%+Errors resolved automatically
SecondsUpdates that took hours
0Lost updates
The Situation

Modern SAP systems. Manual processes between them.

The exporter runs SAP TM for freight and S/4HANA for orders. Both are modern, well-run systems. The problem sat between them: every freight change had to be carried into dozens of order documents by hand, and overlapping updates kept tripping over SAP's document locks.

This is not a rare situation. It is what most SAP landscapes look like. SAP fires events when data changes, but provides no engine to orchestrate the cascade, retry the failures, or keep concurrent writes from colliding. That missing engine is exactly what we build.

The Hard Problems

Three problems every SAP-heavy enterprise eventually hits

These are the walls that stall most automation programmes. Solving them is the boutique work we specialise in.

PROBLEM 01

Two SAP systems, no native sync

What was happening

Freight bookings live in SAP TM. Sales orders, purchase orders, and stock transport orders live in S/4HANA. SAP fires events when things change, but ships no engine to orchestrate what happens next. One freight change cascades into dozens of documents, and someone had to chase every one by hand.

How we solved it

We put Camunda 8 above both systems as the orchestration engine SAP does not ship. Events from SAP Advanced Event Mesh hit a webhook and start a process instantly. The process reads the freight booking through OData, works out which orders are affected, and updates each one, with every step tracked.

Change propagation went from hours of manual work to seconds, with field-level change detection.

PROBLEM 02

Concurrent updates that collide and fail

What was happening

SAP locks a document while it is being written. When three to five purchase orders for the same stock transport order change within seconds, the updates collide: one wins, the rest fail, retries collide again, and eventually someone has to fix it in SAP by hand. There is no native queuing per document.

How we solved it

We used message correlation to give each document exactly one running process instance. Concurrent events queue up behind it and are processed strictly in order. It is the same discipline an external message queue gives you, plus process state, retries, and an audit trail in one engine.

Lock collisions eliminated by design, not by retrying harder.

PROBLEM 03

Failures nobody could see

What was happening

When a manual update failed, it failed silently. Mismatches between systems surfaced days later, usually when a shipment or an invoice did not line up. There was no record of which updates succeeded, which failed, and why.

How we solved it

Every process instance is visible live in Camunda Operate: current step, variables, history. Errors flow through a three-tier architecture. Transient SAP lock errors retry themselves with exponential backoff. Persistent failures notify the right team with full context. Only genuine judgment calls reach a person, who resolves them from a form with one decision: retry or abort.

95%+ of lock errors self-heal before anyone notices. The rest arrive with context attached.

Inside the Build

Two of the flagship processes

Both are built from reusable pieces shared across the full suite of 20+ processes, so each new process ships faster than the last.

Freight Booking Sync

A freight booking changes in SAP TM. That change must reach every linked sales order and purchase order in S/4HANA, including recalculated mode of transport and converted time zones. The manual version took hours per change.

What we built

  • 1Event from SAP AEM starts the process through a webhook
  • 2DMN decision tables determine which fields matter and how they map
  • 3The process reads the freight booking and all linked orders via OData
  • 4A multi-instance subprocess fans out across the affected orders
  • 5Sales order and purchase order tracks run in parallel, then join
  • 6Field-level comparison ensures only real changes are written back

Hours to seconds. Business rules now change in a DMN table, not a code release.

Stock Transport Order Update

Several purchase orders that belong to the same stock transport order change within seconds of each other. Writing them to SAP concurrently guarantees lock failures and a retry storm.

What we built

  • 1A sender process validates each purchase order event and publishes a message keyed to its stock transport order
  • 2One receiver instance exists per stock transport order and owns all writes to it
  • 3An event-based gateway loops: process the current event, then wait for the next or time out
  • 4Messages buffer with a time-to-live, so bursts queue instead of colliding
  • 5Dual error boundaries separate lock retries from technical failures

Sequential writes per document. Zero lock conflicts. Full per-document audit trail.

Built once, reused across every process

Lock retry subprocess

Catches SAP lock errors, waits with exponential backoff, retries, and escalates only when retries are exhausted. Written once, used by every process in the suite.

Notification subprocess

A DMN table decides who needs to know based on the process and error type. The subprocess sends the alert with process name, document IDs, and the error message attached.

Human review task

A Camunda form presents the error with its full context. The operator chooses retry or abort. Either way, the decision is recorded in the audit trail.

What Comes Next

From human-in-the-loop to agent-first exception handling

The orchestration layer is the foundation. The next step puts AI agents inside it, so even fewer exceptions need a person.

Today

Humans decide the exceptions

The 5% of errors that do not self-heal reach an operator, who reviews the context and chooses retry or abort. Every decision is logged.

Next

AI agents triage first

Camunda 8.8 lets an AI agent sit inside the process as a governed step. The agent reads the error context, checks history for similar cases, and resolves the routine ones itself. It escalates to a person only when confidence is low.

The result

Human attention where it earns the most

The share of exceptions needing a person keeps shrinking, while every agent decision stays inside BPMN governance: auditable, bounded, and reversible. Fewer interruptions, same accountability.

FREE PROCESS AUDIT

Running SAP with manual processes in between?

Book a free 30-minute audit. We will map one of your cross-system processes, show you where orchestration removes the manual work, and give you a concrete path to production.

Book a Free Process Audit