Editing or inspecting a returned cart opens an empty basket
A cart came back to the requisition without trouble. When the shopper clicks to edit or view it, your site opens on an empty basket, a fresh home page, or an error.
A setup request is not always a create. When the shopper reopens a cart, the buyer sends operation="edit" or operation="inspect" and lists the existing lines as ItemOut elements inside the request. If your handler ignores the operation attribute and starts a new session every time, the shopper sees nothing they added. Check also whether the buyer supports edit at all: Coupa’s supplier documentation states it supports create and inspect only.
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.
-
Every setup request is handled as create
How to confirm: Log the operation attribute on the PunchOutSetupRequest element. If you see edit or inspect arriving and your handler has no branch for either, this is the fault.
Fix: Branch on the operation. For edit, rebuild the basket from the ItemOut lines and let the shopper change it. For inspect, show the same lines read-only and do not offer a way to return a changed cart.
-
Your lines cannot be rebuilt from what comes back
How to confirm: The ItemOut elements arrive but your code cannot map them to products. The buyer echoes the ItemID you sent — SupplierPartID and SupplierPartAuxiliaryID — so if neither carries enough to identify the configured item, the line is unrecoverable.
Fix: Put whatever you need to reconstruct a line into SupplierPartAuxiliaryID when you first return the cart, such as a configuration or basket-line reference. It is the field intended for exactly this round trip.
-
operationAllowed is not set the way you meant
How to confirm: Read the PunchOutOrderMessageHeader in the cart you returned. Its operationAllowed attribute tells the buyer what the shopper may do later. Set to create, the buyer has no reason to offer editing; set to edit when you cannot handle it, the buyer offers something that fails.
Fix: Declare only what you support. If edit is not built, return inspect or create and say so during setup rather than letting the shopper find out.
-
You key the reopened session on the BuyerCookie alone
How to confirm: An edit request carries a BuyerCookie, and on some platforms that value is fixed per user and supplier rather than per requisition. Coupa documents its BuyerCookie as unique to each user and punchout site combination, and says it never changes.
Fix: Rebuild from the ItemOut lines in the request rather than from a basket you stored under the cookie. A stored basket keyed on a fixed cookie is whatever the shopper last did, not the requisition they opened.
If it is not on your side
Ask the buyer to capture one edit request from their side and send it to you redacted. Seeing whether ItemOut lines are present, and what identifiers they carry, settles whether the gap is in what they send or in what you read.
Check the document itself
Before chasing “Editing or inspecting a returned cart opens an empty basket” 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
Do we have to support edit at all?
No. Plenty of suppliers support create only and the buyer handles changes by deleting lines and punching out again. What matters is that operationAllowed tells the truth, so the buyer does not offer something you cannot do.
What should happen if an item in the edit request is no longer sold?
Show it in the basket marked as unavailable rather than dropping it silently. The shopper needs to see that a line they expected has changed, otherwise the returned cart quietly differs from the requisition they opened.
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