The governing rule: every cost document is extracted to line-item granularity, allocated to the right SKUs and shipments (freight and duty spread correctly), and three-way matched against the purchase order and receipt before it updates the cost model, with a human clearing exceptions.
Two decisions made it reliable. First, structured extraction that carries provenance. Every figure returns the page it came from, so an exception is traceable. Second, a real allocation step: freight and duty are not per-SKU on the document, so the model allocates them across the shipment by weight or value into a true landed cost per SKU. We did not let extracted numbers flow straight into margin. The three-way match gates them, and mismatches go to a person.
What we deliberately did not do: no auto-posting to the GL, no replacing the AP process, and no trusting a number that did not reconcile.