Work with B2B Schemas

B2B for Oracle Integration allows you to create a new schema using a standard schema or by importing a Standard Exchange Format (SEF) file. In addition, you can perform a host of customizations on the schemas and generate implementation guides for custom or standard schemas.

Create a New B2B Schema

You can create a new B2B schema based on a standard document type and customize it to match your requirements.

  1. In the navigation pane, click B2B, then Schemas.
  2. On the Schemas page, click Create.
  3. Enter the following details.
    Element Description
    Name Enter a name.
    Identifier This field is automatically populated with the name. You can manually change this value.
    Description Enter an optional description of the customization details for this schema.
    Document standard Select the document standard. The document standard identifies the business protocol to follow when exchanging business documents between partners.
    • 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 Select the document version from the drop-down list. You cannot manually define a document version.
    Document type Select the document type from the drop-down list. You cannot manually define a document type.
  5. If you selected OAG, Custom, or RosettaNet, enter the following details:
    Element Description
    Schema location Click Browse to select the schema to use.

    If you select RosettaNet, note that RosettaNet PIPs are not preseeded in B2B for Oracle Integration. You can download the RosettaNet schema to use from this site. Expand the Specification list to find the schema you want to download and use in B2B for Oracle Integration.

    Prepare the schema for upload into B2B for Oracle Integration:
    1. Download the schema from RosettaNet and place it in a new folder.
    2. Unzip the downloaded schema.
    3. Navigate to the XML directory inside the unzipped folder.
    4. Find and delete all non-XSD files in this directory.
      $ find . -type f  | grep -v xsd | xargs rm

      Note: If you are using a UI-based explorer, some hidden files/folders may exist that also need to be removed. In which case, the above command must be modified. For example, the __MACOX__ folder on macOS or the Thumbs.db file on Windows.

    5. Create a new zip file from current XML directory onwards.
      zip -r pip4b2-v11-01-00-notifyofshipmentreceipt.zip ./
    6. Upload this new zip file to define a new schema.

    After you upload a RosettaNet schema to use, the name of the PIP is displayed in the Root element field (for example, Pip3A4PurchaseOrderRequest.)

    Document version
    • For Custom or RosettaNet, manually enter a new value or select an existing value from the drop-down list.
    • For OAG, select an existing value from the drop-down list. You cannot manually define a document version.
    Document type
    • For Custom or RosettaNet, manually enter a new value or select an existing value from the drop-down list.
    • For OAG, select an existing value from the drop-down list. You cannot manually define a document type.
  6. If you selected FixedLength, enter the following details:
    Element Description
    Scan for character Enter an integer between 1 and 32 to identify the number of characters to scan to identify the segments in the payload. For example, enter 3 to identify the schema segments from the first three characters in each row. See Positional Flat or Fixed Length Payloads Support.
    Drag and Drop

    Drag a sample payload file with a fixed-length content. UTF-8 is the supported character encoding.

    After creating the schema, you can add child elements, as necessary. See Add Child Elements to a Fixed-Length Schema.

    Character Encoding Select the character encoding to use.
    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.
  7. If you selected Delimited, enter the following details:
    Element Description
    Drag and Drop

    Drag and drop the delimited payload file.
    Character Encoding Select the character encoding to use.
    Segment Delimiter Select the delimiter used to separate segments in the payload. See Delimited Payload Support.
    Element Delimiter Select the delimiter used to separate elements in the payload.
    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.
  8. Click Create.
  9. Customize the schema to match your business requirements.

    For example customizations, see Customize or Edit a B2B Schema.

    After completing the customization, you can select the custom schema while creating a new B2B document as described in Create a Custom B2B Document Definition.

Create a Schema from an Imported SEF File

You can create a schema by importing a Standard Exchange Format (SEF) file. A SEF file exchanges EDI implementation guidelines in a machine-readable form.

  1. In the navigation pane, click B2B, then Schemas.
  2. Click Actions Actions icon, then select Import SEF.
    The Import schema for SEF file dialog is displayed.
  3. Enter the following details.
    Element Description
    Select SEF File Select the SEF file you want to import.
    Name Enter a name for the schema you want to create.
    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 the document standard.
    • EDIFACT
    • X12
    EDI X12 is automatically selected for use.
    Document Version Select the document version.
    Document Type Select the document type.


  4. Click Import.
    An information message is displayed indicating that the SEF file has been imported successfully. The B2B schema is then created based on the SEF file.

Customize or Edit a B2B Schema

To create custom schemas, you can add new constructs (such as new segments and elements) to a standard B2B schema or edit existing constructs within it.

About B2B Schema Constructs

A B2B schema represents the message format of an EDI X12, EDIFACT, or X12 HIPAA document, which is a hierarchical structure based on four types of constructs:

  • Element: The smallest unit that represents a single data field of a primitive type, such as, alphanumeric text, integer, decimal, date, time, or binary.
  • Composite: A complex data type consisting of one or more elements.
  • Segment: The next higher level construct, consisting of a sequence of elements and composites.
  • Loop or Loop Segment: A container for a specific set of segments or child loops, which make its structure nested and hierarchical.
The schema editor in B2B for Oracle Integration displays each of these constructs in its own row. The rows for segments, composites, and loops are expandable, and display the elements they contain. The order of the rows in the schema defines the exact order in which each of the constructs must appear in an actual EDI X12, EDIFACT, or X12 HIPAA document.
  • An EDI X12 document, which is the topmost construct, is defined as an ordered set of segments and loops. The schema for all EDI X12 documents starts with a segment named ST and ends with the segment SE across all documents types. These segments are called transaction set envelope segments, and they cannot be deleted in the B2B schema editor.
  • An EDIFACT document, which is the topmost construct, is also defined as an ordered set of segments and loops. The schema for all EDIFACT documents starts with a segment named UNH and ends with the segment UNT across all documents types. These segments are called transaction set envelope segments, and they cannot be deleted in the B2B schema editor.
  • An X12 HIPAA document, which is the topmost construct, is also defined as an ordered set of segments and loops. The schema for all X12 HIPAA documents starts with a segment named UNH and ends with the segment UNT across all documents types. These segments are called transaction set envelope segments, and they cannot be deleted in the B2B schema editor.

Add New Segments and Other Schema Constructs

According to your organization's requirements, you can add new constructs to a standard B2B schema to customize it.

To add new constructs to a schema:
  1. In the navigation pane, click B2B, then Schemas.
  2. Hover over a schema and click Edit Edit icon.
  3. Hover over the row of a required hierarchy and click Actions Actions icon.
  4. Select an option to add a new construct. The Details panel appears on the right, displaying the Properties tab, where you can enter the necessary information.

    Note:

    The options displayed in the Actions Actions icon list vary according to the hierarchy of the rows. The Actions Actions icon list for a segment or loop row has options to create new child elements, child composites, segments and loops, whereas the Actions Actions icon list for a composite or element row has options to create only new composites and elements.

Edit Properties of Segments and Other Schema Constructs

B2B for Oracle Integration allows you to modify properties of existing constructs of a schema that's derived from a standard schema.

To edit the properties of constructs:
  1. In the navigation pane, click B2B, then Schemas.
  2. Hover over a schema and click Edit Edit icon.
  3. In the schema editor, hover over a row you want to modify and click Edit details Edit icon.

    A panel open on the right, displaying the Properties tab. The property fields displayed in the tab vary for element, composite, segment, and loop rows. You can edit the field values to customize and deviate from the X12 standard according to your business requirements. The following sections describe the different property fields that are displayed for each construct type.

Element Properties

Property Description
Name

A descriptive name for the element.

Element ID

The ID that identifies this element in the EDI X12, X12 HIPAA, or EDIFACT element dictionary. This field is not editable.

Position

The element's position number within the parent segment or composite. This field is not editable.

Purpose

A detailed description of the element's purpose.

Requirement
  • Mandatory: The element must have a nonempty value in an EDI document.
  • Optional: The element may have a value or be empty.
  • Conditional: The element may have a value or not depending on syntax rules defined on the parent segment or composite.

This setting is preselected by the X12, X12 HIPAA, or EDIFACT standard and typically not modified. To override this setting, modify the Usage field.

Usage

This field overrides the Requirement field. When this field is left blank (no value selected), it implies that the element is used and the selection made in the Requirement field is enforced.

  • Must Use: Overrides the selection in the Requirement field and treats the element as mandatory.
  • Not Used: Overrides the selection in the Requirement field and specifies that the element should remain empty (that is, not have a value).
  • Recommended: Follows the selection in the Requirement field, but suggests that the element is a preferred element.
  • Not Recommended: Follows the selection in the Requirement field, but suggests that the element is not a preferred element.
Type

The element's type as defined by the X12 standard in the EDI X12 element dictionary, X12 HIPAA standard, or EDIFACT standard in the EDIFACT element dictionary.

The type is one of the following: ID (Identifier), AN (Alphanumeric Text String), DT (date), TM (time), N(0-9) (Integer with implied decimal), R (Decimal), or B (Binary). This field is not editable.

Length (Min / Max)

The minimum and maximum characters (or numeric digits) that the element's value allows.

Repeat

Specifies if it's a repeating element.

  • 1: Indicates that the element has a single value (non-repeating).
  • A number greater than one or the >1 symbol: Indicates that this is a repeating element; that is, one element accommodates multiple values.

The EDI X12 version 4012 and older versions do not support repeating elements; therefore, this setting is ignored for those versions.

Composite Properties

A composite has property settings similar to an element construct, except for the Type and Length fields.

Segment Properties

A segment has several property settings similar to an element construct. However, it doesn't have the Element ID, Type, and Length fields. In addition, there are the following differences.

Property Description
Repeat

For a segment, this property indicates how many consecutive instances of the segment may occur in an EDI document. Segment repetition is supported in all X12 versions, unlike elements.

Table Area

Indicates the section of the EDI document to which this segment belongs. Typically, an EDI document is defined with a heading, summary, and detail sections, also called table areas.

Loop Properties

A loop has four property settings, namely Requirement, Usage, Repeat, and Table Area, which have similar meanings as those of a segment.

Edit the Code List for an Element

In addition to properties, you can also edit code lists for element constructs while customizing standard B2B schemas.

Some EDI X12 elements are restricted to a set of enumerated values. A code list displays the allowed values for an element. Typically, elements of the type ID (identifier) have a code list associated with them; however, any element can have a code list.

To edit an element's code list,
  1. Hover over the element row and click Edit Details Edit icon.

    The Details panel appears on the right, displaying the Properties tab.

  2. Click Code list Code List icon.

    If there is a code list defined, all code values are displayed in the table.

  3. Hover over a row and use the buttons that appear to edit or delete the row or to add a new row.
    While editing, you can add a description and a note to each code. While deleting, a row is first marked for deletion (which can be reversed with an Undo) and is actually deleted upon clicking Save.

    Note:

    While adding a new row, you can insert it at any position. The validation of an element's data against the code list happens regardless of the order. After a Save action, the code list is sorted alphabetically.
  4. If you want to edit several rows in a code list, use the Export CSV action under Code list actions to export the list to a comma-separated values file for editing in an external tool, such as a spreadsheet editor.

    The CSV file has a header row identical to the code list table. After the editing is complete, you can import it back using the Import CSV action. This overwrites the existing code list completely with the codes defined in the CSV file.

Multiple Code Lists for an Element

Occasionally, you may find elements with multiple code lists. One such example is the element TD101 (Packaging Code) for the document type EDI X12 850 (any version). This element has two code lists defined as follows:


Description of code_list2.png follows
Description of the illustration code_list2.png

The element's data value is a concatenation of one code from each of the code lists. For example, a value of AMM01 is a valid data value because it uses AMM from Code list 1 and 01 from Code list 2.

Customizing a Code List

An element is considered customized (with respect to code lists) if any of its associated code lists have codes that are different from the standard X12 codes. However, only changing the description or adding notes is not considered a customization because it does not affect the element's allowed data values or the validation.

Edit Syntax Rules for Segments and Composites

You can view and edit the syntax rules, if defined for a segment or a composite. These rules apply to data elements and are enforced during the validation of the input data.

Note:

You cannot edit a schema currently in use in an active document definition.
  1. In the navigation pane, click B2B, then Schemas.
    The B2B schemas page shows all custom schemas you have created by cloning the standard schemas.
  2. Open a custom schema, find the segment you want to view (for example, CUR), and select Edit details Edit icon.
  3. Click Syntax Rules icon in the Details panel to open the syntax rules enforced for the selected segment.
  4. Hover over a syntax rule row to see options to edit, add, or delete a rule.
  5. If you select Add +, a Select list is displayed with the following syntax rule types:
    X12 Syntax Rule Description
    Pairing If any of the elements are present, all are required.
    Required At least one of the elements is required.
    Exclusion Only one of the elements may be present.
    Conditional If one element is present, other elements are required.
    List Conditional If one element is present, at least one of the other elements is required.

    For each rule, you are presented with either one or two element selections into which you select elements.

  6. For example, if you add the List Conditional rule, click select an element for the first element selection and click select one or more elements for the second element selection.

    List Condition rule with links for select an element and for select two or more elements.

  7. Select appropriate elements.
    The current selections are displayed in terms of the element position numbers.


    List conditional with Elements 3 and 4 selected.

    The element position numbers identify the corresponding child elements inside the selected segment or composite. For example, 2 means CUR02 below and 3 and 4 mean CUR03 and CUR04.

  8. Click the element numbers in the rule description to add or remove elements.

    Note:

    Deleting a syntax rule first marks it for deletion (which can be undone) and then deletes it when the B2B schema is saved.

Add Child Elements to a Fixed-Length Schema

When editing a fixed-length schema, an additional option is provided for adding multiple child elements to a segment, each of a specified fixed length.

  1. Hover over the fixed-length schema and click Edit Edit icon.
  2. Hover over the row of a segment and click Actions Actions icon.
  3. Select Add child elements.

    The menu shows options for Delete, Add child elements, New child element, New segment, and New loop.

  4. Enter a comma-separated list of element lengths. For example:

    The elements lengths are 35, 4, 14, 35, 4, 14, 6, 35, 8, 4, 3, 3, and 3.

    This action adds alphanumeric child elements beneath the selected segment. The Element type column shows the length you entered for each child element.


    The details page shows a table with columns for Segment/Element, Position, Name, Requirement, User, and Element type. The Generate drop-down list and Edit info button appear at the top right.

Generate an Implementation Guide

You can generate implementation guides for standard or customized schemas to share with your trading partners.

About the Implementation Guide

An implementation guide is a single, consolidated document with full details about a B2B schema.

Typically, a host company shares the implementation guide for an EDI schema with their trading partners. This guide is shared especially when a schema has been customized to deviate from a standard X12 or X12 HIPAA document. It points out some of the customizations made to the standard schema (not all customizations are highlighted in the document).

In B2B for Oracle Integration, you can generate implementation guides for both standard and custom B2B schemas. The guide is generated as an HTML document, which you can edit to apply branding and print as a PDF file if necessary.

Note:

You cannot currently generate an implementation guide for EDIFACT documents.

The following image shows an example X12 implementation guide:

Description of sample-implementation-guide.png follows
Description of the illustration sample-implementation-guide.png

Structure of an Implementation Guide

List of Segments and Loops

The guide begins with a listing of each segment and loop defined in the document schema. Each row defines a segment or loop with the following columns:
  • Pos.No: The position number of the segment as defined in the X12 standard.
  • Seg.ID: The segment identifier.
  • Name: A descriptive name for the segment.
  • Req.Des: The requirement designator (M = Mandatory, O = Optional, C = Conditional).
  • Max Use: The Repeat property of the segment.
  • Loop Repeat: The Repeat property of the loop, when the row represents a loop.
  • Usage: The Usage property of the segment (Must Use, Not Used, Recommended, Not Recommended).

Details Section for Each Segment

Each segment has a details section that lists elements in the segment as shown in the following image:

Description of segment-detail.png follows
Description of the illustration segment-detail.png

The Data Element Summary table lists the elements declared in the segment and has the following columns:
  • User Option: The Usage property of the element (Must Use, Not Used, Recommended, Not Recommended).
  • Ref Des: The reference designator of the element, which is a convention to represent an element. For example, BEG01 is the first element in the segment BEG. If an element is a composite element, the child elements in the composite use the convention REF04-01, where 01 is the sub-element position, 04 is the composite element's position, and REF is the segment.
  • Data Element: The identifier of the element's definition.
  • Name: A descriptive name assigned to the element.
  • Attributes: Includes more properties of the element's definition. A value like M ID 2/2 is made of the following parts:
    • The requirement designator for the element (M = Mandatory, O = Optional, C = Conditional).
    • Element's data type (ID=Identifier, AN=Alphanumeric String, N0=integer number, etc.).
    • Element's minimum and maximum character length. A value 1/30 implies that the element's value must be between 1 and 30 characters to be valid.

Generate the Implementation Guide for a Schema

View or download the implementation guide for a schema in the HTML format. The implementation guide is supported only for X12 and X12 HIPAA.

  1. In the navigation pane, click B2B, then Schemas.
  2. For a standard schema: Click Generate, then click Implementation Guide.
  3. For a custom schema: Hover over a schema row.
  4. Click Actions Actions icon, then select Generate implementation guide.
  5. On the Generate Implementation Guide page, click Download or View to generate the document in HTML format.