X12 EDI Connector 2.6 - Message Structure Hierarchy - Mule 4

Use this connector to read or write X12 documents into (or from) the canonical EDI message structure. This structure is a hierarchy of Java Maps and Lists. You use either DataWeave or code to manipulate them. Each transaction structure is defined in the schemas.

The message itself contains the following keys, some of which apply only to either the read operation or the write operation, as indicated:

Key Name Description

Delimiters

An optional set of delimiters used in the message. If used in a read operation, the delimiters are based on the most recent interchange processed by a read operation. If used for a write operation, the delimiters override the values in the module configuration. The characters in the string of delimiters are interpreted based on their position in string, in the following order: data separator, subelement separator, repetition separator, and segment terminator, with a value of U indicating no value in that position.

Errors (read only)

A list of errors that are associated either with the input as a whole or with interchanges that have no valid transaction sets.

FunctionalAcksGenerated (read only)

A list of 997 or 999 configured acknowledgments that are generated by the module during the read operation.

Group (write only)

A map of GS group header segment values used as defaults when writing groups

Interchange (write only)

A map of ISA interchange header segment values used as defaults during an interchange write operation.

InterchangeAcksGenerated (read only)

A list of TA1 acknowledgments that were generated by the module during the read operation.

InterchangeAcksReceived (read only)

A list of TA1 acknowledgments that were received by the module during the read operation.

InterchangeAcksToSend (write only)

A list of TA1 acknowledgments that are sent by the module during the write operation.

Transactions

A hierarchy of the transaction sets that are either read by the module during a read operation or sent by the module during a write operation. The value of this top-level key is a map with standard versions as keys, in the form of v005010. For example, if you are using version 005010 with 850 and 855 transaction sets, the transactions contain a map with one key, v005010. The value of this key is another map, one with two keys, 850 and 855. Each of these contain a list of individual 850 and 855 transaction sets that are processed. If you’re using 997 functional acknowledgments, then 997 is the key for a list of 997 transaction sets.

Individual transaction sets have their own maps, with the following keys:

Key Description

Detail

A map of segments or loops from the detail section of the transaction set. Values are maps for segments or loops that occur once. Lists of maps exist for segments or loops that occur more than once.

Errors (read only)

A list of errors that are associated either with the input as a whole or with interchanges that have no valid transaction sets.

Group

A map containing GS group header segment values. For a read message, the map is the actual data from the enclosing group. It is a single map linked from all transaction sets in the group. For a write message, the map value creates the enclosing group. If there are no values for this map, then the default is the value(s) taken from the Group map at the message level.

Heading

A map of segments or loops from the heading section of the transaction set. Values are maps for segments or loops that occur once. Lists of maps exist for values that occur more than once.

Id

The Transaction ID must match the key of the containing transaction list.

Interchange

A map of ISA interchange header segment values. For a read message, the map is the actual data from the enclosing interchange. It is a single map linked from all transaction sets in the interchange. For a write message, the map value creates the enclosing interchange. For example, gathering transactions with the same interchange values into a single interchange, regardless of whether the actual maps are the same. If there are no values for this map, then the default is the value(s) taken from the Interchange map at the message level.

Name

Transaction set name

SetHeader

A map of ST transaction set header segment values. This provides the actual header data for a Read operation, and enables you to provide overrides for for Write operation configuration settings.

Summary

A map of segments or loops from the summary section of the transaction set. These values are maps for segments or loops that occur once. The list of maps are for values that are repeated.

Generated 997 or 999 functional acknowledgment transactions differ from received messages in their handling of interchange information:

Key name Description

Interchange

A map of ISA interchange header segment values. For functional acknowledgments generated by receive processing, this map is a copy of the data for the containing interchange with sender and receiver identification components (ISA05/ISA06 and ISA07/ISA08) interchanged. When writing a message, these values are used for creating the enclosing interchange. For example, gathering transactions with the same interchange values into a single interchange, regardless of whether the actual maps are the same. If there are no values for this map, then the default is the value(s) taken from the Interchange map at the message level.

TA1 interchange acknowledgments are in the form of maps representing the TA1 segment data and linked to data on the corresponding interchange:

Key name Description

Interchange

A map of ISA interchange header segment values. For TA1 acknowledgments generated by receive processing, this map is a copy of the data for the interchange matching the TA1 with sender and receiver identification components (ISA05/ISA06 and ISA07/ISA08) interchanged. When writing a message, these values are used for creating the enclosing interchange. It gathers transactions with the same interchange values into a single interchange, regardless of whether the actual maps are the same. If there are no values for this map, then the default is the value(s) are taken from the Interchange map at the message level.