Which documents disappear when a Magento 2 order is deleted?

1 min read

Two trays with bundles of documents held by brass clips

On a restorable test copy, prepare two fictional orders. Record their internal IDs, invoices, shipments and credit notes. With test integrations, record references to payments, ERP records and attachments as well. In Sales → Orders, select one test order.

Check what is removed and in what order

Bulk Order Deletion 1.0.0 removes invoices, shipments and credit notes before the order. The original controller ran against a local data model with 701 selected and 702 as the control. In a separate run, a shipment deletion error left 701 in place without its invoice. Bulk Order Deletion. Module documentation.

Compare documents by ID after the test

Check each document type in the copy. After an error, compare the state with your baseline and restore the copy before trying again. The table shows record counts in the local model.

Test records before and after the operation
Record type701 before701 after success702 control after success701 after interruption
Order1011
Invoice1010
Shipment1011
Credit note1011

For a cancellation or refund, follow the sales and payment workflow for the current order status. Check attachments, customer data and records in the ERP or with the payment provider separately. Adobe Commerce order workflow. Adobe Commerce refunds and credit notes.

For selecting test orders, see the earlier guide.

Previous Next

KOWAL.BLOG

Choose your language

Available versions open the corresponding page. More languages are being prepared.

English (UK) Français Deutsch Español Italiano Português Nederlands Svenska Dansk Norsk Suomi Lietuvių Latviešu Eesti Čeština Slovenčina Magyar Română Български Ελληνικά Slovenščina Hrvatski Polski English (US)