AI chatbotMicrosoft Dynamics 365 Business Central Agent view

How to add an AI chatbot to Dynamics 365 Business Central

Short answer

A useful Business Central chatbot answers from live records and documents, respects who is asking, and shows its sources. Build it on the API v2.0 plus retrieval over your documents, and host it in Teams, a web page or a customer portal, on a private model if data must stay inside.

Business Central already has Copilot features for searching and summarising. The gap that remains for most companies is a chatbot that knows their own way of working: their item numbering, their approval rules, their SOPs, and their customers' questions.

There are two quite different audiences. A staff assistant helps buyers, planners and accountants find records and draft documents. A customer or vendor assistant answers narrow questions such as order status or invoice copies, and must be locked to the right account.

Both fail the same way when they are not grounded: they invent a ship date, quote a stale price, or leak another customer's data. The design below keeps answers tied to records and keeps identity in front of every query.

What teams use it for

Staff question answering

Ask which vendors supply item 1896-S, what the open PO quantity is, and when stock is expected. The bot calls tools and returns the numbers with links to the pages.

Customer order status portal bot

Customers authenticate to a portal and ask about their own orders and invoices. The bot is bound to their customer number and cannot widen the filter.

Procedure and policy helper

Retrieval over SOPs, work instructions and posting guides answers how do I post a consumption correction in this company.

Vendor self-service

Suppliers confirm PO lines, ask about payment status and download remittance advices, without emailing accounts payable.

Onboarding and navigation help

New staff ask where to find a setup field or how a dimension is used, with answers grounded in your own documentation, not generic Business Central help.

Microsoft Dynamics 365 Business Central integration surface

  • API v2.0 and custom API pages for live records. Bind queries by customer or vendor number server side, not in the prompt.
  • Entra ID for staff identity. The Business Central user permission sets can be reused by calling the API on behalf of the user with delegated tokens.
  • Customer and vendor portals are not standard Business Central features, so identity usually comes from a separate portal login mapped to a customer or vendor number.
  • Document sources: SharePoint libraries, OneDrive and file shares for SOPs, plus incoming document attachments in Business Central. Index them with their permissions.
  • Embedding the bot: a web page, a Teams app, or a control add-in inside a Business Central page via AL. Add-ins run client side, so keep keys and model calls on a server.

How it works

  1. 1

    Decide the audience first

    Staff and external users need different identity, tools and tone. Build them as separate bots sharing a code base, not one bot with a mode switch.

  2. 2

    Design the tool and retrieval split

    Structured questions go to API tools. Policy and how-to questions go to retrieval over indexed documents. Route with a simple classifier or let the model choose between the two.

  3. 3

    Bind identity

    Pass the authenticated user to the backend. For staff, call the API with a delegated token. For customers, inject the customer number into every tool call server side.

  4. 4

    Ground and cite

    Require answers to include document or record references. If no tool returns data, the bot says it does not know instead of guessing.

  5. 5

    Choose the surface

    Teams for staff, a portal widget for customers, and optionally an AL control add-in for a side panel inside Business Central.

  6. 6

    Add feedback and escalation

    Thumbs up or down, a handoff to a human with the transcript, and a weekly review of wrong answers that become test cases.

Example flows

Customer asks about their order

Trigger: Authenticated customer types: when will my order ship?

  1. Backend injects the customer number from the portal session.
  2. Tool lists open sales orders and lines with shipment dates for that customer only.
  3. Bot summarises each order with quantity, promised date and any backordered lines.
  4. If the customer asks to change a date, the bot creates a request for a sales coordinator instead of editing the order.

Result: Fewer status emails, with changes still handled by a person.

Buyer finds a substitute item

Trigger: Buyer asks for alternatives to a constrained component.

  1. Bot calls item substitution and item reference lookups.
  2. It checks inventory and open POs for each candidate.
  3. It cites the BOM lines that use the original item.

Result: A shortlist with stock and lead-time context, ready for the engineer to approve.

Keeping data on-prem

A chatbot for an on-premises Business Central environment can run entirely inside the network: an open-weight model served with vLLM or Ollama, an embedding model and vector store for documents, and a thin service that calls the BC service tier. Staff sign in through your directory, and nothing is sent outside. For customer-facing bots, place the public portal and bot front end in a DMZ, keep the model and the BC connection inside, and let only a narrow, authenticated API cross the boundary. Size GPUs to the concurrent users you expect, not to headcount, and plan for slower responses on smaller models.

Security checklist

  • Bind customer and vendor scope server side. Never rely on the prompt to keep a customer to their own records.
  • Keep document retrieval permission-aware so the bot cannot surface an HR or pricing file to the wrong person.
  • Strip or mask sensitive fields (bank details, costs shown to customers) at the tool layer.
  • Rate limit and log external users, and add basic abuse protection to the public endpoint.
  • Retain transcripts only as long as needed and tell users when they are talking to an AI.

Ways to get it done

Microsoft Copilot in Business Central plus Copilot Studio

Effort: Days to weeks.

Microsoft-centric SaaS shops who want low-code and accept Microsoft-hosted models.

Custom bot on API v2.0 with retrieval, hosted by you

Effort: Four to eight weeks for staff and a narrow external scope.

Companies needing role-aware answers, a customer portal or private hosting.

Partner build with a private model (Netray or another integrator)

Effort: Several weeks with GPU setup and evaluation.

On-premises installs and regulated manufacturers.

Pitfalls

  • !Letting the model decide which customer's data to fetch.
  • !Indexing every shared drive folder without checking permissions.
  • !Showing internal cost or margin fields to external users through a generic item tool.
  • !No evaluation set, so quality silently drifts after a prompt or model change.
  • !Answering promised dates from stale cached data instead of live calls.

Frequently asked questions

Can a chatbot sit inside the Business Central client?

You can add a control add-in in an AL extension that hosts a chat panel on a page, but the model calls and credentials must live on your server. Many companies prefer Teams or a separate web page because they are easier to update.

How do I stop customers seeing other customers' data?

Enforce scope in the backend. Take the customer number from the authenticated portal session and add it to every API filter in code. The model should never be asked or allowed to choose it.

Do I need a vector database?

Only for documents such as SOPs, contracts and manuals. Order, stock and invoice questions are better served by live API tools. A small vector index with permission metadata is enough to start with documents.

Can it run without sending data to the cloud?

Yes. Use an open-weight model on your GPUs, local embeddings and an on-premises vector store, with the bot calling your Business Central endpoints. Quality depends on model size and tuning, so run an evaluation on your real questions first.

Is Copilot enough?

For built-in search, summaries and supported tasks in SaaS, often yes. Build your own when you need a customer-facing bot, your own documents, on-premises hosting, or behaviour that follows your process rather than the default one.

Want AI chatbot working on your Microsoft Dynamics 365 Business Central?

A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.

Get a free assessment