Skip to content

Broken EDIFACT ORDERS Sample: Errors to Find

Broken on purpose: counts, references, a GTIN. A EDIFACT file to test a validator with, explained segment by segment.

A synthetic file: made-up companies, IDs and amounts, safe to load into a test system.

This EDIFACT ORDERS file is broken on purpose to test a validator. UNT01 says 25 segments when there are 26, CNT says 4 lines when there are 3, the UNZ reference does not match UNB, and the GTIN on line 3 has a bad check digit. A receiving system would reject it with a CONTRL.

Standard
EDIFACT ORDERS
Version
D:96A:UN:EAN008
Sent by
Buyer to supplier
Segments
29

sample-edifact-orders-with-errors.edi

From 5012345000015 to 5012345000022. Click a line to jump to its explanation.

Open in EDI Inspector

Broken on purpose. Faults to find:

  • UNT01 is 25, but UNH to UNT holds 26 segments.
  • CNT+2 says 4 lines; the order has 3.
  • UNZ02 is 10046, but UNB05 is 10045.
  • GTIN 5012345100037 on line 3 has a bad check digit.
UNA:+.? 'UNB+UNOC:3+5012345000015:14+5012345000022:14+261009:0815+10045'UNH+ME000001+ORDERS:D:96A:UN:EAN008'BGM+220+PO4500812+9'DTM+137:20261009:102'DTM+2:20261014:102'NAD+BY+5012345000015::9++Northgate Grocers Ltd'NAD+SU+5012345000022::9++Hillside Foods Ltd'NAD+DP+5012345000039::9++Northgate DC Daventry+Unit 4 Royal Oak Way+Daventry++NN11 8QL+GB'CUX+2:GBP:9'LIN+1++5012345100012:EN'PIA+1+HF-OAT-500:SA'IMD+F++:::Rolled Oats 500g'QTY+21:120'PRI+AAA:1.15'LIN+2++5012345100029:EN'PIA+1+HF-GRN-750:SA'IMD+F++:::Honey Granola 750g'QTY+21:60'PRI+AAA:2.40'LIN+3++5012345100037:EN'PIA+1+HF-MUE-1KG:SA'IMD+F++:::Fruit Muesli 1kg'QTY+21:48'PRI+AAA:2.95'UNS+S'CNT+2:4'UNT+25+ME000001'UNZ+1+10046'

ORDERS Sample, Segment by Segment

Every segment and element, with what each code means. The 4 segments with a note are open; open any other to see its elements.

About This ORDERS Sample

These are the faults a CONTRL rejection usually reports: counts that do not match, references that do not pair up, and identifiers that fail their check digit.

Open it in the EDI Inspector to see each one at its segment.

For every segment the standard allows and how retailers use them, read the EDIFACT ORDERS guide. To check a file of your own, paste it into the EDI Inspector, or browse all 22 EDI sample files.

Related Sample Files

Frequently Asked Questions

What is a EDIFACT ORDERS?

This EDIFACT ORDERS file is broken on purpose to test a validator. UNT01 says 25 segments when there are 26, CNT says 4 lines when there are 3, the UNZ reference does not match UNB, and the GTIN on line 3 has a bad check digit. A receiving system would reject it with a CONTRL.

Can I use this EDIFACT ORDERS sample to test my system?

Yes, as a negative test. This file is broken on purpose, so a correct translator or validator should reject it and name each fault: UNT01 is 25, but UNH to UNT holds 26 segments. CNT+2 says 4 lines; the order has 3. UNZ02 is 10046, but UNB05 is 10045. GTIN 5012345100037 on line 3 has a bad check digit.

How do I check my own EDIFACT ORDERS file?

Paste it into the free OrderSync EDI Inspector. It names every segment and element, checks the envelope counts and control numbers, tests GS1 check digits, and points at the exact segment a trading partner would reject. Nothing is uploaded: the file is read in your browser.