The systems that actually run a business are rarely the ones anyone wants to demo: an ERP configured over a decade by people who have since left, a CRM carrying hundreds of custom fields most of which are abandoned, a dispatch tool one person understands and everyone depends on. These are the applications a language model is now expected to make smarter, and not one of them is getting rewritten to accommodate it.
That constraint is the entire engineering problem. You are not choosing an architecture on a blank page. You are choosing which of the system's existing surfaces to attach to, and inheriting whatever that surface already guarantees. Everything it does not guarantee — identity, auditability, a way to fail safely — has to be built in the gap you just created between the model and the system.
A model attached to a business application is not a feature of that application. It is a new caller, with new rights, arriving on a surface that was designed for something else.
This article is about that gap. Whether the model is grounded by retrieval, tuned on your own data, or simply prompted well is a different decision with its own cost curve, and we argue it separately in RAG vs fine-tuning. Here we take that choice as already made, and ask what comes after it: where does the thing sit, and what has to be true around it before it is safe to run inside a company.
Three Places to Stand Beside a System You Cannot Change
There are three positions available, and the choice is usually forced by how long the answer is allowed to take rather than by preference.
- Inline. The model call sits inside a request someone is waiting on: a summary at the top of an account page, a classification applied the moment a ticket is saved. Its latency budget is not "how fast is the model" — it is whatever headroom the page has left after everything it already does, and on a line-of-business screen backed by a report query, that headroom is thin.
- Off the queue. The model runs after the fact, triggered by something that already happened: a record created, a document attached, a status changed. Minutes are acceptable. Almost every retrofit that survives contact with production starts here, because a queue absorbs provider slowness, rate ceilings and retries without anyone noticing, and because the output can land as a proposal rather than as a fact.
- Beside the system. A separate service the application does not know about, reading from a replica or calling the app's own API, and presenting results in its own surface. It is the only pattern that needs no cooperation from the team that owns the application — which is frequently the real reason it gets chosen, and is worth saying plainly rather than dressing up as architecture.
Most useful features eventually use two of the three: something queued that does the work, something inline that shows it. The failure mode is choosing inline first because the prototype felt instant. It felt instant because it ran against a handful of records on a laptop; the same call inside a page that already spends most of its budget elsewhere is what gets the feature switched off in its third week.
What Each Surface Already Guarantees
Attaching is not a single decision. The position sets the latency story; the surface you couple to sets the security and correctness story, and the two are chosen independently.
| Surface | What it hands you | What it will not give you |
|---|---|---|
| Read replica or reporting database | A complete, queryable copy with no load on the live system | Any permission model — it was built for a small trusted analytics team |
| The application's own API | Its permission checks, its validation, its business rules, and vendor support | Coverage — an API usually exposes a fraction of what the UI can do |
| Database change log or an outbox table | A durable, ordered record of every change, without touching application code | Meaning — a row diff is not a business event; you reconstruct intent yourself |
| A scheduled export or file drop | Total predictability, and an integration nobody breaks by accident | Freshness — you are answering questions about yesterday |
| A UI extension point or embedded panel | The user's live session, and their identity for free | Everything server-side: no dependable audit, no retry, no back-pressure |
The replica is where most projects start, because it is already sitting there — someone built it for the BI tool two years ago. It is also the surface that silently deletes your access control, which is the subject of the next two sections.
Writing directly into a vendor's schema is the other tempting shortcut, and the reason to refuse it is contractual rather than technical: schema changes and triggers on vendor-owned tables are exactly the sort of thing that ends support for the product you are trying to improve. When the vendor's API cannot do what you need, that is information about scope, not an invitation to go around it.
Whose Rights Is It Asking With?
Every integration reaches first for the credential that already exists: the integration user. It is provisioned, it works, and it has broad rights because it was created back when "integration" meant a batch job that ran at two in the morning against everything.
Point an interactive assistant at that credential and you have converted a nightly batch identity into an interactive query surface available to every employee with a login. The result is a permission-laundering machine: it answers questions the asker was never entitled to ask, in fluent prose, leaving no trace that a boundary was involved.
So the rule is short and unforgiving. The model acts as the user. In practice that means the retrieval step filters by the caller's entitlements before anything is fetched, not after an answer has been composed. Filtering afterwards is too late: once the text has been assembled from records this person cannot see, striking a paragraph does not unlearn it, and a paraphrase of a salary band discloses exactly what a quotation would.
It also means the instruction text is not a control. "Do not reveal compensation data" is a request made to a system that is optimised to be helpful, and it is the first thing any adversarial input in a retrieved document goes after. Access control belongs where it has always belonged — in front of the data.
The Entitlement Problem Nobody Budgets For
Which leads to the discovery that reshapes these projects, normally in week two: plenty of line-of-business applications enforce permissions in application code, not in data. There is no table you can join against to learn who may see which record. The answer is distributed across controllers and conditionals accumulated over a decade, and nobody currently employed can enumerate it.
There are three honest ways out, and one popular dishonest one.
- Route everything through the application's own API, accepting its coverage limits, so that its checks run on every read. Slowest to build, and the only option that inherits rules you cannot fully describe.
- Reconstruct the rules as data — an entitlement projection maintained beside the index and re-derived whenever roles or record ownership change. Legitimate, and it is a project of its own with its own staleness bugs, not a task on someone's sprint.
- Narrow the feature to a data class where everyone with a login is already entitled: published policies, the product catalogue, standard operating procedures, the knowledge base. Genuinely useful, unglamorous, and it ships this quarter.
The dishonest option is to build it broad and add filtering later. Retrieval indexes are precisely where "later" never arrives, because by then the feature is in use and narrowing it looks like a regression. How the retrieval itself is built — hybrid search, ranking, keeping the index current — is a separate craft we have written up in production-grade RAG; the point here is only that the filter is an input to it, not a decoration on top.
What Leaves the Building
Every call is an egress event, and the first governance artefact worth producing is a plain list of what is in one. It usually surprises people: fragments of retrieved records, the user's own question with a customer's name inside it, the system instruction containing your pricing rules, and the output of whatever tools the model was allowed to call.
Hosting choice is downstream of that list rather than a matter of taste.
- Hosted frontier model APIs — the fastest route to capability, and the vendor's data-processing terms become part of your compliance story. Two clauses do the real work: whether inputs may be used to train, and how long they are retained. A zero-retention arrangement is the difference between a prompt log you control and one you merely trust.
- A private or same-region deployment of a hosted model — traffic stays on a private network inside a jurisdiction you named. Usually the answer when residency is the binding constraint rather than trust.
- Self-hosted open-weight models — nothing crosses your perimeter, and you have taken on capacity planning, upgrades, and the fact that the capability floor keeps moving underneath you.
Compliance matters here in specific places, not as a general anxiety. Under the GDPR, sending EU personal data to a model endpoint outside the EEA is a restricted transfer requiring a lawful mechanism under Chapter V — the vendor is a processor and the transfer is real, even though nothing felt like an export. Under HIPAA, a vendor that will handle protected health information has to sit inside the business-associate chain before the first call, not after a successful pilot.
The architectural consequence is the part teams miss. The answer to "which fields may cross" almost never comes back as all or none; it comes back as a list. A list means a redaction and tokenisation step somewhere in the path, which means a place where you can be wrong. Build it as one component every call passes through, not as a filter each feature is trusted to remember.
A Model Decision Is an Event, Not a Function
Business systems assume determinism, and that assumption is load-bearing in more places than anyone lists up front: reconciliation jobs that recompute and compare, caches keyed on inputs, tests asserting exact values, and approval workflows that re-evaluate whenever a record changes.
Attach a model and the assumption breaks quietly rather than loudly. The classic symptom is a case that was classified "standard" on Monday and "escalated" on Tuesday because somebody corrected a typo in the description and the workflow re-ran the classification. Nothing was broken; the system simply asked twice.
The remedy is not a sampling parameter. It is to treat the output as something that happened once — store the decision, the inputs it was made from, and the identifier of what produced it, then read the stored decision everywhere downstream. Recompute only when a person asks you to.
- Idempotency keys come from the target, not the request. Queues deliver at least once, so a worker that posts a credit note will eventually post two. Key the action on the record and the intent — not on a hash of the payload, because a retried run may reach a different conclusion and produce a different payload for the same unit of work.
- Audit the inputs, not just the output. The rendered instruction, the identifiers of what was retrieved, the model and template version, the caller. Six months later somebody asks why the system approved a thing, and "the model decided" is not an answer that survives the meeting.
- Retry and compensation are workflow concerns, not prompt concerns. If the action spans more than one system, the shape you need is the one described in workflow engines — the model supplies a decision, the engine still owns the transitions.
Audit rows are the cheapest thing to add on day one and the most expensive to backfill, because the inputs no longer exist.
What the Screen Shows When the Model Is Down
Your feature now carries an availability dependency you do not operate. Provider incidents, regional capacity limits and rate ceilings arriving during month-end are ordinary operating conditions, not edge cases, and a path with no failure branch is a demo.
The fallback is a product decision before it is an engineering one, and there are only three honest answers.
- Hide it. The panel is not there; the page is the page it used to be. Correct for anything advisory, and the reason to keep the pre-AI layout renderable rather than deleting it.
- Show the manual path. The unsorted list, the unfiltered queue, the field the person used to type into themselves. This only works if you did not remove it — which is the actual argument for leaving it in.
- Queue it and say so. "We will finish this and let you know" is a real answer. A spinner that eventually becomes an error is not.
Two configuration details cause most of the incidents. Your timeout must be shorter than the timeout of whatever is waiting on you, or the caller gives up first and you pay for work nobody receives. And the retry budget needs a ceiling, because an unbounded retry against a degraded provider is how a slow afternoon becomes a large invoice.
Multi-provider failover, meanwhile, gets more attention than it deserves in this setting. Internal users have something customers do not: the way they did the job last year. A clerk whose summary panel is unavailable opens the record and reads it. The failure that actually costs you is not the outage everyone can see — it is the feature that was quietly wrong for a fortnight.
Nothing Changed and It Got Worse
Conventional software fails in a way monitoring can detect. A degraded model returns a confident, well-formatted, subtly worse answer, and every dashboard stays green. What makes an integration particular is that it can degrade with no deployment on your side at all.
- The provider updates the model behind an endpoint name you did not pin.
- The source data drifts — a new document type, a renamed status, a team that started using a field for something else.
- The questions drift, because people ask a tool that works for things it was never scoped to answer.
Only a few of the answers are specific to a retrofit, and those are the ones worth spending words on. Pin the model version where the provider offers one, and treat a version change as a deployment with a rollback rather than as somebody else's maintenance window. Draw the evaluation set from your own systems, and re-run it against the live corpus rather than a frozen copy — in an internal deployment the corpus is the thing that moves, so an evaluation that never changes stops measuring anything real.
Then sample production. A handful of real interactions read by a person every week catches classes of failure no automated score notices, and it is how the evaluation set stays representative instead of ossifying around launch day. The mechanics of building that set and wiring it into a pipeline we have covered for product teams in adding AI features to existing SaaS products.
Last, name an owner. An integration with no owner is not monitored, whatever the dashboard says.
Where the Spend Accumulates
We are not going to print prices; they move faster than articles do. What is stable is the shape of the bill, and in internal deployments it is rarely the shape teams brace for.
The interactive assistant everyone worries about is naturally bounded — by the number of employees and the hours they work. The surprises come from a background job attached to a busy table. A feature that runs on every save is a meter wired to your highest-volume workflow, and it keeps running at three in the morning when the integration batch fires.
- Context carried per call. A retrieval step that returns generously is charged on every single call, forever. Ranking down to the few passages that matter is the cheapest structural saving available, and it usually improves the answer.
- Calls per user action. A chain that plans, retrieves, drafts and then checks its own work costs several times what the trace in your head assumed. The count is invisible until somebody instruments one request end to end.
- Retries and loops. A retry policy without a ceiling is a spending policy without a ceiling.
- Backfill. Anything that processes existing history is a one-off charge proportional to how much history you have, and in year one it is normally the largest single line.
Routing is the other structural lever: classification, extraction and routing do not need the same capability as multi-step reasoning, and the tier belongs in configuration rather than in code, because vendor line-ups change faster than your architecture will. Caching pays unusually well inside a company — employees ask the same questions on the same days of the month — with one condition that is easy to get wrong. The cache key must include the entitlement scope, or the cache quietly becomes the leak that all the identity work was built to prevent.
What This Looks Like on a CRM, an ERP and a Service Desk
Positions, identity and failure branches are easier to check against a system you can name. Three retrofits of the shape we are asked for most often, then — patterns rather than engagements, drawn against the framework above.
The CRM Assistant That Never Sends
An account owner opens a customer record and sees what has moved since they last looked, with a couple of follow-ups worth making. That work runs off the queue — recalculated when activity lands, not while somebody waits — and only the reading is inline. Nothing about a suggested follow-up is worth a spinner.
It acts as the person reading the page, and in a CRM the entitlement boundary is ownership: territory, account team, role hierarchy, sharing rules written for a reorganisation nobody remembers. Those rules live in application code, not in a table you can join, so it reads through the CRM's own API and accepts the narrower coverage; the replica offered to you first has no concept of territory.
It writes to fields it owns: a suggested next step, a task for the rep. It does not send, does not log activity as though a person did it, and does not move a stage — the stage feeds a forecast that leaves the building in a board pack, and editing it back does not undo that. Unavailable, the panel is not on the page and the record renders as before.
The Procurement Assistant That Cannot Buy Anything
A buyer wants the week's vendor activity summarised and the odd items surfaced: a price that moved against the contract, a delivery pattern that changed, one vendor paid under two records. That is queue work by nature — a goods receipt, an invoice posting, a change to the vendor master — and month-end settles it: that is when the assistant is most wanted and when nothing new may be added to the request path.
It acts as the buyer, and an ERP is unusually generous here: the entitlement boundary is org structure — purchasing organisation, plant, cost centre — and org structure is data. The entitlement projection described earlier is a real option here rather than an archaeology project — which is why this shape gets furthest before meeting the permissions wall.
Everything it produces is a proposal attached to a document: a note on a requisition, a flag for review, at most a draft that cannot transmit. It does not release a purchase order, amend a payment term, or touch a vendor's bank details — the one write here a fraud team will ask about by name. Unavailable, it stops flagging; the reports the team ran before still run.
The Service Desk Copilot That Never Closes a Ticket
Tickets arrive, receive a proposed category and priority, and carry a draft the agent takes or discards. This is the queue position at its most literal: the trigger is the ticket being created, and seconds of lag vanish into a queue measured by waiting.
It acts as the agent who will own the ticket, and the entitlement boundary is a queue and a customer. The leak here is not the ticket but the knowledge: retrieval for a drafted reply reaches into runbooks, internal notes and other customers' resolved cases, so the filter runs before retrieval, not over the finished draft. An internal workaround quoted verbatim into a customer reply is what this pattern gets wrong, fluently.
It may set its proposed fields and write its draft. It may not send, close, merge, or reassign off the desk — and priority deserves naming as a write that looks reversible and is not, because the clock it starts has already run by the time somebody corrects it. When it is down, tickets land unclassified in the default queue — which only works if the queue still sorts without that field.
| Pattern | Surface | Acts as | May not | If the model is unavailable |
|---|---|---|---|---|
| CRM sales assistant | Off the queue, read inline | The account owner, bounded by territory and sharing rules | Send, log activity as a person, move a stage | Panel absent; the record page renders as before |
| ERP procurement assistant | Off the queue, on posting and master-data events | The buyer, bounded by purchasing organisation and plant | Release an order, amend terms, edit bank details | Flagging stops; existing exception reports still run |
| Service desk copilot | Off the queue, on ticket creation | The assigned agent, bounded by queue and customer | Send, close, merge, reassign off the desk | Tickets land unclassified in the default queue |
Read down the last two columns and the shape behind all three is visible: everything they may do can be undone by the person who receives it, everything they may not do leaves the building. One gate, applied three times — and it is the gate somebody has to sign.
Who Signs Off on What It May Touch
Governance here is not a policy document. It is three artefacts that either exist or do not, and each one is checkable by somebody who was not in the room when the feature was built.
- A register. Every deployed integration: which system it attaches to, at which surface, which data classes it may read, which actions it may take, which model and vendor sit behind it, who owns it, when it was last reviewed. It is dull, and it is the first thing requested in a security review, an audit or an incident. The only version worth keeping is the one maintained as a condition of deployment rather than assembled afterwards from memory.
- A reversibility gate. This travels further than an autonomy policy, because a team can apply it to a new feature in a single meeting. The model may take actions it can also undo — draft, tag, suggest, assign, flag, prioritise. Anything irreversible outside your walls goes through a person: money moving, a message reaching a customer, a regulatory filing, a record another organisation will act on.
- An approval trail on the proposals themselves. If the answer to "who approved this" is a name and a timestamp on the record, the feature is governable. If the answer is "the workflow ran", it is not.
Whether what you end up with is better described as an assistant or an agent is a real distinction, and one we have drawn elsewhere; the gate above reads the same either way.
Then the part nobody schedules. The risk in an established organisation is usually not the integration engineering built and documented. It is the four that a department assembled from a spreadsheet plugin and an automation tool, pointed at a shared drive, and never mentioned. A register covering only engineering's work describes a fraction of the surface, and the sweep to find the rest is a governance task, not an IT one.
An Order That Stays Reversible
If there is a sequence that keeps the options open, it is this one — and note that every step before the last is cheap to undo.
- Pick one decision or one question a person makes repeatedly inside one system, and write down what a right answer looks like before writing anything else.
- Attach off the queue, even if the eventual feature belongs inline. It is the position where being slow or wrong is survivable while you learn what the data actually says.
- Make it act as the caller from the first commit. Identity retrofits are the ones that never happen.
- Land the output as a proposal a person accepts or rejects. The acceptance rate is your first honest evaluation signal, and it costs nothing to collect.
- Write the audit row before the feature is useful, not after it is trusted.
- Move it inline only when acceptance says people would rather have it immediately than perfectly — and give it a rendered state for the day it does not arrive.
The pattern under all of this is that the model is the easy part. The system around it — whose rights it borrows, what it is allowed to change, what it does when it fails, and who can reconstruct why it said what it said — is the actual work, and it is work that has to happen outside an application you are not permitted to touch.
That is the shape of the LLM integration engagements we take on, and the questions our AI engineers ask in the first week are the ones above rather than which model to use. If you are looking at a business system that would be worth more with a model beside it, tell us what it runs on and we will tell you which surface we would attach to and why.
Frequently Asked Questions
How do you connect an LLM to an ERP or CRM you cannot modify?
There are three places to attach it: inline, inside a request someone is waiting on; off the queue, triggered after a record changes; or beside the system, as a separate service reading a replica or calling the application's own API. Most retrofits that survive production start off the queue, because a queue absorbs provider slowness, rate ceilings and retries, and output can land as a proposal.
Should an AI assistant use a shared integration account to read business data?
No. A shared integration user usually has broad rights, so pointing an assistant at it lets any employee ask questions they were never entitled to ask. The model should act as the user, with retrieval filtered by the caller's entitlements before anything is fetched. An instruction telling the model not to reveal data is not a control; access control belongs in front of the data.
Can I send ERP or CRM data containing personal data to a hosted LLM under GDPR?
You can, but sending EU personal data to a model endpoint outside the EEA is a restricted transfer that needs a lawful mechanism under Chapter V of the GDPR, with the vendor acting as a processor. Check the vendor's terms on training use and retention, and route every call through one redaction and tokenization component rather than trusting each feature to filter.
What should an AI feature do when the LLM provider is down?
Decide the fallback as a product choice before building. There are three honest answers: hide the feature so the page renders as it did before, show the manual path such as the unsorted list or the field people used to fill in themselves, or queue the work and tell the user it will finish later. Also keep your timeout shorter than the caller's and cap retries.
What actions should an AI assistant inside an ERP or CRM be allowed to take?
Apply a reversibility gate: the model may take actions it can also undo, such as drafting, tagging, suggesting, assigning and flagging. Anything irreversible outside your walls, including moving money, a message reaching a customer, a regulatory filing or a record another organization will act on, goes through a person. Each proposal should carry a name and timestamp showing who approved it.
