POA Matching And Validation Workflow
Summary
Matching and validation decide whether interpreted procurement evidence can safely become workflow state. They connect document claims to purchase orders, receipts, jobs, vendors, terms, materials, invoice numbers, packing slip lines, and routing rules.
The concept page POA Matching And Validation explains the primitive. This workflow thread focuses on how matching creates operator-visible confidence, not hidden parser decisions.
Reader Question
How does POA decide whether interpreted document evidence is trustworthy enough to advance, needs repair, or must wait for external context?
Surface Or Workflow
Operators see matching through PO selectors, line assignment evidence, repair diagnostics, invoice QBO diagnostics, review item status, and stage summaries. Engineers enter through matching services, lookup services, policy modules, and workflow transition packages.
Lifecycle
The workflow loads interpretation output and lookup context, runs deterministic policy, persists match candidates and selected matches, and projects status back into the operator surface. Matching can produce accepted state, issue state, or repair fields depending on ambiguity.
Validation is layered. Some checks are pure policy, such as required document fields. Others depend on lookup state, external IDs, invoice number policy, or packing slip receipt context. The state machine uses those results to decide whether to create review tasks, wait, retry, or render external commands.
Child Threads
- POA Operator Repair: covers the human correction path when matching is ambiguous.
- POA External Sync Workflow: consumes validated state for outbound commands.
- Review Primitives: explains the shared case, issue, and review concepts that POA composes.
Implementation Boundaries
services/poa/matching owns matching contracts and service behavior. services/poa/lookups provides read-only lookup context. services/poa/policy owns deterministic business policy. services/poa/workflows coordinates document-specific transitions. Persistence for match state lives under services/poa/persistence/matching.
Tradeoffs
Matching is intentionally not embedded inside the interpretation processor. That extra boundary makes it possible to repair a vendor, PO, receipt, or line assignment without rerunning source intake, and it lets the console explain which evidence was interpreted versus which evidence failed validation.
Visual
The current visual is a graph neighborhood. The intended visual is a validation state diagram from interpretation to lookup context, policy checks, match candidate selection, review issue, repair, and command readiness.
Source Evidence
docs/engineering/concepts/poa-matching-and-validation.mdservices/poa/matchingservices/poa/persistence/matchingservices/poa/lookupsservices/poa/policyservices/poa/workflowsservices/poa/jobs/matching_params.pytests/poa/test_poa_policy_matching_and_payloads.py