ERP and CRM7 min read
Connecting legacy systems: APIs, database sync, file drops and RPA as a last resort
The old system still runs the business, and replacing it is not on the table yet. Here is how to connect it to new tools in an order that keeps the risk low.
Ryze Labs engineering team
Key takeaways
- Choose the integration method by what the old system safely supports: a documented API first, then controlled database access or file exchange, and screen automation only as a last resort.
- Every integration needs a clear owner of each record, logging, retries and alerts, or it will fail silently.
- Integrating around a legacy system is often a sensible step on its own, and it also prepares a later migration.
Many companies run a core system that is ten or twenty years old: an on-premise ERP, a warehouse program, an accounting package with a local database. It works, people know it, and replacing it would be expensive and risky. The problem is that it does not talk to the newer tools around it, so staff copy data by hand between screens.
Why legacy integration is hard
Old systems were rarely designed to share data. Documentation may be missing, the original vendor may no longer exist, and the person who understood the database may have retired. Business rules are often hidden in stored procedures or in the way users fill in certain fields.
There is also a support question. Writing to a vendor's database directly can break your support contract or corrupt data in ways the application does not expect. So the first rule is to find out what the system officially supports before choosing a method.
Start with an inventory, not with code
Before choosing any technique, write down what needs to move and why. A short inventory prevents building ten fragile connections where three solid ones would do. It also shows whether the work can be quoted as a fixed scope, or whether interfaces nobody has documented call for a phased or time-and-materials contract instead.
- Which records need to flow: orders, items, stock levels, invoices, customers, delivery notes.
- In which direction, how often and how quickly: once a night, every few minutes, or immediately.
- Which system is the owner of each record, and which only reads a copy.
- What the old system offers: an API, export functions, import formats, a readable database.
- Who supports the old system today, and what their contract allows.
Option 1: use an API if one exists
Some older systems have an API that nobody uses: a SOAP web service, a COM interface, or a newer REST layer added in a later version. Check the vendor documentation and ask your support provider. An official interface respects the application's business rules and is the option least likely to break after an update.
If the API is limited, a common pattern is to put a small integration service in front of it. That service translates between the old interface and the modern tools, handles authentication and keeps a log. The new tools then talk only to your service, which makes it easier to replace the old system later.
Option 2: database synchronisation
When there is no API, reading directly from the database is often possible and relatively safe. A sync job can copy new or changed records to a separate database or data platform on a schedule, where new tools can use them without touching the original.
- Use a read-only database user, and agree it with whoever supports the system.
- Read changes by timestamp or change log, not by copying everything every time.
- Avoid heavy queries during business hours on a database that is already slow.
- Treat writing back into the database as a separate decision, and test it in a copy first.
Writing directly into a legacy database is where most damage happens. The application may expect related rows, counters or flags that you cannot see. If you must write, use the system's own import functions where they exist, even if they are less convenient.
Option 3: file drops and scheduled imports
Many older systems can export and import files: CSV, fixed-width text, XML, or industry formats such as EDI. A file exchange through a shared folder or SFTP is unglamorous, but it is stable, easy to audit and respects the application's own import logic.
Make file exchanges robust: use unique file names, move processed files to an archive folder, reject files that fail validation instead of importing half of them, and alert someone when an expected file does not arrive. Standard formats help here; an invoice exported as structured XML is much easier to process than a PDF. When the source is a scanned document or an email attachment, our article on AI document processing covers extraction and human review.
| Method | Good for | Main risk |
|---|---|---|
| Official API | Real-time or frequent exchange with business rules applied | Limited coverage of older APIs |
| Database read sync | Reporting, dashboards, feeding new tools | Load on the old database, unclear support position |
| Database write | Rare cases with no other route | Data corruption, broken support contract |
| File exchange | Batch transfers of orders, invoices, stock | Silent failure if files stop arriving |
| RPA (screen automation) | Systems with no other interface at all | Breaks when screens change, hard to monitor |
Option 4: RPA, only as a last resort
Robotic process automation clicks through the user interface like a person would. It can connect a system that offers nothing else, and sometimes that is the only way. But it depends on screen layouts, timing and the robot's login, so small changes can stop it without warning.
If you use RPA, keep each robot narrow, log every step, and add checks that the expected result really happened. Treat it as a bridge with an end date, not a permanent solution. The same reasoning appears in our comparison of no-code and custom automation: the quickest connection is not always the one you want to maintain for years.
Example
Illustrative example: a fictional manufacturer with a twenty-year-old ERP
A fictional 80-person manufacturer runs production in an old on-premise ERP. It wants a web portal where customers can check order status. The ERP has no API, but its vendor confirms that a read-only database user is acceptable. A sync job copies order headers and statuses every ten minutes into a small separate database that the portal reads. New customer orders from the portal are written as XML files into the ERP's existing import folder, so the ERP's own rules still apply. Nothing writes directly into the ERP database.
What every integration needs to be reliable
Whatever method you choose, integrations fail in the same ways: a network drop, a changed field, a duplicate message, a password that expired. The difference between a good and a bad integration is whether anyone notices.
- Logging: every transfer records what was sent, when, and whether it succeeded.
- Retries with limits: temporary failures are retried a few times, then raised to a person.
- Idempotency: processing the same record twice must not create two orders or two invoices.
- Validation: reject incomplete or inconsistent data at the boundary instead of passing it on.
- Alerts and an owner: someone is told when things fail, and knows it is their job to fix it.
- Documentation: a short description of each flow, its schedule and its fallback.
A practical next step
List the three places where your staff retype data between systems most often. For each, check what the old system officially supports: API, import formats, export functions, database access. Start with the flow where an official interface exists and the manual effort is highest, and build it with logging and alerts from day one.
A well-built integration layer also makes a later replacement easier, because the new tools already talk to your service rather than to the old system; our ERP data migration guide picks up from there. Connecting old and new systems is a regular part of our custom ERP work and our automation projects.
General information, not legal, tax or investment advice.