In Aplos Document Desk, the model produces a draft. A separate state transition decides whether that draft can become a CSV.
That boundary matters because a plausible value can still be wrong. A date may have two interpretations. A total may appear several times. A credit note can become a positive number if a parser loses the sign.
Here is how the shipped implementation separates extraction, review and export. This is a description of our implementation, not a claim that the approach eliminates document errors.
Store a candidate and its evidence separately
The extractor returns fields with a value and a source quote. Application code normalizes the candidate and checks whether the quoted text occurs in the extracted source. It retains an anchor for the review interface.
A matching quote establishes that text exists. It does not establish that the text is the correct field, or that OCR read the original image accurately. The original page preview remains available next to the draft.
Money fields need more than substring matching. If the document says (156.60), finding 156.60 inside it does not support a positive amount. Our wrapper inspects the surrounding printed sign and rejects a positive candidate drawn from a negative source amount.
Ambiguous dates and unsupported currencies remain unresolved. Filling every cell is not a useful goal if doing so requires a guess.
Make review a server-side state transition
Documents begin as queued or processing, then become drafts. A reviewer can save changes, exclude a document or explicitly mark it reviewed. Required-field errors prevent review. Warnings, including possible duplicates and inconsistent totals, require acknowledgement and a review note.
Every update carries a version. The server rejects stale changes when another update has already changed that document. Saving an edit resets its review state.
Duplicate decisions also depend on the batch. If a supplier or reference changes and creates a possible duplicate with a previously reviewed document, that earlier review is invalidated. A green check must describe the current data, not an old version of it.
The simplified transition looks like this:
uploaded -> queued -> processing -> draft
draft -> reviewed, after required checks and explicit confirmation
draft -> excluded
reviewed -> draft, after a change that needs renewed review
This is explanatory pseudocode. The production implementation also handles interruptions, expiry and bounded retry.
Seal the artifact before checkout
Preparing an export happens inside a database transaction. Each included document must be reviewed; excluded documents are omitted. The server constructs the CSV once, saves its bytes and hash, and links the batch to that export job.
A repeated preparation request returns the existing job. Once sealed, the batch cannot silently change the file being purchased.
Payment fulfillment uses the existing server-side verification path. A successful browser redirect alone does not grant download access. The verified payment must match the intended account, mode, product, price, quantity, amount, currency and export job.
This separates three facts that are easy to blur together: a model returned fields, a person reviewed those fields, and a payment authorizes access to a particular artifact.
Test the transitions as well as the extractor
The useful cases are not limited to a clean invoice. We check ambiguous dates, negative amounts, duplicate files, supplier/reference collisions, stale updates, edits after review, export before review, download before payment and source access from another session.
Our development evaluation used owned synthetic documents. That helps expose implementation defects, but it does not establish customer-document accuracy, review speed or performance against another product. Every included document still requires review.
The public product supports small English invoice, receipt and credit-note batches and exports document totals. It does not extract line items or post accounting entries.
You can inspect the sample workflow at Aplos Document Desk. Preview is free; a reviewed CSV batch of up to twenty documents costs $9.
Disclosure: I build Aplos. This write-up was prepared with AI assistance and checked against the shipped extraction, review and export code.
Top comments (0)