Skip to content

Latest commit

 

History

History
168 lines (119 loc) · 4.78 KB

File metadata and controls

168 lines (119 loc) · 4.78 KB

@ediflow/edifact-d20b

EDIFACT D.20B (2020) Standard Definitions

NPM Version License: MIT Package Size

EDIFACT D.20B7 Message TypesMIT LicensedFree


📦 What is this?

This package contains EDIFACT D.20B (2020) standard definitions for use with @ediflow/core.

Includes:

  • Message structures (7 message types)
  • Segment definitions
  • Element definitions
  • Composite definitions
  • Code lists

Version: D.20B (2020) - Latest EDIFACT standard


🚀 Installation

# Install core library (required)
npm install @ediflow/core

# Install this standard package
npm install @ediflow/edifact-d20b

📊 Supported Message Types (7)

Message Type Description Use Case
APERAK Application Error & Acknowledgement Error handling
DESADV Despatch Advice Shipping notifications
IFTMIN Forwarding & Transport Message Transport instructions
INVOIC Invoice Billing documents
ORDERS Purchase Order Order placement
ORDRSP Order Response Order confirmations
RECADV Receiving Advice Goods receipt

📖 Usage Example

import { DIContainer } from '@ediflow/core';

const container = DIContainer.getInstance();
const parseUseCase = container.resolve('ParseEDIUseCase');
const validateUseCase = container.resolve('ValidateMessageUseCase');

// Parse EDIFACT message
const parsed = parseUseCase.execute({
  message: edifactString,
  standard: 'EDIFACT'
});

// Validate against D.20B structure
const validation = validateUseCase.execute({
  message: parsed.message,
  messageType: 'ORDERS',
  version: 'D20B',
  repositoryPath: './node_modules/@ediflow/edifact-d20b/data'
});

if (validation.success) {
  console.log('✅ Valid D.20B ORDERS message!');
}

📁 Package Contents

@ediflow/edifact-d20b/
└── data/
    ├── codes/               # Code lists
    ├── composites.json      # Composite elements
    ├── elements.json        # Data elements
    ├── messages/            # Message structures (7 types)
    │   ├── APERAK.json
    │   ├── DESADV.json
    │   ├── IFTMIN.json
    │   ├── INVOIC.json
    │   ├── ORDERS.json
    │   ├── ORDRSP.json
    │   └── RECADV.json
    └── segments.json        # Segment definitions

Package Size: ~1.34 MB


🎯 When to Use D.20B

Use D.20B if:

  • ✅ Starting new EDIFACT integration (recommended!)
  • ✅ Need latest standard features
  • ✅ Modern logistics & retail
  • ✅ Comprehensive message coverage (196 types)
  • ✅ No legacy system constraints

This is the recommended version for new projects!

Consider other versions if:

  • 🔄 D.01B - Most comprehensive (226 message types)
  • 🔄 D.12A - Alternative comprehensive version (198 messages)
  • 🔄 D.96A - Legacy partner requirements (126 messages)

📦 Related Packages

Core:

Other EDIFACT Standards:


📚 Documentation


🤝 Contributing

Data corrections or additional message types? We welcome contributions!


📄 License

MIT License - see LICENSE


🔗 Links


Made with ❤️ for the EDI community