From: WLAIDLEY@BCSC02.BITNET (Bill Laidley)
Newsgroups: bit.listserv.edi-l
Subject: RE: What is a Hierarchical transaction
Date: 29 Dec 92 20:14:03 GMT
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU

Hierarchical EDI transactions

I'll use the X12 Shipment and Billing Notice (857) to explain what
a hierarchical EDI transaction is. Caveats - my copy of the X12
release 3.2 standard is at work, and I'm at home so there are apt to
be errors and omissions...

The Shipment and Billing notice has been designed for use where the
shipment notice information can also be used (with the addition of
some more information) for billing purposes. It is not intended to
be used for just a shipment notice or just an invoice. It is used
where the actual billed cost of the goods shipped is not known in
advance (additional freight charges, special handling...).

This transaction supports two hierarchies - single vendor or multiple
vendor. I'll use the single vendor hierarchy in this example because it
is the one I've been working on. What follows is a 'picture' of the
hierarchy in ASCII characters.

Shipment and Billing Notice (857)
 :
 +--Shipment information
 :
 +--Financial information
     :
     +--Purchase order
         :
         +--Item
             :
             +--Pallet
             :
             +--Pack or sub-pack

An example...

Vendor X has shipped two truckloads of goods to us. The first truck
is carrying 3 products (10 pallets or 400 cases of each). The second
truck is carrying 1 product only (20 pallets, 800 cases). Product A
costs $2.00, B costs $5.00, C costs $10.00, and D costs $1.00.
There are no special handling charges, and the freight cost has been
calculated by the shipper to be $500.00. Products A, B, and C are on
purchase order. Product D is from a second P/O, but is a partial
shipment - 1000 cases were ordered.


Shipment and Billing Notice (857)
 :
 +--Shipment information - information about truck #1, carrier, arrival
 :                         date, container or trailer number...
 :
 +--Financial information - invoice information, amount, terms, discounts
 :   :                      due date...
 :   +--Purchase order - identify original P/O
 :       :
 :       +--Item - product A, costs $2.00 each, quantity 400 cases
 :       :   :
 :       :   +--Pallet # 1 - size information, bar code
 :       :   +--Pallet # 2 - size information, bar code
 :       :   +--Pallet # 3 - size information, bar code
 :       :   +--Pallet # 4 - size information, bar code
 :       :   +--Pallet # 5 - size information, bar code
 :       :   +--Pallet # 6 - size information, bar code
 :       :   +--Pallet # 7 - size information, bar code
 :       :   +--Pallet # 8 - size information, bar code
 :       :   +--Pallet # 9 - size information, bar code
 :       :   +--Pallet # 10 - size information, bar code
 :       :   :
 :       :   +--Pack or sub-pack - no case information included.
 :       :
 :       +--Item - product B, costs $5.00 each, quantity 400 cases
 :       :   :
 :       :   +--Pallet # 1 - size information, bar code
 :       :   +--Pallet # 2 - size information, bar code
 :       :   +--Pallet # 3 - size information, bar code
 :       :   +--Pallet # 4 - size information, bar code
 :       :   +--Pallet # 5 - size information, bar code
 :       :   +--Pallet # 6 - size information, bar code
 :       :   +--Pallet # 7 - size information, bar code
 :       :   +--Pallet # 8 - size information, bar code
 :       :   +--Pallet # 9 - size information, bar code
 :       :   +--Pallet # 10 - size information, bar code
 :       :   :
 :       :   +--Pack or sub-pack - no case information included.
 :       :
 :       +--Item - product C, costs $10.00 each, quantity 400 cases
 :           :
 :           +--Pallet # 1 - size information, bar code
 :           +--Pallet # 2 - size information, bar code
 :           +--Pallet # 3 - size information, bar code
 :           +--Pallet # 4 - size information, bar code
 :           +--Pallet # 5 - size information, bar code
 :           +--Pallet # 6 - size information, bar code
 :           +--Pallet # 7 - size information, bar code
 :           +--Pallet # 8 - size information, bar code
 :           +--Pallet # 9 - size information, bar code
 :           +--Pallet # 10 - size information, bar code
 :           :
 :           +--Pack or sub-pack - no case information included.
 :
 +--Shipment information - information about truck #2, carrier, arrival
 :                         date, container or trailer number...
 :
 +--Financial information - invoice information, amount, terms, discounts
     :                      due date...
     :
     +--Purchase order - identify original P/O...
         :
         +--Item - product D, costs $1.00 each, quantity 800 cases,
             :     200 cases back ordered for 60 days
             :
             +--Pallet # 1 - size information, bar code
             +--Pallet # 2 - size information, bar code
             +--Pallet # 3 - size information, bar code
             +--Pallet # 4 - size information, bar code
             +--Pallet # 5 - size information, bar code
             +--Pallet # 6 - size information, bar code
             +--Pallet # 7 - size information, bar code
             +--Pallet # 8 - size information, bar code
             +--Pallet # 9 - size information, bar code
             +--Pallet # 10 - size information, bar code
             +--Pallet # 11 - size information, bar code
             +--Pallet # 12 - size information, bar code
             +--Pallet # 13 - size information, bar code
             +--Pallet # 14 - size information, bar code
             +--Pallet # 15 - size information, bar code
             +--Pallet # 16 - size information, bar code
             +--Pallet # 17 - size information, bar code
             +--Pallet # 18 - size information, bar code
             +--Pallet # 19 - size information, bar code
             +--Pallet # 20 - size information, bar code
             :
             +--Pack or sub-pack - no case information included.

The key feature to note is that you must 'descend' the hierarchy to get
the lower levels of detail. I.E. if you want to know about a specific
pallet in this hierarchy you must know the item, the P/O, and the
shipment. There are no short cuts that I'm aware of. On the positive
side, the transaction has been designed to carry a wealth of useful
information (bar code, special purpose reference numbers...).

The 'HL' segment is the glue that ties all of the layers together.
Each HL has a unique (within the transaction) identifier number,
identifies the parent HL segment (unless it is the root) and may
also identify a child HL (but only one, and there may be more than
one child) segment.

I suspect that each translator treats HL's slightly differently,
and I haven't implemented an 857 yet, so I'm not sure how the
translator will behave.

Regards, Bill Laidley
EDI Expert Team
BC Systems Corp. Vancouver (604) 660-9705
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU