Package-to-driver assignment for peak and quiet delivery hours, with tracking metrics
Company: Amazon
Role: Product Manager
Category: System Design
Difficulty: medium
Interview Round: Other
You are the product manager responsible for last-mile package delivery. Design the system that assigns delivery orders to drivers so that as many orders as possible are fulfilled, both in busy hours, when demand outstrips the drivers available, and in quiet hours, when drivers outnumber orders. Then explain which metrics you would track.
### Clarifying Questions
- Are these same-day orders arriving throughout the day, next-day packages planned in advance, or both?
- Are drivers employees on fixed shifts, independent drivers who accept or decline offered work, or a mix?
- Does "fulfilled" mean delivered that day, or delivered inside the window promised to the customer?
- Do drivers load up at a delivery station, or collect packages from many pickup points such as stores?
### Part 1 — Design the assignment system
Describe how the system decides which driver delivers which orders and how its behavior changes between busy and quiet hours. Cover the inputs it needs, how orders are grouped and matched to drivers, how often it re-plans, and what happens when things go wrong.
```hint Separate planning from dispatch
Some decisions can be made hours ahead from forecasts, while others must be made within seconds as orders and drivers change. Work out which decisions belong to each, and what lever each one has when demand and driver supply are out of balance.
```
#### What This Part Should Cover
- The inputs, the objective the assignment optimizes and the constraints it must respect.
- How orders are batched into routes and matched to drivers, and how often plans are refreshed.
- Distinct strategies for busy and quiet hours, including capacity levers used before the day starts.
- Handling of failures such as driver no-shows, delays, failed deliveries and an optimizer that times out.
### Part 2 — Choose the metrics
Which metrics would you track to know whether the system is working, and which would you watch to make sure it is not succeeding at someone else's expense?
```hint Look at every side of a delivery
Customers, drivers and the business each judge the system differently, and busy and quiet hours fail in different ways. Make sure no single number can be improved by quietly hurting another.
```
#### What This Part Should Cover
- A primary success metric with a precise definition of fulfillment.
- Input metrics that explain movements in the primary metric, split by busy and quiet hours.
- Guardrails for cost, driver experience and safety, and customer experience.
### What a Strong Answer Covers
- Pinning down what fulfillment means and what kinds of orders and drivers the system serves before designing anything.
- An architecture that connects forecasting, capacity planning, batching, matching and real-time re-planning.
- Clear reasoning about the trade-off between on-time delivery and cost, and how it shifts between busy and quiet hours.
- Metrics tied back to the design, with guardrails that stop gaming, such as hitting on-time targets by offering customers fewer fast delivery options.
### Follow-up Questions
- During a holiday peak, the system predicts that a large number of orders will miss their promised window. What should it do with them, and who decides?
- How would you safely test a new assignment algorithm when orders in the same area compete for the same drivers?
- Drivers complain that the best routes always go to the same people. How would you change the system?
Overview: A technical product question on designing the system that assigns package delivery orders to drivers so fulfillment stays high in both peak and quiet hours. It covers forecasting, capacity planning, batching and matching, failure handling, and the metrics and guardrails a product manager would track.