# How to automate inbound email into Dynamics 365 Business Central

> Source: https://netray.co/integrations/business-central-email-automation
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Integrations

## Short answer

Read shared mailboxes with Microsoft Graph, extract order and quote data with a language model, and create draft sales orders, quotes or purchase confirmations through Business Central API v2.0, with a review queue before anything posts. Business Central's own email features handle outbound mail well, but not inbound understanding.

## System

Microsoft Dynamics 365 Business Central

## Capability

email-automation

## Intro

Many manufacturers receive customer purchase orders as PDFs and free-text emails to a shared inbox, and an order desk retypes them into Business Central. Supplier acknowledgements and shipping notices arrive the same way. The work is slow and error-prone, but the variety of formats defeats rigid templates.

Business Central's email module sends documents and tracks the outbox, and it can attach files to records, but it is not designed to read arbitrary inbound mail and decide what it means. That job sits outside the ERP, in a pipeline that reads mail, classifies it, extracts fields, matches them to master data and drafts a transaction.

The right ambition is a draft with evidence, not an auto-posted order. Done that way, the order desk shifts from typing to reviewing exceptions.

## Use Cases

### Customer PO to draft sales order

**Description:** Match the sender to a customer, map customer part numbers to items using item references, and create a draft Sales Order with the PO number in the external document number.

### RFQ intake to sales quote

**Description:** Extract requested items, quantities and dates from RFQ emails and create sales quotes, flagging unknown parts for engineering.

### Vendor order acknowledgements

**Description:** Compare confirmed quantities and dates against the purchase order and propose date updates on lines, routed to the buyer.

### Shipping and ASN emails

**Description:** Parse carrier or supplier shipment notices and attach tracking numbers or expected receipt dates to the relevant purchase order.

### Customer service triage

**Description:** Classify inbound questions as order status, returns, invoices or complaints and route them, answering status questions from read-only data.

## System Surface

- Microsoft Graph API for reading shared mailboxes with application permissions, change notifications for new mail, and moving messages between folders to show state.
- Business Central REST API v2.0 for salesQuotes, salesOrders, purchaseOrders and their lines, plus customers, items and itemReferences for matching.
- Document attachments and Incoming Documents so the original email or PDF stays linked to the draft record for audit.
- The email module and email scenarios for outbound replies and confirmations, with the outbox as the sending record.
- Custom API pages in AL for staging tables where drafts, confidence scores and extracted evidence wait for review.

## How It Works

### Scope one mailbox and one document type

**Detail:** Start with a single shared inbox and one flow, such as customer POs. Mixed mailboxes multiply classification errors.

### Ingest through Graph

**Detail:** Use change notifications or polling to fetch new messages and attachments, storing the original with a stable message ID for traceability.

### Classify and extract

**Detail:** A model identifies the message type and pulls structured fields: PO number, ship-to, lines, part numbers, quantities, dates. Run it on a local open-weight model if the content is sensitive.

### Match to master data

**Detail:** Resolve customer by sender or tax ID, items by item reference, unit of measure and currency. Unmatched values go to review rather than guesses.

### Create a draft and attach evidence

**Detail:** Create the document via API v2.0 in an open or draft state, attach the source email, and store confidence per field in a staging table.

### Review queue

**Detail:** Present extracted fields beside the source with low-confidence fields highlighted. The user accepts, edits or rejects, then releases the document through the normal process.

## Example Flows

### PO email becomes a draft order

**Trigger:** A PDF purchase order arrives in orders@ mailbox.

**Steps:**

- Graph notification delivers the message and attachment.
- Extraction yields PO number, lines and requested dates.
- Item references map customer part numbers to item numbers.
- A draft sales order is created and the email attached.
- The order desk reviews flagged lines and releases.

**Result:** Retyping is replaced by a short review, with the original email one click away from the order.

### Supplier date change

**Trigger:** A vendor emails revised delivery dates.

**Steps:**

- The message is matched to the vendor and PO number.
- Proposed new dates are compared to current promised dates.
- A task with the change and impact is sent to the buyer.

**Result:** Buyers see schedule risks the day they are announced, but dates are updated only on approval.

## On Prem

Inbound mail often contains drawings, pricing and customer names, so many regulated shops keep extraction local. Run the classification and extraction models on your own GPU servers using vLLM or Ollama, keep the pipeline inside your network, and connect to on-premises Exchange or Exchange Online with the appropriate permissions. For on-premises Business Central, enable web services and call the APIs from the pipeline host. Nothing about extraction requires a cloud model, though accuracy on messy scans depends on the model and tuning you choose.

## Security

- Use application access policies so the Graph app can only read the intended mailbox.
- Treat email content as untrusted input: strip instructions embedded in messages and never let the model call write endpoints directly.
- Keep draft creation separate from release and posting, with permission sets that stop the service account from posting.
- Retain the source message for audit and set retention aligned with your records policy.
- Block auto-replies to external senders until the flow has been validated, to avoid leaking data.

## Options

### Power Automate with Office 365 and Business Central connectors

**Fit:** Structured emails and attachments from a small set of known senders.

**Effort:** One to two weeks

### Third-party EDI or order capture product

**Fit:** High-volume customers who can move to EDI or a portal, where structured data beats email parsing.

**Effort:** Weeks to months including trading partner onboarding

### Custom pipeline with a local model, via Netray or in-house

**Fit:** Messy free-text and PDFs, sensitive content and a review queue tailored to your item references.

**Effort:** Typically four to eight weeks for a first mailbox

## Pitfalls

- Customer part numbers that are not in item references cause silent mismatches; clean this up before automating.
- Auto-creating customers from unknown senders pollutes master data. Send them to review.
- Replies and forwarded threads duplicate the same PO, so deduplicate on PO number plus customer.
- Prompt injection through email text can try to steer the pipeline, so keep extraction output schema-bound and validated.
- Units of measure and currency assumptions are a frequent source of wrong quantities and prices.

## Faq

### Can Business Central read incoming emails by itself?

**Answer:** Its email module is mainly for sending and for attaching messages to records. Reading arbitrary inbound mail and interpreting it is typically done outside the ERP, using Microsoft Graph or Power Automate, then creating records through the APIs. Check your version for newer built-in capabilities.

### Is it safe to create orders automatically?

**Answer:** Create drafts automatically, release manually. Auto-posting from free-text email is risky because a misread quantity or customer becomes a real commitment. After months of measured accuracy, you may auto-release narrow, low-risk cases such as repeat orders from one customer.

### How accurate is extraction?

**Answer:** It varies with document quality and how consistent your customers' formats are. Clean digital PDFs can do well, scans and handwritten notes less so. Measure field-level accuracy on your own samples and set confidence thresholds that route doubtful fields to a person.

### Should we move customers to EDI instead?

**Answer:** For high-volume customers, yes, structured data is more reliable than parsing. Email automation covers the long tail of customers who will never adopt EDI. Many companies run both, with EDI for the top accounts and email extraction for the rest.

### Can this work with on-premises Exchange and Business Central?

**Answer:** Yes. Use the mail API available for your Exchange deployment, enable Business Central web services with a supported authentication method, and host the pipeline internally. Local models mean message content does not need to leave your network.

## Search terms

business central email automation, business central purchase order from email, create sales order from email business central, business central inbound email processing, dynamics 365 business central email to order, business central graph api mailbox, business central rfq email automation, automate order entry business central

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
