After generating your internal invoice, map invoice fields (invoiceNumber, invoiceDate, totalAmount, lineItems with unitPrice and quantity, paymentTerms) to the Stedi JEDI JSON schema for the X12 810 transaction set.
POST the JEDI JSON to POST /2024-01-01/x12/translate with {direction: 'json_to_x12', guideId: YOUR_810_GUIDE_ID} — Stedi returns a valid X12 EDI string in the response body.
Validate the translated X12 against the partner's compliance requirements in your 810 Guide (check required segments like BIG, CUR, N1 loops for buyer/seller, IT1 line items, TDS total).
Send the translated EDI to the partner via POST /2024-01-01/partnerships/{partnershipId}/outbound, providing the X12 content and the envelope metadata (ISA sender/receiver IDs).
Monitor for an inbound 997/999 Functional Acknowledgment from the retailer — an AK2 segment with error code '1' to '7' indicates a structural problem requiring a re-submission.
Reconcile the 810 against the original 850 PO and 856 ASN by matching PO number (BIG02) and shipment references to maintain a complete audit trail for chargeback disputes.
Known gotchas
Many retailers require the 810 invoice to reference the original 850 PO number in the BIG segment and the 856 ASN reference in the REF segment — missing these cross-references is a common cause of invoice rejection.
Tax amounts and allowances/charges (ACS segments) must be itemized separately per retailer compliance guides; lumping all charges into the total will fail validation.
The 997 Functional Acknowledgment only confirms EDI structural receipt — it does not mean the invoice was financially approved; monitor for separate payment confirmations from your accounts receivable system.
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