Exceptions: cancel, edit, and after-sales (RMA)
Last updated 2026-10-13
Which orders can be cancelled or edited, batch cancel, and the RMA return flow.
Exceptions fall into three buckets: cancel an order, edit an order, or handle after-sales returns. Each has strict state gates — the system tells you exactly which orders qualify.
Cancel an order#
- Only draft, pending_review, confirmed, and allocated orders can be cancelled. Released and later states are rejected — use RMA instead.
- Batch cancel handles up to 100 orders with per-order results; the same state rules apply to each.
Edit an order#
- Edits are allowed only before approval (draft / pending_review). Lines are replaced wholesale and totals recalculated.
- After approval, do not edit — cancel (if still allowed) and recreate, or handle it as a return.
RMA: after-sales returns#
- Create an RMA from an order: pick return lines by order line (so_line_id must belong to that order), set return qty, condition, and refund amount. RMA numbers look like RMA-YYYYMMDD-####.
- RMA state machine: requested → approved → receiving → completed; requested / approved can be rejected.
- Returned goods are received through normal receiving (source_type=return) — there is no separate return-receiving document. The full returns process lives in the RMS app.
Every status change — including cancels and RMA steps — is appended to the audit log, so the order timeline always shows who did what and when.