A hundred ERPs, a hundred microservices
The big AI vendors sell to corporations with clean data or to individuals on their own. In between there are thousands of companies with an old ERP, three Excel files, and a desire to use AI. How to build a first product for them, and why it's better to have a small first version, but one designed to scale.
Translated automatically from Spanish.

A distributor, a mid-sized factory, a chain of twenty stores. Fifty, a hundred, three hundred people. They've heard everything AI can do, they've tried one of those assistants you use from the browser, and the question they always ask me is the same: "And how do I connect this to my own stuff?".
The reality is that, in the best case, they have an ERP they chose ten years ago that solved their Excel problem. Sometimes it has an API. Sometimes it's a desktop application running on a server in the office that nobody dares touch. Next to it there are a couple of spreadsheets someone updates on Mondays, a separate invoicing system, and a WhatsApp group where urgent things are requested. The data exists, but it's scattered, and each system calls the same thing by a different name.
For these companies, the AI from the big providers doesn't reach them. Not because the model isn't good, but because the problem isn't the model. It's the integration. And I know this because I had to deal with exactly that problem up close.
Why the big players don't reach them
The big AI providers solve two extremes very well. On one end, the person who wants to write, summarize, or code faster: a chat, a subscription, done. On the other end, the corporation that already has a tidy data warehouse, a data team, and budget for a six-month integration.
The middle gets left out for a simple reason: in the mid-market, integration is the entry point to the product. Each client has a different combination of systems, with messy data, legacy codes, and business rules that only one person in administration knows. That's not solved with a bigger model or a generic connector. It's solved by understanding the business and translating its data, client by client, into something a model can work with without making things up.
It's unglamorous, last-mile work, and that's exactly why it's an opportunity. I see it the same way in Latin America and in Spain: thousands of companies with the same problem and almost nobody building for them.
One microservice per ERP: what I learned the hard way
In my last job we built a product that had to connect with public agencies and with clients' accounting systems. The first three clients used three different ERPs, each with its own data model, its own formats, and its own quirks.
The system that had been built looked like the tidiest option: one microservice per ERP. Each integration isolated, with its own deployment and its own maintenance. On the diagram, it looked impeccable.
In practice, we lived in constant migration. Every time an ERP changed a version, an endpoint, or an export format, you had to touch its service, test it, and deploy it, and often that dragged changes into the rest of the system. The migrations never ended. The roadmap stopped being decided by the product and started being decided by the update schedule of three vendors we didn't control.
And the math didn't add up. If three ERPs were three microservices, a hundred ERPs were going to be a hundred microservices. A hundred pieces to operate, monitor, and migrate, that added nothing for the user. It didn't scale, and not because of a technical problem, but a design one: the architecture was built around external dependencies, not around the use case.
For me, the solution comes down to changing the angle: the foundation of the architecture has to be scalable by design, built around the use case and not around external dependencies. It doesn't matter if it's tax management software, accounting software, or a data-driven AI platform. ERPs, APIs, and formats are input details. They get translated at the edge, as fast as possible, into a common model. Everything behind that edge shouldn't know which system each piece of data came from.
Because the use case isn't in the backend. It's in the user. The purchasing manager who wants to know what to order this week has zero interest in which ERP their company uses. They want the same answer, equally good, whatever their system is. And when you aim to scale across users and clients, that's where the dependency lies: not in the type of data, but in the solution common to all clients. That solution is the product. The integrations are the toll to get there, and it's worth making that toll cheap.
The two ways to get it wrong
With that experience behind me, I see that whoever builds for this segment usually falls into one of two extremes.
The first is a prototype built around one client. A demo put together quickly, which works for the first pilot but not for a second client. It's fine for validating the idea, and in fact it's the best way to start. The problem shows up when you have to do the same demo for another potential client: the first client's data is mixed in with the logic, the integration was done by hand, and there's no way to separate one client from another. Every new client is a new project.
The second is the one I inherited: a large-company architecture for a product that's just starting out. A microservice for every external system, each with its own deployment and its own maintenance. It looks serious on a diagram, but it multiplies the pieces you have to operate, slows down every change, and ends up spending months maintaining integrations instead of improving the product. With three clients, what matters isn't traffic or technical scale. It's understanding the problem from the root common to all three, not from a "custom" solution for each one.
Five principles for the first version
1. A modular monolith, not microservices. A single application, with well-separated modules: connectors, data model, semantic layer, AI, application. Fewer pieces, lower cost, more speed. If someday a module needs to scale on its own, it gets extracted. That day isn't day 1 or day 60, and it's certainly not split by external provider.
2. A common data model for all clients. This is the most important principle. Each external system, ultimately, is just data that gets translated into the same entities: sales, products, customers, stock, purchases. The AI, dashboards, and automations always work on top of that model, never on each client's raw data. That way, adding a client means translating their data, not building a new product.
3. AI converses and writes; numbers come from queries. The model never calculates or makes up a figure. When someone asks "how much did we sell of this product in October?", the model interprets the question, calls a tool that queries the semantic layer, and writes the answer with the number the query returned. If the number didn't come from a query, it doesn't appear. A data-driven product exists to make better decisions. If the figures aren't real, decisions get made with incomplete information, or worse, with made-up information.
4. Multi-client security from day one. This is the one thing you can't leave for later. You're asking a company to connect you to their sales, their margins, and their customers. The promise that their data is isolated from another company's is part of what you're selling. Adding it later means reviewing every single query in the system. And queries, moreover, need permissions from day zero, because within the same company not everyone should see the same thing: the general manager sees margins, a salesperson sees their own customers, and someone in the warehouse sees stock. AI is no exception. When it queries on someone's behalf, it should only be able to see what that person has permission to access. If permissions aren't baked in from the start, the chat ends up answering with data the user should never have seen.
5. Lightweight connectors at the edge. A connector only extracts and maps; it has no business logic. Adding a client with a new management system should mean a mapping file and some configuration, not a new service or new code in the core. If every integration touches the heart of the product, every new client changes the product for everyone.
The architecture, in layers
With those principles, the architecture gets organized into layers that can be built and tested one at a time:
| Layer | What it does |
|---|---|
| Connectors | Extract data from each of the client's sources, on a schedule and idempotently |
| Raw data | Store an untransformed copy, separated by client |
| Common model | Translates everything into the same entities, with data quality tests |
| Semantic layer | Defines each metric only once: margin, turnover, average ticket |
| Permissions | Filter every query by client, role, and user, including the ones the AI makes |
| AI | Chat, insights, and suggestions, using tools on top of the semantic layer |
| Application | Dashboards, automations, and administration |
Notice where the ERPs show up: only in the first row. From the common model upward, no layer knows where the data came from. If a client shows up tomorrow with a system you've never seen, you change the first layer and nothing else. If a vendor releases a new version, you update a mapping, you don't migrate a service.
The semantic layer deserves its own paragraph. It's the one that keeps "margin" from meaning one thing on the dashboard, another in the chat's answer, and yet another for the C-level. Each metric is defined once, in a single place, and everything else consumes it. For AI, this is key: instead of writing free-form SQL over messy tables, the model chooses among metrics and dimensions that are already defined and tested. The answers are more consistent and much easier to audit.
For systems without an API, a scheduled CSV or Excel export is enough to get started. It's not elegant, but it lets you onboard a client in days instead of months, and validate the product with companies you'd otherwise have to turn away.
On the technology side, it's clear to me at the start: managed services, in the cloud where your first clients' data already lives, with infrastructure defined as code and automatic deployment. Nothing that, with a small team, you need to firefight.
What you leave out at the start
This is the hardest part, because everything you leave out seems important. But in a first version, the goal isn't the architecture. It's getting the first paying clients and understanding why they pay.
So in the first version you shouldn't prioritize:
- Automations. Chat and dashboards first. Once you know which questions keep coming up, you'll know what to automate.
- Custom integrations for legacy systems. If the timeline is tight, replace them with scheduled exports.
- Multi-region and scale optimization. Until you have clients in another region or a real performance problem, it's work that goes unused.
- Microservices. I already told you how that ended. It's the strongest temptation, because it looks like the responsible decision.
Everything you don't build is something you don't have to maintain while you're learning what your clients want. And what you learn from the first pilots is going to change more than half of what you would have built in advance.
What does belong, even if it seems premature: isolation between clients, role-based permissions, auditing of every query (including the ones AI makes), and a written commitment that client data isn't used to train models. That's non-negotiable; it's trust, and without trust there's no scaling.
Something many also overlook: measuring what actually matters to the user. Not visits or clicks, but how they really use the solution. What they ask the chat, which questions they repeat, which answers they use to decide something and which they ignore, at what point they give up. And above all, asking for feedback in the moment, while they're using the application: a "was this answer useful?" next to each result is worth more than a "Do you like the application? Rate us how many stars you'd give us".
That kind of tracking is a differentiator twice over. For the client, because they feel the product listens to them. For you, because it's the only real information you'll have to decide what to build after the MVP.
The risks you do need to watch
For me there are three basic ones:
- ERPs with no API or database access. These are mitigated with scheduled exports: if there's constant operation, you can think about a more scalable solution for a second version (like recommending or helping with an ERP replacement, if it brings more value to the client). But at the start, a file is better than not serving the client at all.
- Messy data. Mid-sized companies have duplicate codes, products with three different names, and dates in four different formats. Input contracts, quality tests on the common model, and alias tables for legacy codes. It's not glamorous, but it's the job.
- Depending on a single LLM provider. It's the same trap as with the ERPs, just at a different layer. A thin abstraction so you can switch models when the price, quality, or terms change. Lately the pace is so aggressive that they can change every week.
The opportunity is in the business
The gap between what AI can do and what a mid-sized company can actually use doesn't get closed with better models. It gets closed by someone who sits down with the person in charge of administration, understands why there are two codes for the same product, and translates that into something a model can work with without making things up.
And it gets closed with an architecture that looks toward the user, not toward the systems it depends on. Small, well separated, with integrations at the edge and a common solution at the center, that lets you add clients without rewriting everything and changing direction every week. I learned the difference with three ERPs. It's better to learn it before you reach a hundred.