Return an item for a refund
A shopper picks items from a delivered order to return, with a reason and a drop-off point, and gets a QR code; returns close 30 days after delivery, and courier pick-up is planned. They have 14 days to hand in the parcel, or the return closes. The carrier's scan starts a warehouse inspection that ends in a full refund, a partial refund or a rejection.
What UJN shows here Point at a note to see its part of the drawing
The source (40 lines)
return-refund.puml
@startujnrender { direction: down; arrow_spacing: 24 }journey RETURN "Return an item for a refund"description: "Return items at a drop-off point; the refund follows the inspection. Courier pick-up is planned"unique_id_friendly: returns start from_orders { description: "From the order history" }view order { title: "Order details"; route: /orders/:id }view window_closed { type: modal; title: "Return window closed"; description: "Returns close 30 days after delivery" }view return_form { title: "Return items"; description: "Items, reasons, drop-off point"; route: /orders/:id/return }view pickup { title: "Courier pick-up"; description: "Pick a day and time"; route: /orders/:id/return/pickup }action create_return { title: "Create return"; description: "Return label and QR code" }view qr { title: "Return QR code"; description: "Also sent by email"; route: /returns/:id }handoff drop_parcel { title: "Drop off the parcel"; description: "QR code scanned at the counter"; channel: drop-off point; timeout: 14 d }end lapsed { type: abandoned; description: "Return closed after 14 days" }action scanned { type: event; title: "Carrier scan"; description: "From the carrier" }actor inspector { title: "Returns inspector"; description: "Checks the items"; role: Warehouse }action refund { title: "Issue refund" }system psp { type: external; title: "Payment provider"; host: api.pay.example }end refunded { type: success; description: "Refunded in full or in part" }end rejected { type: failure; description: "Rejected, item sent back" } from_orders --> orderorder --> return_form : [Return items] within 30 daysorder -left-x-> window_closed : [Return items] after 30 dayswindow_closed .x.> order : [Close]return_form --> create_return : [Get QR code] { payload: [items, reasons, drop_off_point] }return_form -left-> pickup : [Book a pick-up] { flags: [future] }create_return --> qrqr --> drop_parcel : [Take the parcel]drop_parcel .right.> lapsed : [Keep the item]drop_parcel ..> scanned : [Hand in parcel]scanned --> inspectorinspector --> refund : [Full refund]inspector --> refund : [Partial refund] { payload: [refund_amount] }inspector -right-x-> rejected : [Reject]refund -right-> psp { payload: [payment_id, refund_amount] }psp ..> refund { payload: [refund_id] }refund -left-> refunded@endujn