Skip to main content

Ubiquitous language

Every term this context speaks, mapped to the identifier the code uses. The first table is the vocabulary of the two aggregates and their value objects, the second is the vocabulary of the silence policy and the closing commands, the third holds terms owned by neighbouring contexts that these pages use. The network-wide glossary is on the central Ubiquitous Language page of warehouse-docs.

Terms of this context​

Source: internal/domain/label/label.go, internal/domain/journey/journey.go, internal/domain/journey/types.go, internal/domain/shared/shared.go.

TermDefinitionCode identifierNot to be confused with
Tracking NumberThe network-wide unique id of one package; RN plus 16 base-32 characters when minted here. Root id of the journey, unique column of the labelshared.TrackingNumber (alias journey.TrackingNumber)labelRef (the label's id) and poNumber (the vendor instruction, which may cover several packages)
Shipping LabelWhat is printed on the package: tracking number, tier, carrier and two values derived from the address. The address itself is not a fieldlabel.ShippingLabelThe Vendor API Label of vendor-connectivity, which is only labelRef, trackingNumber and carrier
Label RefThe identity of one ShippingLabel, minted as lbl-<uuid>label.ReftrackingNumber
Package NoThe number of a package within one purchase order, 1 to 2147483647; (poNumber, packageNo) has at most one labellabel.ShippingLabel.PackageNo, label.MaxPackageNolineNo of a purchase-order line
TierThe service tier the package was sold under: SAME_DAY, NEXT_DAY, TWO_DAY, STANDARDshared.TierThe carrier
CarrierWho carries the package as printed on the label: RN-EXPRESS for SAME_DAY and NEXT_DAY, RN-GROUND otherwiselabel.CarrierFor, label.CarrierExpress, label.CarrierGroundA last-mile delivery service partner
Label statusISSUED or VOIDEDlabel.StatusJourney state
VoidCancel an issued label while the package is still LABELLED (use case VoidLabel, event LabelVoided)label.ShippingLabel.Void, journey.Journey.VoidPurchase-order cancellation in vendor-connectivity
Ship-to snapshotThe AES-256-GCM sealed copy of the address taken from customer-ordering at issue time, kept only to print the label. Never published, never returned, deleted 30 days after the journey closesrepository.SealedShipTo, table ship_to_snapshots, usecases.ShipToRetentionThe Ship-To that customer-ordering owns, the source of truth
Ship-to addressThe in-memory address value object. It redacts itself in logs ([ship-to redacted]) and exists only inside one IssueLabel callshipto.AddressThe snapshot, which is its encrypted form
Stop keyThe opaque HMAC-SHA-256 of the normalised address, 64 lower-case hex characters, so last-mile can group stops without seeing an addresslabel.StopKeyLen, ports.StopKeyer, field stopKeyA postal code
Destination postal prefixThe first five letters or digits of the postal code (shipto.PrefixLen)label.ShippingLabel.DestinationPostalPrefixThe full postal code, which is never kept
Package JourneyThe customer-visible, forward-only timeline of one package, identified by its tracking number; one per labeljourney.Journey (the PackageJourney aggregate), table package_journeyscustomer-ordering's order tracking view, a read model per order fed by this context's events
Journey stateLABELLED, HANDED_OVER, IN_TRANSIT, AT_STATION, OUT_FOR_DELIVERY (open); DELIVERED, RETURNED, LOST, VOIDED (terminal)journey.State, State.TerminalCustomer order status in customer-ordering
ScanOne observation of a package at a node, stored append-onlyjourney.Scan, table journey_scansA last-mile delivery attempt, which this context turns into a scan
Scan typeThe kind of observation: SHIPMENT_CONFIRMED, PICKUP_DEPARTURE, DEPARTURE, TRANSIT_ARRIVAL, STATION_ARRIVAL, OUT_FOR_DELIVERY, DELIVERED, DELIVERY_FAILEDjourney.ScanType, journey.AllScanTypesThe departure kind in linehaul (PICKUP, LINEHAUL, AIR)
Applied scanA scan that moved the journey. An out-of-order scan or one with no edge is stored with applied=falsejourney.Scan.AppliedA duplicate scan, which is refused and not stored
HandoverThe instant a vendor node's package enters the network: the first PICKUP_DEPARTURE scan, LABELLED to HANDED_OVER (HandoverOnFirstScan)Journey.HandedOverAt, event PackageHandedOverVendorShipmentConfirmed, the vendor's own statement that it shipped
DeliveredThe instant of the DELIVERED scan, which also closes the journeyJourney.DeliveredAt, event PackageDeliveredA delivery attempt that failed

Silence policy and closing commands​

Source: internal/domain/journey/types.go, internal/domain/journey/journey.go, internal/application/usecases/sweep.go.

TermDefinitionCode identifierNot to be confused with
SilenceNo applied scan within the window of the current state and tier (6, 24, 48 or 72 hours; 12 hours while out for delivery). LABELLED and terminal states are not watched (ExceptionOnSilence)journey.SilenceWindow, Journey.SilentNode lateness scored by node-performance
Package exceptionA raised problem with a package; the only reason is NO_SCAN. The state does not change and one exception is raised per silenceJourney.RaiseException, journey.ReasonNoScan, event PackageExceptionRaisedA failed delivery attempt, which only returns the journey to AT_STATION
Unanswered exceptionA NO_SCAN exception with no applied scan sinceJourney.unanswered (unexported)A closed journey
Return to senderEnd the journey as RETURNED from AT_STATION (ReturnToSender)Journey.ReturnToSender, event PackageReturnedA customer return, which this context does not model
LostEnd the journey as LOST from IN_TRANSIT after a NO_SCAN exception stayed unanswered for 48 hours (DeclareLost)Journey.DeclareLost, journey.LostAfterExceptionHours, event PackageLostAn exception, which keeps the journey open
ETA windowThe day-of window (at most two hours wide) in which last-mile-delivery expects to reach a package's stop, stated when the route starts. It is not a scan and never changes the state; it is shown only while it is current (OUT_FOR_DELIVERY and not older than the last applied scan)Journey.AssignEta, Journey.EtaCurrent, event PackageEtaWindowAssignedThe promised delivery window of delivery-promise, which it is never clipped to
FactOne observation extracted from a consumed event, one per tracking numberusecases.Fact, usecases.ApplyScansA scan, which is the stored form
Inbox claimThe (consumer, event_id) row that makes a consumer idempotentports.ProcessedEvents, table processed_eventsThe idempotency key of a REST call
Idempotency keyThe Idempotency-Key header of the three POST routes; the stored answer is replayed for 24 hours; a refusal is stored only when its problem type is FINAL or OUTCOME, a RETRYABLE one releases the key (ADR 0020)table idempotency_keys, internal/adapters/inbound/http/idempotency.goThe CloudEvents id
Catalog dimensionsLocal, event-fed copy of a catalogue item's title, dimensions, weight and handling flagsrepository.CatalogDimensions, ports.CatalogDimensionsView, table catalog_dimensionsThe CatalogItem aggregate in offer-availability

Neighbour terms used here​

These terms are owned by other contexts; this table only says which one and what it is not.

TermOwnerMeaning thereNot to be confused with
Purchase Order (PO)vendor-connectivityThe instruction to one vendor node to ship one shipment group, carrying poNumberThe customer order
Ship-Tocustomer-orderingThe delivery address, the only source of truthThe ship-to snapshot kept here
Customer Ordercustomer-orderingWhat the shopper bought, with a promise per shipment group; orderIdA package (one order can have many)
Fulfillment Assignmentorder-sourcingThe decision of which node and path fulfil one shipment group; assignmentIdA purchase order
Loadlinehaul-transportationThe packages consolidated onto one departure; one LoadDeparted names many tracking numbersA scan (one load event becomes one scan per tracking number)
Pickup Departurelinehaul-transportationThe departure that collects packages at a vendor node (departureKind PICKUP)Handover, which is the scan of that departure
Delivery Attemptlast-mile-deliveryOne try to hand a package over, DELIVERED or notThe DELIVERED journey state, entered only on a successful attempt
Catalog Itemoffer-availabilityThe network's own entry for a productA package
Promise Kept / Brokendelivery-promiseThe judgement at delivery against the promised datePackageDelivered, the fact the judgement uses
On-Time Handover Ratenode-performanceShare of packages handed over before the required ship-byHandover itself, which this context only reports

This context does not touch the warehouse-systems fleet, so there is no fleet translation table.