A valid tracking number that returns nothing: two carrier facts that break order lookups
If you have ever built or maintained an order-tracking feature, you have seen this ticket: the customer has a real tracking number, your lookup returns nothing, and everyone assumes the parcel is lost. Usually it is not. Two documented carrier behaviours cause most of it, and both have consequences for your schema. Disclosure: I work on 24hTrack. Written with AI assistance. 1. Corporate ownership…
If you've ever worked on an order-tracking system, you've likely encountered this issue: a customer provides a valid tracking number, but your system returns no results, leading customers to believe their package has gone missing. The root cause is often due to two carrier behaviors that many overlook. Disclosure: I work on 24hTrack, a free package tracker for over 3,200 carriers. Here are two key facts that can help resolve these order lookup problems.
Firstly, corporate ownership does not equate to a tracking namespace. FedEx acquired TNT in 2016, but TNT.com still displays both FedEx and TNT consignment tracking systems. Customers may input a TNT tracking number into a FedEx lookup, resulting in an empty result that mirrors a missing parcel. Conversely, routing by company name rather than the tracking number itself can lead to sending consignment numbers to the wrong carrier.
To avoid this, always resolve the carrier from the tracking number and the sender, not from the brand name on the order.
Secondly, tracking numbers are not unique keys. TNT documents that its eight or nine-digit parcel tracking numbers are recycled every three or four weeks. If you store tracking numbers as a primary key in your database without considering this, a recycled number can collide with an older order. To prevent this, create a composite primary key using carrier, tracking number, and shipped date.
This approach ensures accurate data integrity and prevents overwriting historical data. Similarly, when caching or using webhooks, key events by carrier + number + ship date. Treat any scans dated before the order as belonging to a previous shipment rather than as a time-travelling update.
By implementing these two carrier facts into your order tracking system, you can significantly reduce the number of "lost parcels" tickets and improve overall customer satisfaction.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.