AI on top of a legacy ERP you cannot touch: building on it without breaking the operation
When the ERP can be neither replaced nor modified, the AI is built on top: read its data through the routes it already offers, keep it in a read cache of your own, and have the dashboard query that cache instead of the ERP. The AI works on the same data. That is how CARS Control is built on the Manager ERP, and the same pattern works for a clinic or any operation that depends on a system nobody wants to touch.
Why the ERP stays untouched
An ERP is where the operation’s records live: sales, stock, purchasing, credit, finance. It usually does that record-keeping well. The hard part is answering management questions with it (what sold, what is running low, what to buy), which ends in exported reports cross-referenced by hand.
The reasons not to touch it vary by company: the cost of a migration, the risk of stopping the operation, a vendor who controls the system. On CARS Control, the dashboard we built for Indumotora on top of the Manager ERP, replacing the ERP was not an option, and neither was modifying it. Accepting that constraint up front saves arguments and shapes the architecture.
Read through the routes that already exist
The first step is to list every way you can read without changing anything. CARS Control has two: a SOAP client for Manager and SQL Server queries. Neither requires modifying the ERP.
Other systems offer different routes, sometimes very modest ones. Several show up in our healthcare projects:
- Excel spreadsheets: the surgical quotes in MED360 Presupuestos and the referrals in CCDM enter the system as spreadsheet uploads.
- Syncing with another system: the Instituto Cardiovascular laboratory syncs with Bionet.
- Email: in DataClinic, a GitHub Action syncs appointments from Gmail.
None of these is elegant, and all three work. What matters is that the route is stable and that the new system does not depend on the old one changing.
A read cache between the ERP and everything else
On CARS Control I put a read cache in MongoDB between the dashboard and the ERP. The dashboard queries the cache, not the ERP, so queries are fast and do not load the system the operation depends on.
That cache forces a decision worth making explicit from day one: how stale the data can be in each area. As a general rule, not everything needs the same freshness, and it is better to agree on it with the people using the dashboard than to find out when a number does not add up.
Keeper uses a similar idea in a different setting: a separate analytics layer, so that managers’ queries over 1.53 million visits do not load the day-to-day operation.
Where the AI comes in
Once the data sits in a place of your own, the AI has something to work on. CARS Control has an AI module for asking questions about sales, stock, purchasing, credit, finance and supply, with language models connected through OpenRouter.
My general advice: have the model answer from queries over data that is already clean, rather than reading raw exports, and route the connection to the models through your own interface so you can swap them. It is the same approach we use in SuiteMedica’s booking agent.
ICV OS, the finance platform of Instituto Cardiovascular, also adds an AI module through OpenRouter to a platform that already organises doctor fees, treasury, the income statement and occupancy.
Tests: where things break
Integrating with someone else’s system is where things break without warning: a field that changes format, a SOAP service that responds differently, a value that arrives empty. That is why CARS Control has 149 test files on Vitest across the API and the dashboard.
Tests do not stop the other system from changing, but they make the change show up in continuous integration instead of in Monday’s management meeting.
The same pattern in a clinic
Clinics also work with systems they cannot change: health-insurance vouchers, payment terminals, the tax authority. On SuiteMedica, the integrations with IMED electronic insurance vouchers and Haulmer/TUU payment terminals are in production. On HemoSuite, invoicing connects to SII, Chile’s tax authority. In every case the new system adapts to the existing one, never the other way round.
The pattern is the same as with a commercial ERP: read through the available route, store what you need in a place of your own, build the dashboard and the AI on that copy, and test the integration more than any other part.
What this approach does not solve
CARS Control reads from the ERP: it neither replaces nor modifies it. If a project needs to write to the ERP, for example creating purchase orders from the dashboard, that is a different problem, and it means agreeing with the system’s owner on how and where writes happen.
I also do not publish evaluation, latency or cost metrics for the AI module. What I can share is the architecture and why I chose it. For the context of how I work with constraints like these, see the note on Forward Deployed Engineers.
If you have a system that cannot be touched and want to add AI to it, tell me about it at hola@bcristi.com.