Establish an EDI trading partner relationship with the marine terminal operator to receive 322 transactions via AS2 or SFTP
Parse the W17 segment to identify the terminal, transaction type (gate-in vs. gate-out), and equipment number
Extract container seal numbers and chassis identification from the W09 and W27 segments
Correlate the 322 terminal event with the associated bill of lading and booking in your TMS using the container number as the join key
Use gate-in confirmation to trigger drayage dispatch and gate-out events to update cargo release and demurrage free-time calculations
Known gotchas
EDI 322 is specifically a terminal operations transaction set distinct from the 315 carrier status message; some integrations incorrectly conflate the two
Terminal operators may require membership or direct EDI agreements separate from the ocean carrier relationship
Free-time calculations for demurrage and detention start from the terminal's gate-in event in the 322, not the vessel arrival; use the 322 timestamp as the authoritative trigger
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