To talk to your ERP means asking a question in ordinary words, such as “What did we sell to Kestrel Metals last month?”, and getting an answer built from the ERP’s own data, without opening a report builder or writing a query. Behind the scenes an AI agent turns your sentence into calls to the ERP’s API with the right parameters, runs them under your permissions, calculates the figures exactly, verifies them and shows where every number came from.
The parts that make this trustworthy are less obvious. This guide covers what plain language involves, API tools versus text-to-SQL, better questions, failure modes and how to start.
What “plain language” really means
A natural language ERP query passes through five steps. Each one can go right or wrong on its own.
- Intent. What is being asked? A total, a list, a comparison, a single record, or a change?
- Tools. Which operations can answer it? In a well-built setup, each ERP endpoint is a described tool such as
customers.searchororders.list, and the agent only sees the tools you are allowed to use. - Parameters. Which customer, which dates, which status, which warehouse? This is where most mistakes happen.
- Clarification. If something is ambiguous, a good agent asks instead of guessing.
- Answer. The results come back as rows. The calculation engine computes totals and comparisons exactly, and the language model writes a short answer that cites those results.
Here is what step 3 can look like for “What did we sell to Kestrel Metals last month?”, asked in November 2026:
{
"tool": "orders.list",
"arguments": {
"customerId": "C-10482",
"dateFrom": "2026-10-01",
"dateTo": "2026-10-31",
"status": "invoiced"
}
}
The customer ID came from an earlier customers.search call. The dates came from today’s date and your time zone. The status came from the tool’s description, which says that sales are counted from invoiced orders. None of this is visible in the question, and all of it shapes the answer.
Dates and fiscal calendars
“Last month”, “this quarter” and “year to date” only make sense relative to today’s date and your time zone, so the agent needs both. Fiscal calendars add another layer: if your fiscal year starts in April, “Q1” is ambiguous. A careful agent asks which one you mean or states the dates it used. When in doubt, say “fiscal Q1” or give explicit dates.
Units, currency and definitions
“Sales” can mean gross or net, with or without tax, ordered or invoiced. Quantities can be pieces, boxes or kilograms. Amounts can be in several currencies. No calculation should add euros to dollars without a conversion rate, so a good answer reports each currency separately or tells you which rate it used. In ORQEN, a total is not produced from mixed currencies; the answer explains why and shows the figures per currency.
Clarifying questions
If two customers are called “Kestrel”, the right response is a short question with both options, not a guess. A clarifying question costs a few seconds; a confident wrong answer can cost a decision.
API tools or text-to-SQL?
There are two main ways to talk to your data in an ERP. One lets the model call the system’s API through described tools. The other lets the model write SQL against the database, an approach often sold as “chat with your database”.
| API tools | Text-to-SQL | Read-only SQL views as tools | |
|---|---|---|---|
| How it works | The model picks a described tool and fills its parameters | The model writes a query against the schema | The model calls a curated view like any other tool |
| Business logic | Applied by the ERP (document status, posting rules) | Bypassed; the model must know which tables and flags matter | Built into the view by someone who knows the data |
| Permissions | Per tool, row and field | Usually per database user | Per tool, row and field |
| Typical risk | A missing tool for a new question | Wrong joins, misread columns, heavy queries | The view must be kept in step with the system |
| Writes | Possible, as drafts that wait for approval | Should never be allowed | Not possible; read only |
ERP schemas are large, table names are often cryptic, and the meaning of a row depends on flags that only the application understands. That is why API tools are the safer default: the ERP applies its own rules, and you decide exactly what the agent can call.
SQL views make sense where there is no usable API, for example an older on-premises system or a reporting database. Define a handful of read-only views around real questions, such as open receivables or stock by warehouse, and treat each view as a tool. ORQEN imports read-only SQL views next to OpenAPI, Postman and SOAP sources, and they go through the same review and permissions as any other tool.
How to phrase questions that get good answers
You don’t need special syntax, but specific questions get better answers. Name the entity, the period, the measure and the grouping you want.
| Weak question | Better question | Why it helps |
|---|---|---|
| How are sales? | How do this quarter’s invoiced sales compare with the same quarter last year, by region? | Measure, period, comparison and grouping are clear |
| Show me Kestrel. | Show open orders for Kestrel Metals, newest first. | The record type and the order are defined |
| Any problems with stock? | Which items in the Istanbul warehouse are below their minimum stock level? | “Problem” becomes a rule the system can check |
| Who owes us money? | Which customers have invoices more than 30 days overdue, and how much in total? | A clear threshold and a total |
| What happened last month? | What changed most in operating expenses compared with last month? | One measure, one comparison |
| Pay the suppliers. | Prepare payment orders for supplier invoices due on Friday. | The scope is clear, and the result is a draft for approval |
Follow-up questions work too. After a regional comparison, “Which customers drove the drop in the South?” carries the period and measure forward.
Common failure modes and guardrails
Each common failure has a guardrail that does not depend on the model behaving perfectly.
- Wrong record. The agent picks the wrong customer or item. Guardrail: clarifying questions when a search returns several matches, and answers that name the record they used.
- Wrong period. “Last month” read as the last 30 days. Guardrail: today’s date and time zone in context, and a stated period in the answer.
- Invented numbers. The model writes a figure that is not in the data, a classic hallucination. Guardrail: the calculation engine computes every total exactly, and each number in the answer is verified against the tool results before it is shown. See LLM math accuracy.
- Partial data. A result was cut off by paging or a size limit. Guardrail: the result is marked incomplete, and no total is produced from incomplete or truncated data.
- Seeing too much. A user gets rows or fields outside their role. Guardrail: permissions checked on the server on every tool call, with row filters and field masks. See role-based access control for AI agents.
- Unintended changes. A question is read as an instruction to write. Guardrail: writes are drafts that wait for a person’s approval.
- Instructions hidden in data. A product description says “ignore your rules”. Guardrail: the model can only call the tools the user is allowed to use, and policy is enforced outside the model.
Getting started in three steps
- Connect one system. Start with the ERP your team asks about most. ORQEN connects to SAP through its OData services, to Dynamics 365 through the Business Central API or Finance and Operations data entities, to NetSuite through SuiteTalk REST and SuiteQL, and to Odoo through its external API, which on Odoo Online is available only on Custom plans. Your team reviews the generated tools before anyone can use them.
- Pick a real weekly question. Not a demo question, but one someone answers by hand every week: open receivables by region, stock below minimum, orders shipped late.
- Compare. For a few weeks, put the agent’s answer next to the report you already trust. Where they differ, check the tool descriptions and parameters; usually the difference is a definition such as gross versus net or ordered versus invoiced.
Once the first questions hold up, widen the scope one system at a time. Management questions that cut across sales, finance and operations are covered in the management reporting use case, and the ERP AI assistant guide explains the overall architecture.