Business case and benefits
- Supply chain director
- A · Accountable
- EDI and integration lead
- R · Responsible
- Solutions architect
- C · Consulted
- Technical PM
- C · Consulted
- Engineers
- I · Informed
- Finance
- C · Consulted
- Security
- I · Informed
Every failed or mismatched EDI message diagnosed within minutes, with a proposed fix or a ready-to-send note to the partner's EDI desk. A person approves every resubmission, and a replay can never post the same order or invoice twice.
At a glance
An illustrative scenario. The numbers are typical examples, not a client case study. The cloud services and UK rules were checked on 9 November 2026.
A distributor's EDI runs all day without anyone noticing, until it doesn't. Retail customers send orders (EDIFACT ORDERS, often to the GS1 EANCOM subset) through a VAN. The distributor replies with order responses, sends despatch advices (DESADV, the ASN) as the trucks leave, and invoices (INVOIC) after delivery. Suppliers send the same in reverse, some in X12 (850, 856, 810) over AS2, some in GS1 XML, and a few in CSV over SFTP. A 3PL warehouse sends receipts and stock messages of its own.
A small share of those messages fail, and every failure lands on an EDI analyst. Some fail validation: a missing mandatory segment, a qualifier the map doesn't know, a reused control number. More fail on business rules: a GTIN that isn't in the product master, a price that doesn't match the agreed price, an ASN whose quantities or SSCCs don't match the order, an invoice for goods the warehouse hasn't received. The analyst opens the raw interchange, reads the segments, checks the partner's implementation guide, looks the order up in the ERP and the WMS, and works out whether the fix is ours or theirs.
The cost shows up elsewhere. A rejected order is a missed delivery slot. A late or wrong ASN can mean a retailer's compliance charge or a refused delivery. A rejected invoice is cash that arrives weeks late. And the classic failure of manual fixes is a resubmission that posts the same order or invoice twice.
Agree these, and measure the baseline, before anything is built. Example targets are typical, not promises.
From the exception being raised to the message being successfully processed.
ExampleFrom a day or more to under 2 hours
How often analysts agree with the agent's root cause. Very low means it isn't helping; near 100% can mean nobody is checking.
ExampleStable, and reviewed weekly
Orders, ASNs or invoices posted twice because of a resubmission.
ExampleZero
Exceptions whose root cause has been seen before for the same partner.
ExampleFalling month on month
Despatch advices that missed a retailer's deadline or were rejected.
ExampleDown by half
Invoices rejected by customers, and the days of cash they delay.
ExampleMeasured against last year
Cross-sector rules are on the UK regulation map.
Each partner sets its own message versions, mandatory fields, timings and, often, charges for late or inaccurate ASNs. The agent works from the current version of each guide, held under change control, and every proposed fix is checked against that partner's rules before an analyst sees it.
An EDI invoice is a VAT invoice. If one is rejected, it is corrected at source and re-issued, or put right with a credit note, under finance's control. The agent never changes the amounts, VAT or tax point on an invoice in transit, and never edits a supplier's invoice to make it match.
VAT invoices between VAT-registered businesses must be exchanged as structured e-invoices through Peppol, via a certified access point. PDFs and emails won't count. Existing EDI can continue, but the business must also be able to exchange e-invoices through the new framework, and HMRC plans guidance on EDI and legacy systems in autumn 2027.
Most business-rule failures are identifier problems: an unknown GTIN, a delivery location GLN that has changed, a reused SSCC. The agent checks identifiers against the product and partner master data and proposes corrections there, never in the message.
Orders for home delivery and trade accounts carry names, addresses and phone numbers. That means a light DPIA, collecting only what's needed for diagnosis, masking personal data in prompts and logs where possible, a clear retention period, and a contract that stops providers training their models on your data.
The EDI gateway holds the keys that let partners trust your messages. AS2 private keys live in a vault or HSM, partner certificates are tracked with expiry alerts, access to the gateway is role-based, and the agent has no access to keys or connection settings at all.
Showing AWSAzuresovereign / on-prem services. Switch with the toggle; every diagram and table on this page follows it.
01Channels
02Intake
03Intelligence
04Orchestration
05Systems of record
06People
| Layer | AWS | Azure | Sovereign / on-prem |
|---|---|---|---|
| Transport: AS2, SFTP, VANKeep your VAN mailbox and any Peppol access point with their providers. This layer only collects and delivers. | AWS Transfer Family (AS2 and SFTP) | Logic Apps AS2 (v2) with an Integration Account | OpenAS2, or your existing EDI gateway |
| Translation and mappingB2B Data Interchange supports X12 only, and check its region list before relying on it for UK residency. EDIFACT is widely used across Europe. | AWS B2B Data Interchange for X12; your existing translator for EDIFACT | Logic Apps X12 and EDIFACT actions with an Integration Account | Your existing EDI translator, or open-source parsers (e.g. Smooks) |
| Raw message archiveStore every interchange exactly as received or sent, before anything else touches it. | Amazon S3 with Object Lock | Blob Storage with immutable storage | Ceph with object lock, or IONOS S3 Object Storage |
| Canonical message modelOne internal shape for an order, ASN and invoice, whatever the partner's format. Maps translate to and from it. | JSON schemas in your code repository | JSON schemas in your code repository | JSON schemas in your code repository |
| Reasoning and draftingAWS and Azure both offer a choice of models, including Claude. On-prem and sovereign options run open-weight models. | Amazon Bedrock | Microsoft Foundry | Open-weight models served with vLLM on your own GPUs, or IONOS AI Model Hub |
| Partner knowledge (retrieval)Indexed from partners' implementation guides, your mapping specs, GS1 and EANCOM documentation, and past resolved exceptions. | Bedrock Knowledge Bases | Foundry IQ, built on Azure AI Search | OpenSearch, or PostgreSQL with pgvector |
| Agent runtimeThe original Bedrock Agents closed to new customers on 30 July 2026; new builds use AgentCore. | Amazon Bedrock AgentCore | Foundry Agent Service | An open-source agent framework (e.g. LangGraph) on Kubernetes |
| Exception and replay workflowReplay is a fixed workflow step, not something the agent does. | AWS Step Functions | Logic Apps or Durable Functions | Temporal |
| Events and queues | Amazon EventBridge, SQS (with dead-letter queues) | Event Grid, Service Bus (with dead-letter queues) | Apache Kafka or RabbitMQ |
| Idempotency storeKeyed on sender, interchange control reference and business document number. | Amazon DynamoDB | Azure Cosmos DB | PostgreSQL |
| Link to ERP and WMSReuse the integration layer you have. Don't buy a new one for this. | API Gateway, plus your existing integration platform | API Management, plus your existing integration platform | Kong or your existing API gateway, plus your existing integration platform |
| Human reviewAnalysts approve where they already work, with the raw segments and the proposed fix side by side. | In the EDI team's existing monitoring console or service desk | In the EDI team's existing monitoring console or service desk | In the EDI team's existing monitoring console or service desk |
| Guardrails | Bedrock Guardrails | Foundry guardrails (Azure AI Content Safety) | Open-source guardrails (e.g. NeMo Guardrails, Llama Guard) |
| Identity, keys, certificatesTrack every partner certificate's expiry. The agent never sees keys. | IAM Identity Center, KMS, Secrets Manager | Entra ID, Key Vault (holds the Integration Account's AS2 keys) | Keycloak or your existing Active Directory; OpenBao or HashiCorp Vault; an HSM |
| Monitoring and auditLog every diagnosis, every approval and every replay against the interchange reference. | CloudWatch, CloudTrail | Azure Monitor, Log Analytics, Integration Account B2B tracking | Prometheus, Grafana, OpenTelemetry |
| UK data residencyIONOS AI Model Hub runs in German data centres: EU, not UK, residency. | eu-west-2 (London) | UK South / UK West | Your own UK data centre, or a UK or EU provider |
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 →
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 ERP, the WMS, the master data and, often, the EDI translator stay where they are. Many distributors run these on their own servers or with a managed EDI provider, and nothing in this design moves them.
Uses cloud AI
The exception agent, the partner-guide index and the replay workflow can run in AWS or Azure UK regions, or on your own servers with open-weight models if partner agreements keep message data in your estate.
How they connect
A private link (AWS Direct Connect or Azure ExpressRoute) and the API layer. The translator publishes exception events to the queue. Only the failing message, its error and the related records go to the agent, and proposed fixes come back as tasks, never as direct writes.
If the link drops
EDI keeps flowing, because transport, translation and posting don't depend on the AI. Exceptions queue on your side and analysts work them as they did before, and the agent catches up on diagnosis when the link returns.
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.
EDI exception agent
Where a person signs offAn EDI analyst approves every replay, every corrected message and every note to a partner. Mapping changes go through the integration team's change control and test pack. Anything touching an invoice goes to finance. The agent's permissions are enforced by the platform's identity and policy controls, not by instructions in a prompt.
Think of EDI as layers, because each one fails differently. Transport: AS2 over HTTPS with a signed MDN as the receipt, SFTP, or a VAN mailbox. Envelope: the EDIFACT UNB and UNH headers, or the X12 ISA, GS and ST headers, with their control numbers. Translation: EDIFACT, X12 or GS1 XML turned into one canonical internal shape. Business validation: does the GTIN exist, does the price match, is there an open order. Posting: into the ERP or WMS through the API layer. The agent's first job is to say which layer failed.
Store first, then process. Every interchange is written to an immutable archive exactly as received or sent, with a fingerprint, before translation starts. Every later step refers back to it. That makes diagnosis possible weeks later, and it means a replay always starts from what the partner actually sent, not from someone's edited copy.
Idempotency is what makes replay safe. Each message carries a key built from the sender, the interchange control reference and the business document number: the order number and version, the ASN's shipment number, the supplier and invoice number. Before posting, the workflow checks the key. If it has already been posted, the replay is recorded and does nothing. Outbound corrections get new control numbers and use the message function the partner's guide allows (original, replacement or cancellation), so the partner's own duplicate checks work too.
Receipts are not the same as acceptance. An AS2 MDN proves the partner's server received the file. A CONTRL, 997 or 999 says whether the syntax was accepted. Only a business response, such as an order response or a remittance, says the content was. The workflow tracks all three with timers, so a missing acknowledgement becomes an exception instead of a surprise a week later.
Everything is queued, with dead-letter queues for what can't be processed. If the ERP is down, inbound orders wait safely and post in order when it returns. If the agent is down or switched off, exceptions go straight to analysts exactly as they do today. The EDI flow itself never depends on the AI.
Export three months of exceptions, classify them by layer and root cause, measure time to resolve, and check access to the archive, translator logs and partner guides.
Gate · must be true to passBaseline agreed, top exception types and partners chosen, archive and log access confirmed, DPIA started.
Inbound orders and outbound ASNs for the five busiest retail customers, in shadow mode: the agent diagnoses and proposes, analysts work as normal, and the two are compared. Idempotency checks go live first, before any automated replay.
Gate · must be true to passDiagnosis agreement within agreed limits, zero duplicate postings in replay testing, and EDI lead sign-off.
Proposals and staged replays go live for the pilot partners, with monitoring, the approval rules and a rollback plan.
Gate · must be true to passMonitoring, support model, approval rules and analyst training in place.
Add invoices (with finance), supplier flows and the 3PL one at a time, then use the same pipeline when Peppol e-invoicing arrives.
Gate · must be true to passEach new flow passes the same pilot gate.
| Activity | Supply chain director | EDI and integration lead | Solutions architectI can fill this | Technical PMI can fill this | EngineersI can fill this | Finance | SecurityI can fill this |
|---|---|---|---|---|---|---|---|
| Business case and benefits | Accountable | Responsible | Consulted | Consulted | Informed | Consulted | Informed |
| Target architecture | Informed | Consulted | Accountable and Responsible | Consulted | Consulted | Informed | Consulted |
| Idempotency and replay design | Informed | Consulted | Accountable | Consulted | Responsible | Consulted | Consulted |
| Approval rules and partner templates | Informed | Accountable and Responsible | Consulted | Consulted | Informed | Consulted | Informed |
| Invoice correction rules | Informed | Consulted | Consulted | Informed | Informed | Accountable and Responsible | Informed |
| Go-live decision | Accountable | Responsible | Consulted | Responsible | Informed | Consulted | Consulted |
| Run, monitor and improve | Informed | Accountable | Consulted | Consulted | Responsible | Informed | Consulted |
R ResponsibleA AccountableC ConsultedI Informed· not involved
Option A
If there's no architect on the programme, I'd own the design end to end: the layers, the canonical model, the idempotency and replay design, the agent's permissions, and the links to your ERP and WMS. Order and supply platforms live or die by their EDI, because EDI is where your platform meets everyone else's, so the replay and reconciliation design comes first. I'd run the gates and report to your programme board.
Option B
If your partner or your own team already has an architect, I'd take on the EDI layer, the exception agent and the replay workflow under their lead, and give them a second senior opinion on the rest.
Goes wrong
The agent "fixes" a message by editing its contents, and the ERP now holds an order the customer never sent.
How the design avoids it
Partner content is never edited. Fixes go into master data, cross-references or mappings, and the stored original is replayed.
Goes wrong
A resubmission posts the same order or invoice twice.
How the design avoids it
Idempotency keys checked before every posting, so a replay of something already posted does nothing.
Goes wrong
An AS2 certificate expires on a Friday night and a major customer's orders stop.
How the design avoids it
A certificate register with alerts well ahead of expiry, a renewal runbook agreed with each partner, and monitoring for missing MDNs.
Goes wrong
The same exception is cleared by hand every day for months.
How the design avoids it
Repeat causes counted by partner and root cause, with a monthly review that fixes them at the source.
Goes wrong
A partner receives an off-script email that promises something the business can't do.
How the design avoids it
Approved templates only, and an analyst edits and sends every note.
Changes already announced or under way that affect this design. More in the UK horizon scan.
If partners reach your AS2 endpoint over HTTPS with a public certificate, automate its renewal now, and keep the AS2 signing and encryption certificates in the same register.
Keep one canonical invoice model, so the same invoice can go out as EDIFACT, X12 or Peppol. Choose a certified Peppol access point provider rather than building one.
Measure the days lost to rejected invoices now. Faster fixes for invoice exceptions will matter more once terms are capped.
If a managed provider runs your EDI or VAN, expect new duties on them and update your contracts and supplier assurance.
Good answers are specific. Vague answers to any of these are worth following up.
Whether you need someone to lead the design or to support the architect you already have, let's talk it through.