Markdown Editor

B2B EDI and File Transfer Design Template (X12, EDIFACT, AS2, AS4)

Partner landscape, X12 and EDIFACT versions, AS2, AS4, SFTP and API transports, canonical mapping, TA1/997/999/CONTRL acks, MFT rules, certificates, onboarding

ArquitecturaCompletaAS2 (RFC 4130); AS4 Profile of ebMS 3.0; ASC X12 and UN/EDIFACT (structure only)b2bedifiletransferdesign

Cómo usar: Use it when an organisation exchanges EDI or files with suppliers, carriers, customers or banks, or migrates to a new B2B provider. Fill the partner landscape and the standards and versions inventory first, then transports and the acknowledgement model. The main pitfall is treating a transport receipt such as an AS2 MDN as proof that the partner accepted the business document.

Vista previa

B2B, EDI and File Transfer Design: [Programme or B2B platform name]

Design for business-to-business integration with external trading partners and for managed file transfer: the trading partner landscape, message standards and versions (ASC X12, UN/EDIFACT, industry XML and APIs), transport protocols (AS2, AS4, SFTP, HTTPS APIs, value-added networks), the B2B platform, mapping and canonical formats, acknowledgements (X12 TA1, 997 and 999, EDIFACT CONTRL, AS2 MDN, AS4 receipts), file transfer scheduling, keys and certificates, partner onboarding and testing, error handling and service levels, archiving and non-repudiation, and the operating model. AS2 follows RFC 4130; AS4 follows the OASIS AS4 Profile of ebMS 3.0 Version 1.0. X12 and EDIFACT are described by structure only. Replace every [bracketed] value and every row marked Example.

Document control

FieldValue
Document ID[B2B-001]
Platform or programme[Name]
B2B platform and provider[Product or managed service]
Partner communities[Suppliers, carriers, customers, banks, marketplaces]
Version[0.1]
Status[Draft / In review / Approved / Superseded]
Owner[@b2b-lead]
Approvers/reviewers[@integration-architect], [@security-architect], [@supply-chain-lead], [@finance-systems-lead]
Classification[Internal / Confidential]
Last updatedYYYY-MM-DD
Related documents[Integration strategy], [Partner agreements], [Implementation guides]

Approvals

RoleNameDecisionDate
Integration architecture[@name][Approve / Approve with conditions / Reject]YYYY-MM-DD
Security[@name][Decision]YYYY-MM-DD
Supply chain business owner[@name][Decision]YYYY-MM-DD
Finance systems[@name][Decision]YYYY-MM-DD

Revision history

VersionDateAuthorChange summary
0.1YYYY-MM-DD[@name]First draft
1.0YYYY-MM-DD[@name]Example: Approved; AS2 primary, SFTP secondary, in-house translator
1.1YYYY-MM-DD[@name]Example: Added AS4 for European e-invoicing partners

Contents

1. Scope, drivers and context

1.1 Drivers

IDDriverImplication
B2D-001 (Example)Onboard 200 more suppliers in two yearsSelf-service onboarding, reusable maps, automated testing
B2D-002 (Example)Current EDI provider contract ends in YYYYMigration of partner connections without disruption
B2D-003 (Example)European customers mandate structured e-invoicingAS4 or network access point capability
B2D-004 (Example)Late detection of missing ship notices causes receiving delaysAcknowledgement tracking and alerts per document
[B2D-NNN][Driver][Implication]

1.2 Scope

In scopeOut of scope
Example: EDI with suppliers, carriers and marketplacesConsumer-facing APIs (see API Management Platform Design, architecture/api-management-platform-design)
Example: Managed file transfer for bank, payroll and logistics filesInternal batch jobs between internal systems only
Example: Partner APIs used as an alternative to EDIPartner portal web screens for manual entry
[Item][Item]

1.3 Context

The context view shows partner communities, the B2B edge, the platform components and the internal systems they feed.

2. Trading partner landscape

CommunityPartnersStandard usedTransportMonthly documentsWho sets the guide
North American suppliers (Example)80X12AS245,000Us
European suppliers (Example)40EDIFACTAS2, SFTP18,000Us
Carriers (Example)6X12 and carrier APIsSFTP, HTTPS60,000Carrier
Marketplaces (Example)3Marketplace JSON APIsHTTPS120,000Marketplace
Banks (Example)2ISO 20022 XML filesSFTP1,500Bank
[Community][Count][Standard][Transport][Volume][Owner]

2.1 Partner tiers

TierCriteriaService levelOnboarding path
Strategic (Example)Top 20 by spend or revenueMonitored 24x7, named contactFull EDI with testing support
Standard (Example)Regular EDI partnersBusiness hours supportSelf-service onboarding with test kit
Small (Example)Fewer than 50 documents a monthBest effortWeb form or spreadsheet upload through the portal

3. Message standards and versions

3.1 Standards in use

StandardVersions in useEnvelope structureNotes
ASC X12 (Example)004010, 005010Interchange (ISA to IEA), functional group (GS to GE), transaction set (ST to SE)X12 publishes one release a year; 008070 became available in March 2026 and 008080 is in balloting; check x12.org for the current release
UN/EDIFACT (Example)D.96A, D.01BOptional service string advice (UNA), interchange (UNB to UNZ), optional functional group (UNG to UNE), message (UNH to UNT)Directories published by UNECE; check unece.org for the latest directory
ISO 20022 (Example)pain.001, camt.053 versions per bankXML message with business application header where usedBank-specific implementation guides
Industry XML or JSON APIs (Example)Partner versionsPartner-definedMarketplace and carrier APIs
[Standard][Versions][Envelope][Notes]

3.2 Documents exchanged

Business processX12 transaction setEDIFACT messageDirectionBusiness owner
Purchase order (Example)850ORDERSOutbound to supplierProcurement
Order response (Example)855ORDRSPInbound from supplierProcurement
Order change (Example)860ORDCHGOutboundProcurement
Advance ship notice (Example)856DESADVInboundWarehouse
Invoice (Example)810INVOICInboundAccounts payable
Remittance advice (Example)820REMADVOutboundAccounts payable
Carrier status (Example)214IFTSTAInbound from carrierLogistics
Inventory advice (Example)846INVRPTOutbound to marketplace or customerSales
[Process][Set][Message][Direction][Owner]

3.3 Internal implementation guides

Publish one implementation guide per document and standard (for example "Purchase order, X12 005010, v1.2") that states which segments and elements the organisation sends or expects, code lists, mandatory business rules and examples. Partners conform to the guide; exceptions are recorded in the partner profile. Keep the guides under version control next to the maps.

4. Transport protocols

ProtocolBasisStrengthsWeaknessesUse for
AS2RFC 4130 (July 2005): MIME over HTTP or HTTPS with S/MIME signing and encryption and signed Message Disposition Notifications (MDN)Mature, widely supported by retail and supply chain, signed receipts give non-repudiationBoth sides host endpoints; certificate exchange per partner; push onlyDefault for EDI partners in tier 1 and 2
AS4OASIS AS4 Profile of ebMS 3.0 Version 1.0 (OASIS Standard, January 2013): web services messaging with WS-Security, receipts and optional pullSigned receipts, pull mode lets a partner without an inbound endpoint collect messages, used by e-invoicing and energy networksMore complex to configure than AS2Network access points, partners that require it
SFTPSSH File Transfer Protocol over SSH (the SFTP draft never became an RFC; SSH itself is RFC 4251 to RFC 4254)Simple, universal, key-based authenticationNo business-level receipt; file naming and completeness rules neededBanks, carriers, small partners, bulk files
FTPSFTP over TLSSupported by legacy partnersFirewall complexity with data channelsLegacy only, no new connections
HTTPS APIOpenAPI-described REST or partner APIsReal time, rich error responsesPartner-specific; no standard receiptMarketplaces, carriers, modern partners
Value-added network (VAN)Provider mailbox and interconnectsOne connection reaches many partnersPer-document fees; provider dependencyPartners reachable only through a VAN

4.1 Transport rules

IDRule
TRP-001 (Example)AS2 messages are signed and encrypted; signed MDN requested; synchronous MDN by default, asynchronous for partners that require it
TRP-002 (Example)SFTP uses key-based authentication only; passwords disabled; one account per partner, chrooted to its own folders
TRP-003 (Example)Files are written under a temporary name and renamed when complete, or accompanied by a checksum or trigger file
TRP-004 (Example)No plain FTP or unencrypted HTTP
TRP-005 (Example)Inbound endpoints are reachable only through the B2B edge; outbound connections leave through the egress allow list
[TRP-NNN][Rule]

5. Platform architecture

ComponentResponsibilityChoice (Example)
Partner managementPartner profiles, identifiers (ISA and GS IDs, UNB IDs, AS2 IDs), certificates, agreementsB2B platform module
Communication adaptersAS2, AS4, SFTP, HTTPS endpoints and clientsB2B gateway in the perimeter network
Translator and mapperParse, validate, map EDI to and from internal formatsB2B platform with maps in version control
Managed file transferScheduling, routing, checksums, retries, file auditMFT product shared with internal file flows
Tracking and archiveDocument-level status, search by business reference, retentionB2B platform plus archive storage
Integration to internal systemsCanonical messages and APIs to ERP, WMS, TMSIntegration platform per the Integration Strategy
Partner portalOnboarding forms, test results, web entry for small partnersPortal module or developer portal
OptionFitNotes
Managed EDI service (outsourced)Small teams, many partners on VANsCheck contract rights to maps, data and exit assistance
Licensed B2B platform run in-houseLarge volumes, strict controlNeeds EDI skills and 24x7 operations
iPaaS with B2B featuresOrganisations already on the iPaaSCheck protocol and standard coverage and per-document pricing

Record the choice in an ADR and score options in Build vs Buy Analysis (architecture/build-vs-buy-analysis).

6. Mapping and canonical formats

RuleDetail
Canonical formatsOne per document type (order, order response, ship notice, invoice), owned by the domain team, versioned
Map reuseOne map per standard and version using the internal implementation guide; partner deviations handled by profile parameters, not copies of the map
Code listsUnits, currencies, countries and party identifiers (GLN, DUNS) translated in reference tables
Validation layersSyntax (standard), implementation guide rules, business rules (prices, items, duplicates) in that order
Duplicate detectionInterchange control number per partner, plus business key (purchase order number and version)
Map testingGolden test files per map run in CI; regression run before every map release
Change controlMap changes follow the platform change process and are announced to affected partners

7. Acknowledgements and reconciliation

LevelMechanismQuestion answeredTiming target (Example)
TransportAS2 signed MDN; AS4 receipt signal; SFTP successful close and checksumDid the message arrive intact at the partner's endpoint?Seconds (synchronous MDN)
InterchangeX12 TA1 interchange acknowledgment; EDIFACT CONTRL at interchange levelWas the envelope readable?Within 1 hour
Syntax and implementationX12 997 functional acknowledgment (syntax); X12 999 implementation acknowledgment (syntax and implementation guide rules, common in health care); EDIFACT CONTRL at group or message levelWere the transaction sets or messages accepted, accepted with errors, or rejected?Within 4 hours
BusinessX12 855 or EDIFACT ORDRSP order response; application advice where agreedDid the partner accept the order, and on what terms?Per partner agreement, for example 24 hours

Reconciliation: a daily report per partner lists documents sent, receipts received, acknowledgements outstanding and rejected documents; the business owner reviews exceptions. Overdue acknowledgements create a ticket for the partner manager.

8. Managed file transfer and scheduling

ItemRule (Example)
Naming[partner]_[doctype]_[yyyymmddhhmmss]_[sequence].[ext]
CompletenessWrite to a temporary name, then rename; or check a SHA-256 checksum file before pickup
PickupEvent-driven pickup where the platform supports it; polling every [5 minutes] otherwise
DuplicatesFile hash and name stored for [30 days]; repeated files quarantined and reported
SchedulingCalendar-aware schedules with time zone per partner; cut-off times for bank files
RetriesOutbound transfer retried [5] times with increasing delay, then alert
Large filesCompression and resumable transfer above [1 GB]
Encryption at restPartner folders encrypted; OpenPGP encryption of payload where the partner requires it
CleanupFiles removed from transfer folders after successful processing and archiving
Flow IDPartnerDirectionScheduleCut-offSizeDownstream
MFT-001 (Example)Bank AOutbound payment fileWeekdays 14:00 local15:002 MBPayments
MFT-002 (Example)Bank AInbound statementDaily 06:00Not applicable5 MBTreasury
MFT-003 (Example)Carrier BInbound status filesEvery 15 minutesNot applicable50 KBTMS
[MFT-NNN][Partner][Direction][Schedule][Cut-off][Size][System]

9. Security, keys and certificates

ControlRule
AS2 and AS4 certificatesSeparate signing and encryption certificates; from a public or agreed CA, or self-signed only where the partner agreement allows; key length and algorithms per the current security policy
Certificate renewalInventory of every partner certificate with expiry; renewal starts [60 days] before expiry; overlap period with both certificates accepted
SFTP keysPartner public keys registered per account; host key fingerprint shared out of band; keys rotated at least every [2 years]
Transport encryptionTLS 1.2 or later on HTTPS endpoints; modern SSH algorithms only
Payload encryptionS/MIME for AS2, WS-Security for AS4, OpenPGP for files where required
NetworkB2B edge in the perimeter network; inbound allow lists per partner where practical
Data protectionInvoices and remittances contain bank details and sometimes personal data; access to tracking screens is role-based and logged
Supplier assuranceStrategic partners complete a security questionnaire (compliance/supplier-security-assessment)

10. Partner onboarding and testing

10.1 Partner profile

FieldExample
Partner IDPTN-0042 (Example)
Legal name and business contact[Name], [@contact]
Technical contact and escalation[Name], [Phone], [Email]
IdentifiersISA qualifier and ID, GS application code, AS2 ID, GLN
Standard and version per documentX12 005010 for 850, 855, 856, 810
Transport and endpointsAS2, URL, certificates, MDN mode
Acknowledgement expectations997 within 4 hours, 855 within 24 hours
Special rulesDeviations from the internal guide
Go-live date and statusYYYY-MM-DD, Live

10.2 Onboarding steps

StepActivityOwnerExit criterion
1Business request and agreement, including trading partner agreement terms for EDIPartner managerSigned agreement
2Profile and identifiers exchangedB2B analystProfile complete
3Connectivity test (AS2 or SFTP), certificate exchangeB2B engineerTest message and MDN or file exchange succeed
4Document tests with the partner using test indicators in the envelopeB2B analyst and partnerAll test cases pass
5Business validation in the test ERPBusiness ownerDocuments post correctly
6Go-live with monitoring for the first [10] documentsB2B analystNo unresolved errors after [2 weeks]

10.3 Test cases per document

Test IDCaseExpected result
B2T-001 (Example)Valid invoice (810) with three lines997 accepted, invoice posted
B2T-002 (Example)Invoice (810) quoting an unknown purchase order number997 accepted, invoice held with a business rejection reason sent to the supplier
B2T-003 (Example)Invoice (810) with a syntax error in a mandatory segment997 rejected with error detail
B2T-004 (Example)Duplicate interchange control numberQuarantined, alert
B2T-005 (Example)Expired partner certificateMessage refused, alert to partner manager
[B2T-NNN][Case][Expected]

11. Error handling, monitoring and service levels

Error classExampleDetectionOwnerTarget to resolve (Example)
TransportPartner endpoint down, MDN not receivedPlatform alertB2B operationsRetry automatically; escalate after 1 hour
Envelope and syntaxInvalid ISA, segment errorsTranslator validationB2B operations with partner4 business hours
MappingMap exception after a partner changeTranslator errorB2B analyst1 business day
Business ruleUnknown item, price mismatchValidation or ERP rejectionBusiness ownerPer process, for example 1 business day
Missing documentExpected ship notice not receivedReconciliation in section 7Partner managerContact partner the same day
MeasureTarget (Example)
Platform availability for inbound endpoints99.9 % per month
Inbound document processed to ERP95 % within 15 minutes of receipt
Outbound document delivered99 % within 15 minutes of creation
First-time-right rate per partnerAbove 98 %
Onboarding lead time, standard tierBelow 10 working days

Monitoring views: document status by business reference (order number, invoice number), partner health, certificate expiry and acknowledgement backlog. Link signals to Observability Specification (ops/observability-spec).

12. Archiving, audit and non-repudiation

ItemRule (Example)
What is archivedRaw inbound and outbound payload as exchanged, signed MDNs and receipts, acknowledgements, mapped canonical message, processing log
RetentionPer tax and contract rules for each country, for example invoices [10 years]; confirm with finance and legal
IntegrityWrite-once storage or hash chain; signatures and certificates kept with the message so that they can be verified later
SearchBy partner, document type, business reference, control number, date
AccessRead-only, role-based, logged
DisposalDeletion at end of retention with approval and log
Non-repudiationSigned message plus signed receipt with message integrity check, stored together, prove origin and receipt

13. Operating model

ActivityPartner managerB2B analystB2B platform teamBusiness ownerSecurity
Partner agreement and relationshipA, RCICI
Partner profile and onboardingCA, RCCC
Implementation guides and mapsIA, RCCI
Platform operation and upgradesICA, RIC
Certificate and key lifecycleIRA, RIC
Business rejectionsCCIA, RI
Incident with partner impactRRA, RCC

14. Risks and decisions

IDTypeDescriptionResponseOwner
RSK-001 (Example)RiskMigration from the current provider breaks partner connectionsPartner-by-partner cutover in waves, parallel run, rollback per partner (project/cutover-plan)@b2b-lead
RSK-002 (Example)RiskCertificate expiry stops a strategic partnerInventory, alerts at 60, 30 and 7 days, overlap periods@b2b-platform
RSK-003 (Example)RiskFew staff with EDI mapping skillsTraining, documented maps, provider support contract@b2b-lead
RSK-004 (Example)RiskPartner changes its guide without noticeAgreement clause requiring [30 days] notice; regression tests@partner-manager
DEC-001 (Example)DecisionAS2 as default transport for EDI partnersADR-B2B-001@integration-architect
DEC-002 (Example)DecisionCanonical document formats between platform and ERPADR-B2B-002@integration-architect
[ID][Type][Description][Response][@owner]

15. Glossary and references

15.1 Glossary

TermMeaning
InterchangeOuter envelope of an EDI transmission between two partners
Functional groupGroup of documents of one type inside an interchange
Transaction set (X12) or message (EDIFACT)One business document, such as an order
Implementation guideDocument stating how a standard is used between partners
MDNMessage Disposition Notification, the AS2 receipt
VANValue-added network, a provider that relays EDI between partners
MFTManaged file transfer
GLNGlobal Location Number, a GS1 identifier for parties and locations
Non-repudiationEvidence that prevents a party from denying it sent or received a message

15.2 References

ReferenceVersion or date checkedUse
RFC 4130, MIME-Based Secure Peer-to-Peer Business Data Interchange Using HTTP, Applicability Statement 2 (AS2), IETFJuly 2005AS2 transport and MDN
AS4 Profile of ebMS 3.0 Version 1.0, OASISOASIS Standard, January 2013AS4 transport and receipts
SSH File Transfer Protocol, IETF draft-ietf-secsh-filexfer (expired draft); RFC 4251 to RFC 4254 for SSHChecked YYYY-MM-DDSFTP
ASC X12 standards and acknowledgements (TA1, 997, 999), x12.orgRelease per section 3.1Envelope and transaction set names only
UN/EDIFACT directories and CONTRL message, UNECEDirectory per section 3.1Envelope and message names only
ISO 20022, iso20022.orgMessage versions per bank guideBank files
[Partner implementation guides][Version][Use]

Standard and licence note

Based on public specifications: RFC 4130 (AS2) and the SSH RFCs from the IETF, and the AS4 Profile of ebMS 3.0 Version 1.0 from OASIS. Structure aligned with ASC X12 and UN/EDIFACT: ASC X12 standards are copyrighted by ASC X12, and this template names envelopes, transaction set numbers and acknowledgement types only, with no segment, element or code list content reproduced; UN/EDIFACT message names come from the directories published by UNECE. Product and network names are trademarks of their owners; this template is not affiliated with or endorsed by them. This template is original text written for this collection. Check the current official version of every standard, directory and release before use. Template licence: MIT.

Plantillas relacionadas