Generate SSCC-18 values for each pallet and carton: concatenate the GS1 Company Prefix, serial reference, and a placeholder check digit position.
Calculate the SSCC-18 check digit using GS1 Mod-10 with alternating weights of 3 and 1 (multiply digits from right-to-left alternating 3, 1, 3, 1...), sum the products, and find the digit that makes the sum a multiple of 10.
Encode the SSCC-18 in a GS1-128 barcode using Application Identifier (00) followed by the 18-digit value; print on pallet/carton labels with human-readable text below the barcode.
Build the EDI 856 ASN with the shipment (BSN), order (PRF), pack (HL/TD5), and item (LIN/SN1) hierarchy, referencing each SSCC in the MAN segment with qualifier CP (carton) or PL (pallet).
Validate the 856 against your trading partner's implementation guide — hierarchy levels and MAN qualifier requirements vary by retailer.
Transmit via AS2 or VAN and retain the interchange control number for reconciliation against the partner's 997 functional acknowledgment.
Known gotchas
SSCC-18 check digits use GS1 Mod-10 with alternating 3/1 weighting — this is not the Luhn algorithm; applying Luhn will produce incorrect check digits.
The 856 must be transmitted and acknowledged before goods arrive at the retailer's dock; late ASNs typically incur chargeback penalties defined in the trading partner's routing guide.
Hierarchy structure (shipment/order/pack/item vs. shipment/pack/item) must match the trading partner's implementation guide exactly or the document will be rejected.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp