Skip to content

EDI envelope (UNB, UNH, UNT, UNZ)

The segments that open and close an EDIFACT interchange and each message in it, with counts and references the receiver checks.

Every EDIFACT file is wrapped in two layers:

Segment Role What the receiver checks
UNB Opens the interchange Sender, recipient, date and a control reference
UNH Opens a message Message reference and type, e.g. BAPLIE with its SMDG version
UNT Closes a message Number of segments from UNH to UNT inclusive, and the same reference as UNH
UNZ Closes the interchange Number of messages, and the same reference as UNB

Common mistakes

  • Wrong UNT segment count, usually after a file was edited by hand. Strict receivers reject the whole message.
  • No UNZ at the end, or text after the last segment terminator: the file was probably cut off in transfer, or two files were joined.
  • References that don't match between UNH/UNT or UNB/UNZ.

Related terms

Written by Yuga’s planners for general guidance. Always follow the ship’s approved manuals, class rules and your company’s procedures. All terms