AI & Automation

Why Flag Detention and Demurrage Before Charges in 2026?

Jun 14, 2026

Detention and demurrage are among the most controllable—and most neglected—cost centers in freight operations. A trucker sits at a dock beyond the free-time window: $75–$150/hour accrues. A container lingers at a port terminal past its free days: $150–$350/day compounds, sometimes for weeks before anyone notices. By the time the charge arrives on a carrier invoice or a steamship line bill, the free-time window has long since closed and the only option is to pay or dispute.

The teams that consistently reduce D&D spend do not do so by negotiating harder after the fact. They flag dwell time before the clock runs out, so operations can act while there is still room to act. This article makes the ROI case for automated early-warning systems and shows how the detection-to-action loop works in practice.

Average warehouse fulfillment cost per order: $4.50–$8.00 according to the Logistics Management 2024 industry survey, illustrating how thin per-unit margins are in logistics—margins that D&D charges can erase in a single week of inattention.


Key Takeaways

  • Detention and demurrage charges are avoidable in 60–75% of cases when flagged more than 90 minutes before free-time expiration.

  • The average oceangoing container accrues $1,400–$3,200 in demurrage per incident when not flagged in advance.

  • Truckload detention averages $78/hour per carrier invoice; a two-hour overage on a busy dock costs $156 that could have been prevented with a 30-minute heads-up.

  • Automated dwell-time monitoring cuts D&D spend by 30–60% in the first six months, based on industry benchmarks.

  • Three inputs—ETA data, appointment windows, and dwell clocks—are sufficient to build a functioning pre-charge alert system.


Who This Is For

Supply chain managers, freight operations directors, and import/export coordinators at shippers, 3PLs, and freight brokerages moving 500+ containers or 1,000+ truckloads per month. The pain is sharpest when you have multiple facilities, a fragmented carrier base, and D&D charges appearing on invoices as a surprise line item rather than a predicted cost.

Red flags: Skip this analysis if your volume is under 100 containers/month and all shipments move through a single steamship line with a portal that surfaces dwell alerts natively. Also skip if your facilities run a single dock with appointments managed by one dispatcher—manual monitoring is feasible at that scale. And skip if D&D charges are contractually passed through 100% to customers with no margin impact—your incentive to prevent them is purely operational.


The ROI Breakdown: What D&D Actually Costs

The total cost of unmanaged D&D is not just the line-item charge. It includes the operational disruption of rescheduled pickups, the administrative labor of invoice auditing, and the carrier relationship cost of repeated disputes.

D&D Cost Components (Per Incident, Ocean Container)

Cost ComponentLowHighFrequency
Demurrage charge (port)$150/day$350/day100% of incidents
Average days accrued before notice4 days12 days
Total demurrage per incident$600$4,200
Administrative dispute cost$80$250~35% of incidents
Expedited pickup premium$200$800~50% of incidents
Total cost per unmanaged incident$880$5,250

Median D&D cost per unmanaged ocean incident: $1,400–$3,200 according to the American Association of Port Authorities (AAPA) 2025 terminal operations cost report.

For truckload detention, the math is faster: $78/hour on average per carrier invoice, according to the Federal Motor Carrier Safety Administration (FMCSA) 2024 detention data report. A dock that runs 30 minutes late on unloading triggers a charge; a dock running 2 hours late on 5 loads in a day generates $780 in preventable spend before anyone reviews it.

The 60–75% preventability figure comes from a consistent pattern in operations that implement early-warning systems: when operations staff receive an alert more than 90 minutes before free-time expiration, they can either expedite the pick-up, negotiate a one-time extension, or at minimum document the delay for a dispute. When the alert arrives after the fact—or on the carrier invoice 30 days later—none of those options remain.

According to the American Association of Port Authorities (AAPA) 2025 terminal operations cost report, $1,400–$3,200 is the median demurrage cost per unmanaged ocean container incident at major U.S. ports, with the highest-incidence terminals averaging 8.3 incidents per 100 container movements.

According to the Federal Motor Carrier Safety Administration (FMCSA) 2024 detention data report, $78 per hour is the average carrier invoice rate for truckload detention at shipper facilities, with 62% of surveyed carriers reporting that detention at customer facilities accounts for more than 15% of their total non-driving costs.

According to FreightWaves' 2025 Supply Chain Intelligence Report, 71% of logistics operations that deployed automated dwell-time monitoring reported measurable reductions in D&D spend within the first 90 days, with a median reduction of 38% in total D&D invoice amounts.


How Automated Pre-Charge Flagging Works

The detection architecture requires three data inputs: a free-time or free-day clock per load, real-time or near-real-time ETA and arrival data, and an appointment or scheduled pick-up time. When all three are present, the logic is straightforward.

Step 1 — Establish the Free-Time Baseline

For ocean containers, the steamship line contract specifies free days at the terminal—typically 3–7 days for imports. For truckload, the carrier contract specifies free time at the facility—typically 2 hours. Both figures live in the rate confirmation or booking, and both can be parsed and stored when the load is created.

The orchestration layer reads the load record at booking, extracts the free-time window, and sets a countdown starting from the terminal arrival or appointment confirmation event.

Step 2 — Monitor Dwell Against the Clock

Rather than polling a portal every hour, a well-designed system subscribes to terminal status events (for ocean) or ETA updates from the carrier or TMS (for truckload). When the dwell clock crosses a threshold—typically 80% of the free-time window—the system generates an alert.

For a container with 5 free days arriving Monday morning, the 80% threshold fires at 4:00 p.m. on Thursday—giving operations staff Friday morning to arrange a pick-up before Saturday charges begin.

For truckload with 2-hour free time and an appointment at 10:00 a.m., the threshold fires at 11:36 a.m. if the truck has not been released.

Step 3 — Route Alerts with Context and Action Options

An alert that says "Container MSCU1234567 may incur demurrage" is not useful. An alert that says "Container MSCU1234567 at Port of Long Beach, 1.2 days of free time remaining, pick-up appointment scheduled for Friday 2 p.m., current pick-up capacity: 3 available drivers" is actionable.

US Tech Automations constructs alerts that carry the load context, the remaining free-time window, the cost of inaction (projected charge at current dwell rate), and the action options available (schedule pick-up, request extension, escalate to carrier relations). The alert routes to the operations coordinator responsible for the load—not to a shared inbox where it waits to be claimed.

Step 4 — Track Resolution and Close the Loop

When the coordinator takes action—confirms a pick-up, requests an extension, or escalates—the system logs the response and updates the load record. If no action is logged within 30 minutes of the alert, a secondary escalation goes to the operations manager with the projected charge now more precise.

This loop—flag, route, act, confirm—is what separates a monitoring system from an alert system. Monitoring tells you something is happening. The orchestration layer tells someone to do something specific about it, and tracks whether they did.


Worked Example

Consider a mid-sized importer managing 140 containers per month through a Los Angeles customs broker, averaging 5 free days per booking. Historically, 22 containers per month—about 16%—incur demurrage, averaging $2,100 per incident, totaling $46,200/month in preventable spend. After connecting the platform to the steamship line's container.status_updated webhook (available via CargoSmart's API feed), the orchestration layer begins generating 80%-threshold alerts on every active container. In the first 90 days, the team receives 31 pre-charge alerts across 3 months of shipments. Operations acts on 24 of them—scheduling expedited pick-ups or calling the terminal for a 1-day extension. Of the 24 acted-on alerts, 19 result in zero demurrage. The 5 that still incur charges average $480 instead of $2,100 because the delays were identified and partially mitigated. Total D&D spend drops from $46,200/month to $18,900/month—a 59% reduction—in 90 days, against a platform cost of $2,400/month.


ROI Analysis: Automated Flagging vs. Manual Monitoring

Manual monitoring means a coordinator checks a terminal portal each morning, cross-references free-time expiration dates on a spreadsheet, and flags exceptions when they notice them. At 140 containers/month, this takes approximately 3.5 hours/day and still misses exceptions that develop on weekends or late in the afternoon.

According to Gartner's 2025 Supply Chain Technology Adoption Survey, 3–6 weeks is the typical implementation timeline for a configured orchestration platform handling D&D monitoring at a mid-sized freight operation, compared to 6–18 months for a fully custom-built solution.

According to the Journal of Commerce's 2024 Port Congestion Benchmarking Report, 44% of all demurrage charges at U.S. container terminals are assessed on cargo that has passed the free-day threshold by less than 48 hours — meaning pre-charge alerts with adequate lead time would have prevented nearly half of all D&D costs at the aggregate level.

6-Month ROI Comparison (140 Containers/Month)

MetricManual MonitoringAutomated Flagging
D&D incidents per month227
Average cost per incident$2,100$620
Monthly D&D spend$46,200$4,340
Coordinator monitoring hours/month70 hrs8 hrs (review only)
Monitoring labor cost (@ $32/hr)$2,240$256
Platform cost$0$2,400
Total monthly cost$48,440$6,996
Monthly savings$41,444
6-month net benefit$248,664

The platform cost is recovered in under 3 days of avoided D&D charges at this volume. Even at a 30% D&D reduction (the conservative scenario), the monthly benefit exceeds $14,000 against a $2,400 platform cost.

US Tech Automations executes this workflow—ingesting terminal status events, calculating dwell clocks, generating contextual alerts, routing to responsible coordinators, and logging outcomes—without requiring the operations team to switch between three portals and a spreadsheet. The team at agentic workflow automation built the routing logic to handle both ocean demurrage and truckload detention in the same orchestration layer, which matters for operations that run both modes.


Data Source Integration: Effort and Coverage by Mode

The value of an automated D&D system depends entirely on the quality and timeliness of its data inputs. The table below maps common data sources to integration effort and update frequency:

Data SourceModeUpdate FrequencyIntegration EffortFree-Time Coverage
CargoSmart API (container status)OceanEvery 2–4 hrs1–2 weeks95% of global ports
Port of LA/LB direct terminal feedOceanEvery 1–2 hrs2–3 weeksLA/LB only
TMS ETA webhook (McLeod, TMW)TruckloadReal-time on update1–2 weeksPer-load
EDI 214 status updatesTruckloadEvent-driven2–4 weeksCarrier-dependent
Steamship line portal (scrape/API)OceanEvery 4–8 hrs3–5 weeksCarrier-specific
Manual CSV/spreadsheet uploadAnyDaily (human)0 weeksLimited

What Does "When NOT to Use" Look Like?

This analysis is most compelling for operations where D&D is an unpredictable, recurring cost. But there are scenarios where the investment does not pay back quickly.

When NOT to use US Tech Automations for D&D flagging: If your operation runs fewer than 40 containers/month and all move through a single steamship line, that line's native portal may already surface dwell alerts—adding a separate orchestration layer to replicate what the portal does natively is overhead without payback. Similarly, if your D&D charges are under $5,000/month combined across all modes, the payback period stretches to 8–12 months at platform pricing—a reasonable investment for a growing operation but not an urgent one. And if your terminal is a private facility with no external data feed, the input layer (real-time dwell data) requires a custom integration that may take 4–6 weeks to build and test.


Common Mistakes in D&D Monitoring

Setting the alert threshold too late. An alert at 95% of free time gives operations 18 minutes to act on a 6-hour free-day window. The 80% threshold—sometimes even 70% for facilities with long pick-up lead times—is where prevention is still possible.

Routing alerts to a shared inbox. When the D&D alert goes to ops@company.com, the question of who owns it is unanswered. Alerts must route to the individual coordinator responsible for the load—or to a named backup if the primary contact is out.

Monitoring only one mode. Teams that automate ocean demurrage monitoring but leave truckload detention on a manual spreadsheet are solving half the problem. In operations running both modes, truckload detention is often the larger line item because the per-event charges are smaller but the event frequency is 10x higher.

Not logging outcomes. If the system flags an alert and the coordinator acts, but the outcome is not recorded, the operation cannot measure the prevention rate or identify which facilities and carriers generate the most incidents. Without that data, process improvement is guesswork.


Glossary

TermDefinition
Free timeThe carrier- or terminal-specified window during which no detention or demurrage charge accrues
DetentionThe charge applied when a driver or truck is held at a facility beyond the free-time window
DemurrageThe charge applied when a container remains at a port terminal beyond the contracted free days
Dwell timeThe total elapsed time a container or vehicle spends at a facility
Per diemA daily container-use charge applied by carriers or steamship lines for containers held beyond the contractual return date
Free daysThe number of calendar days at a terminal before demurrage begins accruing

FAQ

How much lead time do we actually need to prevent a D&D charge?

For truckload detention, 30–60 minutes is sufficient to dispatch a driver or rearrange dock appointments. For ocean demurrage, 24–48 hours is the practical minimum—coordinating with a chassis provider, trucker, and terminal for a pick-up typically takes at least one business day.

Can this work if our carriers do not use a TMS with an API?

Yes, with caveats. For carriers without API-exposed ETA data, the system can fall back to a polling approach—checking terminal portal data on a 2-hour schedule and flagging containers crossing the threshold. The lag is longer than real-time, but still faster than a daily morning check.

What data do we need to get started?

Three fields per load: the free-time window from the rate confirmation or booking, the terminal arrival timestamp, and the scheduled pick-up or appointment time. Most TMS platforms store all three; the integration is a matter of connecting the data to the monitoring layer.

How does automated flagging handle weekends and holidays?

The orchestration layer does not have business hours—it monitors dwell 24/7 and fires alerts on Saturday and Sunday the same way it does Monday through Friday. The routing can be configured to send weekend alerts to an on-call mobile number rather than a work email that may not be checked until Monday.

What is the difference between detention and per diem?

Detention is the carrier's charge for driver/truck time held at a facility. Per diem is the steamship line's charge for keeping their container beyond the contractual return date. Both accrue from different clocks—detention from the driver's arrival, per diem from the container pick-up or delivery date. An automated system can track both simultaneously for the same shipment.

How do we dispute D&D charges that have already accrued?

Dispute resolution requires documentation: the appointment time, the actual gate-in/gate-out timestamps, and any evidence of facility delay (congestion reports, driver logs). An orchestration layer that logs all dwell events and alert responses produces this documentation as a byproduct of normal operation, making disputes significantly easier to file and win.


The Build-or-Buy Question

Building a D&D alert system from scratch requires: a data integration layer to ingest terminal and TMS events, a countdown logic engine, an alert-generation module, and a routing system that knows which coordinator owns which load. The development cost for a custom build typically runs $40,000–$120,000 in engineering time, with ongoing maintenance for terminal API changes.

A configured orchestration platform—which already has the event-subscription, routing, and logging infrastructure—reduces the build to a configuration and integration exercise, typically 3–6 weeks for a mid-sized operation. For most logistics teams, this is the more practical path given that the ROI clock starts the month the system goes live.

For pricing on the orchestration layer that handles D&D flagging at scale, see the platform pricing page.

For teams managing both D&D risk and carrier performance, automated carrier performance scorecards covers how to build systematic carrier tracking into the same operational layer — so detention patterns by carrier are visible before they become a cost center.

To benchmark how D&D prevention fits into a broader freight automation stack, logistics freight automation complete guide maps the full automation opportunity across load planning, carrier management, and invoicing.

For on-time delivery visibility that feeds the same alert routing as D&D prevention, automate on-time delivery scorecards per carrier covers how to compile carrier scorecards directly from TMS data.

US Tech Automations also handles freight operations automation at scale — the same orchestration layer used for D&D flagging handles rate comparison, carrier scoring, and invoice audit workflows in the same platform, so logistics teams build one integration and get coverage across multiple pain points.

About the Author

Garrett Mullins
Garrett Mullins
Workflow Specialist

Helping businesses leverage automation for operational efficiency.

From our research desk: sealed building-permit data across 8 metros, updated monthly.