Blog
Language
Book a demoLog in
Operations

How to Let an AI Agent Write Sales Orders Into Business Central Safely

How an AI agent writes sales orders into Dynamics 365 Business Central from customer order emails: the customer and item lookups, the duplicate check, held orders, and the access IT approves.

Marcus Storm-Mollard
November 2026
7 min read

An AI agent can write sales orders into Microsoft Dynamics 365 Business Central safely when it looks up every record before it writes, checks External Document No. for a duplicate first, holds any order it cannot resolve, and holds write access to sales orders only. Business Central order automation then comes down to four checks that run before each write.

TL;DR

  • The agent reads the order email and its attachment, then looks up the customer, the delivery address and each item in Business Central.
  • It searches External Document No. for the customer’s order number before it creates anything.
  • If a lookup fails, it writes nothing. The order is held with the reason and goes to the order desk.
  • IT approves a read connection and a write connection limited to sales orders, once.

What does the agent look up before it writes a sales order?

A customer email says “send 40 cartons of the usual to the Thursday depot”. A Business Central sales order cannot say that. It needs a customer record, a delivery address on that customer, item numbers from your catalogue and a unit of measure for every line. The agent resolves each of these against your master data, in this order.

  1. Sell-to customer. The agent matches the sender, the account details in the email and the attached order to one customer in the Customers list.
  2. Ship-to address. Large buyers order for many depots or stores. The agent reads the delivery address or depot code in the order and matches it to a ship-to address on that customer.
  3. Items. The customer writes their own article numbers and descriptions. The agent maps each line to your item number, using the item references that link a customer’s code to your item.
  4. Unit of measure. The customer orders in pallets, layers or cartons. Your item may be sold in another unit. The agent converts to a unit that exists on that item and keeps the original quantity in the record.

The agent never guesses a field to get past a lookup. Each match comes from a record that exists in your system, and the order keeps the link to the email it came from.

How does the agent avoid entering the same order twice?

Customers resend orders. A buyer who gets no confirmation within the hour sends the same email again, and a forwarded copy lands in the inbox a day later. Both carry the same customer order number.

Business Central has a field for that number: External Document No. on the sales order. The agent writes the customer’s order number there, and it checks that field before it creates the order. The check comes first. It searches the existing sales orders of that customer for the same value. If it finds one, it creates nothing and links the new email to the order that already exists. If the second email changes quantities, it is a change to an existing order, and the agent treats it as one.

We describe the same rule at the process level in how to automate sales order entry from customer emails.

What happens when a lookup fails?

The agent holds the order. It does not create a sales order with a blank item line or a placeholder customer. Business Central receives nothing, and the order desk receives the order with the reason in plain words.

LookupWhat failsWhat the order desk sees
Sell-to customerTwo customers match the sender, or none doesThe candidates found, or “no customer matches this sender”
Ship-to addressThe depot in the email has no ship-to address on the customerThe address as written in the email, and the ship-to addresses on file
ItemNo item reference for the customer’s article numberThe line, the article number and the closest items
Unit of measureThe ordered unit does not exist on the itemThe line and the units the item has
DuplicateExternal Document No. already exists for the customerA link to the existing order

Once the desk fixes the master data, for example by adding the missing item reference, the held order can go through, and the same fix covers that customer’s next order. The orders around it never waited.

What does IT approve?

Two things, once. The first is a connection with read access, so the agent can look up customers, ship-to addresses, items, item references and existing sales orders. The second is a connection with write access to sales orders and nothing else. The two are separate connections, so IT can revoke one without touching the other.

Our design for these connections keeps the credentials encrypted and out of the agent’s reach, scopes each connection to one organisation, and lets an operator grant an agent less than IT approved, never more. Every call the agent makes is logged. The model is described in what an AI agent audit trail needs.

What does the agent leave alone in Business Central?

It does not create customers or items, change prices or post invoices. A customer or item that does not exist is an exception for the order desk. A price that differs from the email is the price in your system, since the agent uses what Business Central holds. Those decisions belong to the people who own your master data and your pricing.

Does a person approve every order?

With our Business Central connection, yes, for now. Each order the agent wants to create waits as a proposed change until the person IT names approves it, and only that exact change is written. Everything before that step runs without anyone: reading the email, the lookups, the duplicate check and the holds. The approver checks a finished order next to the email it came from.

Reads through this connection run in a customer workspace today. Writes are built and tested and have not yet run against a live company, so read the write steps in this article as how they work by design.

For scale, the figures below come from our order agents at a global fresh-produce company. They describe order agents in general and do not describe a Business Central deployment. In their first seven weeks, our agents entered 1,000+ retailer orders, about 650,000 cases (about 11,000 tonnes) of fruit, for 63 distribution centres.

FAQ

How do I let an AI agent write to Business Central safely?

Give IT two connections to approve once: read access to the master data the agent looks up, and write access limited to sales orders. The agent checks the customer, the delivery address and every item before it writes, checks External Document No. for a duplicate, and holds any order it cannot resolve instead of creating a partial one.

How does the agent avoid entering the same order twice?

Before it creates an order, it searches Business Central for the customer’s own order number in the External Document No. field on that customer’s sales orders. If it finds a match, it creates nothing and links the new email to the order that exists.

What happens when the agent cannot find the customer or an item?

It writes nothing to Business Central. The order is held with the reason, for example "no item reference for this customer article number", and goes to the order desk. The other orders in the inbox keep moving.

Can the agent create new customers, items or prices in Business Central?

No. Its write access covers sales orders only. It does not create customers or items, change prices, or post invoices. A missing customer or item goes to the order desk as an exception.

Does someone approve each order before it is written?

With our Business Central connection, yes for now: each new order waits until the person IT names approves the exact change, and only then is it written. The reading, the lookups, the duplicate check and the holds run on their own, so that person sees a finished order with its source email, or an exception with its reason.

Where to go next

Compare the approaches in AI agents vs RPA for order processing, or read how the same model applies to back-office operations. See how Atlas works, and book a pilot with your own order emails.

Explore more from Clarm

Helpful links to the product, demo, and policies - all in one place.

Get new Clarm articles

Join the monthly roundup on governed AI agents, autonomous workflows, and source-cited operations.

Talk to us or join the launch list

Book a call to walk through your workflow, or leave your email – we notify you when Atlas opens for new teams.