Medicines wholesale · Playbook 67

Cold chain and temperature excursions

Excursions caught early, many prevented, and every one that happens arrives at the Responsible Person's desk as a complete evidence pack. The AI never decides whether stock can be used.

  • Predictive ML
  • Event-driven integration
  • Agents with tools
  • Human in the loop
  • MHRA GDP
  • Responsible Person (WDA(H))
  • MHRA data integrity
  • UK GDPR

At a glance

The problem
Temperature data sits in three or four systems, and every excursion means a day of gathering evidence by hand
Typical volume
Around 3,000 refrigerated totes a day from 10 depots, 350 vans and 2,000 sensors
Who's involved
Quality, the Responsible Person, warehouse and transport operations, IT, data protection
Pilot
8–10 weeks after a 3 week discovery
Clouds
AWS or Azure, UK regions

An illustrative scenario. Linked to a real, anonymised case study below; the numbers here are still typical examples. The cloud services and UK rules were checked on 9 November 2026.

The business problem

A large wholesaler moves fridge lines every day: insulin, vaccines, biologics and eye drops, packed into totes with cool packs and carried in refrigerated vans to community pharmacies, dispensing doctors and hospitals. Temperature data comes from everywhere. Cold rooms and fridges feed a monitoring system, van fridge units report through telematics, and tote data loggers are downloaded when they come back, sometimes days later.

When something goes wrong, such as a cold room alarm at 3am, a van unit that cycles badly on a hot afternoon or a tote logger that shows 9.4°C for forty minutes, someone in quality has to rebuild the story. Which stock was there, for how long, at what temperature, what the product's label allows, what the manufacturer's stability data says, whether that probe was in calibration, and which customers have already received affected batches. In a typical operation this takes a day or two per excursion, and the stock sits in quarantine meanwhile.

The Responsible Person named on the wholesale dealer's licence carries the decision, and MHRA inspectors look closely at how excursions are investigated and recorded. A slow, manual evidence trail means more stock written off on caution, longer quarantine for lines that may be short, and records that are harder to defend at inspection.

What AI changes

  • Every sensor, van and tote reading lands in one place within minutes, matched to the location, the stock and the batch it was protecting.
  • Excursions are caught as they start, not when a logger is downloaded, and the duty team is called while there's still time to move stock or swap a van.
  • A model predicts which routes and totes are at risk tomorrow, from the weather forecast, route length, number of drops and each van's recent fridge performance.
  • Planners get suggestions to re-sequence a route or use the summer pack-out, chosen only from routes and pack-outs that quality has already validated.
  • When an excursion happens, the Responsible Person gets a complete evidence pack within the hour: the trace, the label conditions, the stability data, the calibration record and the affected customers.
  • The Responsible Person makes every disposition decision. The AI gathers, sorts and explains. It never releases, rejects or destroys stock.

How success is measured

Agree these, and measure the baseline, before anything is built. Example targets are typical, not promises.

Alarm to precautionary hold

How long affected stock stays pickable after an alarm starts.

ExampleUnder 10 minutes, every time

Time to a complete evidence pack

From the excursion ending to the Responsible Person having everything needed to decide.

ExampleFrom 1–2 days to under 2 hours

Excursions per 1,000 refrigerated totes

Whether prediction and route changes are preventing excursions, not just reporting them.

ExampleDown by a third in the first year

Stock written off after excursions

Value of stock destroyed because evidence was missing or late, rather than because the product was affected.

ExampleMeasured against last year

Packs sent back for more evidence

How often the Responsible Person can't decide from the pack alone. Near zero means the pack is complete; high means it's not helping.

ExampleBelow 1 in 10, reviewed monthly

Inspection findings on temperature control

Observations from MHRA inspections and self-inspections about excursion handling and records.

ExampleNone open

UK regulation and controls

Cross-sector rules are on the UK regulation map.

  • MHRAGood Distribution Practice (EU guidelines 2013/C 343/01, as applied in the UK; the Green Guide)

    Medicines must stay within their labelled storage conditions in the warehouse and in transit, storage areas must be temperature mapped, and monitoring equipment must be calibrated. The design ties every reading to a mapped location and a calibrated probe, so the evidence for any excursion is already joined up.

  • MHRAThe Responsible Person on the WDA(H)

    The Responsible Person must be told about temperature deviations and decides what happens to affected stock. The AI prepares the evidence pack and a plain-English summary. It never recommends release. The disposition, and the reason for it, is recorded by the Responsible Person in the quality system.

  • MHRAExcursion assessment and Mean Kinetic Temperature

    MHRA inspectors have warned against using Mean Kinetic Temperature in wholesale without robust supporting data, and against routinely relying on stability data where shipment conditions weren't controlled. The pack shows the raw trace, time out of range and peak temperature first, and quotes the manufacturer's own excursion data where it exists.

  • MHRAGxP data integrity guidance and computerised system validation

    Temperature records are GDP records, so the new platform is validated before use and records stay attributable, complete and unaltered, with full audit trails. The existing validated monitoring system stays the system of record. The AI reads a copy and never edits a reading.

  • MHRAReturns of fridge lines (GDP chapter 6)

    Returned cold-chain stock can only go back to saleable stock with documented evidence that it stayed within its storage conditions throughout, including transport. Many wholesalers don't accept fridge returns for resale at all. The design treats any returned fridge line as quarantined until a person decides.

  • ICOUK GDPR and monitoring workers

    Van telematics and location data identify drivers. That means a DPIA, telling drivers what is collected and why, using location for cold chain and routing only, and keeping it no longer than needed. Temperature records themselves are kept for the GDP retention period, typically five years.

The solution

Showing AWSAzuresovereign / on-prem services. Switch with the toggle; every diagram and table on this page follows it.

Cold chain and temperature excursions: reference architecture
  1. 01Channels

    • Cold room and fridge sensors
    • Van fridge units and telematics
    • Tote data loggers
  2. 02Intake

    • AWS IoT CoreAzure IoT HubMQTT broker (Eclipse Mosquitto or EMQX)Device connection
    • Kinesis Data StreamsEvent HubsApache KafkaSensor stream
    • Timestream for InfluxDBFabric EventhouseTimescaleDB or InfluxDBTime-series history
  3. 03Intelligence

    • SageMaker AIAzure Machine LearningMLflow and Kubeflow on KubernetesExcursion risk model
    • Amazon Location ServiceAzure MapsOSRM or Valhalla on OpenStreetMap dataRoute and timing options
    • Bedrock Knowledge BasesFoundry IQ (Azure AI Search)OpenSearch, or PostgreSQL with pgvectorSOPs and stability data
    • Agent
      Bedrock AgentCoreFoundry Agent ServiceLangGraph on KubernetesEvidence agent
  4. 04Orchestration

    • Step FunctionsLogic Apps / Durable FunctionsTemporal, or n8nExcursion workflow
    • EventBridge + SQSEvent Grid + Service BusApache Kafka or RabbitMQEvents and queues
  5. 05Systems of record

    • Validated temperature monitoring system
    • WMS and stock status
    • Transport management system
    • Quality management system
  6. 06People

    • Person
      Cold-chain duty team: alarms
    • Person
      Responsible Person: disposition
    • Person
      Transport planners: route changes
  • Cloud or platform service (AWSAzuresovereign / on-prem)
  • AI agent
  • A person decides
  • Your existing systems
  • Outside your organisation

Components, side by side

Cold chain and temperature excursions: components on AWS, Azure and a sovereign or on-prem stack
LayerAWSAzureSovereign / on-prem
Device connectionGateways and loggers buffer readings locally, so a network drop delays data but doesn't lose it.AWS IoT CoreAzure IoT HubAn MQTT broker (Eclipse Mosquitto or EMQX) at each depot
Streaming and detection rulesExcursion thresholds are plain rules owned by quality, not something a model learns.Kinesis Data Streams, LambdaEvent Hubs, Azure FunctionsApache Kafka, with rules in Kafka Streams or Apache Flink
Time-series historyTimestream for LiveAnalytics is closed to new customers; new builds use the InfluxDB option.Amazon Timestream for InfluxDBFabric Real-Time Intelligence (Eventhouse) or Azure Data ExplorerPostgreSQL with TimescaleDB, or InfluxDB
Excursion risk predictionTrained on your own logger history, weather and route data.Amazon SageMaker AIAzure Machine LearningMLflow and Kubeflow on Kubernetes
Routes and timingsAzure Maps Route v1.0 retires on 31 March 2028; build on the current version.Amazon Location Service (Routes)Azure Maps (Route 2025-01-01)Open-source routing on OpenStreetMap data (e.g. OSRM or Valhalla)
Reasoning and summariesEach offers a choice of models.Amazon BedrockMicrosoft FoundryOpen-weight models served with vLLM on your own GPUs, or IONOS AI Model Hub
SOPs, labels and stability data (retrieval)So the pack quotes your SOP and the manufacturer's data, not general knowledge.Bedrock Knowledge BasesFoundry IQ, built on Azure AI SearchOpenSearch, or PostgreSQL with pgvector
Agent runtimeThe original Bedrock Agents closed to new customers on 30 July 2026; new builds use AgentCore.Amazon Bedrock AgentCoreFoundry Agent ServiceAn open-source agent framework (e.g. LangGraph) on Kubernetes
Workflow and eventsStep Functions, EventBridge, SQSLogic Apps or Durable Functions, Event Grid, Service BusTemporal or n8n; Apache Kafka or RabbitMQ
Link to WMS, TMS and quality systemReuse the integration layer you have.API Gateway, plus your existing integration platform if you have oneAPI Management, plus your existing integration platform if you have oneKong, or your existing API gateway
PlatformManaged AWS services, Amazon EKS where containers are neededManaged Azure services, AKS where containers are neededKubernetes on-prem (e.g. OpenShift, Rancher), or IONOS Managed Kubernetes
GuardrailsBedrock GuardrailsFoundry guardrails (Azure AI Content Safety)Open-source guardrails (e.g. NeMo Guardrails, Llama Guard)
Identity, keys, data protectionIAM Identity Center, KMS, MacieEntra ID, Key Vault, PurviewKeycloak or your existing Active Directory; OpenBao or HashiCorp Vault; an HSM
Monitoring and auditEvery alert, hold, pack and decision logged with time, person and reason.CloudWatch, CloudTrailAzure Monitor, Log AnalyticsPrometheus, Grafana, OpenTelemetry
UK data residencyAWS IoT SiteWise isn't offered in London, which is one reason this design doesn't use it.eu-west-2 (London)UK South / UK WestYour own UK data centre, or a UK/EU provider (IONOS AI Model Hub runs in Germany)

On a phone, the table shows the platform you pick. Sovereign / on-prem means open, portable components you can run in your own data centre or with a UK or European provider; IONOS is shown as one example, and others exist. What sovereign cloud means →

Hybrid and on-prem

Many organisations keep core systems and sensitive data on their own servers. This is how the same design works across both.

Stays on-prem

The validated temperature monitoring system, the cold-room sensors and their alarm call-outs, and the WMS stay in each depot, as they are today. A small edge gateway at each depot collects sensor readings and returning tote logger downloads, and runs the precautionary hold rule locally.

Uses cloud AI

The excursion risk model, the evidence agent, route and pack-out suggestions and the long-term history run in the cloud, or on your own sovereign stack. Van telematics usually reach it directly over the mobile network rather than through a depot.

How they connect

Depot gateways publish readings over MQTT with TLS across a private link, such as AWS Direct Connect, Azure ExpressRoute or a site-to-site VPN. Where a depot needs local compute, the gateway and rules can run on AWS Outposts, on Azure Local managed through Azure Arc, or on a small Kubernetes cluster.

If the link drops

Nothing that protects stock depends on the link: the monitoring system keeps alarming and calling out, and the depot gateway still places holds in the WMS. Readings buffer at the gateway and in the loggers, then send on reconnect with their original timestamps, and the evidence pack shows any gap as a gap rather than filling it.

The agents

What each agent may do through its tools, what it may not, and where a person signs off. The limits are enforced by the platform, not the prompt.

Evidence agent

May do

  • Pull the temperature trace, peak and time out of range for the affected location, van or tote
  • Look up the stock, batches and expiry dates that were there, from the WMS
  • Find the label storage conditions and the manufacturer's excursion or stability data
  • Attach the probe's calibration record and the location's mapping report
  • List customers who have already received affected batches
  • Draft a factual summary and open a deviation record in the quality system

May not do

  • Release, reject or destroy stock, or change its status in any way
  • Recommend whether stock is fit for use
  • Contact customers or manufacturers
  • Edit or annotate a temperature reading
  • Close a deviation

Where a person signs offThe Responsible Person decides every disposition and records the reason. Customer notifications and any recall decisions go through the existing quality process. The agent's permissions are enforced by the platform's identity and policy controls, so it can read the systems of record but has no write access to stock status.

Route and pack-out advisor

May do

  • Score tomorrow's routes and totes for excursion risk
  • Suggest re-sequencing drops so fridge lines go first on hot days
  • Suggest a different validated pack-out, such as the summer configuration
  • Flag vans whose fridge units are trending towards failure, for maintenance

May not do

  • Change a route or a pack-out without a planner
  • Suggest a pack-out or vehicle that quality hasn't validated
  • Delay or cancel a delivery to a customer

Where a person signs offA transport planner accepts or rejects every suggestion, and the reason is captured. Only routes, vans and pack-outs on quality's validated list can be offered.

Middleware and integration

The validated temperature monitoring system stays the GDP record. The new platform takes a copy of every reading through its export or API, so a fault in the AI layer can never change or lose a record an inspector will ask for.

The precautionary hold is a rule, not the agent. When a reading crosses quality's threshold, the workflow asks the WMS, through the API layer, to put the affected locations or totes on hold. Holding stock is always the safe direction, and only a person can lift it.

Loggers and vans lose signal. Gateways buffer readings and send them on reconnect, every reading carries the device's own timestamp and a sequence number, and gaps are shown as gaps in the pack, never filled in.

If the cloud platform is down, alarms still work. The existing monitoring system keeps its own alarms and call-out, and the duty team works exactly as it does today.

Process and people

  • A cold-chain duty rota with a clear owner for every alarm, day and night, and a target time to respond.
  • Excursion thresholds and hold rules owned by quality, under change control, with any change validated before use.
  • A validated list of routes, vehicles and pack-outs that the advisor can choose from, reviewed each season.
  • A monthly review of evidence packs with the Responsible Person: what was missing, what was wrong, what to improve.
  • Planners and the duty team trained before go-live, including what the model can't see, such as a door left open at a pharmacy.
  • Self-inspection and the validation file updated to cover the new platform, ready for the next MHRA inspection.

Delivery plan

  1. 3 weeks

    Discovery

    Map today's excursion process, measure the baseline, list every sensor and logger, and check how their data can be reached.

  2. Gate · must be true to passBaseline agreed, data access confirmed, validation approach agreed with quality, DPIA started.

  3. 6–8 weeks

    Pilot

    One depot and its vans, in shadow mode: evidence packs are built alongside the manual process, and the Responsible Person compares them.

  4. Gate · must be true to passPacks complete and correct on real excursions, no reading altered or lost, and quality sign-off.

  5. 4–6 weeks

    Production

    Holds and evidence packs go live at the first depot, with the validation file, monitoring, support and a rollback plan.

  6. Gate · must be true to passValidation complete, SOPs updated, duty team trained, Responsible Person approval.

  7. Ongoing

    Scale

    Add depots one at a time, then turn on route and pack-out suggestions once a season of data is in.

  8. Gate · must be true to passEach depot passes the same gate, and route advice runs in shadow mode for a month first.

Roles and RACI

Who is responsible, accountable, consulted and informed, by activity
ActivityOperations directorResponsible PersonSolutions architectI can fill thisTechnical PMI can fill thisEngineersI can fill thisQA & validationSecurityI can fill this
Business case and benefitsAccountableConsultedConsultedResponsibleInformedConsultedInformed
Target architectureInformedConsultedAccountable and ResponsibleConsultedConsultedConsultedConsulted
Excursion SOP and hold rulesConsultedAccountableConsultedInformedInformedResponsibleInformed
Validation and data integrityInformedConsultedConsultedConsultedResponsibleAccountableConsulted
Build and integrationInformedInformedAccountableResponsibleResponsibleConsultedConsulted
Shadow-mode comparisonInformedAccountableResponsibleConsultedResponsibleConsultedInformed
Go-live decisionAccountableResponsibleConsultedResponsibleInformedResponsibleConsulted
Run, monitor and improveAccountableConsultedConsultedInformedResponsibleConsultedConsulted

Business case and benefits

Operations director
A · Accountable
Responsible Person
C · Consulted
Solutions architect
C · Consulted
Technical PM
R · Responsible
Engineers
I · Informed
QA & validation
C · Consulted
Security
I · Informed

Target architecture

Operations director
I · Informed
Responsible Person
C · Consulted
Solutions architect
A/R · Accountable and Responsible
Technical PM
C · Consulted
Engineers
C · Consulted
QA & validation
C · Consulted
Security
C · Consulted

Excursion SOP and hold rules

Operations director
C · Consulted
Responsible Person
A · Accountable
Solutions architect
C · Consulted
Technical PM
I · Informed
Engineers
I · Informed
QA & validation
R · Responsible
Security
I · Informed

Validation and data integrity

Operations director
I · Informed
Responsible Person
C · Consulted
Solutions architect
C · Consulted
Technical PM
C · Consulted
Engineers
R · Responsible
QA & validation
A · Accountable
Security
C · Consulted

Build and integration

Operations director
I · Informed
Responsible Person
I · Informed
Solutions architect
A · Accountable
Technical PM
R · Responsible
Engineers
R · Responsible
QA & validation
C · Consulted
Security
C · Consulted

Shadow-mode comparison

Operations director
I · Informed
Responsible Person
A · Accountable
Solutions architect
R · Responsible
Technical PM
C · Consulted
Engineers
R · Responsible
QA & validation
C · Consulted
Security
I · Informed

Go-live decision

Operations director
A · Accountable
Responsible Person
R · Responsible
Solutions architect
C · Consulted
Technical PM
R · Responsible
Engineers
I · Informed
QA & validation
R · Responsible
Security
C · Consulted

Run, monitor and improve

Operations director
A · Accountable
Responsible Person
C · Consulted
Solutions architect
C · Consulted
Technical PM
I · Informed
Engineers
R · Responsible
QA & validation
C · Consulted
Security
C · Consulted

R ResponsibleA AccountableC ConsultedI Informed· not involved

Where I'd fit

Option A

Lead the architecture

If there's no architect on the programme, I'd own the design end to end: the sensor and event architecture, the link to your monitoring system, WMS and quality system, and the validation approach agreed with your QA team. I'd report to your programme board and keep the Responsible Person close to every gate.

Option B

Support your architect

If your partner or your own team already has an architect, I'd take on the parts that tend to be hardest: getting reliable data out of loggers, vans and the monitoring system, the evidence agent, and the integration with the WMS. I'd work under their lead and give them a second senior opinion on the rest.

Where this goes wrong

  1. Goes wrong

    The new platform quietly becomes the temperature record, and nobody validated it.

    How the design avoids it

    The existing validated system stays the record. The new platform reads a copy, and anything it adds is validated before use.

  2. Goes wrong

    Readings can't be matched to stock, because sensor IDs, locations and the WMS don't line up.

    How the design avoids it

    Map every sensor to a location and every location to the WMS in discovery. It's dull work, and it's most of the value.

  3. Goes wrong

    The pack reads like a recommendation, and the Responsible Person starts to lean on it.

    How the design avoids it

    The pack states facts and sources only, with no verdict, and a monthly review checks the decisions were made independently.

  4. Goes wrong

    Too many alerts, so the duty team starts ignoring them.

    How the design avoids it

    Thresholds and delays set with quality from the mapping data, alert volumes tracked weekly, and every dismissed alert given a reason.

  5. Goes wrong

    Route advice suggests a pack-out that was never validated, and a planner uses it.

    How the design avoids it

    The advisor can only choose from quality's validated list, and that's enforced in the data, not the prompt.

On the horizon

Changes already announced or under way that affect this design. More in the UK horizon scan.

  1. 31 January 2027
    The analogue phone network switches off

    The national analogue phone (PSTN) switch-off has no further extension. Cold-room alarm diallers and some older monitoring kit still call out over analogue lines. List every alarm path that depends on one, move it to IP or mobile, and test the backup.

  2. 1 January 2027
    The GB HFC quota steps down again

    Under the existing GB F-gas rules, HFC supply falls from 31% to 24% of the baseline. DEFRA's tighter reform is paused but still planned. Use the sensor data to see which cold rooms and van units are struggling, and replace those first.

  3. 2026–2030
    More electric vans

    Zero-emission van targets rise each year, to 70% of new van sales in 2030 under current rules; the government consulted on the 2030 figure in autumn 2026. Electric vans power fridge units differently and change route range. Log temperatures on any electric vans you trial now, so routes and pack-outs can be validated before the fleet changes.

  4. 2029–2033
    2G mobile networks switch off

    EE plans to start in 2029, Vodafone during 2030, and all networks by 2033. Many tote loggers and van telematics units use 2G modules. Ask suppliers which units are 2G-only and plan replacements into the normal hardware cycle.

  5. Ongoing
    Cloud IoT services are being consolidated

    AWS IoT Events ended in May 2026, Timestream for LiveAnalytics and SiteWise Monitor are closed to new customers, and Azure IoT Central retires in September 2029. Keep thresholds, hold rules and excursion logic in your own code and data, so changing a service doesn't mean re-validating everything.

Questions to ask your partner or vendor

Good answers are specific. Vague answers to any of these are worth following up.

Copy them into your next supplier meeting

  1. Which system is the GDP record for temperature, and can the AI ever change it?
  2. How is every sensor and logger matched to a mapped location and to stock in the WMS?
  3. What happens to alarms and holds if the cloud platform or the network is down?
  4. How will the platform be validated, and who in our QA team signs it off?
  5. Can the agent ever change stock status, and where is that enforced?
  6. What does it cost to run per depot per month, including the sensor data?

Planning something like this?

Whether you need someone to lead the design or to support the architect you already have, let's talk it through.

Sam Naseem
Sam NaseemBirmingham, UK · UK & Europe
Available now