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 the EDIFACT DIRDEF message worksDiagram of the UN/EDIFACT DIRDEF Directory definition message. Standards body, directory publisher or software vendor sends it to eDI software, implementer or standards body. It usually starts the exchange. Inside the UNB and UNH envelopes, the directory D.21A requires, in the start of message: BGM (Beginning of message) and DII (Directory identification). 6 conditional segment groups are listed by their trigger segment.How the EDIFACT DIRDEF message worksDirectory definition: who sends it, where it fits and what the directory marks mandatory1 WHERE IT FITSUSUALLY FOLLOWSStarts the exchangeDIRDEFSENDERStandards body,directory publisher orsoftware vendorRECEIVEREDI software,implementer orstandards bodyCONTRL syntax report back, if agreedUSUALLY FOLLOWED BYNo business reply expected2 WHAT DIRECTORY D.21A REQUIRESInterchange: sender and recipient IDsUNB … UNZMessage DIRDEFUNH … UNTSTART OF MESSAGEBGMBeginning of messageDIIDirectory identificationBODY AND SEGMENT GROUPS+ 6 conditional groups, starting with:NADMSGSEGCMPELMCDSBlue box: mandatory segment group. Conditional groups are listed by the trigger segment that starts them; a group is sent only when its data applies.Conditional segments outside groups are not drawn.Structure: mandatory segments and groups in the UN/EDIFACT directory D.21A listing for DIRDEF. Your trading partner's implementation guide adds itsown requirements.
How the EDIFACT DIRDEF message worksDiagram of the UN/EDIFACT DIRDEF Directory definition message. Standards body, directory publisher or software vendor sends it to eDI software, implementer or standards body. It usually starts the exchange. Inside the UNB and UNH envelopes, the directory D.21A requires, in the start of message: BGM (Beginning of message) and DII (Directory identification). 6 conditional segment groups are listed by their trigger segment.How the EDIFACT DIRDEFmessage worksDirectory definition: who sends it, where it fitsand what the directory marks mandatory1 WHERE IT FITSUSUALLY FOLLOWSStarts the exchangeDIRDEFSENDERStandards body,directorypublisher orsoftware vendorRECEIVEREDI software,implementer orstandards bodyCONTRL syntax report back, if agreedUSUALLY FOLLOWED BYNo business reply expected2 WHAT DIRECTORY D.21A REQUIRESInterchange: sender and recipient IDs(UNB … UNZ)Message DIRDEF (UNH … UNT)START OF MESSAGEBGMBeginning of messageDIIDirectory identificationBODY AND SEGMENT GROUPS+ 6 conditional groups, starting with:NADMSGSEGCMPELMCDSBlue box: mandatory segment group. Conditionalgroups are listed by the trigger segment thatstarts them; a group is sent only when its dataapplies. Conditional segments outside groups arenot drawn.Structure: mandatory segments and groups in theUN/EDIFACT directory D.21A listing for DIRDEF.Your trading partner's implementation guide adds itsown requirements.

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.

Expand diagram Download SVG

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

This message DIRDEF Directory definition

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.

Need help with DIRDEF?

ECOM maps, tests and monitors EDIFACT messages for your trading partners and integrates them with your ERP.