Engineering notes
Business API Integration: Design for Failure and Recovery
Connect sales, accounting and operations with clear ownership, bounded retries and a recovery workflow your team can actually use.
An integration is unfinished if it works only while both systems are healthy. Consider a hypothetical distributor sending approved sales orders to accounting. A timeout can mean the invoice was never created, or that it was created and its response was lost. A useful integration makes that uncertainty visible and recoverable.
Agree on ownership before mapping fields
List the business objects crossing the boundary and identify the authoritative owner of each field. Accounting may own the invoice number while sales owns the customer request. A two-way sync without these rules creates a loop in which both applications overwrite each other. Map stable identifiers rather than display names, and preserve the remote identifier after the first successful association.
Write down units, currency, timezone, optional fields and the meaning of deletion. An empty address must not become permission to erase a verified address in the destination. Keep sample payloads containing only invented data, including missing and malformed values. The contract should explain what a human must do when no mapping exists.
Generated editorial illustration; not a record of a live system.
Separate local acceptance from remote completion
The sales application can accept an approved order before accounting is available, provided the interface clearly says awaiting export. Persist the export request alongside the approval transaction, then process it independently. Record pending, processing, completed and needs-review states with timestamps.
Do not display a green completed status because a job was merely added to a queue. Show the remote reference only when the destination has confirmed it. If immediate cross-system consistency is essential, discuss the availability cost with the business rather than quietly assuming that asynchronous delivery is acceptable.
Retry only when repeating the action is safe
A read is different from creating an invoice. HTTP method semantics help describe intent, but a remote API's documented behaviour determines how your application can safely retry a business operation. Use a stable operation identifier where the destination supports idempotency; otherwise reconcile by an agreed external reference before creating again.
Set connection and response timeouts, classify transient and permanent failures, and cap retries with backoff and jitter. Invalid customer data needs correction, not an endless retry loop. Keep one retry owner so the HTTP client, worker and scheduler do not multiply attempts. Never log authorization headers while diagnosing a failed request.
Make recovery a product feature
An operations screen should answer: which order is affected, what was the last attempt, what is uncertain and who owns the next step? Let an authorized operator correct a mapping or retry an operation through the same guarded path as normal processing. Store the reason and the resulting remote reference.
Reconciliation compares local intentions with destination records independently of delivery logs. This catches gaps after prolonged outages and uncertain responses. A successful API status is useful evidence but does not prove the destination applied every expected business rule. Validate important returned fields and route discrepancies for review.
Roll out one workflow with explicit acceptance tests
Start with one order type and a small, agreed set of accounts. Test a remote outage, rate limiting, malformed responses, duplicate export requests and a timeout after remote creation. Change a mapping while work is queued and confirm which mapping version the job uses.
The handover should include the data contract, replay procedure, alert owner and a reconciliation report. Track oldest pending export and unresolved mismatches before adding more integrations. These signals describe operational health; they are not evidence of reduced staffing or increased revenue. Review the systems integration service when the current process requires a concrete implementation plan.
Worked example and implementation boundary
Suppose export operation X-17 sends order O-52 to accounting. Accounting creates invoice I-88, but the response is lost. The local operation remains uncertain. If the destination supports a documented idempotency key, a retry uses X-17; otherwise the recovery workflow searches by an agreed external reference or asks an operator to reconcile it. A second invoice is not created merely because the first request timed out. This scenario depends on destination capabilities, which discovery must verify.
Trade-offs and limitations
A durable outbox adds state and operational work, but avoids coupling order acceptance to a remote service's availability. Immediate confirmation may still be required for some commitments. Define that requirement explicitly instead of promising both unconditional availability and immediate cross-system consistency.
Common pitfalls
Avoid retrying validation errors indefinitely, letting several layers multiply attempts, or treating an HTTP success code as proof that every important returned field is correct. Never use a display name as the only cross-system identity.
Key takeaways
Assign data ownership, preserve operation identity and give uncertain delivery a recovery state. A small integration is ready for handover when an operator can reconcile a timeout-after-success without duplicating the business object.
References and further reading
Related reading and implementation support
Related content
Systems Integration and Business Workflow Automation
Connect your applications and automate repeatable processes with clear rules, visible status and a defined way to handle exceptions.
Reliable Background Jobs for Business Workflows
Design reports, imports and notifications with durable job states, safe retries and recovery that survives worker restarts.
Define the implementation boundary
Discuss business API integration in the context of your current systems, decision owners and exception paths, then define a bounded first step.
Discuss your project
