Validation overview

The EDI Compliance Check framework performs validation as follows:

  • Envelope validation - The interchange, group, and transaction envelopes are checked for structure and configurable partner content restrictions. Segment, group and transaction counts are also validated.
    • An interchange that fails the envelope validation cannot continue in the process.
    • If the group envelope validation fails, the contents of the group cannot continue but other groups in the interchange continue.
    • If any transaction fails the envelope validation, only that transaction envelope is rejected, and all other transactions continue to be validated.
  • Schema validation - the data in each transaction is compared to the pattern defined by the appropriate version of the standard EDI schema. If the data matches the pattern in the schema, it passes validation and no further processing is necessary.
  • Segment structure validation - if data fails the schema validation step, it is passed through more validation. The transaction is checked for segment structure errors by using an external library to validate the order of the segments. This step checks for errors such as missing mandatory segments, or loops, too many repetitions of a segment or loop, or unrecognized segments.
  • Segment detail validation - if no segment structure errors are found, the data is passed to a segment map to check for data element errors within the segments. This uses the audit log information to collect information about the location and reason for the error. Examples of errors that are detected by this step include the missing data elements, invalid data element values, and data elements that are too long or too short.
  • The EDI Compliance Check framework collects all error information into a detailed error log and creates the acknowledgment. The error log and acknowledgment can report multiple errors if multiple errors are detected. However, there are some situations in which only the first error is reported. For example, if an error is found in the envelope, then detailed validation on the contained transactions is not performed. There are also some cases such as missing loops, or segments, where more error messages are suppressed because they would be misleading as they are the result of recovery attempts from the initial error. An optional JSON report component may also be created with configuration options for Accepted, Full, Never, and Rejected along with Interchange, Group, and Transaction header and trailer images from the inbound document.
Note: Incoming acknowledgments in the interchange are not validated or acknowledged.