Automate B2B order entry: purchase orders from email into draft orders
Updated · By Ecomsellertool editorial team
To automate B2B order entry from email, send every purchase order to one inbox, let an AI model read each email, PDF or spreadsheet into order lines, and let fixed rules match the buyer's item numbers to your SKUs and check prices, pack sizes and stock. The workflow creates a draft order in Shopify or a pending sales order in NetSuite, and a person confirms only the flagged lines.
- Shopify B2B runs on the Basic, Grow, Advanced and Plus plans, and PO numbers, draft order to invoice and checkout to draft are on all four (checked October 2, 2026).
- A Shopify draft order assigned to a B2B company location takes that company's prices, payment terms and checkout options automatically.
- Shopify's Admin API creates draft orders with a PO number, a B2B purchasing entity and an inventory reservation time, with at most 499 line items per draft.
- NetSuite's REST web services give a sales order an orderStatus of A for Pending Approval or B for Pending Fulfillment, so an order entered by automation can wait for a person.
- In this recipe the AI model only reads the document: rules match SKUs, prices and duplicates, and a person confirms every exception before the order is released.
The step map: who runs each step
Trigger: A buyer emails a purchase order to your orders inbox, as text in the email, a PDF or a spreadsheet.
| Step | What happens | Who runs it |
|---|---|---|
| 1 | The email reaches the orders inbox; the workflow logs it, saves the attachments and identifies the buyer from the sender's address. | Rule |
| 2 | An AI model reads the email and its PDF or spreadsheet, decides whether it is a new order, a change or something else, and extracts the PO number, ship-to, dates and every line's item number, quantity and price, with a confidence score per field. | AI model |
| 3 | Each line is matched to your SKU through the buyer's item-number cross-reference, and cases or packs are converted to your selling unit. | Rule |
| 4 | Each price is checked against the buyer's price list, the PO number against orders already entered, and the quantities against available stock. | Rule |
| 5 | A draft order is created for the buyer's company location in Shopify, or a Pending Approval sales order in NetSuite, with the PO number, the source file and every flag attached. | Rule |
| 6 | A person confirms the flagged lines: unmatched items, price differences, low-confidence fields, new ship-to addresses and stock shortfalls. | Person |
| 7 | Once approved, the order is released on the buyer's payment terms and a templated acknowledgment goes to the buyer. | Rule |
5 rule steps · 1 AI model step · 1 person step. A rule follows fixed logic you approve; an AI model handles messy input and its output is checked by rules; a person makes the calls listed below.
What stays with a person
- Lines the matcher could not map to a SKU, or mapped with low confidence
- Prices that differ from the buyer's price list or catalog
- New buyers, new ship-to addresses and any change to payment terms
- Short stock: backorders, substitutions and partial shipments
- Revised or cancelled purchase orders for an order already entered
Which tools can run it
- Shopify's own B2B ordering and Shopify Flow, when buyers will order online themselves
- Zapier, Make or n8n with an AI model step, for a few buyers with simple documents
- Custom code on your accounts, for many buyers and layouts, an ERP such as NetSuite or high volume
Systems it connects
- Orders inbox (Gmail or Outlook)
- Shopify B2B and draft orders
- NetSuite or another ERP
- Buyer price lists
- Item-number cross-reference
Build size: Medium
One inbox and one order system; most of the work is the item cross-reference and the exception queue, not the reading.
Wholesale buyers who never log in to a portal still send orders the old way: a PDF attached to an email, a spreadsheet, or a list typed into the message. Someone on your team reads each one, finds the right SKUs, checks the prices and keys the order in. It is slow, and the mistakes are expensive: a case read as a unit, an old price, the same purchase order entered twice. This recipe automates the typing and the checking, and leaves only the real exceptions to a person. It is one page of our automation library.
What does the workflow do, step by step?
The step map above is the whole workflow. An AI model does one job, reading a document a rule cannot read reliably, and fixed rules do everything after it. That split matters. A model can turn a messy PDF into clean lines, but it should never decide what a buyer pays or which SKU ships. Rules do that against data you control: the buyer's price list, your item cross-reference and your stock. The order is entered as a draft, so nothing reaches your warehouse until the checks pass or a person clears the flags.
The core of the build is the field map: every field the model reads, where it lands in your order system and the rule that checks it. This is the table we fill in with a client before writing any code.
| Field on the purchase order | Where it goes | The rule that checks it |
|---|---|---|
| Buyer name and sender address | The company and contact in Shopify B2B, or the customer in your ERP | The sender must belong to a known buyer; a new sender goes to a person |
| PO number | The draft order's PO number | Must not match an order already entered for that buyer |
| Ship-to address | The company location, or the order's shipping address | Must match an address on file; a new address goes to a person |
| Requested ship or delivery date | The order note or a custom field | Must be in the future and inside your lead time |
| Buyer's item number or description | Your SKU, through the cross-reference table | Exact match on the buyer's item number, then your SKU, then the GTIN; a description-only line goes to a person |
| Quantity and unit (each, pack or case) | The line quantity, in your selling unit | Converted with the pack size; a quantity that is not a whole case goes to a person if you sell by the case |
| Unit price | Checked only: the order takes the price on file | Compared with the buyer's price list; any difference goes to a person |
| Payment terms | The order's payment terms | Must match the terms on file for that buyer |
In Shopify, the draft order is the natural landing spot. Shopify's guide to creating B2B orders with draft orders says a draft order assigned to a B2B customer and a company location automatically reflects that company's prices, payment terms and checkout options, and it supports a PO number (checked October 2, 2026). Shopify's draft orders guide adds that you can then take payment by sending an invoice, charging a card or marking the order as paid.
Which tool should run it?
Start by asking whether you need to read emails at all. If your buyers would order online, Shopify can take the order without anyone retyping it. Shopify's B2B features by plan page says B2B runs on the Basic, Grow, Advanced and Plus plans, that PO numbers, draft order to invoice and checkout to draft are available on all four, and that direct company catalogs and deposits or partial payments are Plus only (checked October 2, 2026). For the buyers who will keep emailing, the table sets out the three levels that fit.
| Level | Fits when | What to know |
|---|---|---|
| Shopify's own B2B ordering, plus Shopify Flow | Buyers will place orders on your store | No email reading. Shopify Flow is a free app on the Basic, Grow, Advanced and Plus plans, and its Draft order created trigger starts a workflow whenever a person or a third-party app creates a draft order (checked October 2, 2026) |
| A workflow tool (Zapier, Make or n8n) with an AI model step | A handful of buyers, each with one document layout | The file has to become text before a model reads it; n8n's Extract From File node, for example, turns PDF, XLSX and CSV files into JSON (checked October 2, 2026). Failures nobody sees are the risk, so log every run |
| Custom code on your accounts | Many buyers and layouts, large orders, or an ERP that must agree | Shopify's DraftOrderInput takes a PO number, a B2B purchasing entity and an inventory reservation time, and accepts at most 499 line items (checked October 2, 2026). NetSuite's REST web services set a sales order's orderStatus to A for Pending Approval or B for Pending Fulfillment |
Retailers that require EDI are a different job. Their orders arrive already structured, so there is nothing for a model to read; the work is mapping their codes to your SKUs and sending acknowledgments and shipping notices back. Email automation is for everyone else: independent stores, distributors and corporate buyers who will never set up EDI.
When custom code is the right answer, it can run on Ecomsellertool Growth OS beside your other order flows, and the same cross-reference can feed order routing once the order is released.
What should stay with a person?
Anything that changes what a buyer pays or what you promise to ship. The checkpoint list above covers the usual cases: items the matcher could not place, prices off the list, new addresses, short stock and revised orders. The workflow does not ask the person to retype anything. It shows the original document beside the draft, highlights the flagged lines and offers the likely fix, such as the closest SKU or the list price, so a decision takes seconds.
Clean orders are another matter. Once the checks have run for a few weeks and the flags match what your team would have caught, you can let drafts with no flags release on their own. That is your call, and many teams keep a person on every order from new buyers. The point is that a person's time goes to the orders that need judgment, not to the ones that only need typing.
What can go wrong, and how do you catch it?
Most failures are quiet: an order that looks right and is not. Each one needs a check that fails loudly.
| What goes wrong | How it shows up | The check that catches it |
|---|---|---|
| The model reads 12 cases as 12 units | An order a fraction of the usual size | Units of measure come from the cross-reference, not the model, and the quantity is compared with the buyer's usual order |
| A buyer sends a revised PO | Two orders for the same purchase | The PO number is checked against orders already entered |
| A price list is out of date | Every line from one buyer flags | Each price list has an owner and an effective date; a run of price flags alerts that owner |
| A scanned or photographed PO | Low confidence on many fields | Text recognition runs first; below a set confidence, the whole PO goes to a person |
| A very large PO | The draft is rejected | Orders over Shopify's 499-line limit are split by rule before entry |
| The email is not an order | A junk draft | The model classifies the email first; anything that is not an order is filed, not entered |
Keep the source document attached to every order, and keep a log of what the model read and what the rules changed. When a buyer disputes an invoice, that log answers the question in a minute.
Who builds this for ecommerce brands?
Ecomsellertool builds workflow automation on your own accounts and systems. We have built software on Amazon's seller APIs since 2017 and shipped 50+ tools for 100+ teams. For order entry we map your buyers, documents, item numbers and exceptions first, then build the reading, matching and approval steps. Send a project brief below, or read how our workflow automation service works.
Mapping one company's item codes to another's is work we have done before:
- Kits and multipacks mapped to warehouse components. For Cheddy we built warehouse inventory software whose core problem was mapping kits, multipacks and single-pack Amazon listings to the components on the warehouse shelf, the same problem as a buyer's case packs and item numbers.
- Customers entering their own work. For Little Owl, a 3PL and FBA prep center, we built software in which customers add their own shipments, returns and listings from the customer side, which is the self-serve alternative to reading emails.
Get this workflow built
Send us your version of this workflow
Describe the workflow you want automated. We reply with a written plan: scope, timeline and a fixed price.
Frequently asked questions
Can AI read purchase orders from email accurately?
It reads most typed PDFs, spreadsheets and plain emails well, but not perfectly, which is why the model never creates an order on its own. Rules check every line it reads against your SKUs, price lists and pack sizes, and anything uncertain goes to a person. Scanned or photographed orders need text recognition first and fail more often.
Can Shopify create B2B orders from emailed purchase orders by itself?
No. Shopify's B2B features, on the Basic, Grow, Advanced and Plus plans, let your team create draft orders for a company with its prices and payment terms, and let buyers order online themselves. Turning an emailed PDF into a draft order takes a workflow tool with an AI step, or custom code that uses Shopify's Admin API.
Should we use EDI instead of email for wholesale orders?
If a retailer requires EDI, yes. EDI orders arrive already structured, so no model is needed, only a mapping to your SKUs. Email automation suits the buyers who will never set up EDI, such as independent stores and smaller distributors who send a PDF or a spreadsheet.
What happens when a buyer sends a revised purchase order?
The workflow checks every PO number against orders already entered for that buyer. A repeat number is held as a possible change or duplicate, and a person decides whether to update the existing draft or open a new one, so a revised PO never becomes a second order.
Does this work with NetSuite or other ERPs?
Yes, when the ERP takes orders through an API. NetSuite's REST web services can create sales orders that wait in Pending Approval, so the same exception step works there. Other ERPs differ, so we check the API before we quote.
How long does it take to automate B2B order entry?
It depends most on the item cross-reference: how many buyers use their own item numbers, and whether that mapping lives in a spreadsheet or only in someone's head. The written plan we send within 2 business days of a project brief states the timeline and a fixed price.
