DEV Community

Ariftly
Ariftly

Posted on Originally published at ariftly.io

A 997 Passed. Did the Purchase Order?

Ariftly EDI acknowledgment evidence framework

Disclosure: This is Ariftly engineering research. The examples are synthetic, not customer evidence or production benchmarks. EDI onboarding remains a future workflow direction, not a shipped Ariftly product.

EDI partner onboarding is usually described as a mapping and transport exercise: convert the order, connect two endpoints, validate a sample and obtain certification. The harder operational issue is knowing what “finished” means. When the receiving organization uses several independent components, no single technical acknowledgment necessarily spans all of them.

Start by specifying the intended commercial outcome. In a typical X12 purchase-order exchange, an 850 requests goods or services. The sender may use AS2 for transport. The trading partner's systems may return an AS2 MDN, a 997 or 999, and, where agreed, an 855 from the seller's order process. The sequence sounds linear, but each response has its own scope and identifiers.

Transport boundary. RFC 4130 specifies AS2, including synchronous and asynchronous MDNs. A correctly verified signed receipt can offer important evidence about message delivery and integrity. The receiving party's signature, the original-message identifier, the returned MIC and the disposition provide pieces of that proof when required. A transport response or an MDN's arrival alone should not be interpreted as proof of the business outcome. The RFC's own example cautions that received EDI data may still be syntactically incorrect or not have reached the translator. Security configuration must follow current practice rather than copying 2005-era algorithms uncritically.

Syntax boundary. X12 defines the 997 to report syntactic-analysis results for encoded EDI transaction sets. Its definition expressly does not address the meaning of the business content. The 999 includes syntactic and relational analysis against the relevant implementation scope, yet it still does not establish the encoded business transaction's semantic meaning. A 997 with accepted counts is useful validation evidence. It is not the same thing as acceptance of quantities, dates, items or contractual terms.

Commercial response boundary. X12 describes the 855 as the response from a seller's purchase-order system after processing an 850. One official example depicts acceptance without line-item detail; another depicts a changed order involving date, quantity, price, substitution and a line rejection; another illustrates an order being rejected. The key observation is not that any one format is universal. It is that an engineer must interpret the received 855 under the exact agreed version and partner-specific guide. A bare message count or the presence of an 855 is not enough.

A disciplined implementation can represent these as a versioned evidence contract. The contract should state which responses are mandatory, which are optional, which identifier fields must match, what time window applies, how changes are handled, what counts as an authoritative order state and which person can approve an exception. The contract is not a standard transaction set. It is the organization's policy for determining whether the integration has met its promised outcome.

Correlation deserves explicit design. An AS2 MDN refers to an original AS2 message. A 997 or 999 may report on a group or multiple included transaction sets. An 855 refers to a purchase order and, in some cases, individual lines. These identifiers are not interchangeable. Build joins at the actual message, group, transaction and order levels and preserve sufficient context to explain why a particular business response belongs to a particular outbound PO. If the response omits optional line detail, do not fabricate a line-by-line proof from the header alone.

Negative tests should be engineered before go-live. Simulate a transport receipt arriving but syntax failing; an accepted 997 followed by a rejected 855; a response containing changed terms; a late or missing functional response; a wrong-PO reference; and a claimed acceptance that disagrees with the designated receiving system. Every scenario should specify the classification, escalation owner, safe retry behavior and record required for audit or handover.

The companion educational kit illustrates six such cases. Its CSV includes normalized fields for MDN state, 997 status, 855 status, PO-reference match and independent order-state check. The Python evaluator produces VERIFIED, WAIT_BUSINESS, BLOCK_SYNTAX, BLOCK_BUSINESS, REVIEW_DISCREPANCY or REVIEW_EVIDENCE_GAP under a deliberately strict fictional partner policy. The six outcomes are designed test coverage, not observed EDI traffic. The program is not a live AS2 validator or X12 parser and must not be installed as production acceptance logic.

This creates a useful division of responsibilities. Deterministic services validate protocol receipts, syntax and references. The seller's actual business response supplies commercially relevant evidence. A trusted system of record confirms whatever additional outcome the agreement requires. Operators resolve missing or contradictory evidence. AI may help analyze partner guides or summarize exception context, but its explanation is not the evidence. That is the difference between adding an AI feature and designing an operationally verifiable integration workflow.

A handover package should therefore contain the contract, test messages, negative-case results, correlated acknowledgment evidence, exception runbook, owner matrix and sign-off. The objective is not to make every status turn green. It is to be able to say exactly what was checked, what was not checked, and who accepted the remaining risk.

Sources: RFC 4130 (https://www.rfc-editor.org/rfc/rfc4130.html); X12 transaction sets (https://x12.org/products/transaction-sets); X12 supply chain flow (https://x12.org/flow/supply-chain); X12 855 public examples (linked in the canonical article).

From human-operated to bounded AI-operated workflows

The useful role for AI is not to invent an acceptance state. It is to compare partner documentation, prepare evidence, summarize exceptions and propose next actions. Deterministic software must still verify receipts, syntax, correlation, policy and business state. Consequential discrepancies stay with an accountable person.

A practical maturity path is: people perform and decide; AI prepares evidence; bounded steps execute under deterministic controls; autonomy expands only after representative work demonstrates reliability. That is the Ariftly View: redesign the workflow before adding a model, preserve an evidence chain and make every exception destination explicit.

Ariftly Forge is the in-development experience for recording, redesigning and operating workflows. Forward-Deployed AI Engineering is the implementation motion for one bounded workflow at a time. This article does not claim that Forge currently operates EDI onboarding in production.

Read, reproduce and cite

The full canonical guide includes the Ariftly Eight-Gate Acknowledgment Framework, methodology, limitations and downloadable six-case research pack:

Does an EDI 997 mean an order was accepted?

Documentation and data are available under CC BY 4.0; the evaluator code is MIT licensed.

Top comments (0)