Customizing ITX Standard for Hierarchical Loop level

The instructions below reference the X12 856 Advanced Ship Notice transactions but can be used for similar hierarchical structures.

Procedure

  1. Make a copy of the type tree to be customized. You can also trim/prune the type tree to remove components not used. There is a documented process for accomplishing this task.
  2. Open the copy of the standard type tree to be used.
  3. Navigate to ANSI V8020 > Set > Partner > Inbound > 856 transaction and expand.
  4. Copy LoopHL to each HL Loop level needed in the hierarchy.

    For example, copy LoopHL to LoopHLShip, then again for LoopHLOrder, and again for LoopHLPack, and LoopHLPackItem.

  5. Open LoopHLPack and add LoopHLItem (set range to min 0, max s). Open LoopHLOrder and add LoopHLPack (set range the same on all). Open LoopHLShip and add LoopHLOrder.
  6. Open the transaction and edit the component LoopHL as follows:
    1. Modify to LoopHLShip. Or drag and drop Loop HLShip and set range to be the same as LoopHL.
    2. Remove the LoopHL component.
  7. Enter the following mapping rule on LoopHLShip:
    HierarchicalLevelCd Element:HL Segment:$ = "S"
    & (ABSENT(HierarchicalParentIDNum Element:HL Segment:$) 
    	| MEMBER(HierarchicalParentIDNum Element:HL Segment:$,{"0", " "}))
    
  8. Open LoopHLShip and move to the bottom and enter the following mapping rule on LoopHLOder:
    HierarchicalLevelCd Element:HL Segment:$ = "O"
    & HierarchicalParentIDNum Element:HL Segment:$ = HierarchicalIDNum Element:HL Segment
    
  9. Open LoopHLPack and LoopHLItem and enter the following mapping rule:
    HierarchicalLevelCd Element:HL Segment:$ = "P"
    & HierarchicalParentIDNum Element:HL Segment:$ = HierarchicalIDNum Element:HL Segment
    HierarchicalLevelCd Element:HL Segment:$ = "I"
    & HierarchicalParentIDNum Element:HL Segment:$ = HierarchicalIDNum Element:HL Segment
    
  10. Save and analyze the type tree.

Results

The input should parse into each HL Loop depending on the HL Loop level code:

(HierarchicalLevelCd Element:HL Segment:$) and its parent id (HierarchicalParentIDNum Element:HL Segment:$ = HierarchicalIDNum Element:HL Segment)