Scan once. Receive properly. Claim the rest.
Returns aren't batch metadata. OrderReturn is a first-class long-lived domain object — with reason, AWB, address, pickup/delivered status, and a 60-day claim_due_at clock. The receive scan is one keystroke. The claim flow takes care of the rest.
- OrderReturn is a first-class table with OrderReturnItem, OrderReturnEvent, ReturnAwb children — not a string column on Order.
- Receive scan resolves AWB → OrderReturn → received in one keystroke; the audit trail writes itself.
- Returns not received within 60 days auto-promote to claim_pending so you don't lose the dispute window.
Returns sub-pages.
A return has a state machine, not a status string.
OrderReturn.status is a real enum: INITIATED → PICKED_UP → IN_TRANSIT → DELIVERED → CANCELLED. Internal status carries two extra states (received, claim_pending) for warehouse + claim coordination. Every transition lands in order_return_events.
- · OrderReturn rows persist forever — no batch-by-product churn.
- · ReturnAwb tracks every shipment movement.
- · received_at + received_by_user_id + received_at_warehouse_id are all captured.
- · claim_due_at is materialised so the sweeper indexes cleanly.
How returns work in Robnu.
A single-parcel scan that resolves an AWB (or return ID, tracking number, or forward shipment ID) to an OrderReturn row, flips internal_status to 'received', and writes a return_scan_event audit row. The scan-resolver service handles all four resolution modes.
When an OrderReturn is created, claim_due_at is set to 60 days from initiation. The daily claim sweeper (BullMQ, 0 2 * * *) finds all OrderReturn with claim_due_at < now and internal_status not in ('received','cancelled') and promotes them to claim_pending — at which point Robnu prompts you to file the claim.
GlobalScanSearch is a topbar control that combines scan resolution and global search. Press Ctrl/Cmd+K from anywhere in the app, paste an AWB or order ID, and either resolve the scan or jump to the result.
return_scan_events is an append-only audit table. Every scan creates a row with the AWB scanned, the resolution mode, the user, the warehouse, and the timestamp. The table is per-seller (RLS-enforced) and exportable.
Receive returns properly. Claim the rest automatically.
Sign up free. Connect Ajio. Scan your first return.
