Skip to main content

Order Move

Order moves provide an ordered, domain-neutral routing plan within an order. An order owns moves, and each move owns ordered legs. Vertical details such as container, chassis, appointment, and leg type belong in customValues.

OrderMove

PropertyTypeRequiredDescription
OrderMoveIdintYesPrimary key
OrganizationIdintYesTenant scope
OrderIdintYesParent order
SequenceintYes1-based position within the order
Namestring?NoDisplay label
AssignedDriverContactIdint?NoAssigned driver or resource
OrderMoveStatusIdint?NoCurrent move status
StartDateDateTime?NoMove start
EndDateDateTime?NoMove end
OrderMoveLegsOrderMoveLeg[]NoLegs ordered by sequence
DispatchRouteStopsDispatchRouteStop[]NoTrip stops executing this move, ordered by route and planned sequence
TrackingEventsTrackingEvent[]NoMove-level milestones
CustomValuesDictionaryNoVertical-specific data

OrderMoveLeg

PropertyTypeRequiredDescription
OrderMoveLegIdintYesPrimary key
OrderMoveIdintYesParent move
SequenceintYes1-based position within the move
Namestring?NoLeg label
OrderMoveLegStatusIdint?NoCurrent leg status
StartDateDateTime?NoActual arrival/start
EndDateDateTime?NoActual departure/end
TrackingEventsTrackingEvent[]NoLeg-level milestones
CustomValuesDictionaryNoLocation, appointment, and vertical data

OrderMoveStatus and OrderMoveLegStatus are organization-defined dictionaries. Both contain statusName, statusDescription, statusStage (Pending, InProgress, or Completed), priority, color, and customValues.

Behavior

  • Creating an order can include orderMoves. The order ID is supplied by the new aggregate, and each move defaults its sequence to its array position unless an explicit sequence is provided. Nested legs are created with 1-based array-order sequences.
  • Order/Import@1 accepts orderMoves with nested orderMoveLegs. Existing records match by ID first, then configured orderMoveMatchByFields or orderMoveLegMatchByFields (including dotted customValues paths), and finally by sequence/array position. Unmatched records are appended; records omitted from an import are left untouched.
  • Creating a move accepts nested legs and assigns their sequence from array order.
  • Dynamic updates are sparse. When orderMoveLegs is supplied, existing legs with IDs are updated, new legs are added, omitted or explicitly isDeleted legs are soft-deleted, and only active legs consume sequence positions. New legs already marked deleted are ignored.
  • Supplying orderMoves through a dynamic order update applies the same reconciliation to the whole move collection. Existing moves are sparse-updated, new moves inherit the order and organization, omitted or explicitly deleted moves are soft-deleted, and active moves are resequenced from 1. The update command loads nested moves and legs so the aggregate can cascade these changes.
  • Move and leg status lifecycle logic keys on statusStage, not the organization-defined status name.
  • Tracking events may be linked to a move or leg for customer-visible milestones.
  • A move exposes its executing trip stops through DispatchRouteStops. This is the inverse of DispatchRouteStop.OrderMoveId; one move may span stops on multiple dispatch routes.
  • Workflow tasks are OrderMove/Create@1, OrderMove/Update@1, and OrderMove/Delete@1.