Customs declaration prep is an integration problem disguised as a document problem.
Invoices arrive by email. Packing lists sit in shared drives. Bills of lading come from carriers in inconsistent formats. Every document holds structured data that needs to reach a declaration API. None of it gets there without someone manually carrying it across systems.
IDP software integration fixes this by building an automated pipeline between document intake, AI extraction, ERP master data, and customs API submission. No manual data entry. No format dependency. No disconnected systems.
Document Ingestion
Documents enter the pipeline through three channels simultaneously.
Email integration monitors designated mailboxes and automatically routes attachments into the processing queue by document type. API uploads allow ERP systems, freight platforms, and trading partner portals to push documents programmatically. EDI integration accepts structured trade documents alongside unstructured PDFs and scanned images.
The integration process normalises all incoming formats into a unified queue. No manual sorting. No delay caused by format incompatibility.
You can read a full IDP Software Integration Guide in depth.
AI Extraction and Classification
Once received, each document is classified by type and passed through the relevant extraction model.
For a commercial invoice, the model identifies goods descriptions, unit prices, declared values, currency, quantity, weight, country of origin, Incoterms, and party data including EORI numbers. For transport documents, it captures HAWB and MAWB references, carrier identity, and routing. Each extracted field is assigned a confidence score.
This is where IDP differs from OCR. OCR returns raw text. IDP returns structured, field-mapped data. It knows the difference between a declared value and a unit price. It handles 50 different supplier invoice layouts without a new template for each one, because it reads context, not structure.
Validation Against CDS Rules and ERP Data
Extracted data hits the validation stage before anything moves forward.
CDS validation rules confirm mandatory fields are present and correctly formatted. Commodity code candidates are checked against the UK Trade Tariff. Cross-document validation compares values between the invoice and packing list to catch quantity, weight, and value mismatches early. VAT treatment is verified against the import procedure code.
Confidence scoring from the extraction stage determines what proceeds automatically and what gets routed to the exception queue.
ERP Integration
This is the stage most automation conversations skip over.
ERP systems already hold the master data declarations depend on: approved commodity codes, supplier EORI numbers, standard packaging units, Incoterms by trade lane. IDP integration with SAP, Oracle, Dynamics, NetSuite, or Sage pulls that data into the declaration workflow automatically.
Incoming invoice data is matched against the corresponding purchase order record. Discrepancies between the invoice and ERP data are flagged before the declaration is prepared, not after CDS rejects it.
API Submission and Rejection Handling
Validated declarations are submitted programmatically via REST API to CDS, ICS2 ENS, NCTS, or TSS endpoints.
When CDS returns a rejection, the exception handler parses the error code, maps it to the specific declaration field, notifies the operator with the exact correction required, and triggers resubmission through the same API connection. No manual re-entry. No starting from scratch.
Every submission response, MRN, and routing decision is logged in a structured audit trail that satisfies HMRC record-keeping requirements automatically.
The Practical Takeaway
The pipeline covers five stages: document intake, extraction, validation, ERP enrichment, and API submission. Each connects to the next without human intervention for standard consignments.
Humans only appear when confidence scoring flags an exception or CDS returns a rejection. Everything else runs straight through.
For customs teams dealing with ICS2 Release 3, HMRC CDS enforcement, and the EU Customs Data Hub reform, this architecture isn't optional infrastructure. It's the baseline for meeting pre-arrival filing deadlines consistently across all transport modes.
Watch a Demo and see how iDP Software actually works.
Top comments (0)