ERP

Integrating a Legacy ERP with a Modern API: Approaches and Pitfalls

AS400, SAP, Oracle, in-house ERP — connecting a legacy system to a modern CRM is one of the most complex challenges in enterprise software. Here are the patterns that actually work.

In the majority of custom CRM projects for mid-market companies, there's a legacy ERP that needs to be integrated. Whether it's an AS400, a SAP R/3 from the 2000s, an Oracle system, or an in-house ERP written in VB6, the challenge is always the same: get different generations of technology talking to each other without compromising either system.

Pattern 1: Event-Driven with a Message Queue

The most resilient integration pattern for legacy systems: don't call the legacy directly from the CRM. Instead, publish events to a queue (RabbitMQ, AWS SQS, Redis Bull) that the legacy can consume at its own pace. Benefits: full decoupling, no availability dependency, message replay on error.

Pattern 2: API Gateway / Adapter Layer

  • →Create an adaptation layer between the modern CRM and the legacy system
  • →The CRM always calls a standardized REST/GraphQL API
  • →The adapter translates those calls into the legacy's protocol (SOAP, flat files, direct DB)
  • →Advantage: the CRM is shielded from the legacy's technical details
  • →If the legacy is replaced tomorrow, only the adapter changes — not the CRM

Pattern 3: Intermediate Database Synchronization

When the legacy allows no direct integration (no API, no webhook), synchronization via an intermediate database is a pragmatic solution: the legacy writes to staging tables, an ETL job reads those tables and pushes data into the CRM. Less elegant, but often the only workable option.

Classic Pitfalls

  • →Tight coupling: synchronous direct calls between CRM and legacy — a timeout in the legacy blocks the CRM
  • →No error handling: a silently failed message creates invisible data drift
  • →Ignoring transactions: an order created in the CRM but not in the ERP = accounting inconsistency
  • →Underestimating scope: a 'simple' legacy integration rarely takes less than 2 months

Observability: The Key to Maintaining the Integration

An integration without structured logs and alerts is a ticking time bomb. Log every exchange systematically (timestamp, direction, payload, response, duration, any error). Set up alerts on error rates and latency thresholds. Your support team will thank you.

Have a custom CRM project in mind?

Confidential call · Response within 24h · No strings attached

Start a Conversation