Skip to content

Wait for goods movement

Follows a goods movement record (GMR) in HMRC’s Goods Vehicle Movement Service until the goods clear, HMRC asks for an inspection, or the GMR needs changes.

@lainstack/hmrc/wait-for-goods-movement · Customs · Available on Lainstack Cloud

Use Wait for goods movement to follow a goods movement record (GMR) in HMRC’s Goods Vehicle Movement Service until its goods clear. Put it after Send goods movement record, or give it the GMR ID of a movement made elsewhere.

Good to know:

  • The block reads the GMR from HMRC now and then, and leaves on Cleared once the vehicle has crossed and HMRC says the goods are clear to proceed.
  • Cleared is HMRC’s own state for a GMR whose goods are clear to proceed. For transit movements HMRC can still ask for an inspection at the next transit office afterwards.
  • Inspection required means HMRC wants the vehicle inspected. The output lists the inspection locations to report to. To keep following the GMR after the inspection, run this block again.
  • Needs changes means the GMR can no longer check in, for example because a declaration on it was cancelled. Rule failures under GMR says why. Fix it with Send goods movement record.
  • Timed out means none of these happened within the time limit, a day by default.
  • While waiting, the run holds no worker: checks start every 30 seconds and slow down to one every 10 minutes.
  • HMRC shows a haulier only their own GMRs. A GMR that HMRC can’t find, because it was deleted or expired 28 days after its last update, fails the step.
  • A check that can’t reach HMRC counts as still waiting. HMRC problem says why.
  • A sandbox connection reads HMRC’s test environment.
Setting Key Type Details
HMRC connection (required) credentialId Connection The HMRC connection of the haulier who owns the GMR. At most 160 characters.
GMR ID (required) gmrId Text The goods movement record to follow.
Give up after (minutes) timeoutMinutes Number Take the Timed out path when the goods haven’t cleared by then. Defaults to 1440 (a day); up to 10080 (a week). From 1 to 10,080. Default 1440.
Output Path Type
Outcome outcome Choice
Summary summary Text
GMR ID gmrId Text
Environment environment Text
Started At startedAt Text
Checked At checkedAt Text
Next Check At nextCheckAt Text
HMRC Problem hmrcProblem Text
GMR > GMR ID gmr.gmrId Text
GMR > State gmr.state Choice
GMR > Status Version gmr.statusVersion Number
GMR > Inspection Required gmr.inspectionRequired Yes or no
GMR > Report To Locations gmr.reportToLocations List
GMR > Rule Failures gmr.ruleFailures List
GMR > Direction gmr.direction Choice
GMR > Haulier EORI gmr.haulierEori Text
GMR > Vehicle Reg Num gmr.vehicleRegNum Text
GMR > Trailer Registration Nums gmr.trailerRegistrationNums List
GMR > Customs Declarations gmr.customsDeclarations List
GMR > Planned Crossing > Route ID gmr.plannedCrossing.routeId Text
GMR > Planned Crossing > Local Date Time Of Departure gmr.plannedCrossing.localDateTimeOfDeparture Text
GMR > Planned Crossing > Local Date Time Of Arrival gmr.plannedCrossing.localDateTimeOfArrival Text
GMR > Checked In Crossing > Route ID gmr.checkedInCrossing.routeId Text
GMR > Checked In Crossing > Local Date Time Of Departure gmr.checkedInCrossing.localDateTimeOfDeparture Text
GMR > Checked In Crossing > Local Date Time Of Arrival gmr.checkedInCrossing.localDateTimeOfArrival Text
GMR > Actual Crossing > Route ID gmr.actualCrossing.routeId Text
GMR > Actual Crossing > Local Date Time Of Departure gmr.actualCrossing.localDateTimeOfDeparture Text
GMR > Actual Crossing > Local Date Time Of Arrival gmr.actualCrossing.localDateTimeOfArrival Text
GMR > Updated At gmr.updatedAt Text
Exit Port Notes
Cleared out
Inspection required inspection
Needs changes notFinalisable
Timed out timedOut

Last updated: