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 or EDIFACT 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.
- 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 segmentSE
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 segmentUNT
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.
- On the B2B Schemas page, hover over a schema and click Edit
.
- In the schema editor, hover over a row of required hierarchy and click Actions
.
- Select an option from the Actions list 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 list vary according to the hierarchy of the rows. The Actions list for a segment or loop row has options to create new child elements, child composites, segments and loops, whereas the Actions 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.
- On the B2B Schemas page, hover over a schema and click Edit
.
- In the schema editor, hover over a row you want to modify and click Edit Details
.
The Details panel appears 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 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 |
This setting is preselected by the X12 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.
|
Type |
The element's type as defined by the X12 standard in the EDI X12 element dictionary or the 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.
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.
- Hover over the element row and click Edit
Details
.
The Details panel appears on the right, displaying the Properties tab.
- Click Code List
.
If there is a code list defined, all code values are displayed in the table.
- 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. - 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 the illustration multiple_code_lists.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.