Analyze with AI
Get AI-powered insights from this Mad Devs article:
A buyer resends yesterday’s purchase order with a different quantity. In this hypothetical distributor example, the PDF uses customer SKU codes and orders in boxes; the ERP records pieces. Entering eight as eight pieces instead of eight boxes of twelve changes the line from 96 pieces to eight. Treating the correction as another order creates a second problem: duplicate demand. Sales order processing automation needs rules for both situations before anyone connects the inbox to production. This guide helps Sales Operations and ERP owners define one email/PDF pilot, decide which orders require review, and prove what the ERP actually created.
Key takeaways
- Limit the pilot to one mailbox, one customer segment, and an agreed PDF layout before expanding email order processing.
- Resolve customer accounts, SKU aliases, and pack conversions against approved ERP data; extraction confidence cannot establish business validity.
- Give ambiguous lines and revisions a named reviewer, a held state, and evidence that records the decision.
- Confirm creation with an ERP identifier and matching order details. After a timeout, establish the outcome before authorizing another write.
Map one order from the inbox to the ERP
Start with an integration map that separates the incoming document, the buyer’s intended order, and the ERP record. For our hypothetical wholesaler, Customer A sends PO-4821 as a PDF showing eight boxes of product BX-17. A later email changes the quantity to six. Neither the attachment nor its delivery event is, by itself, permission to create an order.
Define the first channel as a monitored mailbox receiving one agreed PDF layout from existing domestic wholesale accounts. Accept readable PDFs with a buyer PO, ship-to reference, line codes, quantities, and units. Route unsupported layouts, unreadable files, and instructions that conflict with attachments to Sales Operations in “input review.” The operator resolves them with the customer and records the clarification before processing resumes.
The integration map is:
Mailbox → preserved email and attachment → extracted candidate → account, SKU, and unit validation → approved intent → ERP draft or order → reconciled confirmation.
Store the buying company, message identifier, original document, document fingerprint, and revision relationship. Retain the exact source behind each candidate, including which message introduced a correction and who confirmed its meaning. The ERP owns account eligibility, product identifiers, approved customer aliases, units, pack sizes, and order statuses. If aliases live elsewhere, designate a steward and synchronize approved mappings with ERP identifiers.
BE-terna’s VAUDE case describes an email-processing pilot that went live in September 2025 on its Dynamics 365-based environment. Employees approve proposed actions. That is a useful boundary for a first flow, rather than evidence that every incoming message should create an order automatically.
For orders already structured by a storefront, see Mad Devs’ B2B ERP integration guide. Here, establishing buyer intent precedes the integration contract. Mad Devs’ Veeqo case provides adjacent inventory-platform infrastructure experience; it does not establish an email-order intake implementation.
Decide what can become an order
AI order processing can read a legible field and still produce an invalid order. Extraction confidence answers whether the software read “BX-17” correctly. Business validation asks whether BX-17 identifies an authorized, sellable ERP product for Customer A in the requested unit. Keep these decisions separate in the review screen and processing record.
For this pilot, define the following rules with the ERP owner. Each failure puts the candidate in the named exception state; no order write proceeds until its owner records a resolution. Successful validation produces an approved intent containing the account, customer PO, version, mapped lines, converted quantities, and agreed commercial terms.
| Rule | Automatic route | Exception | Owner |
|---|---|---|---|
| Approved buyer-to-account mapping | Select active account and allowed ship-to | Account review: unknown sender or conflicting company | Sales Operations |
| One approved alias per customer SKU | Resolve to one active ERP item | Product review: missing or competing matches | Product data steward |
| Explicit unit and current pack conversion | Convert boxes into ERP selling units | Unit review: missing pack or conflicting quantity | ERP master-data owner |
| PO, terms, and line checks pass | Save validated candidate for approval | Commercial review: missing PO or disputed price | Sales Operations |
| Latest version approved; no unresolved write | Submit approved intent | Revision or outcome review: hold submission | Order supervisor |
Suppose BX-17 matches two ERP items. Show the operator the source PDF region, extracted code, candidate items, descriptions, and customer-specific mapping history. The product steward chooses the correct item only after checking the customer’s specification, or requests clarification. Save the selected ERP ID, rationale, approver, timestamp, and source evidence. A one-order decision should not silently become a reusable alias; approve that master-data change separately.
Pack validation needs the same discipline. Eight boxes of twelve means 96 pieces only when that conversion applies to this item and customer. A model’s confident reading of “8” supplies neither the missing unit nor the pack definition.
Consider draft-first order entry automation when the target interface supports a controlled approval stage. Microsoft’s Business Central salesOrder resource documents an external document number and statuses including Draft, In Review, and Open. Verify actual write permissions and workflow behavior in your ERP. A status label alone does not prove that downstream processing is held. Otherwise, retain the candidate outside the ERP until approval, and distinguish that candidate from an ERP draft in every operator message.
Treat resubmissions, revisions, and timeouts explicitly
Agree on order identity with Sales Operations before implementing duplicate detection. For this example, the business key combines ERP company, customer account, and buyer PO within an agreed PO reuse policy. A version identifies the approved intent under that key. An operation identifier tracks a specific write. A message identifier or attachment fingerprint helps detect deliveries; neither replaces the business key.
Three events need different outcomes:
- Identical delivery: PO-4821 version 1 arrives again with the same message and attachment. The operator sees “duplicate delivery linked to version 1.” No second candidate approval or ERP write occurs. The existing held candidate remains; there is no ERP record yet.
- Same PO, new message: the buyer forwards the unchanged PDF. Link it to the existing intent after comparing normalized fields and source evidence. The operator sees “resubmission, no business change”; the ERP count remains zero while review continues. Conflicting instructions instead enter revision review.
- Changed version: the correction requests six boxes. Version 2 shows the quantity difference, marks version 1 superseded, and requires approval. Once the ambiguous SKU is resolved, the operator approves 72 pieces. Only version 2 is submitted; version 1 never becomes an ERP order.
If an earlier version already exists in the ERP, hold the correction for the order supervisor. Confirm its current processing status and use the ERP’s permitted amendment or cancellation workflow. Preserve the old intent and link the approved change to the existing order. Never infer that another creation request is an amendment.
For PO-4821, assume the receiving interface enforces uniqueness of the operation reference and supports lookup by that reference. The ERP creates order SO-7308 for version 2, but its response is lost. The operator sees “outcome unknown,” not “failed” or “created.” The integration owner reconciles the stored reference against the ERP, compares account, PO, version, lines, and quantities, and restores confirmation with SO-7308 and its status.
AWS’s guidance on idempotent APIs explains caller-provided identifiers and changed-intent handling. These are design principles, not guarantees about your ERP. Test uniqueness, retention, and repeated-request behavior. A lookup miss may reflect delay. Without a verified safe retry contract, keep the write held for manual reconciliation, including checks with the ERP owner, before authorizing resubmission. Serialize writes for the same business key and preserve recovery state across restarts, including pending approvals and lookup attempts.
Test one customer segment before widening rollout
Build the sales order automation pilot around actual documents from one customer segment, with permission to use them in testing. Select clean orders, customer-specific aliases, pack ambiguities, forwarded messages, and genuine correction threads. Create a reference result with Sales Operations: intended account, item, unit, quantity, version, and expected review decision for each document. Keep these labels separate from the extractor’s output so its own answers cannot become the acceptance standard.
Use the following acceptance matrix as a proposed pilot checklist. Run it against the same ERP permissions and workflow planned for launch, using a test environment. The evidence must connect source documents to decisions and resulting records.
| Scenario | Expected record or route | Evidence for acceptance |
|---|---|---|
| Standard approved order | One ERP record with correct account, lines, and units | Source, approved intent, ERP ID, status, and line comparison |
| Unknown or competing SKU | Product review; no ERP write | Candidate matches, steward decision, and approved mapping |
| Ambiguous box size | Unit review; no inferred conversion | Source wording, confirmed pack definition, owner approval |
| Repeated delivery or unchanged resubmission | Link to existing intent; no additional record | Delivery history, matching business key, ERP record count |
| Corrected PO | Revision review; superseded intent blocked | Before/after quantities, approval, one resulting ERP ID |
| Response lost after creation | Outcome review, then original record recovered | Write reference, lookup trail, matching ERP ID and quantities |
Exercise the timeout after the ERP commits the write, then restart the integration during recovery. Interrupting the request before it reaches the ERP tests a different failure. Also replay an old delivery after the corrected version is approved: the old quantity must not return. For an order already entered, test amendment permissions and processing locks separately.
Measure the pilot against the manual baseline: record reviewer handling time per order, the share routed to review, and confirmed ERP line errors per orders checked. Track unresolved unknown outcomes separately. Agree on targets and sampling with Sales Operations before rollout; speed alone cannot establish accuracy.
Evaluate a ready-made platform with these documents and expected outcomes. Ask the provider to demonstrate account mapping, customer aliases, explicit pack handling, revision comparison, approval evidence, and recovery. Mark each requirement as covered by configuration, requiring an extension, or unsupported. A successful extraction demo does not establish order acceptance.
The PECO case published by lowki.ai reports use with Epicor Kinetic since February 2026. Its scope includes email bodies, PDFs, and spreadsheets; the team checks entered orders. It also identifies unclear trade-pack versus single-unit quantities as a remaining limitation. Use that customer account to inform your pack-size test, without assuming the same results for your segment.
Add a separate adapter only for a demonstrated gap, such as persisting operation state when a supported connector cannot reconcile unknown writes. Keep supported mappings and approvals in configuration where they pass acceptance. Before expansion, assign queue owners, escalation times, and a recovery procedure; require the ERP owner and Sales Operations to sign off on record accuracy and unresolved exceptions.
Conclusion
Collect a clean PDF order, its original email, an unchanged resubmission, and a correction thread for one customer segment. Add documents exposing three exceptions: an uncertain SKU, an unclear pack size, and a write whose ERP response disappears. Agree on owners and expected evidence before estimating the integration. In our hypothetical PO-4821, the corrected version wins, the approved quantity is 72 pieces, and reconciliation confirms the single ERP record SO-7308. Use that complete trail as the acceptance target for your first email-to-ERP integration.
Order-to-ERP integration Connect incoming orders to your ERP We can map one order channel, build the adapter that validates customer and product details, and route ambiguous documents to review. The pilot tests how your ERP handles revisions, duplicates, and a lost response before you process more orders. Discuss your order flow |







