Work with B2B Documents

After you create a schema, you must create a document based on that schema for use in your integration. The document represents a specific snapshot of a schema to use in an integration.

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.
  1. In the navigation pane, click B2B, then Documents.
  2. On the Documents page, click Create.

    The Create B2B document panel is displayed.

  3. 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
  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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).


The page shows the Identifier and Updated by labels at the top. In the Document Selection section are fields for Name and Description. Below this are the values selected for Document standard, Document version, and Document type. Below this is a list for Document schema and the Edit button.

  1. If you selected a previously-created schema as the document schema, the Document schema field shows the Edit button.
    1. If you want to edit the schema, click Edit to access the schema details page.
    2. 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.
    3. 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.

    1. Scroll down to the Document property section.
    2. 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.
    3. In the Expression field, click to select a business identifier expression path.
    4. 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)


      The Delimiters section shows fields for Document separator, Document terminator, Subelement separator, and Repetition separator.

      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, where 0x is a fixed prefix and A 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, a segment-terminator value of ~0xd0xa uses ~ followed by <CR> and <LF> as a segment-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 the TranslateOutput 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.)

      See Schema Elements for Outbound EDI.

    5. 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.
    6. Click Save.

If You Selected RosettaNet

The schema document details page appears.


The page shows the Identifier and Updated by labels at the top. In the Document Selection section are fields for Name and Description. Below this are the values selected for Document standard, Document version, and Document type. Below this is a list for Document schema and the Edit button.

  1. 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.

  2. Scroll down to the Document property section.
  3. 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.
  4. In the Expression field, click to select a business identifier expression path.
  5. 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.


    The Service header section shows fields for From role, To role, From service, To service, Business transaction name, Business action, Time to perform for collaboration (minutes), Collaboration name, Collaboration code, Global usage code, Manifest free-form text, Manifest version identifier, and Partner defined PIPPayloadBindingID.

  6. 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 section shows Correlation from XPath name, Correlation to XPath name, Correlation from XPath expression, and Correlation to XPath expression.

    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 Actions icon menu for your integrations. This configuration ensures that message delivery occurs in the correct sequence at runtime.

If You Selected OAG

The schema document details page appears.


The page shows the Identifier and Updated by labels at the top. In the Document Selection section are fields for Name and Description. Below this are the values selected for Document standard, Document version, and Document type. Below this is a list for Document schema and the Edit button.

  1. 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.

  2. Scroll down to the Document property section.
  3. 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.
  4. In the Expression field, click to select a business identifier expression path.
  5. From the DTD/XSD conversion drop-down list, select a value.
    • None
    • Outbound
    • Inbound
    • Both
  6. Optionally enter a logical ID and auth ID.
  7. 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.
  8. Click Save.

If You Selected Custom

The schema document details page appears.


The page shows the Identifier and Updated by labels at the top. In the Document Selection section are fields for Name and Description. Below this are the values selected for Document standard, Document version, and Document type. Below this is a list for Document schema and the Edit button.

  1. 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.

  2. Scroll down to the Document property section.
  3. 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.
  4. In the Expression field, click to select a business identifier expression path.
  5. From the Identification type drop-down list, select a value.
    1. 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.

    2. If you select Flat, specify an identification value and identification start and end positions.
  6. 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.
  7. Click Save.

If You Selected FixedLength

The schema document details page appears.


The page shows the Identifier and Updated by labels at the top. In the Document Selection section are fields for Name and Description. Below this are the values selected for Document standard, Document version, and Document type. Below this is a list for Document schema and the Edit button.

  1. 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.

  2. Scroll down to the Document property section.
  3. 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.
  4. 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.

  5. 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).
  6. 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.
  7. Click Save.

If You Selected Delimited

The schema document details page appears.


The page shows the Identifier and Updated by labels at the top. In the Document Selection section are fields for Name and Description. Below this are the values selected for Document standard, Document version, and Document type. Below this is a list for Document schema and the Edit button.

  1. 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.

  2. Scroll down to the Document property section.
  3. 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.
  4. In the Expression field, click to select a business identifier expression path.
  5. In the Translation identifier field, click to select a translation identifier. This identifier is used to identify the document at runtime. For example,


    The Document property section is shown. This section includes the Business Identifiers subsection, with fields for Expression and Name. Below this is the Translation Identifier subsection, with fields for Element and Identifier type. Below this is the Correlation subsection.

  6. 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.
  7. 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.


The Document schema list is shown. The Customize button appears to the right.

  1. Enter the details to create a new B2B document definition.
  2. 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.


    Description of clone_standard_schema2.png follows
    Description of the illustration clone_standard_schema2.png

  3. On the schema page, find the element you want to customize, and select Edit icon. 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 clone_standard_schema3.png follows
    Description of the illustration clone_standard_schema3.png

    The Properties panel is displayed.


    Description of clone_standard_schema4.png follows
    Description of the illustration clone_standard_schema4.png

    The three tabs on the Details pane enable you to perform customizations.
    Tab Description
    Properties Properties icon 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 Code list icon Click to view the code list for the element. A code list defines an enumeration of allowed values for the element.
    Notes
    Notes icon

    Click to add notes to the element.
  4. Edit the element details as necessary for your business environment. For this example, select Code List Code list icon to add new code.
  5. Click Add a new code list (if the element does not already have a code list defined).
  6. Define the syntax rules.
  7. When complete, click X in the upper right corner to close the dialog.
  8. Return to the B2B document's details page and click Save to associate the customized schema to the document.
  9. 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.
  10. Note that the customized document definition is now available to use from the Document schema list in the wizard.


    Document schema list with schemas available for selection. The Edit button is also displayed.

Edit or Clone a B2B Document

You can edit an existing B2B document to associate a different schema or add business identifiers. You can also clone a document to create a copy of it.

  1. In the navigation pane, click B2B, then Documents.
  2. Hover over a document row to see the actions you can perform on a B2B document.
  3. Click Edit Edit icon to change the document's name, description, document type or document properties (business identifiers, correlations, and more).

    Note:

    You cannot change the document standard or version.