Create a Custom B2B Document Definition
You can create customized document definitions to use in your B2B integrations. Custom document definitions are useful for scenarios in which your trading partner requires specific customizations to meet certain business requirements.
Note:
You must first create an OAG, Custom, RosettaNet, FixedLength, or Delimited schema before you can create a document definition that uses one of these standards. See Create a New B2B Schema.- To create a document in a project.
- In the navigation pane, click Projects.
- Click the project in which to create the document.
- Click B2B
.
- In the Documents section, click Add.
- To create a document in a standalone environment.
- In the navigation pane, click B2B, then Documents.
- On the Documents page, click Create.
- Enter the following details to create a new B2B document
definition.
Element Description Name Enter a document name. Identifier This field is automatically populated with the document name. You can manually change this value. Description Enter an optional description of the customization details for this document. Document standard Select a document standard: - EDIFACT
- X12
- X12HIPAA
- OAG
- Custom
- RosettaNet (version 2.0)
- FixedLength
- Delimited
- If you selected EDIFACT,
X12, or X12HIPAA, enter the
following details:
Element Description Document version Specify the document version. The versions shown are based on the document standard you selected.
Document type Specify the document type. The types shown are based on the document version you selected.
Document schema Select an existing schema or select Standard. If you select Standard, you can customize the document schema after creation.
- If you selected OAG,
Custom, or RosettaNet, enter
the following details:
Element Description Document version Select an existing document version.
Document type Select an existing document type.
Document schema Select an existing schema. If a schema does not exist, you cannot create a document definition. See Create a New B2B Schema.
- If you selected FixedLength, enter the
following details:
Element Description Document version Manually enter a new value or select an existing value from the drop-down list.
Document type Manually enter a new value or select an existing value from the drop-down list.
Document schema Select an existing fixed-length schema. If a fixed-length schema does not exist, you cannot create a document definition. See Create a New B2B Schema.
- If you selected Delimited, enter the
following details:
Element Description Document version Manually enter a new value or select an existing value from the drop-down list.
Document type Manually enter a new value or select an existing value from the drop-down list.
Document schema Select an existing delimited schema. If a delimited schema does not exist, you cannot create a document definition. See Create a New B2B Schema.
- Click Create.
The details page for your new B2B document is displayed.
If You Selected EDIFACT, X12, or X12HIPAA
The schema document details page appears (for this example, the X12 document standard was selected).
- If you selected a previously-created schema as the document schema,
the Document schema field shows the
Edit button.
- If you want to edit the schema, click Edit to access the schema details page.
- If you want to change the schema, select a different schema from the drop-down list. If you had previously created custom schemas, they are also displayed for selection in the drop-down list. If you want, you can select those schemas to create further customizations.
- If you want to customize the standard schema to satisfy your business requirements, click Customize. See Customize an EDIFACT, X12, or X12HIPAA Document Definition.
You can also define document properties for the schema.
- Scroll down to the Document property section.
- In the Business identifiers section, add at least one identifier (primary). You can also add a second and third identifier to associate with this document. The business identifier names and expressions enable filtering by the identifiers on the Instances page when this document is sent or received.
- In the Expression field, click to select a business identifier expression path.
- In the Delimiters section, select
the following delimiters to use for outbound X12 and EDIFACT
documents:
- Element
- Subelement
- Segment
- Repetition (only for X12 versions 4020 or later)
Note the following guidelines:
- If the delimiter character you want to use is an
ASCII printable character, assign a string value such as
|
to the corresponding attribute. - If you want to use a special character as a
delimiter, specify it in hexadecimal format. For example, use
0xA
, where0x
is a fixed prefix andA
is the hexadecimal representation of the ASCII line feed character. - If your EDI payload uses a different encoding such
as UTF-8, use the hexadecimal format to specify a Unicode
character as a delimiter. For example, specify
0x03A60
to use the Unicode characterΦ
as a delimiter. - Prepare the receiving trading partner to receive a
UTF-8 EDI payload for this process to work correctly. The
delimiter string value you specify must equate to only a single
character. Multiple characters are not allowed. The only
exception is the
segment-terminator
, which allows one character plus an optional ASCII carriage return and line feed character at the end. For example, asegment-terminator
value of~0xd0xa
uses~
followed by<CR>
and<LF>
as asegment-terminator
. This value means each EDI segment is output on a separate line, making it more readable.
You can also define these delimiters for standalone mode outbound X12 and EDIFACT documents in theTranslateOutput
XML.headers > interchange-ctrl > attribute 'element-separator'
headers > interchange-ctrl > attribute 'subelement-separator'
headers > interchange-ctrl > attribute 'segment-terminator'
headers > interchange-ctrl > attribute 'repetition-separator'
(Only applies to X12 versions 4020 or later.)
- In the Correlation section, select
Correlation from or Correlation
to from the drop-down list, enter an XPath name, and
click the field to select an XPath expression. These values enable you
to correlate related documents in business transactions. You can only
select one option: Correlation from or
Correlation to.
- The Correlation from XPath retrieves the value from the payload to initiate the correlation.
- The Correlation to XPath retrieves the value from the payload for correlation.
- Click Save.
If You Selected RosettaNet
The schema document details page appears.
- If you want to use a different document schema, select an existing
schema from the drop-down list or click Edit to upload a
new schema file.
You can also define document properties for the schema.
- Scroll down to the Document property section.
- In the Business identifiers section, add at least one identifier (primary). You can also add a second and third identifier to associate with this document. The business identifier names and expressions enable filtering by the identifiers on the Instances page when this document is sent or received.
- In the Expression field, click to select a business identifier expression path.
- Expand Service header to view parameters used
for validating inbound messages and creating RosettaNet outbound messages. For
this example, the service header parameters provided are for a document
configured to use PIP3A4 (Purchase Order Request). The time to
perform for collaboration (in minutes) field shows the time
window in which the buyer is expecting the purchase order acceptance message
from the seller. If the acceptance message does not arrive within this time
window, it times out.
- Expand Correlation and
Parameters to show additional parameters. You must
manually populate these fields. In particular, note the three fields for XPath
expressions.
The Correlation from XPath expression field shows the following expression:/*[local-name()='Pip3A4PurchaseOrderRequest']/*[local-name()='thisDocumentIdentifier']/*[local-name()='ProprietaryDocumentIdentifier']/text()
The value for
ProprietaryDocumentIdentifier
in the request purchase order from the buyer integration must match with the value in the response purchase order of the seller integration. Whichever fields you configure for correlations to occur, you must supply the value correctly in the request/response payloads to get the relevant messages successfully correlated.For example:- If the seller's
ProprietaryDocumentIdentifier
parameter in the request purchase order consists of this value:<thisDocumentIdentifier> <ProprietaryDocumentIdentifier>420002933046</ProprietaryDocumentIdentifier> </thisDocumentIdentifier>
- Then the seller's the
ProprietaryDocumentIdentifier
parameter in the response purchase order must consist of the same value:<thisDocumentIdentifier> <ProprietaryDocumentIdentifier>420002933046</ProprietaryDocumentIdentifier> </thisDocumentIdentifier>
If your buyer and seller integrations are both REST Adapter-triggered, you can make these edits in the Body section of the Configure and run page. This page appears when you select Run from the Actions
menu for your integrations. This configuration ensures that message delivery occurs in the correct sequence at runtime.
- If the seller's
If You Selected OAG
The schema document details page appears.
- If you want to use a different document schema, select an existing
schema from the drop-down list or click Edit to upload a
new schema file.
You can also define document properties for the schema.
- Scroll down to the Document property section.
- In the Business identifiers section, add at least one identifier (primary). You can also add a second and third identifier to associate with this document. The business identifier names and expressions enable filtering by the identifiers on the Instances page when this document is sent or received.
- In the Expression field, click to select a business identifier expression path.
- From the DTD/XSD conversion drop-down list, select a
value.
- None
- Outbound
- Inbound
- Both
- Optionally enter a logical ID and auth ID.
- In the Correlation section, select
Correlation from or Correlation
to from the drop-down list, enter an XPath name, and click the
field to select an XPath expression. These values enable you to correlate
related documents in business transactions. You can only select one option:
Correlation from or Correlation
to.
- The Correlation from XPath retrieves the value from the payload to initiate the correlation.
- The Correlation to XPath retrieves the value from the payload for correlation.
- Click Save.
If You Selected Custom
The schema document details page appears.
- If you want to use a different document schema, select an existing
schema from the drop-down list or click Edit to upload a
new schema file.
You can also define document properties for the schema.
- Scroll down to the Document property section.
- In the Business identifiers section, add at least one identifier (primary). You can also add a second and third identifier to associate with this document. The business identifier names and expressions enable filtering by the identifiers on the Instances page when this document is sent or received.
- In the Expression field, click to select a business identifier expression path.
- From the Identification type drop-down list, select a
value.
- If you select XML, specify an XPath
identification expression and value. For example, In the
Identification expression (XPath) field,
specify the identification type as an XPath expression.
/*[local-name()='Brazil-FDG_OUTBOUND_Scherr']
This expression uniquely identifies the document. For this example, the XPath expression identifies that the document must have a root element of
Brazil-FDG_OUTBOUND_Scherr
. - If you select Flat, specify an identification value and identification start and end positions.
- If you select XML, specify an XPath
identification expression and value. For example, In the
Identification expression (XPath) field,
specify the identification type as an XPath expression.
- In the Correlation section, select
Correlation from or Correlation
to from the drop-down list, enter an XPath name, and click the
field to select an XPath expression. These values enable you to correlate
related documents in business transactions. You can only select one option:
Correlation from or Correlation
to.
- The Correlation from XPath retrieves the value from the payload to initiate the correlation.
- The Correlation to XPath retrieves the value from the payload for correlation.
- Click Save.
If You Selected FixedLength
The schema document details page appears.
- If you want to use a different document schema, select an existing
schema from the drop-down list or click Edit to go to the
details page for the schema.
You can also define document properties for the schema.
- Scroll down to the Document property section.
- In the Business identifiers section, add at least one identifier (primary). You can also add a second and third identifier to associate with this document. The business identifier names and expressions enable filtering by the identifiers on the Instances page when this document is sent or received.
- In the Expression field, click to select a
business identifier expression path.
The Identification type list shows a value of Flat. This value cannot be changed.
- Specify values.
- Identification value: Enter the segment key for
identifying the payload (for example,
BGM
). - Identification start position: Enter
the starting character position for the identifier (for example,
1
). - Identification end position: Enter
the ending character position for the identifier (for example,
3
).
- Identification value: Enter the segment key for
identifying the payload (for example,
- In the Correlation section, select
Correlation from or Correlation
to from the drop-down list, enter an XPath name, and click the
field to select an XPath expression. These values enable you to correlate
related documents in business transactions. You can only select one option:
Correlation from or Correlation
to.
- The Correlation from XPath retrieves the value from the payload to initiate the correlation.
- The Correlation to XPath retrieves the value from the payload for correlation.
- Click Save.
If You Selected Delimited
The schema document details page appears.
- If you want to use a different document schema, select an existing
schema from the drop-down list or click Edit to go to the
details page for the schema.
You can also define document properties for the schema.
- Scroll down to the Document property section.
- In the Business identifiers section, add at least one identifier (primary). You can also add a second and third identifier to associate with this document. The business identifier names and expressions enable filtering by the identifiers on the Instances page when this document is sent or received.
- In the Expression field, click to select a business identifier expression path.
- In the Translation identifier field, click
to select a translation identifier. This identifier is used to identify the
document at runtime. For example,
- In the Correlation section, select
Correlation from or Correlation
to from the drop-down list, enter an XPath name, and click the
field to select an XPath expression. These values enable you to correlate
related documents in business transactions. You can only select one option:
Correlation from or Correlation
to.
- The Correlation from XPath retrieves the value from the payload to initiate the correlation.
- The Correlation to XPath retrieves the value from the payload for correlation.
- Click Save.
Customize an EDIFACT, X12, or X12HIPAA Document Definition
If you click Customize for EDIFACT, X12, or X12HIPAA, the Clone standard schema dialog is displayed. This option enables you to customize the standard schema to satisfy your business requirements.
- Enter the details to create a new B2B document definition.
- Click Save.
This action creates a copy of the standard EDIFACT, X12, or X12HIPAA schema for you to use as a baseline to customize. For this example, the EDIFACT schema is shown.
- On the schema page, find the element you want to customize, and
select
. As an example, select the UNH01 currency code element (part of the UNH segment) to edit it. You can also add new constructs to the schema. See Edit Properties of Segments and Other Schema Constructs.
Description of the illustration clone_standard_schema3.png
The Properties panel is displayed.
Description of the illustration clone_standard_schema4.png
The three tabs on the Details pane enable you to perform customizations.Tab Description Properties Displayed by default when you initially access the Details pane. You can modify the following standard EDI X12 properties for the selected segment or element: - Purpose of element
- Requirement (mandatory, optional, or conditional)
- Usage (must use, do not use, recommended, or not recommended)
- Minimum and maximum number of characters
- Number of times to repeat the element
Code List Click to view the code list for the element. A code list defines an enumeration of allowed values for the element. Notes Click to add notes to the element. - Edit the element details as necessary for your business environment.
For this example, select Code List
to add new code.
- Click Add a new code list (if the element does not already have a code list defined).
- Define the syntax rules.
- When complete, click X in the upper right corner to close the dialog.
- Return to the B2B document's details page and click Save to associate the customized schema to the document.
- Go to an orchestration integration either to add a new B2B action or edit an already configured B2B action that is not part of an activated integration. See Use the B2B Action in Standalone Mode.
- Note that the customized document definition is now available to
use from the Document schema list in the wizard.
You can create a UNA segment for an outbound EDIFACT document. See Create a UNA Segment for Outbound EDIFACT Documents.
Create a UNA Segment for Outbound EDIFACT Documents
To create a UNA segment for an outbound EDIFACT document, you must pass
delimiters through the payload as part of the interchange-ctrl
header.
For example:
<edi-xml-document format="EDIFACT-D98A-ORDERS"
ver="1.0.20210503"><headers><interchange-ctrl syntax-identifier="UNOB"
syntax-version-number="4" sender-id="INTERCHANGE SENDER IDENTIFICATION" sender-id-qualifier="1"
receiver-id="INTERCHANGE RECIPIENT IDENTIFICATIO" receiver-id-qualifier="1"
date="00210503" time="1518" interchange-ctrl-num="1005" subelement-separator=":"
element-separator="*" decimal-separator="." segment-terminator="'"/>
The same elements (that is, subelement-separator
,
element-separator
,decimal-separator
,
release-character
, reserved-for-future
, and
segment-terminator
) must be mapped in the backend integration
under the interchange-ctrl
headers in the XML payload as shown in
the following steps.
- Open the map action.
- Perform the following mappings: