Book a free AI discovery call

Trucking

How to find the detention you never billed in your TMS export

The questionHow can a trucking company find detention it never billed, using its own TMS export?

Most carriers know they leave detention on the table. Few can say how much, and the reason is rarely effort. It is that the TMS was never set up to time a stop. This article shows how to check your own export, build a clock from GPS, and produce a short list of candidates worth a dispatcher’s review. It comes from an audit we ran for a regional trucking company. Everything below is a measurement or a candidate, not recovered money.

How often do you bill detention today?

Count it from your billing lines, not from memory. Export every invoice line, find the ones that carry detention, and divide by your load count.

Search the description field as well as the charge type. Detention often hides under a general “accessorial” line with “shipper detention” typed in the description.

At the regional trucking company, detention was billed on 110 of 30,652 loads since 2022, or 0.36%. Every one was billed as a flat amount, so the hours were never recorded. Compare detention with your other accessorials, such as lumper and layover. If you bill lumper routinely and detention almost never, the problem is probably the clock, not the facilities.

Can you get the data out of your TMS?

Usually yes, even without an API. We pulled 42,977 trips out of a legacy desktop TMS that has no API and reconciled them to the screen’s own totals. A person ran that export at the keyboard; it was not an unattended job.

What made it work:

  • Use a plain-text export if the system offers one. Older spreadsheet formats cap the number of rows and can fail on large tables.
  • Reconcile every export to the on-screen count or footer total before you trust it.
  • Watch for line breaks typed inside fields, such as a broker load number. They split one row into two.
  • Export loads, stops and billing lines separately, and join them yourself on the load number.

Does your TMS even record arrival and departure?

Check this before you build anything. Count how many stops have an actual arrival time and an actual departure time filled in. That fill rate decides whether your TMS can time detention at all.

At the regional trucking company, the answer was no. The TMS had no actual arrival or departure time on any of 135,631 stops. It also had no coordinates for the stops, only addresses, and most of those had a ZIP code but no street.

Are your appointment times real?

Find out whether the appointment field holds real appointments or a default. Count how often the most common time appears. If one time dominates, it is a placeholder someone types to get past the screen.

In the same export, 80.2% of 2026 loads had a pickup time of exactly 06:00. A default appointment hides every early and late arrival, so detention can’t be measured against it. Use the appointment on the rate confirmation wherever you have it.

How do you use GPS dwell as the detention clock?

Join each TMS stop to the truck’s GPS dwell at that place, then compare the GPS arrival and departure with the appointment. When the TMS has no arrival time, GPS or ELD data is the only clock you have. At the regional trucking company it also matched their own rule, which starts the detention clock when the truck arrives.

A conservative join rule:

  • same truck;
  • the dwell is outside your own yard;
  • it starts within a day of the stop date;
  • it sits within a set radius of the stop’s ZIP code.

Leave drop-and-hook loads out, because the driver does not wait.

If the TMS doesn’t say which truck ran the stop, infer it only when exactly one of your trucks dwelled there that day. If two or more did, skip the stop. A guess here becomes a bad invoice later.

Before you trust the join, run a positive control. Take the detention you did bill inside the GPS window and confirm the method finds it at the right stop. At the regional trucking company, detention had been billed on two loads inside the window, and the method found both at the billed stop. A method that cannot see the detention you know about cannot be trusted to find the detention you don’t.

How do you apply the free-time rule?

Subtract the free time from every matched dwell and keep what is left. Use the free time on each rate confirmation. If you don’t have it load by load, start with your most common contract term and label the result as an assumption.

Set very long dwells aside first. Stops of eight hours or more are mostly the driver’s required ten-hour rest break, so review them separately.

At the regional trucking company, 71 days of GPS data produced detention candidates: 243 of 1,098 matched stops under eight hours ran past the two-hour free time, adding up to 327 hours beyond free time. Those are candidates, not billable detention. GPS dwell includes agreed loading time, early arrivals and driver breaks, so nobody knows the billable share until a person checks.

Where should you look first?

Rank the candidates by facility and by broker, because long dwells cluster. In our audit of a regional carrier, the top of the list was a short set of facilities and brokers. That is where a dispatcher’s hour is best spent.

Don’t rank dispatchers by their candidates. Dispatchers book different lanes and brokers, and nobody can bill detention from arrival times that were never recorded. It is a data problem, not a people problem.

Why confirm a sample with dispatch before billing anything?

Because a detention charge you can’t support costs more than the money. It costs you the broker’s trust.

Pick ten candidates, for example five at your worst facility and five across your largest broker. Have dispatch check each one against the rate confirmation, the broker’s notice rules and the driver’s notes. Where the shipper or receiver wrote in and out times on the signed bill of lading (BOL), check the GPS arrival and departure against those too. If notice had to be given during the wait and wasn’t, the candidate drops out. The share that holds up tells you what the rest of the list is likely to be worth, and whether it is worth building an alert for.

How do you make detention billable going forward?

Fix the data where it is entered, then automate the routine part. Four changes do most of the work:

  1. Enter the real appointment time from the rate confirmation, not a default.
  2. Name customer facilities and record their street address, so a geofence list can build itself.
  3. Record actual arrival and departure, typed or filled from GPS.
  4. Bill detention as hours times rate, not a flat amount, so the history can be audited.

Then the routine part can be automated: an alert to dispatch when a truck passes free time, with the GPS evidence attached, and a draft detention line for a person to approve. Test that kind of engine before it touches operations, and re-run the tests after every change. The detention engine from this audit passes 35/35 tests.

Want this run on your own data?

Finding the detention you never billed is a typical first measurement for a trucking client, at a fixed fee agreed before we start. You send the exports; we send back the measured baseline, the ranked candidates and the method behind them.

Questions

Can I bill detention from GPS dwell time alone?

Not without a check. GPS dwell includes loading time you agreed to, early arrivals and driver breaks. Use it to find candidates, then have dispatch confirm a sample against the rate confirmation and the broker's rules before anything is billed.

What if my TMS has no arrival or departure times?

Then your TMS cannot time detention. The regional trucking company we worked with had no actual arrival or departure time on any of 135,631 stops. Use GPS or ELD data as the clock, and start recording real times going forward.

How much history should I look at?

Look at your full billing history to see how often you bill detention at all, and at a few months of GPS data to find candidates. The billing history shows the habit; the GPS window shows what the trucks actually did.

Who decides whether a candidate gets billed?

Dispatch or billing, with the rate confirmation in hand. The analysis ranks candidates by facility and broker so a person can review the strongest ones first. Nothing goes to a broker without that review.

Find the one problem worth fixing first.

A free 45-minute discovery call on Zoom with Vytas Skapcevicius, the founder. Four questions about your agency, no pitch deck. You leave knowing whether there is something worth measuring.

Book a free AI discovery call