For distributors running Microsoft Dynamics 365 Business Central
Stop quoting away your margin on Dynamics 365 BC.
PIE connects to the Microsoft Dynamics 365 Business Central book you already run, reads the trading history in it, and checks every new quote line against your own margin floor before it goes out — then reports the margin that held. Your ERP keeps the records; PIE decides nothing you did not set a policy for.
One sign-in, checked when you save it
An Entra ID app registration on the client-credentials grant: an administrator registers one app, consents to the Business Central API permission and creates one client secret. No browser round-trip on a sync and no certificate to renew. The form asks for the directory (tenant) id, the application id and secret, and the environment — leave it blank for production — and then lists the companies that grant can actually see, so the company is picked by name instead of by pasting a GUID. A document's lines ride on the same request as its header ($expand), and the date window is filtered on Microsoft's side rather than here.
What your administrator does first
Two places, and a grant in one of them without the other looks like a broken connection rather than a missing permission. On the app registration: the Dynamics 365 Business Central application permission — API.ReadWrite.All, with admin consent. It is the only application permission Microsoft publishes for this API and there is no read-only variant, so the grant is wider than what PIE does with it: everything above is a read, and the one write is the sales quote. Inside each company: the permission sets on the app's own user (Microsoft Entra Applications → the app → Permission sets), starting with D365 BASIC — without it the token is valid and every company answers 401 — then read access to the entities above.
What the first pull reads
The first pull is offered from the first day of the month 18 months back, and you choose the date before it starts. It runs as a background job that commits as it goes, so you can watch it move rather than wait on a spinner — and what the screens then report is the span the rows actually cover, not the window that was asked for.
Exactly this, and nothing else
The list below is not a summary of the integration — it is the integration. Each line is a permission the Dynamics 365 BC connector declares and a method that reads it, and a test holds the two against each other in both directions, so a capability cannot be claimed here and missing in the code.
- Customerscustomers
- Vendorsvendors
- The item masteritems
- Sales invoices, with their linessalesInvoices · salesInvoiceLines
- Purchase invoices, with their linespurchaseInvoices · purchaseInvoiceLines
- Sales orderssalesOrders
- Purchase orderspurchaseOrders
What PIE creates in Dynamics 365 BC
A quote built in PIE can be created in Business Central as a sales quote — the header, then one call per line, because salesQuoteLines is a child entity set and Business Central publishes no single call that carries both. That is the only thing PIE ever creates in Business Central. Business Central puts no uniqueness on externalDocumentNumber, so a second press would simply make a second quote: PIE reads the reference back before it sends rather than relying on the repeat to fail. It refuses rather than guessing — no reference to find it by afterwards, no Business Central customer, no priced lines, a line naming an item that does not already exist there, or a line with no price or quantity, and nothing is sent. Business Central would fill an omitted price from the item card, which is a number nobody here chose.
What PIE does not read from Dynamics 365 BC
- “Dynamics 365” names a family, and this reads one member of it: Business Central, the ERP that NAV became. Finance & Operations is a different product with a different API and PIE does not read it.
- Customer payments are not read from Business Central. Payment timing, the collections worklist and days-to-pay have nothing to read on this book, and they say so rather than estimate around it.
- Stock on hand is read only where your API version reports it on the item. Where it does not, PIE stores no stock snapshot at all rather than a zero, and the stock and GMROI screens stay empty and say why.
- Draft, in-review and cancelled sales documents are skipped deliberately: a cancelled order must never count as demand a customer stopped placing.
- Quotes already in Business Central are not imported — no ERP's are — so a win rate has no denominator until you start quoting here.
- Credit memos are not read from Business Central in this version, so a returned or credited line still counts as sold until you say otherwise.
- Vendor payments are not read from any ERP, so what has actually been paid out is outside what PIE can see on this book.
- Salespeople are not imported, so every decision routes to management until accounts are assigned inside PIE.
Three things, on your own numbers
Every figure is deterministic arithmetic over the rows above, stamped with the version of the margin policy that judged it. The AI on this platform reads those numbers and phrases them; it never produces one.
Every quote line, against your own floor
Cost comes off the purchase-invoice lines and the item card's own unit cost, both of which Business Central already holds. PIE checks each new line against the policy you set, routes a breach for sign-off — the platform holds it, not the salesperson — and, where the grant allows it, creates the agreed quote back in Business Central rather than making somebody retype it.
Margin drift, per customer and item
The lines come back with their headers, so PIE has the line-level history to compute a margin per customer-item and compare it across windows. Every figure is stamped with the version of the policy that judged it and carries the operands it was computed from, so a number on the screen opens into the rows behind it.
The accounts that went quiet
Decline is measured from the invoice history the first pull brings in, so it works on a Business Central book from the first sync — no quotes to record first and nothing to configure. What is not read on this book, payments, is stated on the screen that would have used it rather than approximated.
Why it can be trusted
The AI never computes a single number.
Your Dynamics 365 BC data and your rules determine the number. AI explains it.
Same inputs, same answer, every time — with a paper trail.
- Deterministic calculations — every figure is arithmetic on your own records; turn AI off and every number still works
- Auditable decisions — each number names the policy that produced it, so a price you quoted last quarter still explains itself
- Your data — read from your own books, used for you alone, exportable and erasable on request; AI runs on your own account
- Your rules — you set the floors and thresholds, and PIE holds every quote to them
- Provenance — every row carries the connector, the connection and the id it came from, so nothing in PIE claims a source it did not have
Your Dynamics 365 BC book already knows where the margin went.
30–45 minutes, your own numbers on the screen, and an honest answer about what PIE can and cannot see in Microsoft Dynamics 365 Business Central.