Skip to content

Answer a customs hold with documents

Sometimes customs holds an import before releasing it and asks for documents, such as a licence or a certificate of origin. This recipe picks up where Send CDS declaration leaves on Held by customs. It sends the documents to HMRC against the declaration’s MRN, then checks the declaration again until the goods are released or a person needs to step in.

Uploading doesn't release the goods by itself: a case worker at HMRC reviews the documents first.

Held by customs appears only when Send CDS declaration has Wait until set to Released (goods cleared). With Accepted (MRN issued) the block leaves as soon as HMRC accepts the declaration, and a later hold shows up only when you check the status.

The exit covers two different requests from HMRC:

  • Documents required (DMSDOC): HMRC wants to see documents. This recipe answers it.
  • Goods selected for physical control (DMSCTL): customs wants to examine the goods. Documents don’t answer this one. Tell whoever holds the goods.

The block’s Summary and Notifications show which one HMRC sent. If both can happen on your route, put an Approval before the upload so a person confirms that HMRC asked for documents.

The quickest answer uses files the run already has. Have the Operation form that starts the declaration also take the supporting documents your goods usually need, such as licences and certificates of origin, alongside the invoice and packing list.

When customs asks for something you don’t have yet, a person has to get it first. Build a second, small automation for that: an Operation form that takes the MRN and the files, followed by the steps below.

Connect Upload documents to HMRC to Held by customs:

  • HMRC connection: the same one that sent the declaration. HMRC answers only the trader who submitted it.
  • MRN: the send block’s MRN.
  • Files: the documents customs asked for.
  • Document type: optional, such as “Licence”. It applies to every file in the step.

HMRC takes up to 11 files per step, each up to 10 MB and 18 MB together. A larger set needs more than one step, each with its own files. HMRC takes PDF, JPEG, PNG and plain text files, and checks each file’s type from its content, not its name.

The block uploads every file and waits until HMRC has checked them. It leaves on:

Exit What it means What to do
Uploaded HMRC took every file Wait for the case worker
Refused HMRC refused a file, refused the upload, or a file didn’t reach HMRC Files says which file and why. Upload only those again, so the ones HMRC took aren’t sent twice
Timed out HMRC hadn’t checked every file within Give up after (minutes), an hour by default Check with HMRC before uploading again

On Refused, the summary also names any file that may have reached HMRC. Check with HMRC before sending that one again.

A case worker at HMRC reviews the documents before the goods are released, so nothing happens at once. Add a Wait with Mode set to Delay and a Duration that suits how quickly your holds usually clear, such as a few hours.

Then add Get CDS declaration status with the same MRN and connection, and a Condition on Status under Declaration:

  • released: tell whoever books the delivery.
  • anything else: the hold isn’t over. Hand it to a person, or add the MRN to the table in Track CDS declaration status so a scheduled run keeps checking.
  • The wrong connection. Use the connection that sent the declaration, as with every later message about it.
  • Too many or too large files. More than 11 files, a file over 10 MB or a set over 18 MB fails the step before anything is sent. Split the set across steps.
  • A file HMRC won’t take. A failed virus check or another type, such as XML or a Word file, leaves on Refused with HMRC’s reason.
  • A physical check, not documents. Uploading doesn’t answer a DMSCTL hold.
  • Trying it on the sandbox. HMRC’s test environment checks and stores the files but doesn’t link them to a hold: a test hold clears without them. To make Trade Test hold a declaration, put one of HMRC’s test words in a goods description, such as ttdocblockingF for documents. Send CDS declaration accepts these words only on a Trade Test connection.
  • Resuming the run. Once the files are uploaded, a resumed run goes back to checking HMRC’s answer without uploading again.

Last updated: