EDIFACT message guide · Master data
DIRDEF Directory definition
The UN/EDIFACT message that transfers the contents of a UN/EDIFACT or ANSI ASC X12 directory set, or parts of it.
- Sent by
- Standards body, directory publisher or software vendor
- Received by
- EDI software, implementer or standards body
- Standard
- UN/EDIFACT · Batch message
- X12 equivalent
- No direct equivalent
What is the EDIFACT DIRDEF message?
DIRDEF is the UN/EDIFACT directory definition message. The directory defines it as a message that transfers the contents of a UN/EDIFACT or ANSI ASC X12 directory set, or parts of it.
Directories define the messages, segments, composites, data elements and code lists of a standard release. Transferring them in a structured message lets EDI software load a new release, such as a new EDIFACT directory, without manual keying, so mapping tools and translators can validate against it. It supports both standards.
How to read this diagram: the top row shows who sends DIRDEF, to whom, and which messages usually come before and after it. The lower part shows what the directory D.21A itself requires: the envelopes around DIRDEF and the segments and segment groups it marks mandatory. Conditional groups are listed by their trigger segment rather than drawn in full. This is the directory's minimum, not a trading partner's requirement: a message implementation guide, such as an industry subset or a partner’s own guide, usually makes some conditional groups mandatory, restricts the codes and may use an older directory.
When it is used
- Distributing a new directory release
- Loading directory definitions into EDI software
- Exchanging partial directory updates
Where it fits in the message flow
No other message routinely comes directly before or after DIRDEF; it is exchanged when the business event occurs. If the partners agree, the receiver confirms each interchange with a CONTRL syntax and service report.
Structure
Mandatory segments in DIRDEF (directory D.21A)
In UN/EDIFACT directory D.21A, the DIRDEF message has 50 segment positions arranged in 13 segment groups. These are the segments and segment groups marked mandatory at message level, in order; a mandatory group is shown with the segment that starts it. Segments inside conditional groups are needed only when the group is used. This is the directory’s requirement, not your trading partner’s: each partner’s message implementation guide names the directory it uses, often an older one such as D.96A or D.01B where the structure can differ, makes some conditional segments mandatory and restricts the codes.
- UNH
- BGM
- DII
- UNT
Practical example
DIRDEF in practice
A translator vendor prepares support for a new EDIFACT directory. It loads the release definitions, received as directory data, into its tool, which generates the message, segment and code list definitions customers use for mapping and validation.
Implementation
Implementation considerations for DIRDEF
- Identify the directory release and version precisely.
- Validate loaded definitions against the published directory.
- Keep older directories available, since partners use many versions.
- Track code list updates between releases.
How ECOM helps
Automate DIRDEF with ECOM
Solution
EDI Integration
Exchange X12 and EDIFACT documents with partners and integrate them directly with your ERP.
Service
Mapping and Translation
Map development and maintenance for X12, EDIFACT, XML, JSON, flat files and ERP formats.
Solution
B2B Integration
Connect every customer, supplier, carrier and bank across EDI, API, file and portal channels.
Compare X12 and EDIFACT, or see answers to general questions in the EDI FAQ.
Related messages
Related master data messages
Need help with DIRDEF?
ECOM maps, tests and monitors EDIFACT messages for your trading partners and integrates them with your ERP.