Skip to main content

Ubiquitous language

The terms of the last mile as the code uses them. Each term carries the identifier that implements it, so a conversation with the station planner and a read of the code use the same words. Neighbour terms are marked with their owner.

Source: internal/domain/*, internal/application/views/views.go, apis/openapi.yaml, apis/asyncapi.yaml, ADR 0002.

TermMeaningCode identifier
Delivery stationA network-operated node that receives loads and dispatches vans; owned by node-topology as node type DELIVERY_STATIONviews.DeliveryStation, table rm_stations
Delivery waveA dispatch slot of one station on one service date with an induct cutoff, a delivery window and a stop capacitywave.DeliveryWave
Service dateThe station's local calendar date a wave runs onServiceDate, YYYY-MM-DD
Induct cutoffThe last instant a package can join a waveInductCutoffAt
Delivery windowThe period in which the wave's packages are deliveredWindowStart, WindowEnd
StopOne delivery address; several packages for one address are one stoproute.Stop, grouped by stopKey
Stop keyOpaque keyed hash of the normalised address (never the address); pkg:<trackingNumber> when no label data arrivedstopKey, table rm_package_stops
Delivery pointThe address behind one stop key and its delivery history (counted failed attempts by outcome detail, decaying over 60 days); after two counted failures the point is flagged so the shopper can be warned (ADR 0014)deliverypoint.DeliveryPointProfile, DeliveryPointFlagged
Stop capacityHow many stops a wave can take (counted in stops, not packages)StopCapacity, AssignedStops, RemainingStops
InductionPlacing a package in a waveDeliveryWave.Induct, wave_inductions
Induct on arrivalPolicy: when a load arrives at a station, induct every package into the earliest eligible waveusecases.InductOnArrival
Eligible waveAn OPEN wave of the station whose cutoff is after the package's arrival and that has room or already holds its stopwriter.place
Deferred packageA package no wave takes yet; it waits AT_STATION and PackageInductionDeferred is publishedhistory.StatusAtStation, PackageInductionDeferred
Close inductionStop accepting packages into a waveCloseInduction
DispatchRelease the wave to its routes; packages no route holds are re-inductedDispatchWave
Re-inductMove an inducted package to the next eligible wave (after a cancel, a dispatch leftover or a failed attempt)writer.reinduct, RetryNextWave
Delivery service partner (DSP)An independent delivery business contracted to a station, with vanspartner.DeliveryServicePartner
Van capacityThe most stops one of the partner's routes may haveVanCapacity
RouteOne partner's van run within a wave: ordered stops and attemptsroute.Route
Plan a routeAssign inducted packages, grouped into numbered stops, to a partnerPlanRoute, route.Plan
Out for deliveryA started route; each of its packages is announcedStateOutForDelivery, PackageOutForDelivery
ETA windowThe at most two-hour window of one stop of a started route, a deterministic spread of the stops over what is left of the wave's delivery window; announced once at StartRoute and never retractedroute.EtaWindows, StopEtaWindowAssigned
Delivery attemptOne try at one package on one route, DELIVERED or FAILED with a reasonroute.Attempt, DeliveryAttempted
Failure reasonFree text supplied exactly when an attempt failedFailureReason
Package attempt historyPer tracking number: status and failed-attempt count (G16)history.History, package_histories
Return to senderAfter three failed attempts the package is returnedMaxFailedAttempts = 3, PackageReturnInitiated
Tracking numberThe package's identity, issued upstreamtrackingNumber
LoadA linehaul shipment arriving at a station with its tracking numbers (owner: linehaul-transportation)LoadArrived
LabelThe shipping label of a package carrying the stop key and postal prefix (owner: shipping-and-tracking)LabelIssued
Service areaThe postal prefixes a station serves (owner: node-topology)ServiceAreaAssigned, rm_station_service_areas
Delivery modeHow an area's final leg is carried: NETWORK_ROUTE (the station's own vans) or CARRIER_HANDOFF (a contracted carrier from a handoff node; the package never enters this context, ADR 0015)deliveryMode on ServiceAreaAssigned
Postal prefixThe leading part of the postal code; the only address fragment this context keepsdestinationPostalPrefix
Read modelA local, event-fed copy of a neighbour's factstables rm_*
Outbox / inboxThe transactional outbox of published events and the processed_events table of consumed onesoutbox_events, processed_events
Idempotency keyClient-chosen key that makes a state-changing call safe to repeat for 24 hoursIdempotency-Key, idempotency_keys
Station plannerThe person who schedules waves and plans routesactor
DSP driver appThe partner's app that starts routes and reports attemptsactor

Distinctions that matter​

  • Stop versus package. Capacity is counted in stops. A second package for an address already in the wave takes no capacity and raises no capacity event.
  • Cancel versus dispatch leftover. Both re-induct packages, but cancel moves all of them and only an OPEN wave can be cancelled; dispatch moves only those no route holds.
  • Failed attempt versus return. A failed attempt sends the package to the next wave; only the third failure returns it.
  • Wave COMPLETED versus route COMPLETED. A route completes when every package has an attempt; the wave completes with its last route.