EDI Compliance & Validation Question

I am using wm.b2b.edi.convertToValues to check for any edi compliance errors. I am checking an 850 for gs version 3010 (EDIFFSchema.X12.V3050:T850). (See below for sample transaction) I believe the PO1/06 & PO1/07 are conditional. If the 07 is present than an 06 must also be present. (Same for 10 & 11) The error is not showing up in the error array.

Also, I believe the CTT 01 should match the count of PO1’s, shouldn’t that also be an error?

Finally, the NTE segment is a floating segment which can appear anywhere in the transaction but that is showing up as an error and shouldn’t be.

Am I doing something wrong? Is there a better way for compliance checking?

 ISA*00*          *00*          *01*123456789      *01*987654321      *070404*0936*U*00301*000002176*0*P*>~
GS*PO*123456789*987654321*070404*0936*2176*X*003010~
ST*850*0001~
BEG*00*SA*PONUMBER**070404~
ITD************Net 30~
DTM*074*070404~
NTE*GEN*REQUESTED DATE 20070404~
TD5*Z****Truck Prepaid~
PO1*1*384*EA*1.92***Part1A no qual*BP*Part1B w/qual**Part1C no qual~
PO1*2*252*EA*2.39***Part2A no qual*BP*Part2B w/qual**Part2C no qual~
PO1*3*10*EA*24.45***Part3A no qual*BP*Part3B w/qual**Part3C no qual~
PO1*4*24*EA*9.6***Part4A no qual*BP*Part4B w/qual**Part4C no qual~
CTT*3~
AMT*TT*1814.46~
SE*13*0001~
GE*1*2176~
IEA*1*000002176~

I can’t cite chapter and verse in the documentation, so I may not be entirely correct here, but I think that the flat file validation done by the EDI module is not detailed enough to pick up (or omit) the issues you’re describing. It can operate on, for example, valid code lists, required segments and elements and segment order. I don’t believe that it checks for ‘if x is present then y must be present’ (except when y is identified as a subfield of x) or that you have correctly coded your service to count the PO1s and put the result in CTT01. I know it doesn’t correctly handle the floating NTE segment, though this has been promised in a future release. AFAIK this has not yet been delivered.

I use third-party EDI software such as EDISIM from Foresight Corp. to do more sophisticated validation than IS provides with the EDI module. HTH,

Tim

Thanks Tim,

I’m not sure that is entirely true. If I run the same document above thru as 003050 or higher (EDIFFSchema.X12.V3050:T850), the compliance errors show up. (the schema in my original post should be 3010 not 3050)

Snolan,
According to X12 stds documentation ro 3010 850, if PO106 is present, PO107 is required. So technically, PO107 could be present without PO106. In 4010, if either PO106 or PO107 is present, the other is also required. So the validation is probably working as designed.

The CTT count checking can be done via the Compliance Check option on the envelopeProcess service. This service will also perform validation.