A laptop showing bar and pie charts beside a tablet calendar

SAP Business One · Natural Language Queries

SAP Business One Natural Language Queries That Tie Out

The Service Layer makes the question easy to answer. The semantics underneath decide whether the answer is right.

Key takeaways
  • Yes. The SAP Business One Service Layer exposes the company database over OData, identically on Microsoft SQL Server and on SAP HANA, so an agent reads live journal entries, invoices and master data without an export.
  • Parsing the question is the easy half. One question about March invoicing returns three defensible numbers depending on posting date against document date, on currency, and on whether tax is in or out.
  • A figure is only usable with its filter set attached and a route to the rows behind it. Company database, date basis, document status, currency, period status and the time of the read.
  • Reading is a far lower bar than writing. ChatFin drafts the document and a named person approves it before anything reaches SAP Business One.
  • The approach degrades on a chart of accounts with inconsistent naming and where meaning sits in undocumented user defined fields. ChatFin says so during evaluation rather than after a rollout.

Yes, you can ask SAP Business One a financial question in plain language and get a number back. The Service Layer exposes the company database over OData and behaves the same on Microsoft SQL Server as on SAP HANA, so an agent reads journal entries, invoices, business partners and the chart of accounts live rather than from an export. That part is settled. What decides whether anyone acts on the answer is the semantics underneath, because one ordinary question can be read three defensible ways and each way returns a different number.

This page sets out what has to be true under a natural language answer before a controller signs anything based on it. Which date the period is drawn on, which company database, which currency, what happens to drafts and cancellations, and whether you are reading a control account or the subledger behind it. ChatFin reads SAP Business One through the Service Layer and prints the filter set beside every figure, and the last two sections say where the approach stops working, because ChatFin is no better than the chart of accounts it is pointed at.

SAP Business OneService LayerODataNatural Language QueryGeneral LedgerPosting PeriodsData LineageControllership

01

What you can ask, and what the agent reads to answer it

A plain language question over SAP Business One resolves to a read against specific objects. The Service Layer publishes the company database over OData and behaves the same way on Microsoft SQL Server as on SAP HANA, so one agent covers both. Entities such as JournalEntries, Invoices, PurchaseInvoices, ChartOfAccounts and BusinessPartners are the surface a question lands on.

Underneath sit the tables a controller already knows from writing a query. Journal entry headers in OJDT with their lines in JDT1. The chart of accounts in OACT. AR invoices in OINV and INV1, AP invoices in OPCH and PCH1, business partners in OCRD. Naming the objects matters, because an answer that cannot be traced back to rows in those tables never gets checked.

The question as asked What it reads What decides the number
What did we invoice in March? OINV headers, INV1 lines Which date column defines March, and whether cancellations are out
What is sitting in account 610000? OACT for the account, JDT1 for the lines Whether that account is a control account fed by a subledger
Which customers are over 60 days? OCRD against open rows in OINV Which company database, and posting date or due date
What have we accrued for this supplier? OPCH and PCH1 against open receipts Whether drafts count, and whether the period is still open
In ChatFin

ChatFin reads SAP Business One through the Service Layer rather than from a nightly copy, so the rows behind an answer are the rows in the company database at the moment the question was asked.

02

Why the same question returns different numbers

Ask five people in one finance team what March revenue was and they mostly agree, because they share conventions nobody wrote down. An agent has no access to those conventions unless somebody states them. Six forks decide the figure.

Posting date or document date. On an AR invoice, DocDate is the posting date and TaxDate is the document date. In OJDT the posting date is RefDate. An invoice raised on 31 March and posted on 2 April belongs to March on one basis and April on the other.
Which company, and which branch. Most estates run more than one company database. A question asked without a company named gets answered against whichever database the connection points at.
Local currency or system currency. JDT1 carries Debit and Credit in local currency, SYSDeb and SYSCred in system currency, FCDebit and FCCredit in the transaction currency. One line, three amounts, all correct.
Drafts and cancellations. Draft marketing documents live in ODRF and are not postings. On OINV the CANCELED column carries N for a live document, Y for one that has been cancelled and C for the cancellation itself. Sum without that filter and both halves of a cancelled pair count.
Period status. A posting period is unlocked, unlocked except sales, in closing period, or locked. A figure from a locked period is stable. A figure from an unlocked period is a reading, and it moves.
Control account or subledger. The receivables control account in OACT and the open items behind it agree only while nothing has been posted straight to the control account.
In ChatFin

ChatFin treats those six as filters rather than defaults, prints the ones it applied above the figure, and asks rather than choosing where a question leaves one of them open.

A person holding a printed report of pie and line charts
The number is the easy part. The sentence that produced it is what a reviewer needs.
03

One question, three numbers, and how naming the filters settles it

Here is the question in the form it arrives, usually by message on the second working day of the month. How much did we invoice in March? One company database, an ordinary March. These three answers are all defensible and all different.

1,846,200.00
AR invoices posted in March, gross of tax
1,891,550.00
AR invoices dated in March, gross of tax
1,632,500.00
Revenue reaching the profit and loss in March

The first takes OINV rows where DocDate falls inside March, drops the drafts in ODRF, and excludes both sides of every cancelled pair. The second uses TaxDate instead. Two invoices dated 27 and 28 February were posted on 2 March and fall out, taking 96,400.00 with them, and three dated 30 and 31 March were posted on 2 April and come in, adding 141,750.00. So 1,846,200.00 less 96,400.00 plus 141,750.00 gives 1,891,550.00.

The third is not an invoice total. It is what reached the revenue accounts in JDT1, the invoice value net of 213,700.00 of output tax, so 1,846,200.00 less 213,700.00 leaves 1,632,500.00. The sales director who asked meant the first. The auditor who asks in October means the third. Neither of them said so.

Then the exception every controller has met. One March invoice for 62,400.00 goes to a customer who had already been credited, and it is cancelled on 14 April. The cancellation posts in April, so the March posting date figure never moves. Rerun the question in May on document status instead and the answer is 1,783,800.00, which nobody can reconcile to the 1,846,200.00 in the April board pack.

1

Name the date basis

Posting date or document date, stated in the answer rather than assumed. On this database that one choice is worth 45,350.00 in a month of ordinary trading.

2

Name the population

AR invoices only, drafts in ODRF excluded, cancelled documents and their cancellations both excluded, credit notes shown rather than netted silently.

3

Name the currency and the moment

Local currency from Debit and Credit or system currency from SYSDeb and SYSCred, with the period status and the read time attached.

Four numbers on the table and no argument, because each one carries the sentence that produced it.
In ChatFin

ChatFin answers this with the basis attached. Invoices posted between 1 and 31 March, company database named, drafts and cancellations excluded, local currency, read at a stated time, with the document list below the figure.

04

What has to sit beside the number before anyone uses it

A figure with no filter set beside it is a rumour. Finance teams know this, which is why they keep rebuilding the spreadsheet they were promised they could stop building. Five things travel with a usable answer.

The filter set in words. Company database, date basis and range, document types included, statuses excluded, currency. Above the figure, not in a tooltip.
A route to the rows. Document numbers a person can open in SAP Business One, not a record count. A reviewer checks three of them once and then stops checking.
The read time. Live data moves while the meeting runs. A figure read at 09:14 and quoted at 11:00 has changed if a credit note posted in between.
An explicit empty result. Where the filters match nothing, the answer says so and shows the filters, rather than assembling a plausible number from the nearest population.
The question as understood. Restating the interpretation is what lets the asker say no, I meant document date, before the figure reaches a board pack.
In ChatFin

Every ChatFin answer carries its filter set, its read time and the underlying documents. Where a question cannot be resolved to a defensible population, ChatFin names the missing filter instead of returning a number.

05

Asking is one bar. Posting is a much higher one.

Reading is reversible. A wrong answer costs a conversation. A wrong posting costs a reversal, an audit note and a harder conversation, so the read path and the write path deserve separate controls. Treating them as one feature is how evaluations stall at the moment somebody asks the tool to book something.

SAP Business One offers more than one way in. The Service Layer over OData carries reads and writes. The DI API and the DI Server are the older programmatic route, still in use across long lived integrations, and B1if is the integration framework for message based flows between SAP Business One and other systems. All of them put a write through business logic rather than around it, which is why writing straight into the tables belongs nowhere near a ledger.

1

The agent reads

Live rows through the Service Layer, under an account whose permissions are visible, with read access granted separately from write access.

2

The agent drafts

A journal entry or a credit note, with the accounts, the amounts, the posting date and the reason it was proposed.

3

A named person approves

Not a role and not a shared login. The person who carries the account is the name against the posting.

4

The write goes through the published interface

The same validation a keyed document meets, so period locks and document numbering still apply, and the evidence exports as one record.

In ChatFin

The ChatFin read path answers questions. The ChatFin write path prepares a document and stops. A named person approves before anything reaches SAP Business One, and the request, the rows read, the payload and the approver are logged together.

06

Where this approach fails, and it fails predictably

Two conditions break natural language querying on SAP Business One, and both are visible before anybody signs anything. Neither is an AI problem.

A chart of accounts nobody has maintained. OACT holding three accounts whose names are variants of miscellaneous expense, a suspense account used as a working file, and names carrying a division code that was reorganised in 2019. An agent reasons from names and structure. Where the names carry no meaning it maps a question to the wrong account with complete confidence.
Heavy user defined fields. Meaning that lives in fields added with a U_ prefix, populated by three people who each read the label differently, described nowhere. The data is there. What it means is not.
Convention carried in free text. Project codes typed into a remarks field, groupings encoded in the first two characters of a reference, prefixes that mean something to one team and nothing to the system.
Company databases that have drifted. The same customer under two codes, the same cost under two accounts, and a group question that has to bridge them with no mapping anybody owns.

Reporting has absorbed all of this quietly for years, because the person who builds the monthly pack knows which account really means what and fixes it by hand. A natural language layer takes that person out of the middle, which is the point of it and also why the underlying mess stops being invisible.

In ChatFin

Where the chart of accounts is inconsistent or the meaning sits in user defined fields nobody documented, ChatFin underperforms until that is fixed. We say so during evaluation rather than three months into a rollout.

07

How to test this on your own database in an afternoon

A scripted question proves the demonstration works. Run this instead, on your own company database, with your own controller in the room.

1

Collect the last five things somebody exported

The awkward ones that ended in a spreadsheet, because that is the population the tool has to survive.

2

Ask each one exactly as it was asked

Ambiguity included. Watch whether the tool resolves the ambiguity silently or names it.

3

Check one answer row by row

Against the original export. A total can match by accident on a population that is wrong twice in opposite directions.

4

Ask the follow up, then ask something unanswerable

A question about a period that was never migrated. A tool that produces a confident figure there will do it again where you cannot check.

Five real questions in an afternoon separates the tools faster than a feature matrix, and it costs one controller half a day.
In ChatFin

Run this on ChatFin as well. We would rather lose on your awkward questions than win on a scripted demonstration.

“

A number with no filter set beside it is a rumour with a decimal point.

Ashok Manthena

Read further

This page covers the semantics under a question. The mechanics and the wider category sit one level down.

By interface

Service Layer, DI API, DI Server, B1if
Which route a tool reads and writes through, and what that predicts about upgrades and about audit evidence.
By process

Close, reconciliation, payables, receivables, reporting
What an agent prepares in each, and where a named person still decides.
By evidence

Filter sets, row level lineage, approval records
What has to export before an answer can be quoted in a board pack or handed to an auditor.

For the category argument underneath this, see ERP AI agents and AI for controllers. The same date basis and population choices decide whether financial close automation produces numbers a controller will sign. For the equivalent split on other systems, see AI agents for Sage Intacct and AI agents for Oracle Fusion Cloud ERP.

Where SAP Business One reporting runs out

SAP Business One handles transactions well. These five gaps are documented, and every one of them ends in a spreadsheet.

No native consolidation. Multi company consolidation means exporting each company’s reports and combining them in Excel, which is why close week reruns the same pack repeatedly.

No transaction currency reporting. Native reports cannot produce statements in transaction currencies, which makes reconciliation harder and slows period end.

One accounting standard per company. B1 assumes a single reporting standard per managed company, so running US GAAP and IFRS in parallel means manual adjustment at consolidation.

Rigid report formats. A chart of accounts change forces manual restructuring of income statement rows rather than the report adapting.

Weak statutory mapping. You can hold an external code per GL account, but there is no mapping to multiple alternate charts and no way to run statements on them.

An agent connected over the Service Layer reads across companies and answers the consolidated question directly, which is the step that currently happens in Excel.

Questions finance teams ask first

Can you query SAP Business One financial data using natural language?

Yes. The SAP Business One Service Layer exposes the company database over OData, and it behaves the same way on Microsoft SQL Server and on SAP HANA, so an agent reads journal entries in OJDT and JDT1, AR invoices in OINV, AP invoices in OPCH, the chart of accounts in OACT and business partners in OCRD live rather than from an export. Parsing the question is the straightforward half. The work is applying the conventions the schema does not describe, such as excluding drafts and cancelled documents and choosing between posting date and document date. ChatFin resolves those as named filters and prints them beside the figure.

Why does the same question return different numbers in SAP Business One?

Because one question hides six choices. Posting date or document date, since DocDate and TaxDate differ on an invoice and OJDT records the posting date as RefDate. Which company database. Local currency from Debit and Credit or system currency from SYSDeb and SYSCred. Whether drafts in ODRF and cancelled documents flagged in the CANCELED column are excluded. Whether the posting period is still unlocked, so the figure can still move. And whether you want the control account or the subledger behind it. Asking what March invoicing was on posting date, on document date, and net of tax gives three different and equally defensible totals.

Can an AI agent post to SAP Business One, or only read?

Both are possible through the Service Layer, and the DI API, DI Server and B1if remain in use for integrations, but the write path is a much higher bar than the read path and should be a separate decision. A question is reversible. A posted journal entry is not. ChatFin drafts the document with the accounts, amounts, posting date and the reason it was proposed, then stops. A named person approves before anything is written, the write goes through the published interface so period locks and document numbering still apply, and the request, the rows read, the payload and the approver are logged together.

How ChatFin works on SAP Business One

The number comes with the sentence that produced it.

ChatFin reads live SAP Business One data through the Service Layer, on Microsoft SQL Server or on SAP HANA, and answers across finance, sales, purchasing and inventory in one place rather than in four exports somebody merges by hand.

Every answer carries the company database, the date basis, the statuses excluded, the currency and the read time, with the underlying documents below the figure. Where a filter is left open, ChatFin names it rather than choosing quietly. Where a posting is required, ChatFin prepares it and a named person approves before anything is written.

Bring the last five questions your team answered with a spreadsheet. Those five decide the evaluation faster than any feature list.

Book a demo

AM

Ashok Manthena
CEO and co founder, ChatFin

Ashok Manthena is the CEO and co founder of ChatFin, an AI agent platform for enterprise finance that runs across NetSuite, Acumatica, JD Edwards, SAP and Dynamics 365. He works with CFOs and controllers on governed automation of the close, payables, receivables and reporting. Connect on LinkedIn.

Image credits. Header photograph: a laptop showing bar and pie charts beside a tablet calendar, sourced from Pexels and used under the Pexels licence.
Section photograph: a person holding a printed report of pie and line charts, sourced from Pexels and used under the Pexels licence.
All images are served from the Pexels content network. No third party product screenshots, vendor logos or licensed media are used on this page.
Get started

Bring your five awkward questions.

Send the questions your team last answered by exporting to a spreadsheet. We will run them and show the filter set and the rows behind each answer.

✓Answers with the company database, date basis and currency stated
✓The underlying documents attached, not a record count
✓A straight answer on whether your chart of accounts is ready
Request a demo

Confidential & private