Label created is not a scan: the tracking state most systems collapse too early
If you surface carrier tracking to customers, there is one modelling decision that quietly produces a whole category of support tickets: treating the first row a carrier returns as if the carrier had seen the parcel. It usually has not. What that first row actually is Pull the history for a parcel that was ordered an hour ago and you tend to get exactly one line. Depending on the carrier it reads…
When carriers report a parcel's status to customers, a common practice is to treat the first row returned by the carrier as if it were the parcel's first scan. However, this approach can create numerous support tickets and lead to inaccurate tracking information. Instead of collapsing all non-delivered statuses into a single "in_transit" category, it is better to use three distinct fields: status, has_carrier_scan, and first_scan_at.
The has_carrier_scan field, derived from the type of row, determines whether the carrier has physically scanned the parcel or if it is still in the shipper's possession. This allows for accurate calculation of transit time by using delivered_at - first_scan_at, rather than the incorrect interval of created_at - first_event_at. Alerts can then be generated based on whether the parcel is still in the carrier's possession (has_carrier_scan = false) or has been collected by the carrier (has_carrier_scan = true).
Using consistent phrasing across carriers helps avoid confusion and ensures that customers receive accurate information. For example, terms like "info received" or "electronic information submitted" should all be mapped to a single meaning. It is important to note that a single row does not necessarily indicate that the parcel has been scanned, and measuring the count of rows can help break ties.
By separating these two intervals, the true nature of the wait becomes clear. For domestic last-mile deliveries, half of the parcels are delivered within a day, with the slowest 20% taking around four days. On cross-border air routes, the median delivery time increases to nine days, with the slowest 20% taking up to fourteen days. Most of the delay is due to the flight and customs clearance processes, which do not generate scans.
In cases where customers claim that their parcel has not moved in a week, the honest answer is often that seven days have not even begun yet. The 24hTrack package tracker, which covers over 3,200 carriers, uses this approach to provide accurate tracking information through a REST API and MCP server.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.