Orders, Task Groups, Segments, and Stops

The data model behind every shipment on chrt.

A shipment on chrt is an order. Orders are split into one or more task groups — each task group is a leg of the shipment that one party (a courier company, an airline, or an onboard courier) executes end-to-end. Inside each task group is an ordered list of tasks, where each task is one action at one location: a pickup, a delivery, a hand-off to an airline, a customs clearance, and so on. The user-visible label varies by surface — drafts and the forwarder UI call task groups segments and tasks stops — but the underlying model is the same.

Order

An order is the shipper-facing record of a shipment. It owns the customer, the cargo, the time windows, and the overall lifecycle. One order can contain multiple task groups when the shipment crosses more than one party — for example, a pickup-courier task group, a flight task group, and a delivery-courier task group on an international move.

Shippers and forwarders see the full order. Couriers see only the task group(s) assigned to them.

Order states

StatusMeaning
draftBeing built in the draft builder. Not visible to assigned parties yet.
stagedSubmitted. Assignments and details are locked in but no work has started.
in_progressAt least one task group is in progress; live tracking is on.
completedEvery non-skipped task group has completed.
exceptionSomething blocked completion (cancelled, failed delivery, dispute).

Task group

A task group is one continuous unit of work on an order. It’s the courier-facing concept: a courier company is assigned to a task group, sees only that task group, and bills against it. Three kinds exist:

Task group typeUsed for
chrt_ground_providerA ground leg run by a courier (pickup, deliver, tender, recover).
cargo_on_flightAn air leg — cargo travels on a commercial flight, tracked via FlightAware.
onboard_courierA hand-carry shipment where one person accompanies the cargo through pickup, flight(s), and delivery.

A simple LA-to-San-Diego order has one ground task group. An LA-to-Houston international hand-off has three: ground to LAX, cargo on the SAN→IAH flight, ground from IAH to the consignee.

In the draft builder, task groups are labelled segments.

Task group states

StatusMeaning
draftCreated on a draft order, not yet submitted.
stagedSubmitted and waiting to start.
in_progressDriver has started; events and location updates are flowing.
completedAll non-skipped tasks completed.
skippedTask group was bypassed (rarely used; e.g. cancelled mid-route).
exceptionSomething went wrong and the task group did not complete normally.

Task

A task is one action at one place: pick this cargo up at this address, deliver it at that one, tender it to the airline at LAX, recover it at DEN. Each task carries a location, a time window, a cargo reference, and an action verb drawn from one of the three task-action enums:

  • Ground actionspickup, deliver, tender_to_airline, recover_from_airline, consolidate, hold, other.
  • Flight actionscargo_received_by_airline, cargo_loaded_onto_flight, flight_departed, flight_arrived, cargo_offloaded_from_flight, cargo_cleared_customs, cargo_ready_for_recovery.
  • OBC actions — the courier-and-cargo lifecycle from courier_departed_for_pickup_location through courier_arrived_at_delivery_location.

In the draft builder and on the order timeline, tasks are labelled stops.

Task states

StatusMeaning
draftCreated on a draft order.
stagedSubmitted, awaiting completion.
completedDone — either by driver action, geofence trigger, or flight integration.
skippedMarked as not needed (e.g. a recipient refusing a partial).
exceptionBlocked or failed.

Flight tasks frequently auto-complete from the FlightAware feed — no human input required.

Cargo

Cargo is what’s being moved. An order has one or more cargo records, and each task references the cargo it’s acting on. Cargo has a quantity, weight, optional dimensions, an optional declared value, and a cargo type. See Cargo types for the full enum and how it affects routing and pricing.

How the pieces fit together

Order
├── Task Group 1 (e.g. ground pickup leg, assigned to Courier A)
│ ├── Task: pickup at origin
│ └── Task: tender to airline at LAX
├── Task Group 2 (flight leg, auto-tracked)
│ ├── Task: cargo received by airline
│ ├── Task: flight departed
│ ├── Task: flight arrived
│ └── Task: cargo cleared customs
└── Task Group 3 (ground delivery leg, assigned to Courier B)
├── Task: recover from airline at IAH
└── Task: deliver to consignee

A courier assigned to Task Group 1 sees Task Group 1’s two tasks. They don’t see Task Group 2 or 3 unless explicitly given access. The shipper and the forwarder see the whole order.

UI vs model vocabulary

Model termDraft builder labelOrder page label
OrderOrderOrder
Task groupSegmentTask group (or “leg”)
TaskStopTask / event
CargoCargoCargo

Use whichever term matches the surface you’re documenting; this page is the canonical mapping.