The problem
Best at what, exactly?
Merchants used to choose shipping companies mostly based on price and personal experience.
We were also ranking shipping companies by how many packages they had delivered overall.
But a shipping company that performs really well in Casablanca might not perform nearly as well in Tanger.
And what if it doesn't even pick up packages from your city today?
My approach
Understanding how packages travel
I introduced what we called delivery plans.
Each shipping company has its own network of cities, logistics hubs, pickup schedules and delivery schedules.
By modeling these, I could estimate when a package would be picked up, how long it would spend traveling between hubs and when it would reach the customer.
Even creating the same shipment a few hours later could change its estimated delivery date.
The interesting part
Not all delivery rates tell the same story
Instead of looking at how many packages a shipping company had delivered overall, we looked at how well it performed on the merchant's specific route.
I built a ranking system with independent criteria: delivery rate, price and estimated delivery date.
Their order could be changed without a deployment.
| Carrier | Rate | Price | Delivery |
|---|---|---|---|
| 94% | 30 DH | 3d | |
| 94% | 35 DH | 2d | |
| 86% | 25 DH | 1d |
But what happens when a shipping company has never delivered a package on that route?
Initially, we treated missing history as a 100% delivery rate. That made unproven shipping companies look like the best ones.
I changed that to show "New" instead.
Even then, a delivery rate based on one package doesn't tell you nearly as much as one based on hundreds. Historical data has its limits.
What changed
A little less guessing
Merchants could now compare shipping companies that actually served their route, see their delivery rates, prices and estimated delivery dates, and get a recommendation before creating a shipment.
They could still choose whichever shipping company they wanted, just with a little less guessing :)