B2B Action Input and Output Schema Reference
While configuring data mappings for the B2B action, you use the
TranslateInput
and TranslateOutput
elements and map the incoming and outgoing data to or from these elements.
TranslateInput
and TranslateOutput
data elements. These schema elements drive the behavior of the B2B
action.
Schema Elements for Inbound EDI
In the inbound EDI use case, the input to the B2B action has the EDI payload element and the output, which is generated after parsing, has the XML form of the EDI document.
The TranslateInput
data element represents the input message to the
B2B action, and the TranslateOutput
represents the output of the
action. Therefore, at a minimum, TranslateInput
needs to contain
the edi-payload
element to which you'll assign a value using the
input map action. The TranslateOutput
data element then produces
the edi-xml-document
element, returning the parsed data in the XML
format along with validation errors, if any.
Description of the illustration edi-translate-inbound.png
The following tables describe each element contained in
TranslateInput
and TranslateOutput
for the
inbound EDI scenario.
Elements in TranslateInput
Element | Description |
---|---|
edi-payload |
You should assign a base64-encoded string value generated from a native EDI X12 payload (starting with the ISA segment and ending with the IEA segment) to this element. Base64 encoding is required because EDI may contain unprintable characters used as delimiters or even binary content such as images. In case the EDI X12 payload contains a batch of transactions, you must use a stage file action along with the B2B action to process the batch. |
tracking-info |
You'll require this element only when you use the B2B action with the stage file action for batch processing. This element contains the tracking information for each EDI transaction that is passed from the stage file action to the B2B action. |
edi-encoding |
The character encoding of the EDI X12 payload (default is UTF-8). |
and
|
By default, any syntactical error in the input EDI payload is treated as a validation error in translation. You can alter this behavior in two ways:
These elements offer the second option listed above by providing a fine-grained control over the types of validation errors to ignore. You may need to have this fine-grained control in specific situations where you want to forward the message to a back-end application; for example, despite the B2B layer detecting invalid data. Both these elements are of a string type, and the format of the string allows you to specify one or more validation error types. These elements are semantic opposites of one another. The format is as follows:
It is a comma-separated string, where each token starts with The When a validation error is treated as a real error, the B2B action also generates an
acknowledgment message (EDI X12 997) with a rejected flag.
However, when a validation error is ignored, the 997 is
flagged with the |
validate |
By default, any syntactical error in the input EDI payload is treated as a validation
error in translation. You can alter this behavior in two
ways:
This element offers the first option listed above. Setting this element to
|
functional-ack-required |
If you set this element to |
passthrough-errors |
You'll require this element only when you use the B2B action with the stage file action for batch processing. This element simply transfers certain errors from the stage file action to the B2B action so that a proper functional acknowledgment message can be generated in case of errors. You must not set this element when using the B2B action in standalone mode. |
routing-info |
You'll require this element only when you use the B2B action with the stage file action for batch processing. You must not set this element when using the B2B action in standalone mode. |
input-source-context |
To use this optional element, you can assign any identifier string that the B2B
action simply copies to the |
Elements in TranslateOutput
Element | Description |
---|---|
edi-xml-document |
This element is returned with the translated message in the XML form. See Sample TranslateOutput XML for Inbound EDI. |
|
These header elements are returned with values parsed from the EDI X12 ISA and GS envelopes. |
edi-xml-document > func-ack-report |
This element is returned only when the document type is a 997 (functional acknowledgment), and carries special content specific to a 997. Here are the child elements:
|
|
This element is returned with the hierarchical structure of data segments and
elements inside the EDI message, starting with the
Each segment or loop inside the EDI X12 data becomes a parent XML element and its constituent EDI elements become child XML elements. For example, this may appear inside the
The above XML fragment represents the data values parsed from the EDI X12 data that has this line: The XML elements |
|
The trailer elements are returned with values parsed from the EDI X12 IEA and GE envelopes. |
functional-ack-present |
This element is returned as This element is returned as The B2B action automatically generates a functional acknowledgment message as
follows:
|
functional-ack |
If |
functional-ack-tracking-info |
This element is returned with a string representing a unique transmission identifier for the generated functional acknowledgment message. The string includes control numbers used for the functional acknowledgment. The value is useful for tracking purposes in case the trading partner is unable to process the 997 document. |
validation-errors-present |
This element is returned as |
|
The The |
tracking-info |
This element is returned with a string representing a unique transmission identifier occurring in the input EDI. This string includes control numbers used in the input EDI message (interchange/group/transaction-set control numbers). This value is useful for tracking purposes. |
translation-status |
This element is returned with the values
|
transaction-summary |
This element is returned with the overall counts of transactions parsed with success, warning, or errors across a batch of transactions. |
input-source-context |
This element is returned as a verbatim copy of the |
Sample TranslateOutput XML for Inbound EDI
This section provides a sample TranslateOutput XML file for inbound EDI.
<ns0:executeResponse xmlns:ns0="http://xmlns.oracle.com/cloud/adapter/ediAdapter/EDI_Translate_REQUEST/types">
<TranslateOutput xmlns="http://xmlns.oracle.com/b2b/X12/4010/transactionset-850/default" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<edi-xml-document format="X12-4010-850" ver="1.0.20200326">
<headers>
<interchange-ctrl ack-requested-code="0" auth-info="" auth-info-qualifier="00" ctrl-standards-id="U" ctrl-version-num-code="00401" date="190312" element-separator="|" interchange-ctrl-num="000001894" receiver-id="22222" receiver-id-qualifier="01" sec-info="" sec-info-qualifier="00" segment-terminator="0xa" sender-id="111111T" sender-id-qualifier="01" subelement-separator="~" time="0845" usage-indicator-code="T"/>
<group app-receivers-code="ACME" app-senders-code="0124578" date="20190312" func-identifier-code="PO" group-ctrl-num="0123456" resp-agency-code="X" time="084515" version-identifier-code="004010"/>
</headers>
<transaction-data>
<ST>
<ST01>850</ST01>
<ST02>1013</ST02>
</ST>
<BEG>
<BEG01>99</BEG01>
<BEG02>BA</BEG02>
<BEG03>Purchase Order Number</BEG03>
<BEG05>20061103</BEG05>
<BEG06>Contract Number</BEG06>
<BEG09>01</BEG09>
</BEG>
....
<SE>
<SE01>25</SE01>
<SE02>1013</SE02>
</SE>
</transaction-data>
<trailers>
<group count-of-txnsets="1" group-ctrl-num="1013"/>
<interchange-ctrl count-of-groups="1" interchange-ctrl-num="100000020"/>
</trailers>
</edi-xml-document>
<functional-ack-present>true</functional-ack-present>
<functional-ack>SVNBfDAwfCAgICAgICAgICB8MDB8ICAgICAgICAgI...</functional-ack>
<functional-ack-tracking-info>tc=1016;gc=1016;sn=22222;rc=111111T;ic=000000016;</functional-ack-tracking-info>
<validation-errors-present>true</validation-errors-present>
<validation-errors>
<error>
<code>B2B-01757</code>
<category>data_codelist</category>
<summary>Element BEG01 (element id 353) contains an invalid identification code [99] that is not listed in the allowed codes for this element (for example: 00, 44, 01, 45, 02, 46 ...).</summary>
<location>segment-BEG > BEG01 (element id 353) | segment position 2 (starting with ST segment) | element position 1 | character position 174</location>
</error>
<validation-error-report>[1] Error code: B2B-01757 | category: data_codelist | message: (Severe) Element BEG01 (element id 353) contains an invalid identification code [99] that is not listed in the allowed codes for this element (for example: 00, 44, 01, 45, 02, 46 ...). | segment-BEG > BEG01 (element id 353) | segment position 2 (starting with ST segment) | element position 1 | character position 174</validation-error-report>
</validation-errors>
<tracking-info>tc=1234;gc=0123456;sn=111111T;rc=22222;ic=000001894;seq=1;tot=1;</tracking-info>
<translation-status>Error</translation-status>
</TranslateOutput>
</ns0:executeResponse>
Schema Elements for Outbound EDI
In the outbound EDI use case, the input to the B2B action has the XML form of the EDI document and the output has the document assembled into the EDI format.
Description of the illustration edi-translate-outbound.png
The following tables describe each element contained in TranslateInput
and TranslateOutput
for the Outbound EDI scenario.
Elements in TranslateInput
Element | Description |
---|---|
edi-xml-document |
The XML form of the data to use to form the output EDI message during translation. At the minimum, you must assign values to the following child XML elements in the input:
Note: The B2B action automatically generates unique control numbers for the interchange, group, and transaction set.Note: Customizing Delimiters for Outbound EDIBy default, the
If the delimiter character you want
to use is an ASCII printable character, simply
assign a string value such as If your EDI payload
uses a different encoding such as UTF-8, you can use
the hexadecimal format to specify a Unicode
character as a delimiter. For example, specify
Note that the
delimiter string value you specify must equate to
only a single character. Multiple characters are not
allowed. The only exception is the
|
|
|
reject-message-on-errors |
|
validate |
See Validate. |
input-source-context |
See Input Source Context. |
Elements in TranslateOutput
Element | Description |
---|---|
edi-payload |
This element is returned with the translated message in the EDI format, starting with the X12 ISA header envelope and ending with the IEA trailer envelope. The control numbers are automatically generated and inserted in the EDI content. Note that the EDI content is Base64 encoded. |
validation-errors-present |
|
|
|
tracking-info |
This element is returned with a string representing a unique transmission identifier occurring in the output EDI. This string includes control numbers used in the output EDI message (interchange/group/transaction-set control numbers). This value is useful for tracking purposes. |
translation-status |
See Translation Status. |
input-source-context |
See Input Source Context. |
Sample TranslateOutput XML for Outbound EDI
This section provides a sample TranslateOutput XML file for outbound EDI.
<executeResponse xmlns="http://xmlns.oracle.com/cloud/adapter/ediAdapter/EDI_Generate_REQUEST/types">
<TranslateOutput xmlns="http://xmlns.oracle.com/b2b/edi/generic/document">
<edi-payload>SVNBKjAwKiAgICAgICAgICAqMDAqICAgI...E1fg==</edi-payload>
<validation-errors-present>true</validation-errors-present>
<validation-errors>
<error>
<code>B2B-01757</code>
<category>data_codelist</category>
<summary>Element BEG02 (element id 92) contains an invalid identification code [00] that is not listed in the allowed codes for this element (for example: PR, LS, DR, DS, UD, UE ...).</summary>
<location>edi-xml-document > transaction-data > segment-BEG > BEG02 (element id 92) | segment position 2 (starting with ST segment) | element position 2</location>
</error>
<validation-error-report>[1] Error code: B2B-01757 | category: data_codelist | message: (Severe) Element BEG02 (element id 92) contains an invalid identification code [00] that is not listed in the allowed codes for this element (for example: PR, LS, DR, DS, UD, UE ...). | edi-xml-document > transaction-data > segment-BEG > BEG02 (element id 92) | segment position 2 (starting with ST segment) | element position 2</validation-error-report>
</validation-errors>
<tracking-info>tc=1015;gc=1015;sn=Acme Foods;rc=Global Chips;ic=000000015;</tracking-info>
<translation-status>Error</translation-status>
</TranslateOutput>
</executeResponse>