In Java CAPS, message structures are defined as Object Type Definitions (OTDs). Each OTD consists of the following elements:
Physical Hierarchy – The predefined way in which envelopes, segments, and data elements are organized to describe a particular X12 EDI transaction.
Properties – The characteristics of a data element, such as the length of each element, default values, and indicators that specify attributes of a data part, for example, whether it is required, optional, or repeating.
Included with the ASC X12 PM product is the X12 OTD Library. See the X12 OTD Library User’s Guide for details.
The Transaction Set structure of an invoice sent from one trading partner (TP) to another defines the header, trailer, segments, and data elements required by invoice transactions. The X12 OTD for a specific version includes Transaction Set structures for each of the transactions available in that version. You can use these structures as provided, or customize them to suit your business needs.
eXchange uses OTDs based on X12 message structures to verify that the data in the messages coming in or going out is in the correct format. There is a message structure for each X12 transaction. The list of transactions provided is different for each version of X12.