You received the same purchase order twice
Two OrderRequest documents with the same order number arrive minutes or hours apart, and your system created two sales orders. The buyer says they raised one.
Assume every order can arrive more than once and make receiving one safe to repeat. Buyers resend when your acknowledgement was slow, failed or never arrived. Before treating a repeat as a duplicate, read OrderRequestHeader: the same orderID with type="update" or a higher orderVersion is a change order, not a duplicate, and discarding it loses the change.
Causes, most likely first
Ordered by how often each one turns out to be the culprit, not by how interesting it is. Work down the list.
-
Your acknowledgement was too slow and the buyer retried
How to confirm: The two copies share a payloadID and arrive a fixed interval apart. Your logs show the first one was processed successfully but responded after a long delay.
Fix: Store the order and respond immediately, then process it. Deduplicate on payloadID for exact retries.
-
A failed order was resent after you fixed the cause
How to confirm: The first attempt returned an error, yet your system created the order anyway before failing. The resend then created a second one.
Fix: Make order creation and the success response one transaction. If you return an error, nothing should have been created.
-
A change order was treated as a new order
How to confirm: Same orderID, different payloadID, header type update, orderVersion 2. Your handler ignored the type and created a second order.
Fix: Key orders on orderID and handle type new, update and delete separately. An update replaces the earlier version rather than adding to it.
-
The buyer cancelled and reissued under a new number
How to confirm: Two different orderIDs for the same goods, with a delete for the first one arriving before or after the second. Some buyer systems cannot change an order and reissue instead.
Fix: Process cancellations as promptly as new orders. If the delete is ignored, the reissue looks like a duplicate to the warehouse.
-
The order also arrived by another channel
How to confirm: One copy came by cXML and one by email or a portal download. Both were keyed in.
Fix: Agree one channel per buyer for purchase orders and switch the others off, or check new orders against existing orderIDs whatever the channel.
If it is not on your side
Ask the buyer for their transmission log for the order: how many times it was sent, with which payloadIDs and which header types. That tells you whether it was a retry, a change or a reissue.
Check the document itself
Before chasing “You received the same purchase order twice” further, paste the cXML or OCI payload into our free tester. It runs in your browser and reports the structural problems buyers reject on. The interactive demo plays the whole round trip from the buyer's seat.
Open the tester Play the demoRelated questions
Should we deduplicate on payloadID or orderID?
Both, for different things. The same payloadID is the same document sent again: safe to ignore after acknowledging. The same orderID with a new payloadID is a new version of the order and needs reading, not discarding.
What should we return for a duplicate?
Success. The buyer is asking whether you have the order, and you do. An error response invites another retry.
Rather not be the one debugging this?
A free PunchOut shop runs the PunchOut round trip for you: upload from Excel, test it, invite your buyer.
Start free Send us the error