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.
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.
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
includeandfieldsselection.
All the actions of this topic
- List deliveries of an order: Lists the deliveries planned for an order.
- Plan a delivery: Creates a draft delivery for items of a completed order, with address, fee or zone, driver, optional trip stop and optional cash collection on delivery.
- View a delivery: Shows one delivery with its items and zone.
- Edit a delivery: Changes address, fee, trip, driver, items or date of a delivery that is still a draft.
- Delete a delivery: Removes a delivery that is still a draft or ready to ship.
- Mark a delivery ready: Marks a draft delivery as prepared and ready to ship.
- Return a delivery to draft: Takes a delivery back from ready to draft so it can be edited again.
- Record a delivery as done: Records what was actually delivered, who received it and any amount collected. Marks it delivered, or partially delivered when fewer units than planned were delivered.
- Record a failed delivery: Marks a delivery as failed with a reason; no item counts as delivered.
- List delivery zones: Lists the delivery zones with their fees.
- Create a delivery zone: Adds a named delivery zone with a delivery fee, active or not.
- View a delivery zone: Shows one delivery zone and its fee.
- Edit a delivery zone: Changes the name, fee or active state of a delivery zone.
- Delete a delivery zone: Deletes a delivery zone that no delivery uses.