Typical mapping issues: CTT-01 in X12 856

A typical issue – when an unexperienced developer works on the outbound X12 856 documents (ASNs/Ship Notices), they often populate CTT-01 with the number of products this Ship Notice contains. Partly because of its definition of

CTT-01 354 Number of Line Items
Total number of line items in the transaction set

But for X12 856 CTT-01 should contain the number of HL groups/loops. There is a note about it in the standard:

NOTES 3/010 Number of line items (CTT01) is the accumulation of the number of HL segments. If used, hash total (CTT02) is the sum of the value of units shipped (SN102) for each SN1 segment.

Gennady Kim