Skip to content
Insights/Article

When a Business Record Is Changed by Mistake, How Should Undo and Recovery Work?

Key takeaway

Define what is undone: a field edit, a business action, a version restore, or a transaction. Reversible actions restore directly. Shipped, charged, or externally sent actions can only be compensated with a trace. Irreversible actions get no undo button. Recovery must also handle downstream notices and reporting.

A version timeline for an order record, with undo limited to the record and a separate compensation for warehouse picking already done

Suppose the following happens. An order quantity should have been 100, but the buyer types 1000 by mistake. He notices and clicks Undo; the system reverts the last field, but the order has already reached the warehouse, which prepared material for 1000 units. In another case, customer service corrects a wrong delivery address and then corrects it back. The address in the system is restored, but the shipping label already printed carries the old one.

"Undo" is an underestimated word in business systems. It looks like putting data back, but it first requires answering: which step is being undone, and has that step already affected someone else?

Four kinds of undo, with different meanings

Undoing a field edit: returning one input to its previous value. It affects only the record, and belongs before saving or in a draft.

Undoing a business action: cancelling a submission, a shipment, or a publication. It may already have triggered downstream work and needs compensation.

Restoring a version: returning the whole record to a historical version. It overwrites current content but does not reverse business that already happened.

Cancelling a whole transaction: voiding an order or a payment. It touches money, stock, documents, and the other party's confirmation, and usually needs its own flow and approval.

One Undo button carrying all four meanings will be misused. Label the action: Withdraw submission, Restore previous version, Void order.

Separate reversible, compensable, and irreversible actions

Reversible: draft edits, unsubmitted fields, schedules not yet effective. Restore directly; no downstream notice.

Compensable: stock already deducted, goods shipped, notifications sent, receivables created. The data can change, but downstream actions already happened. Add a reversing action: return to stock, reverse the receivable, send a correction. Compensation leaves two records; it does not make the original disappear.

Irreversible: money already paid out, content already public, a contract formally sent to a customer. Do not offer an undo button. Use a correction, reversal, or republication flow and keep the original record.

The classification is a business decision, not a technical one. The business owner decides which action belongs where; development designs the button and flow.

Restoring a record is not restoring the business chain

Changing the quantity from 10 back to 100 changes the order. The warehouse already picked 10, logistics booked 10, and the customer was told the quantity changed to 10. Restoring the order does not change any of that automatically.

Before restoring, show the impact: which downstream records reference this one, which have executed, and which are still waiting. The system can list related stock movements, payments, notifications, and tickets for the operator to check.

What cannot be compensated automatically becomes a task with an owner. "Order restored to 100; warehouse must pick 90 more." "Customer must receive a correction." Restoring the record is not the same as restoring the business.

Versions, time, and related effects

Keep a version for every change: which field, from what to what, who, when, and why. Versions are not only for audit; they are the basis for recovery.

When restoring a version, state which fields are restored. A whole-record restore can overwrite notes and attachments someone added later. A safer approach restores selected fields, or compares current and target versions before confirmation.

Keep time honest. Backfilling a record dated yesterday is not the same as changing the record's date to yesterday. The first creates a new record; the second rewrites history. The recovery action carries its own real time, not a fabricated one.

Preview related effects. If a quote is restored, do orders referencing it lose their price basis? If a customer address is restored, do unshipped orders follow? The system should show the list before confirmation, not leave the business to discover it afterward.

When a second confirmation is needed

Use a second confirmation when the action affects money, stock, or permissions; when it has crossed roles; when it has been sent outside; when a batch exceeds an agreed size; or when restoring a historical version.

The confirmation is not another "Are you sure?" It shows what will change, which downstream records are affected, whether compensation is needed, and who is notified. The confirmer should be a role accountable for the consequence, not whoever happens to click.

Batch undo is especially dangerous. Undoing 50 records may create 50 compensation tasks. Run a dry run first, show the impact summary, then execute.

Undo logs and notifications

The undo itself needs a log: initiator, time, record, target version, reason, affected downstream, and approver. It uses the same viewing rules as other activity logs; being a correction does not exempt it from recording.

Notify affected people, not only the operator. The warehouse needs to know about the extra pick, finance about the reversal, customer service about the correction to send. The message says what happened, which version now governs, and what still needs doing.

Batch operations deserve a dry run for the same reason. Before undoing fifty records, show which downstream items will need compensation, how many tasks each owner receives, and what cannot be reversed. A dry run is cheap; discovering the impact after execution is not.

A recovery checklist

[Business record recovery checklist]

1. Define the action
- Is this undoing a field, a business action, a version, or a transaction:
- Is it reversible, compensable, or irreversible:
- Does the button name the specific action:

2. Impact
- Which downstream records reference it, and which have executed:
- Which compensating actions are needed, and who owns them:
- Is a customer or external party notification required:

3. Versions and time
- Which fields are restored; will later additions be overwritten:
- Has the current version been compared with the target:
- Does the recovery use the actual time rather than a fabricated one:

4. Confirmation and trace
- Is a second confirmation required, and by whom:
- Does the log record actor, time, reason, version, and impact:
- Were affected roles notified:

Take one record type that gets corrected often and walk its edit, undo, and recovery. If nothing happens downstream after Undo, the button is not finished. What an activity log should record is covered in the field inventory discussed in the system preparation guide; this article covers only recovery after a mistake. Approval returns and resubmission are a separate flow topic and are not covered here.

Let's talk about your project

Websites / Business systems / AI applications

Chat on WhatsApp