Send a UK export declaration to CDS from an invoice
This recipe takes an export invoice and packing list and ends when HMRC says the goods have left the UK. It reads the documents with AI, a person corrects them, and Send CDS declaration builds, checks and sends a B1 standard export declaration (procedure 1040).
Where you can send it from
Section titled “Where you can send it from”Lainstack sends the declaration straight to HMRC. That fits exports through roll-on roll-off ports and inland locations. For ports and airports with their own cargo systems, HMRC’s exporter guidance has the declarant give the DUCR to the loader, who records the goods’ arrival there; whether a declaration sent straight to HMRC is accepted there, and reported as exited, is not confirmed yet.
1. Set up the tables
Section titled “1. Set up the tables”Use the client and product tables from the import recipe. On an export the client is the exporter: its eori must be a GB or XI EORI, and it goes into the DUCR. Payment columns aren’t used: a B1 export declares no duty.
For an arrived export (EXA) at a Customs Supervised Exports location, also fill in the client’s cse_authorisation.
2. Read the documents
Section titled “2. Read the documents”Read the invoice and packing list as in the import recipe. On an export the answer needs the buyer instead of the seller:
consigneeName,consigneeStreet,consigneeCity,consigneePostcodeandconsigneeCountryCode.destinationCountryCode: where the goods are going.- The lines’
lineTotal, which is also the statistical value when the invoice is in GBP. For an invoice in another currency, each line needsstatisticalValueGbp, its value in pounds.
Have a person correct the answer with an Approval, as in the import recipe.
3. Send the declaration
Section titled “3. Send the declaration”Add Send CDS declaration with Declaration set to Export:
- Type: Goods have arrived at the place of export (EXA), or Before arrival, pre-lodged (EXD).
- Invoice data, Client, Client table and Product table: as in the import recipe.
- Wait until: Accepted (MRN issued), or Exited (goods left the UK). A pre-lodged (EXD) declaration also offers Received (MRN issued), which continues once HMRC has it, before the goods arrive at the port.
- Under Goods location: the Goods location code where the goods are presented, and the Office of exit, such as
GB000040. - Give up after (minutes): an export can take days to leave; up to 14 days.
When the goods count as exited
Section titled “When the goods count as exited”HMRC sends its “goods exited” message only after the departure is recorded against the DUCR:
- at a roll-on roll-off port, by the haulier’s goods movement record (GMR) carrying the DUCR;
- at a port with its own cargo system, by that system’s departure message;
- elsewhere, on HMRC’s departure forms.
The block doesn’t send any of these: it waits for HMRC’s message. Pass the DUCR from the block’s output to whoever records the departure.
What goes wrong
Section titled “What goes wrong”- The declaration fails a check. A missing office of exit, a destination of GB or a missing statistical value stop the send and open a review.
- The goods don’t leave in time. The block leaves on Timed out. Check the status later.
- HMRC rejects it. A review opens beside the source documents, and a resend uses a new LRN.