Most logistics operations do not fail in a single dramatic moment. They drift. A picking rate slips by a few percent each week, a cycle count misses a bin that nobody notices, a carrier starts arriving late on Tuesdays, and by the time a monthly report shows the damage, the customer has already felt it. The antidote is not more reports. It is a small set of logistics KPIs, tracked daily, with a named owner for every number that moves.
This article explains which KPIs matter most in a warehouse or distribution operation, how to define them so teams trust them, how to follow up on them every day, and how to compute them from raw events with a small Java model.
Why daily tracking beats monthly reporting
A monthly KPI pack answers the question "what happened?" A daily KPI loop answers "what do we do about it today?" The difference is latency. A productivity drop caught on day two can be fixed with a shift briefing. The same drop discovered at month end is a root-cause investigation with a cost already locked in.
Daily tracking also changes behavior. When teams see their own numbers every morning, they start to ask better questions: why did the inbound dock slow down, which zone generates most of the mispicks, which shift carries the most unfinished orders into the next day.
The four families of logistics KPIs
Most operations can be described with four families. Each one answers a different question.
Productivity. How much work gets done per unit of labor or time. The most common measures are units picked per labor hour, lines picked per hour, and orders shipped per shift. Productivity tells you whether your capacity is being used well, but it says nothing about quality. A team that picks fast and wrong looks productive until the returns arrive.
Delivery performance. Whether the customer receives what was promised, when it was promised. The standard measure is On-Time In-Full (OTIF): the share of orders delivered both on time and with every requested line and quantity. OTIF is harsher than on-time delivery alone, because a shipment that arrives on time but short still counts as a failure. Pair it with order cycle time, the elapsed time from order receipt to shipment.
Inventory accuracy. Whether the system's view of stock matches what is physically on the shelf. The measure is simple: the number of storage locations counted with a matching quantity, divided by the total number of locations counted, expressed as a percentage. Inventory accuracy is the foundation of nearly every other metric. If the system says a SKU is available and it is not, you pick a shortage, promise a delivery you cannot make, and open an investigation that may never end.
Operational issues. The events that disrupt flow: damaged goods, mispicks, missed scans, dock delays, equipment downtime, safety incidents. These are counts and durations, not averages. The goal is to see their frequency, their location and how long they take to resolve.
Define each KPI precisely
Most KPI disputes are definitional disputes. Before a number goes on a dashboard, write down four things:
- The formula, including what counts in the numerator and denominator.
- The data source and the system that owns it.
- The time window and the cutoff, for example midnight in the site's local time zone.
- The owner who is accountable for the number, and who explains it when it moves.
Example: "Units per labor hour equals units shipped in the day divided by direct labor hours logged against picking and packing activities. Source: WMS shipment records and time-clock data. Window: 00:00 to 23:59 site time. Owner: outbound shift lead." That level of specificity removes arguments before they start.
A daily follow-up routine
A KPI without a routine is decoration. A workable daily rhythm looks like this:
- Before the shift starts. The system publishes yesterday's numbers against targets. Each KPI shows a status: on target, watch, or action required.
- Shift briefing, fifteen minutes. The shift lead reviews only the KPIs in watch or action state. The team agrees on one or two actions for the day, each with an owner.
- During the shift. Exceptions are logged as they happen, not reconstructed at the end. A damaged pallet recorded at 10:15 is useful. The same pallet remembered at 17:00 is guesswork.
- End of shift. Totals are locked. Any open operational issue gets a named next owner.
- Weekly review. Trends matter more than single days. A metric that is slightly off target every day for three weeks is a process problem, not a bad day.
The discipline is to keep the briefing short and to focus on the exceptions. Reading out fifty green numbers wastes everyone's attention.
Computing KPIs from events in Java
Raw warehouse data arrives as events: a pick confirmed, a count recorded, a shipment closed, an issue reported. KPIs are aggregations over those events. Modeling the events explicitly makes the calculations testable and the assumptions visible.
The example below uses Java 17 records to represent a simplified daily snapshot and computes the four core metrics. It has no external dependencies:
import java.math.BigDecimal; import java.math.RoundingMode; import java.util.List; public class DailyLogisticsKpis { public record OrderResult(String orderId, boolean onTime, boolean inFull) {} public record InventoryCount(String location, int systemQuantity, int countedQuantity) { boolean matches() { return systemQuantity == countedQuantity; } } public record OperationalIssue(String type, int durationMinutes) {} public record DailySnapshot( long unitsShipped, double directLaborHours, List<OrderResult> orders, List<InventoryCount> counts, List<OperationalIssue> issues) {} public record Kpis( BigDecimal unitsPerLaborHour, BigDecimal otifPercent, BigDecimal inventoryAccuracyPercent, int issueCount, long totalIssueMinutes) {} public static Kpis compute(DailySnapshot day) { if (day.directLaborHours() <= 0) { throw new IllegalArgumentException("directLaborHours must be positive"); } BigDecimal unitsPerHour = BigDecimal.valueOf(day.unitsShipped()) .divide(BigDecimal.valueOf(day.directLaborHours()), 2, RoundingMode.HALF_UP); long otifOrders = day.orders().stream() .filter(o -> o.onTime() && o.inFull()) .count(); BigDecimal otif = percentage(otifOrders, day.orders().size()); long matchingLocations = day.counts().stream() .filter(InventoryCount::matches) .count(); BigDecimal accuracy = percentage(matchingLocations, day.counts().size()); int issues = day.issues().size(); long issueMinutes = day.issues().stream() .mapToLong(OperationalIssue::durationMinutes) .sum(); return new Kpis(unitsPerHour, otif, accuracy, issues, issueMinutes); } /** Returns part/whole as a percentage with two decimals; zero when there is no whole. */ private static BigDecimal percentage(long part, long whole) { if (whole == 0) { return BigDecimal.ZERO; } return BigDecimal.valueOf(part) .multiply(BigDecimal.valueOf(100)) .divide(BigDecimal.valueOf(whole), 2, RoundingMode.HALF_UP); } public static void main(String[] args) { DailySnapshot day = new DailySnapshot( 12_400, 186.5, List.of( new OrderResult("SO-1001", true, true), new OrderResult("SO-1002", true, false), new OrderResult("SO-1003", false, true), new OrderResult("SO-1004", true, true)), List.of( new InventoryCount("A-01-03", 40, 40), new InventoryCount("A-01-04", 12, 10), new InventoryCount("B-02-11", 75, 75)), List.of( new OperationalIssue("damaged_goods", 25), new OperationalIssue("dock_delay", 40))); Kpis kpis = compute(day); System.out.println("Units per labor hour: " + kpis.unitsPerLaborHour()); System.out.println("OTIF %: " + kpis.otifPercent()); System.out.println("Inventory accuracy %: " + kpis.inventoryAccuracyPercent()); System.out.println("Operational issues: " + kpis.issueCount() + " (" + kpis.totalIssueMinutes() + " min)"); } } Running this prints 66.49 units per labor hour, 50.00 percent OTIF, 66.67 percent inventory accuracy, and two issues totaling 65 minutes. The numbers are deliberately dramatic: a sample this small is for illustration, not for conclusions. The value of the model is that every assumption is explicit. OTIF requires both conditions. Inventory accuracy counts locations, not units. Productivity divides by direct labor hours, so indirect time is excluded by definition.
In production, the snapshot would be built from your WMS, TMS and time-tracking exports, and the tests would cover edge cases such as zero orders on a holiday, partial shifts and locations counted twice. The formulas themselves are the easy part. Agreeing on which events belong in each numerator is the real work.
Practical recommendations
Start with five KPIs, not twenty. Choose one productivity measure, OTIF, inventory accuracy, order cycle time and one operational issue count. Add others only when a specific decision needs them.
Set targets from history and capacity, not from wishes. A target that the team has never come close to becomes background noise. Use the last four to eight weeks to set a realistic baseline, then tighten it gradually.
Separate leading from lagging indicators. OTIF is a lagging result. Inventory accuracy, cycle count completion and dock-to-stock time are leading signals you can act on before the customer notices.
Treat inventory accuracy as a control, not a score. Cycle counts should target the locations most likely to drift: high-velocity picks, locations with recent adjustments, and items with frequent mispicks.
Make issues measurable. Every operational issue needs a type, a location, a start time, an end time and an owner. Without those fields you can count incidents but cannot learn from them.
Protect the data. Hand-typed numbers at the end of a shift are the weakest link. Capture events at the point of work with scanners and simple forms, and reconcile the totals automatically.
Conclusion and key takeaways
Logistics performance is decided in small daily details. A short list of well-defined KPIs, reviewed every shift and tied to named owners, turns that detail into action. Productivity shows how work gets done, OTIF shows whether customers receive it, inventory accuracy shows whether the system can be trusted, and operational issues show what keeps breaking.
Key takeaways:
- Daily tracking catches drift while it is still cheap to correct.
- Each KPI needs a precise formula, a data source, a time window and an owner.
- OTIF is stricter than on-time delivery because it requires complete orders.
- Inventory accuracy underpins every other metric and deserves targeted cycle counting.
- Modeling KPI calculations explicitly, even in a small Java program, makes assumptions testable.
If your team does not yet track these numbers daily, start tomorrow with three: units per labor hour, OTIF and inventory accuracy. Review them at the next shift briefing and assign one action to each one that is off target.
![Physical AI Engineering — Ch.13: Computing Platforms for Physical AI [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg3ou3b2eumf1epqj4bk4.png)