Manufacturing Execution and ERP API Integration Resilience Report
Design resilient transactional API contracts and failover architectures between MES and ERP platforms.
Use this template when auditing or redesigning transactional API integrations between shop-floor MES platforms and enterprise ERP backends. It generates an integration resilience report detailing transactional boundaries, idempotency, and dual-write mitigations.
Role: Lead Enterprise Integration Engineer specializing in mission-critical manufacturing ERP-MES transactional backends.
Context
- Manufacturing Execution System: {{mes_vendor_platform}}
- Core ERP backend: {{erp_backend_system}}
- Daily transactional volume: {{sync_transaction_volume}}
- Traffic distribution: {{batch_vs_realtime_ratio}}
- Idempotency and deduplication approach: {{idempotency_strategy}}
- Maximum allowable recovery time: {{failover_rto_minutes}}
Task
Author a comprehensive API integration resilience report that establishes transactional consistency, asynchronous messaging patterns, compensation protocols, and outage recovery procedures between the shop floor MES and the enterprise ERP.
Method
- Analyze interface boundaries and API endpoints across {{mes_vendor_platform}} and {{erp_backend_system}} for work order releases, material consumption, and finished goods inventory updates.
- Evaluate payload throughput and latency impacts given {{sync_transaction_volume}} under the {{batch_vs_realtime_ratio}} operational profile.
- Design an event-driven transactional outbox pattern to eliminate distributed two-phase commit locks and dual-write inconsistencies.
- Detail the operational implementation of {{idempotency_strategy}} using deterministic hashing, distributed key stores, and unique correlation headers.
- Model retry policies with exponential backoff, jitter, and dead-letter routing to prevent upstream cascading saturation.
- Formulate automated compensation transactions (Saga pattern) for partial failure states across production order confirmations.
- Define the failover orchestration and state reconciliation runbook required to satisfy {{failover_rto_minutes}} target recovery.
- Outline API security, mutual TLS authentication, token caching, and payload audit logging.
Constraints
- MUST NOT prescribe synchronous REST calls for high-frequency inventory deduction events.
- MUST provide clear JSON or OpenAPI contract snippets illustrating idempotent header enforcement.
- All state synchronization proposals must enforce zero dual-writes.
- Outage reconciliation workflows must run autonomously without requiring manual database record patches.
Output format
Deliver an engineering audit report organized as follows:
- Section 1: Integration Architecture & Transaction Boundary Map
- Section 2: Resilient Messaging & Outbox Implementation Spec
- Section 3: Idempotency, Concurrency & Conflict Resolution Matrix
- Section 4: Saga Compensation & Failure Handling Workflows
- Section 5: Disaster Recovery & State Reconciliation Runbook (RTO Target: {{failover_rto_minutes}}) Target length: 1,400 to 2,000 words.
Self-review
- Ensure both {{mes_vendor_platform}} and {{erp_backend_system}} specific integration quirks are addressed.
- Confirm the Saga execution flow covers both forward execution and backward compensation.
- Verify that the idempotency design covers edge cases such as duplicate network packet retries.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.