4. Orders, Fulfillment & Courier
Purpose — Unified order management across all channels and physical delivery via courier partners (Shiprocket first), recognizing that for these products an order isn't "done" at delivery — it's done at install + commissioning.
Personas served
Customer, Dealer, Finance admin, Service head, Super admin.
Key capabilities
- Unified OMS — all channels' orders in Medusa (self + dealer + Amazon/Flipkart synced).
- Courier integration — Shiprocket as a Medusa fulfillment provider (rate shopping, AWB, label, pickup, live tracking, NDR/RTO, COD reconciliation). Heavy goods → LTL/freight options. See Shiprocket.
- Multi-warehouse — nearest-warehouse routing (v2: van stock).
- Install-completes-the-order — delivery triggers an installation job in FSM; order lifecycle extends to commissioning.
- Serial capture at dispatch — serials recorded →
serial.assigned→ Warranty. - Returns / RMA — replacement, defective-unit reverse logistics.
Data owned
Medusa (PG): orders, fulfillments, returns, shipping options. Finance (PG): COD/settlement reconciliation. Tracking snapshots cached (Redis).
Events
- Emits:
order.placed,order.delivered,serial.assigned,return.created,shipment.updated. - Consumes: Shiprocket webhooks (status),
claim.approved(replacement logistics).
APIs
- Medusa Store/Admin order APIs via BFF.
POST /fulfillment/quote(rates),POST /fulfillment/ship,GET /fulfillment/:id/trackPOST /orders/:id/returns
Tenant-config knobs
Enabled couriers + credentials; COD on/off; warehouse list; auto-create-installation-job flag; RTO policy.
Dependencies
Storefront, FSM, Warranty, Finance, Shiprocket.
Open questions
- Freight/LTL provider for heavy solar consignments — which, and in which phase?
- COD scope (many high-ticket items may be prepaid/financed only).