Edwige Assogba, who owns the bar Le Palmier, orders forty crates from Dépôt Houngbédji in Porto-Novo. The depot cannot send everything in one run: the van carries thirty crates today and the rest follows tomorrow. Codjo Houngbédji and his manager Fifamè Sossou need to plan each run, tell the driver Moussa Alassane what to take, and record what really arrived. This page follows a delivery from the zone to the last crate. The same steps apply to any business that delivers what it sells, in one or several runs.

Define delivery zones

Codjo prices delivery by area. With Create a delivery zone, he adds a zone such as “Porto-Novo centre” with a fee. The name is unique in the company, and the fee is in major units with no more decimals than the currency allows: for XOF, none. A zone can be active or not. List delivery zones and View a delivery zone read them. Edit a delivery zone changes the name, the fee or the active state. Delete a delivery zone works only for a zone that no delivery uses.

Plan a delivery

A delivery is planned for a completed order, that is, after the sale was cashed (see Run a register session). Fifamè plans a delivery for Edwige’s order (Plan a delivery), with the thirty crates the van can take. She gives:
  • the items and quantities. Across all the deliveries of the order, a quantity cannot exceed what was ordered;
  • an address: one of the customer’s addresses, a free address, or the customer’s stored address;
  • a zone, or a fee, but not both;
  • optionally the driver, a stop of an active trip (see Trips and waypoints), and an amount to collect on delivery.
The delivery starts as a draft. Until it is ready, Edit a delivery changes the address, fee, trip, driver, items or date. The items sent replace the existing ones, and the items not sent are removed. List deliveries of an order and View a delivery show what is planned.

Prepare the run

When the crates are loaded, Fifamè marks the delivery ready with Mark a delivery ready. It records who prepared it and when. A delivery set to collect on delivery needs its amount to collect. If something changes, Return a delivery to draft makes it editable again. A draft or ready delivery can also be removed with Delete a delivery.

Record the outcome

Moussa comes back. Two outcomes are possible:
  • Record a delivery as done records what was delivered, who received it and any amount collected. If some units were not delivered, a reason is required and the delivery is partially delivered. Items not listed count as fully delivered. At least one unit must be delivered.
  • Record a failed delivery is used when nothing was delivered, for example because the bar was closed. A reason is required.
Units not delivered, in a partial or failed delivery, can be planned again in another delivery. So the ten crates left are planned for tomorrow with a new draft.

The rules

  • Deliveries are planned only for completed orders, and marking ready, delivering or failing is refused on a cancelled order. Cancelling a sale deletes its draft and ready deliveries, and keeps the others.
  • Only a draft delivery can be edited, and only a ready delivery can be completed or failed. Delivered, partially delivered and failed are final.
  • A collected amount is accepted only when the delivery is set to collect on delivery.
  • A delivery zone must be active when it is used on a delivery.
  • Delivery responses ignore the include and fields selection.

All the actions of this topic