Configure Conditional Guideline Requirements

As a leader, you can configure conditional logic in a guideline using:

Configure Syntax Notes

Syntax Notes are conditional relationships between elements within a segment.
For example, a syntax note might specify that if one element is present, another must also be present. This ensures that related data elements are used together appropriately.

To configure a syntax note:

  1. Open a draft guideline.
  2. On a segment row, under the column “Syntax Notes”, click on “Add” or “XX Notes”.
  3. On the Syntax Note modal, select a relation type (see different types below).
  4. Select elements included in your syntax note.
    The modal will display a user-friendly summary of the syntax note once elements are selected.
  5. Click “Add Syntax Note”.

Note: If you’re entering a guideline with an X12 version, syntax notes defined by the X12 standards are already applied.

You can implement different types of Syntax notes:

  • P (Paired or Multiple) Syntax Note:
    • Definition: If any one of the specified data elements is present, then all must be present.
    • Example: In the (L11) Business Instructions and Reference Number segment, if element (L1101) Reference Identification is present, then element (L1102) Reference Identification Qualifier must also be present, and vice versa.
  • R (Required) Syntax Note:
    • Definition: At least one of the specified elements must be present.
    • Example: In the (N1) Party Identification segment, at least one of the elements (N102) Name and (N103) Identification Code Qualifier must be present. Both can also be present.
  • C (Conditional) Syntax Note:
    • Definition: If one specified data element is present, then another specified data element must also be present.
    • Example: In the MS3 (Interline Information) segment, if element (MS305) State or Province Code is present, then element (MS303) City Name must also be present.
  • L (List Conditional) Syntax Note:
    • Definition: If one specified data element is present, then at least one of the elements in a specified set must also be present.
    • Example: In the (ITD) Terms of Sale/Deferred Terms of Sale segment, if element ITD03 (Terms Discount Percent) is present, then any one of elements (ITD04) Terms Discount Due Date, (ITD05) Terms Discount Days Due, or (ITD13) Day of Month must also be present.
  • E (Exclusive) Syntax Note:
    • Definition: Not more than one of the specified data elements may be present.
    • Example: In the (AT7) Shipment Status Details segment, you can use either (AT7) Shipment Status Details or (AT703) Shipment Appointment Status Code but not both within the same segment.

Configure Loop or Segment Variants

Loop or Segment Variants allows users to apply conditional logic to enforce different structure and requirements on child loops, segments, and elements within a specific loop or segment.
A variant must have a unique identifier, a code in the initial segment of the variant. Then you can define applicable requirements for its subordinate structures. This allows for precise control over the data hierarchy, ensuring that appropriate conditions are enforced throughout the transaction set.

To configure loop or segment variants:

  1. Open a draft guideline.
  2. Click on “Edit Structure”.
  3. In the modal, locate the loop or segment you want to have variants for.
  4. Click on the “+” icon on the right side of a loop or segment to duplicate it.
    You can duplicate loops and segments as many times. Each duplicate represents a variant.
  5. If you choose to create a loop variant, you can select a different child structure for each duplicated loop.
  6. Click “Save”.
  7. On your guideline page, go to your loop or segment variants you just created.
  8. For each variant:
    • Define the variant uniqueness by adding a unique code on a mandatory ID element of the first segment.
    • Define granular requirements of children loops, segments and elements.

Notes:
Each variant has their own usage requirement. So you can mark some variants Mandatory and others Optional.
You can also implement a condition set on a variant.

📘

Example - Loop variant

To set up an Advance Ship Notice (ASN) guideline with a Shipment-Order-Pack-Item (SOPI) hierarchical structure, you'll need to define four Hierarchical Level (HL) loop variants, each representing a different hierarchical level. Each HL loop variant is identified by the HL03 code and contains specific child segments pertinent to that level.

  • 1st HL Loop Variant: Shipment Level (HL03 = 'S'): Represents the overall shipment.
    Children Segments: Segments related to shipment information, such as TD1 (Carrier Details - Quantity and Weight), TD5 (Carrier Details - Routing Sequence/Transit Time), REF (Reference Identification), DTM (Date/Time Reference), ...
  • 2nd HL Loop Variant: Order Level (HL03 = 'O'): Represents individual orders within the shipment.
    Children Segments: Segments related to order information, such as PRF (Purchase Order Reference), ...
  • 3rd HL Loop Variant: Pack Level (HL03 = 'P'): Represents packaging details within each order.
    Children Segments: Segments related to packaging information, such as MAN (Marks and Numbers), MEA (Measurements), ...
  • 4th HL Loop Variant: Item Level (HL03 = 'I'): Represents individual items within each package.
    Children Segments: Segments related to item information, such as LIN (Item Identification), SN1 (Item Detail - Quantity), PID (Product/Item Description), ...

Configure Condition Sets

Condition Sets are set to control conditionally the usage and codes of specific loops, segments or elements based on the presence or absence of certain data elsewhere in the transaction.
Condition sets help set up various business use cases where multiple interrelated conditions must be evaluated to determine the appropriate structure and requirements of the EDI message.

To configure condition sets:

  1. Open a draft guideline.
  2. On a loop, segment or element row, click on the "IF" icon.
  3. On the Condition Sets modal, choose a type of condition set:
    • Usage Condition Set: You can conditionally control the usage of your path (M - Mandatory, O - Optional, NU - Not Used, ...) based on another path existence or value.
    • Code Condition Set: You can conditionally control the list of allowed codes of your path based on another path existence or value.
      You can only set up code condition sets on an element that has a list of allowed codes.
  4. Configure your 1st condition:
    1. On the IF statement:
      1. Select a condition path: Loop, Segment or Element path
      2. Choose an Operator: Includes, Does Not Include, Is Empty, Is Not Empty.
        You can only choose Include or Does Not Include for element path
      3. Enter values: Only available if you selected the operator Include or Does Not Include
      4. You can add another condition paths with an AND or OR statement if you have a complex condition logic. You can add up to 5 condition paths.
    2. On the THEN statement, choose a usage or a list of allowed codes.
  5. Configure multiple conditions if needed.
    You can configure up to 5 conditions.
  6. Define the default usage or a list of allowed codes.
  7. Click "Save".

📘

Example - Condition Sets

Example 1: On a Purchase order acknowledgment (855) guideline, you want to ensure suppliers send a price when indicating a price change, or a quantity when indicating a quantity change.
You can configure 2 condition sets:

  • On the element (PO104) Unit Price:
    IF (ACK01) Line Item Status Code Includes IP THEN (PO104) Unit Price Is Marked As M - Mandatory
    ELSE (PO104) Unit Price Is Marked As O - Optional
  • On the element (ACK02) Quantity:
    IF (ACK01) Line Item Status Code Includes IQ THEN (ACK02) Quantity Is Marked As M - Mandatory
    ELSE (ACK02) Quantity Is Marked As O - Optional

Example 2: On a response to a load tender (990) guideline, you want to ensure carriers provide a reason when declining a load tender.
You can configure 1 condition set:

  • On (K1) Remarks:
    IF (B104) Reservation Action Code Includes D THEN (K1) Remarks Is Marked As M - Mandatory
    ELSE (PO104) Unit Price Is Marked As NU - Not Used