Things happen like shipping containers showing up on the docks without a proper cargo manifest or other documentation errors, which of course leads to the shipment sitting in customs until it gets sorted out. This is because the humans creating those forms often have poor tools, and of course there's the usual factors like staff who are too busy, incompetent, or lazy (in an ideal world they should not be doing that job, but this is reality we're dealing with).
The obvious answer would be a shipping management system integrated with the company's supply chain software (typically, their ERP), but usually these problems are coming from OEMs, subsidiary companies, and occasionally 3PLs that have aren't part of the company's systems. Any integration with those systems is usually rudimentary at best, and it's not unusual for the "integration" to be human-based.