Construct the ISA segment with correct interchange control version number, sender and receiver ID qualifiers and IDs, and a unique ISA13 interchange control number padded to nine digits; set the ISA16 component element separator to a character that will not appear in data
Wrap each functional group with a GS segment that carries the functional identifier code matching the transaction type, the group control number in GS06, and the implementation convention reference matching the adopted guide version such as 005010X279A1
Open each transaction set with ST01 set to the transaction set identifier code and ST02 set to a unique four-digit control number within the group; close with SE01 set to the total segment count including ST and SE
After submission, wait for the TA1 interchange acknowledgment which signals whether the ISA envelope was syntactically accepted or rejected at the interchange level before any functional processing occurs
Parse the 999 functional acknowledgment for each GS group: read the AK1 loop to match the group, then each AK2/AK5 transaction set loop; AK501 value A means accepted, E means accepted with errors, R means rejected
If any transaction set is rejected in the 999, use AK3 and AK4 segments to identify the exact loop, segment position, element position, and error code before correcting and resubmitting only the rejected transactions
Known gotchas
The ISA13 interchange control number must be unique per trading partner relationship; reusing a previously accepted ISA13 will cause the TA1 to return an error code indicating a duplicate interchange
A TA1 with acknowledgment code A (accepted) does not mean the payload transactions were valid — it only confirms the ISA envelope was structurally correct; the 999 carries transaction-level acceptance
Some clearinghouses do not return a TA1 and only return a 999; confirm the expected acknowledgment type with your trading partner during enrollment to avoid waiting indefinitely for a TA1 that will never arrive
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