Duplicate Order Detection in ERP: Causes, Checks, Cleanup
Duplicate order detection in an ERP means catching the same order before it is booked twice, and finding the ones that already slipped through. The fix is rarely one setting. It is a layered set of checks: a reliable key (usually the customer PO number), fuzzy matching on customer, items and quantities, and a review step at the point where orders enter your system. This guide shows where duplicates come from, how to detect them without flagging legitimate repeat orders, and how to clean up what is already in your ERP.
TL;DR
- Duplicates come from the same transaction arriving more than once: resent emails, retried integrations, reused PO numbers and manual re-keying.
- Match on several signals (customer, PO number, line items, amounts, dates), not on one field, so real repeat orders pass.
- Block at the intake point, before posting, because cleaning up after shipment and invoicing is far more expensive.
- For integrations, use idempotency tokens or unique message IDs. For email orders, add a validation and approval step before ERP entry.
- Clean up with a ranked review list, never a bulk delete.
Table of Contents
- What a duplicate order is, and why it hurts
- Why duplicate orders occur
- How to detect duplicates without flagging real repeat orders
- Controls that prevent duplicates in the integration layer
- Stopping duplicates at the email inbox
- How to clean up duplicates already in your ERP
- Our perspective
- Where Ampwise fits
- A short checklist to start this week
- FAQ
- Sources
What a duplicate order is, and why it hurts
A duplicate order is one customer demand recorded as two or more sales orders (or purchase orders) in your ERP. The system treats each as real. Warehouse picks twice, production schedules twice, and finance invoices twice, until someone notices.
The damage is usually quiet at first:
- Inventory distortion. Allocated stock disappears for an order that does not exist, so a real order may show as unavailable.
- Wasted fulfillment. Picking, packing and shipping an unwanted second shipment, then paying for the return.
- Customer friction. A buyer who receives and is billed for double the goods loses trust quickly.
- Credit memos and rework. Finance spends time reversing invoices, and sales spends time apologizing.
Not every look-alike is a duplicate, which is exactly why detection is hard. Wholesale customers legitimately reorder the same items every week. Some reuse a PO number across ship-to locations or release against a blanket order. A rule that flags every repeat will be switched off within a month.
Why duplicate orders occur
In practice, most duplicates fall into four groups.
1. Resent or forwarded emails
A buyer sends the order, hears nothing for an hour, and sends it again, sometimes with a slightly changed subject line. A colleague is copied and forwards it to a different inbox. Two people in your team each process what they see. Nothing is technically wrong with the ERP; the duplicate was created by hand.
2. Retries in integrations
Automated pipelines are built to retry. Cloud messaging services state plainly that records can be delivered more than once, for example when a producer retries after a network timeout or a consumer restarts or rebalances, as AWS documents for Kinesis Data Streams. If your web shop, EDI feed or middleware sits on that kind of plumbing, the same order can arrive twice without anyone doing anything wrong.
3. Reused or shared PO numbers
Customers sometimes reuse an old PO number or share one between two ship-to locations. A naive “PO number already exists” rule will either block a valid order or, if switched off, let true duplicates through. This is a common complaint in ERP user forums, and it explains why the PO number alone should never be the only test.
4. Multiple channels for the same order
An order is placed by email, then confirmed by phone, then entered by an account manager from the confirmation. Or it arrives through a portal and also as a PDF. Each channel is correct on its own; together they create two records.
How to detect duplicates without flagging real repeat orders
The goal is a score, not a switch. Combine signals and decide what each result triggers.
Start with exact keys
Where a unique identifier exists, use it. For webhook-style integrations, Shopify’s guidance is to extract the unique webhook ID, check a persistent store for it and skip processing if it has already been seen, as described in Shopify’s webhook delivery documentation. The same principle applies to any source: store the message ID, file hash or external order number and compare on arrival.
In the ERP itself, many systems can check the customer PO number for you. For example, Sage 300 lets you choose per customer whether a duplicate PO number triggers a warning, an error or no check at all. Check what your own ERP offers and set it to warn rather than block for customers known to reuse numbers.
Add fuzzy matching
When there is no clean key, compare a bundle of fields within a time window:
| Signal | What to compare | Why it helps |
|---|---|---|
| Customer | Account and ship-to location | Same buyer, same destination |
| PO or reference number | Exact and near-match (typos, prefixes, trailing spaces) | Catches “PO-1042” vs “PO1042” |
| Line items | SKU, quantity, unit price | Identical basket is a strong signal |
| Totals | Order value within a small tolerance | Catches re-keyed orders with a tiny change |
| Timing | Received within hours or days of an earlier order | Separates resends from planned reorders |
| Source | Same email thread, attachment name or file hash | Spots forwarded copies |
Two matching signals is a hint. Four or five is a near-certain duplicate.
Decide what each result does
Use three outcomes instead of two:
- High confidence: hold the order and show the existing one next to it.
- Medium confidence: let a person decide with one click, with the matching fields highlighted.
- Low confidence: post normally and log the weak match for later audits.
This keeps legitimate reorders flowing and puts human attention only where it pays off.
A worked example
Say a wholesale customer emails an order for 40 units of item A and 10 of item B on Monday. On Tuesday the same buyer sends the same PDF again, subject line changed to “Re: order”. The PO number matches, the lines match, the total matches, and the gap is one day. That is a high-confidence duplicate and should be held.
Now take the same customer sending an identical basket the following Monday, with a new PO number. Customer, lines and total match, but the PO number differs and a week has passed. It is a weekly reorder, and it should post, perhaps with a soft note. The difference is only visible when you test several signals together.
Controls that prevent duplicates in the integration layer
If orders reach your ERP through connectors, middleware or APIs, prevention belongs in the design.
- Idempotency tokens. AWS describes how a token lets a service tell a new request from a repeat, returning the stored original response if the token has already been processed, in its guidance on idempotent operations.
- Propagate the token downstream. The same guidance says the token should travel to every downstream service so the whole chain avoids repeating the action (AWS reliability pillar). An order that is de-duplicated at the front door but re-created in a later step is still a duplicate.
- Store the external order ID in the ERP. Keep the web shop, portal or customer reference in a dedicated, indexed field so every future import can check it.
- Make imports safe to rerun. A failed batch that is replayed should update or skip existing orders, never create new ones.
- Log every rejected duplicate. A running count tells you whether a customer, channel or connector is the recurring source.
If you run Microsoft’s ERP, a partner experienced with Dynamics 365 Business Central implementation can help you configure the available duplicate checks on your sales documents.
Stopping duplicates at the email inbox
For many wholesalers and manufacturers, the largest source of duplicates is not an integration at all. It is the shared inbox, where orders arrive as PDFs, spreadsheets, scans and free-text emails and someone retypes them into the ERP. Nothing in that path carries a unique ID, so the ERP cannot protect you.
The practical answer is to put the check before posting:
- Capture every order email in one place, with sender, thread and attachments attached to the record.
- Extract the customer, PO number, items, quantities and dates into structured fields, whatever the document format.
- Validate against ERP master data and against orders already on file.
- Approve the verified record, then post it to the ERP.
This is the same human-review-before-posting pattern we describe in automating email orders for manufacturers, and the checks that belong in step 3 are covered in validating purchase orders before ERP release. If your orders come as spreadsheets, Excel order import automation deals with that specific format.
How to clean up duplicates already in your ERP
Do not start by deleting. A posted order may already have a shipment, an invoice or a payment attached.
- Build a candidate list. Query open and recent orders grouped by customer, PO number, total and order date. Flag groups with more than one record.
- Rank by risk. Review first the orders not yet picked or shipped, because they can still be cancelled at no cost.
- Check status. For each pair, see whether there is a shipment, invoice or payment. The treatment differs: cancel an open order, reverse a shipment, or issue a credit memo for an invoice.
- Confirm with the customer when unsure. One short email beats a wrong cancellation.
- Keep the audit trail. Cancel or void rather than delete, and record the reason code. That way a recurring cause becomes visible.
- Fix the cause. Tag each duplicate with its source (email resend, integration retry, reused PO, multi-channel). After a month you will know which control to build first.
If duplicates cluster in one connector or one customer, that is the signal to audit that path rather than keep cleaning up after it.
Our perspective
We see duplicates as a symptom of a deeper issue: orders reach the ERP through a manual, unstructured step with no memory. When a person retypes an email, there is nothing to compare against and nobody has time to search the order history for a look-alike.
That is why we focus on the moment between the inbox and the ERP. Ampwise works directly in Outlook and Gmail, reads emails, PDFs, Excel files and scanned documents without templates, extracts and validates the data, and lets a person approve the verified record with one click before it goes into the ERP. Putting structured data and a review step at that point is what makes duplicate checks possible at all, and it also cuts the retyping that creates errors in the first place.
Our advice to any team: do not chase a perfect rule. Start with a PO number check set to warn, add customer, items and timing as supporting signals, and keep a human on the medium-confidence cases. Review what gets flagged every month and tune from there. Teams that do this find the false alarms drop quickly and the real catches become obvious.
— Evert
Where Ampwise fits
If your orders, inquiries, invoices and PO confirmations arrive by email and are typed into an ERP by hand, Ampwise is built for that gap. It processes Outlook and Gmail messages and their attachments, supports multiple ERP integrations, adds smart labeling and status tracking, and keeps a verified approval step before anything is posted. You can see how it works on the Ampwise product page and decide whether a short pilot makes sense for your inbox; our guide to a 2 to 4 week pilot outlines what that looks like.
A short checklist to start this week
- Turn on your ERP’s duplicate customer PO check and set it to warn.
- Add an indexed field for the external order or message ID.
- Pull a report of open orders sharing customer, PO number and total.
- Agree who decides on medium-confidence matches, and how fast.
- Record a reason code for every cancelled duplicate.
- Review the codes after 30 days and pick the first root cause to remove.
FAQ
Can I just block any order with a PO number that already exists?
Usually not. Some customers reuse a PO number or share one across ship-to locations, so a hard block will stop valid orders. A warning, combined with checks on items, totals and timing, is safer.
What is the fastest way to find duplicates already in the ERP?
Group recent open and shipped orders by customer, PO number, total and date, then review every group with more than one record. Start with orders not yet shipped, since they can be cancelled without a credit memo.
Do integrations create duplicates by themselves?
They can. Messaging and webhook systems may deliver the same message more than once after timeouts or restarts. Store a unique ID for each message and make imports safe to rerun, so a repeat is skipped rather than posted again.
How does email order automation help prevent duplicates?
It turns each email into structured data before posting, so the order can be compared with what is already on file. A person can then approve or reject a flagged match before it reaches the ERP, which a manual retyping process cannot offer.
Sources
- Handle duplicate records, Amazon Kinesis Data Streams
- Verify webhook deliveries, Shopify
- Check duplicate customer PO number in Sage 300 ERP
- REL04-BP04 Make mutating operations idempotent, AWS Well-Architected Framework
- REL04-BP04 Make mutating operations idempotent, AWS Reliability Pillar
- Dynamics 365 Business Central