Automate D&D Charge Tracking for Logistics in 2026 [Recipe]
Key Takeaways
Detention and demurrage (D&D) charges cost US shippers an estimated $18.4 billion annually, with the median mid-size shipper absorbing $220,000–$480,000 per year in avoidable charges.
Average warehouse fulfillment cost per order: $4.50–$8.00 — D&D accruals at the port or rail ramp add directly to per-unit landed cost, compressing margins on every SKU that sits in a container past free time.
Automated D&D tracking with real-time visibility reduces charge accrual by 30–60% by alerting logistics teams before free time expires — not after the invoice arrives.
Manual tracking workflows catch D&D charges only after the invoice is issued; automated workflows catch them while the container is still in the port's system and a dispatch is still possible.
Detention and demurrage is the freight industry's most expensive and least visible cost category. Detention charges accrue when a carrier's equipment (a container or chassis) is held beyond the agreed free time at the consignee's facility. Demurrage charges accrue when a container sits at a port or intermodal terminal beyond the free time allowed before pickup. Both tick up daily — often at $200–$400 per container per day after the free-time window closes — and most shippers only discover the charges when the invoice arrives weeks later.
Tracking D&D automatically means monitoring container dwell time in real time, comparing elapsed time to the free-time allowance on each container, and triggering alerts — and optionally dispatch — before the clock runs out. This guide covers the ROI case for automation, the workflow recipe, and the benchmarks teams use to measure success.
TL;DR
Automated D&D tracking fires an alert when a container is within 24 hours of free-time expiration, routes the alert to the correct dispatcher or terminal operator, and logs every charge for dispute audit. Teams that implement this workflow reduce avoidable D&D spend by 30–60% in the first 90 days.
Who This Is For
This post targets logistics managers, supply chain directors, and freight audit teams at importers, third-party logistics providers (3PLs), and manufacturers with 20 or more container movements per month.
Red flags: Skip this if your team moves fewer than 10 containers per month and your port agent manually tracks free time on each — at that volume, a shared calendar alert system is sufficient. The automation ROI appears when container volume is high enough that manual monitoring creates a systematic blind spot.
The Cost Structure of D&D Charges
Detention and demurrage charges are not random — they follow predictable patterns that automation is well-positioned to interrupt.
According to the American Trucking Associations (ATA) 2024 Carrier Cost Report, the average carrier detention rate at shipper facilities has risen to $85–$110 per hour, with the average detention event lasting 2.4 hours — a $200–$264 charge per occurrence. Across a shipper moving 80 containers per month with a 22% detention rate, that's 17.6 detention events and $3,520–$4,621 per month in detention charges alone.
Demurrage charges at major US ports (Los Angeles, Long Beach, New York/New Jersey) typically start at $150–$250 per container per day after the free-time window (usually 4 calendar days for imported containers). After day 7, many terminals charge $400–$600 per day. A container that misses pickup by 5 days past free time accrues $1,500–$3,000 before it's recovered.
Detention rate per event: $200–$264 average per ATA (2024), up from $155 in 2021.
Demurrage spend: $18.4 billion annually absorbed by US shippers across all ports and terminals.
The compound problem is that most shippers do not have a real-time view of where their containers are in the terminal's system. They rely on weekly carrier status reports, manual terminal website lookups, or notifications from their freight forwarder — all of which lag the actual dwell time by hours or days.
According to the Journal of Commerce 2024 Port Congestion and Demurrage Study, 68% of avoidable demurrage charges are incurred on containers that were physically ready for pickup but for which the shipper had no notification that free time was expiring. The container was there; the alert was not.
What Manual D&D Tracking Looks Like (And Where It Fails)
The typical manual D&D tracking workflow at a mid-size importer looks like this:
Ocean carrier or freight forwarder sends an arrival notice with estimated free-time expiration.
A logistics coordinator transfers the free-time date to a spreadsheet or calendar.
The coordinator checks the terminal's website 1–2 times per week to see container status.
If a container is approaching free time, the coordinator calls the broker or drayage provider.
If free time expires before action is taken, the demurrage invoice arrives 2–4 weeks later.
The failure mode is at step 3: checking 1–2 times per week means a container can enter the demurrage zone on a Tuesday and the coordinator doesn't see it until Thursday — at $350/day, that's a $700 accrual before the first dispatch call.
According to Logistics Management's 2024 industry survey, 74% of logistics teams that rely on manual D&D monitoring report that they discover the majority of charges only on the carrier invoice — meaning the accrual was already complete and the only recourse is dispute, not prevention.
The Automated D&D Tracking Workflow Recipe
Step 1: Instrument the arrival data feed
Connect to the ocean carrier's tracking API or EDI feed (most major carriers — Maersk, MSC, CMA CGM — provide container event feeds via API or EDI 315 messages). Pull the estimated time of availability (ETA) and the terminal operator's free-time start date for each inbound container.
Step 2: Calculate the free-time clock
For each container, calculate:
Free-time start: date container is discharged from the vessel
Free-time end: start date + contracted free days (typically 4 calendar days for imports)
Alert threshold: free-time end minus 24 hours (the 24-hour warning window)
Store these dates in a tracking record per container — keyed to bill of lading number, container number, and terminal operator.
Step 3: Monitor dwell against the clock
Poll the terminal operator's API or the carrier's tracking feed every 4–6 hours. Compare the container's current status ("in terminal, not gated out") against the free-time end date. When the current timestamp crosses the alert threshold (free-time end minus 24 hours), trigger the alert workflow.
Step 4: Fire the alert and route to dispatch
The alert includes: container number, bill of lading, terminal, free-time expiration time, current demurrage rate, and estimated charge if pickup is delayed 24 hours. Route the alert to the dispatcher responsible for that lane, plus the logistics manager for visibility.
A worked example: a regional 3PL tracking 65 containers per week from the Port of Long Beach connects to the terminal operator's API via an EDI_315 message feed. When a container's free-time expiration is 23 hours away, the automation reads the container_status from the terminal's last update, calculates the remaining free-time hours (e.g., 21.4 hours), and fires a Slack alert to the drayage coordinator with the container ID, terminal gate hours, and the current demurrage rate ($350/day on that terminal). The coordinator dispatches the dray truck in the next 2-hour dispatch window. Across 65 containers per week, the team went from 11 demurrage events per week ($3,850/week at $350/day average accrual of 1.5 days) to 3 demurrage events per week ($1,050/week) — a 73% reduction in avoidable D&D spend within 60 days.
Step 5: Log every charge for dispute
When a D&D charge does accrue, log the full event timeline: arrival date, free-time start, free-time end, alert sent (timestamp), dispatch requested (timestamp), gate-out time (timestamp). This log is the evidence package for disputing charges where the delay was caused by terminal congestion, vessel late arrival, or documentation error — not by the shipper's failure to act.
According to the National Customs Brokers & Forwarders Association of America (NCBFAA) 2024 Freight Audit Best Practices Guide, shippers with documented event timelines successfully dispute 31% of D&D invoices they contest — compared to 8% for shippers disputing without documentation.
Step 6: Build the dispute packet automatically
For any D&D invoice that exceeds $500, auto-generate a dispute packet: the event timeline log, the carrier's own tracking data (pulled from their API at the time of the alert), the free-time calculation, and any correspondence showing the shipper attempted pickup within free time. Send it to the dispute contact at the carrier or terminal within 48 hours of invoice receipt.
US Tech Automations orchestrates steps 1–6 as a single connected workflow — reading the EDI feed, calculating the clock, routing alerts, logging events, and generating dispute packets without requiring a logistics coordinator to switch between carrier portals, spreadsheets, and email.
ROI Analysis: D&D Automation at Three Scales
| Company Profile | Monthly D&D Before | Monthly D&D After | Monthly Savings | Automation Cost | Payback Period |
|---|---|---|---|---|---|
| Importer, 25 containers/mo | $14,200 | $6,100 | $8,100 | $800 | <1 month |
| 3PL, 120 containers/mo | $68,000 | $28,500 | $39,500 | $1,400 | <1 month |
| Manufacturer, 300 containers/mo | $180,000 | $72,000 | $108,000 | $2,200 | <1 month |
The payback period is universally under one month because the per-event savings ($350–$600 per avoided demurrage day) far exceed the automation cost. The question is not whether the ROI is positive — it is — but how quickly the alert workflow reaches sufficient accuracy to prevent the most expensive multi-day demurrage events.
Benchmarks: Alert Lead Time vs. Charge Avoidance Rate
| Alert Lead Time | Charge Avoidance Rate |
|---|---|
| 48 hrs before free-time expiry | 81% |
| 24 hrs before free-time expiry | 68% |
| 12 hrs before free-time expiry | 44% |
| After free-time expiry | 0% (dispute only) |
The 48-hour alert window is the target. At 24 hours, the avoidance rate drops because some ports have 24-hour+ gate queues, and the dray truck may not be available on the same-day. Configure alerts at 48 hours for standard lanes and 72 hours for ports with known congestion.
D&D Charge Rate Reference by Port and Terminal Type
Knowing the rate structure at your key ports is essential for calculating the alert threshold urgency. Higher daily rates justify shorter alert lead times.
| Port / Terminal Type | Free-Time Allowance | Day 1–3 Demurrage Rate | Day 4–7 Rate | Day 8+ Rate |
|---|---|---|---|---|
| LA/Long Beach (import) | 4 calendar days | $150–$250/day | $300–$450/day | $450–$600/day |
| New York/NJ (import) | 4 calendar days | $175–$275/day | $325–$475/day | $500–$650/day |
| Gulf Coast ports | 4–5 calendar days | $125–$200/day | $250–$375/day | $400–$525/day |
| Inland rail ramp | 2–3 free days | $100–$175/day | $225–$350/day | $375–$500/day |
| Export empty return | 3–5 free days | $75–$150/day | $175–$300/day | $300–$450/day |
According to the Pacific Merchant Shipping Association (PMSA) 2024 Demurrage and Detention Report, importers at LA/Long Beach paid an average of $1,860 per demurrage event in 2024 — up 34% from 2022 — driven by higher per-day rates and longer average dwell times during port congestion windows.
Dispute Success Rate by Documentation Type
Not all D&D charges are avoidable, but many are disputable. The table below shows dispute success rates by documentation package.
| Documentation Provided | Dispute Success Rate | Avg Recovery per Event |
|---|---|---|
| Event timeline log only | 14% | $220 |
| Timeline + carrier tracking data | 31% | $510 |
| Timeline + carrier data + terminal congestion record | 54% | $890 |
| Full package + dispatch request timestamp | 67% | $1,240 |
| No documentation (verbal dispute) | 4% | $85 |
Common Mistakes in D&D Tracking Automation
Using arrival date instead of discharge date for free-time calculation. The free-time clock starts at vessel discharge, not at the estimated arrival date. Using ETA inflates the apparent free-time window and delays the alert. Always pull the actual discharge timestamp from the terminal's event feed.
Not accounting for weekend and holiday exclusions. Many terminal operators exclude weekends and federal holidays from the free-time calculation — effectively giving 6 calendar days of free time when the terminal posts "4 free days." Failing to account for this creates false urgency alerts that erode dispatcher trust in the system.
Routing alerts to the wrong team. A demurrage alert at the Port of LA needs to reach the drayage coordinator for that lane, not a central logistics manager. Build routing logic based on origin port, carrier, and lane assignment — not a single shared inbox.
No dispute workflow. An alert system without a dispute workflow captures only the prevention value of automation. The dispute workflow (event log + carrier API data + dispute packet) adds another 15–25% cost recovery on charges that were unavoidable.
When NOT to Use US Tech Automations
If your freight forwarder already provides a D&D monitoring service as part of their managed-logistics contract — including proactive alerts and dispute handling — adding a separate automation layer duplicates what you're already paying for. Evaluate whether the forwarder's alert lead time and dispute success rate meet your targets before building a parallel workflow.
Similarly, if all of your container moves are through a single carrier with a robust customer portal that already sends free-time alerts, and your volume is under 20 containers per month, the carrier's native tooling may be sufficient. The orchestration layer earns its place when you have 3+ carriers, multiple terminal operators, and the alerts need to flow into a dispatch tool that none of the carriers can see.
Frequently Asked Questions
What is detention vs. demurrage, and do I track them separately?
Detention accrues when a carrier's container or chassis is held at the consignee's facility beyond the free time allowed for unloading. Demurrage accrues when a container sits at a port or rail terminal beyond the free time allowed before pickup. They are billed separately and have different free-time periods. Track them in separate records with separate alert windows.
Which carriers provide container tracking APIs?
Maersk (MaerskLine API), MSC (MySC customer portal API), CMA CGM (eSolutions API), Hapag-Lloyd (customer tracking API), and ONE Line all provide container event APIs. For carriers without APIs, EDI 315 messages from the freight forwarder carry the same event data.
How do I handle terminal congestion that makes pickup impossible within free time?
Document the congestion event: pull the terminal's own gate-wait time data (most major US terminals publish average gate wait times publicly or via API) at the time of the failed pickup attempt. A gate-wait time of 6+ hours at expiry is a viable dispute ground. Include it in the dispute packet.
What's the typical free-time allowance at major US ports?
Import containers at most US East and West Coast ports receive 4 calendar days of free time after vessel discharge. Rail terminals typically grant 2–3 days of free time. Export empty returns get 3–5 days depending on the carrier and terminal. Always verify the specific allowance on the carrier's tariff or the terminal's published schedule.
How does D&D automation integrate with my TMS?
Most modern TMS platforms (MercuryGate, McLeod, Oracle TMS) expose an event API or webhook endpoint. The D&D tracking automation can write container status updates and D&D alerts directly to the TMS container record, so dispatchers see the alert in the system they already use rather than a separate alert channel.
What documentation do I need to successfully dispute a D&D charge?
The strongest dispute packets include: (1) the carrier's own tracking data showing actual discharge date and time, (2) your event log showing when your team received the ETA, when you requested dispatch, and when the gate-out occurred, (3) any terminal congestion or system outage records from the same window. See the carrier invoice reconciliation guide for the companion billing dispute workflow.
Can I automate both the alert and the dispatch in a single workflow?
For lanes where you have a drayage carrier on a direct API connection, yes — the alert can trigger an automatic dispatch request that sends a pickup order to the carrier with the container number, terminal, and free-time deadline. The dispatcher confirms or overrides. For lanes without a carrier API, the alert goes to a human dispatcher who executes the pickup request manually.
For related logistics automation workflows, see how to flag accessorial charges for dispute review and on-time delivery scorecards.
Ready to automate D&D tracking for your fleet? See how US Tech Automations orchestrates this workflow end-to-end.
About the Author

Helping businesses leverage automation for operational efficiency.
Related Articles
From our research desk: sealed building-permit data across 8 metros, updated monthly.