Toggle availability
Description#
Allows couriers to indicate if they are ready to deliver orders. Courier that are not available are ignored by the courier assignment mechanism.
Input#
Coordinates#
- Type
- Coordinates
- Validation
- Required
Address#
- Type
- String
- Validation
- Required
Vehicle#
- Type
- Enum of type string
- Options
- Car
- Bike
- Validation
- Required
Additional validation#
- This function cannot be activated if the courier is assigned to an active orders.
- The Function inputlocation must be within one of the regions.
Mechanism#
- Switch the courier entitycourier's Entity propertyavailable property.
- Identify the current region by the Function inputcoordinates.
- Save the following as the courier Entity propertylocation:
- Function inputCoordinates (as Entity propertyCoordinates)
- Function inputAddress (as Entity propertyAddress)
- Current region (as Entity propertyRegion)
- Current time (as Entity propertyLast updated)
- Store availability data.
Notes#
info
- A newly created courier is unavailable by default.