| Author: Abdullah Ahmed | Category: AI Automation
A document arrives in the shared inbox with a familiar supplier name and an unfamiliar layout. The amount is easy to read. The purchase order reference is split across two lines, the attachment contains several separate invoices, and the sender has included a correction in the email body.
Document intake is a sequence of decisions about identity, completeness, evidence, and responsibility. AI extraction can help with variable layouts and language, but a useful intake system must also validate the result, route the work, and expose exceptions to the right people.
Consider an illustrative supplier-document workflow throughout this guide. The same design questions apply to service forms, onboarding packs, delivery paperwork, and internal operational requests. The destination and authority rules will differ, but the need to preserve the relationship between source and outcome remains.
Define what intake is responsible for
Decide where the intake workflow ends. It may create a reviewed draft record, classify and route a document, or accept a complete submission into a downstream process. Those outcomes carry different responsibilities.
For supplier invoices, intake could verify that a document is readable, identify the supplier and purchase order, extract the relevant fields, and create a review task. Approval for posting or payment should remain a separate operation unless explicitly included in the design.
Write acceptance rules for the document family. Specify required pages, acceptable file types, necessary identifiers, and the treatment of supporting attachments. A missing page should not become a successful extraction merely because the visible fields look plausible.
Identify the team that owns each unresolved condition. An unreadable scan may go back to the sender; an unknown supplier may need procurement; an amount discrepancy may need the order owner. “Manual review” is too vague to operate at volume.
Create a controlled receiving boundary
Assign a durable submission identifier as soon as the system accepts a file. Preserve the channel, receipt time, sender context, and relationship to any email or form. Use application-generated storage names rather than trusting a supplied filename as an identifier.
The OWASP File Upload Cheat Sheet recommends layered controls including allowed file types, size limits, type validation, safe storage, and appropriate scanning. Apply these before sending files through document parsers or model workflows.
Limit processing resources as well as file size. A compressed archive or unusually complex document can consume disproportionate memory or time. Define how encrypted files, unsupported formats, and damaged documents are rejected or routed for assistance.
Keep originals protected and separate from working derivatives. OCR output, page images, and extracted fields should refer back to the accepted source. Do not overwrite the source when a later processing step normalises or repairs a working copy.
Identify document boundaries before extracting fields
One attachment is not necessarily one document. A PDF may contain several invoices, a cover sheet, and delivery evidence. Conversely, a single submission may be spread across multiple attachments.
Make splitting and grouping explicit stages. Store the page ranges or attachment relationships that support each logical document. If the boundaries are uncertain, ask for review instead of combining unrelated amounts into one record.
Determine document type before applying a detailed extraction schema. An invoice, credit note, statement, and purchase order can contain similar fields but require different treatment. Misclassification can produce a result that is structurally valid and operationally wrong.
Retain context from the submission channel when it matters. A correction in an email may explain why a new attachment supersedes an earlier one. Preserve that relationship without allowing free-form email text to override the application's security or approval rules.
Extract into a schema that can represent uncertainty
Define the fields the next stage actually needs. For an invoice, these might include supplier identity, invoice reference, issue date, currency, line items, subtotal, adjustments, and total. Avoid extracting every visible detail merely because the model can return it.
Allow missing values and unresolved alternatives. If two dates appear and their meanings are unclear, preserve the uncertainty. Requiring every field to contain a value encourages a workflow to hide ambiguity behind a plausible guess.
Attach evidence locations to important fields: page number, region, or source text where available. A reviewer should be able to move from an extracted value to its source without searching the entire document.
Keep original and normalised values when conversion matters. A date string can be ambiguous across regional formats, and a number may use commas or spaces differently. Normalisation should be a traceable operation with agreed rules.
Validate structure, meaning, and business context separately
Structural validation asks whether the result matches the expected schema. Semantic validation asks whether values are meaningful: dates exist, currency codes are recognised, and quantities have the appropriate units. Business validation asks whether the document fits authoritative records and process rules.
These checks should produce separate results. A valid date does not prove it is the invoice date. A correctly extracted supplier name does not prove that the supplier is approved. A total that matches the printed document does not establish that the purchase was authorised.
| Layer | Example check | Possible next step |
|---|---|---|
| Structure | Expected fields and data types are present | Retry extraction within limits or review |
| Document meaning | Line totals agree with the document's stated arithmetic | Flag the specific discrepancy |
| Reference data | Supplier and order identifiers match authoritative records | Route uncertain matches to the owner |
| Process policy | The submission meets the next stage's acceptance rules | Accept, request clarification, or escalate |
Use deterministic checks where possible. Arithmetic, allowed values, and lookup rules should be implemented in code or policy rather than delegated to a model's explanation.
Match records without disguising ambiguity
A supplier name may match several entities, trading names, or branches. Use stable identifiers where available and combine evidence deliberately when they are absent. Record why a proposed match was selected.
Do not treat a model's confidence wording as a calibrated probability. Evaluate matching behaviour on representative known cases and distinguish exact matches, supported suggestions, and unresolved candidates.
For sensitive record changes, require the organisation's independent verification process. A document that states a new bank account is evidence of a request, not proof that the account change is legitimate.
Expose the alternatives to reviewers when they help resolve the case. Showing two plausible suppliers with their relevant identifiers is more useful than presenting one guess as a settled fact.
Detect duplicates at more than one level
A file hash can detect the same bytes arriving twice, but a rescanned or corrected document may have different bytes. Business duplicate detection needs identifiers such as supplier, document reference, date, and amount under the organisation's rules.
Separate duplicate submissions from legitimate revisions. A corrected invoice may supersede an earlier document, while an identical resend should normally link to the existing workflow. Keep both the relationship and the decision visible.
Prevent duplicate downstream effects with a stable operation reference. Even after intake deduplication, a worker can retry after a timeout. The destination's idempotency or uniqueness controls should protect the creation or posting step where available.
When an external result is unknown, reconcile it before creating another record. A duplicate warning after two records exist is less useful than a design that handles uncertainty before repeating the effect.
Build queues around actionable exception reasons
Route work according to what is needed next. Useful reasons include unreadable source, missing page, ambiguous identity, arithmetic discrepancy, unmatched order, and policy exception. Keep the underlying evidence with the task.
Distinguish technical failures from business exceptions. A parser outage belongs with the support owner; an unrecognised supplier belongs with the process owner. Sending both into one undifferentiated queue makes prioritisation difficult.
Set ownership, age, and escalation rules. A document waiting for clarification should not repeatedly re-enter extraction while nothing has changed. Record the requested information and resume from the appropriate stage when it arrives.
Give staff a controlled reassignment path. The first route may be wrong, especially during a pilot. Capture the correction so the team can improve routing rules and understand recurring ambiguity.
Design review around source comparison
Place extracted values next to the relevant source page and make uncertain fields easy to find. Preserve keyboard navigation, zoom, and the reviewer's position when moving between pages.
Show what the system has already checked. Reviewers should not need to repeat arithmetic that passed a reliable deterministic check, but they should understand its scope. A passed total check says nothing about the legitimacy of the purchase.
Allow field-level corrections with reasons where useful. Retain the previous value, the corrected value, and the actor. Avoid quietly replacing model output with a human edit and then reporting the final result as unassisted extraction accuracy.
Confirm the effect of accepting the document. Does acceptance create a draft, send it for approval, or post to the destination? The interface should make that transition unambiguous.
Evaluate on realistic document variation
Build a test set that includes common layouts and difficult cases: rotated scans, multiple documents, faded text, credit notes, unfamiliar suppliers, and corrections. Use appropriately authorised data and protect sensitive material.
Measure field accuracy separately for important fields. A system can extract most text correctly while missing the one identifier that controls routing. Track document-level acceptance quality and downstream corrections as well.
Measure review effort and abstention. A workflow that sends nearly every document to review may still organise work usefully, but its business case differs from one that reliably prepares complete drafts.
Keep a holdout set for checking prompt, parser, or model changes. Record versions and compare errors by document type. Overall averages can hide a regression affecting one supplier or a newly introduced form.
Operate the pipeline as a maintained service
Track intake volume, oldest unprocessed submission, extraction failures, review backlog, and confirmed destination completion. Monitor the whole path so that a healthy model endpoint does not conceal a stalled export.
Set retry limits and retain enough evidence to resume failed stages. A transient extraction failure should not require staff to upload the document again and risk creating a second submission.
Budget for storage, processing, review, monitoring, and maintenance. Document layouts and business rules change. Assign someone to review new exception patterns and decide whether the schema or validation needs adjustment.
Define retention for originals and derivatives according to the applicable business and records policy. Include temporary files, extracted text, review screenshots, logs, and failed-message stores. Removing the original while leaving several uncontrolled copies does not complete the lifecycle.
Follow a corrected multi-invoice submission
Suppose a supplier emails a PDF containing two invoices and then sends a corrected version of the second invoice. The first submission receives one intake identifier, while each logical invoice receives its own document record linked to its page range.
The corrected attachment receives a new submission identifier. Business matching suggests that it supersedes the second invoice rather than representing a third purchase. The system presents that relationship for review because the amount changed and the earlier document may already be in a downstream process.
If the earlier invoice remains a draft, the reviewer may replace it through a versioned update under the process rules. If it has already been posted, the correction follows the destination's supported adjustment process. The intake system should not silently overwrite history to make the two versions appear identical.
Meanwhile, the first invoice can continue independently if it passed the relevant checks. One exception should not necessarily block every document in the original email. Preserve the submission relationship while allowing document-level progress.
The operator view should answer which version is current, what happened to the earlier version, and where each invoice sits. This is the difference between extracting text from attachments and managing a dependable intake process.
Keep evidence usable as processing changes
A later OCR or model version may produce a better extraction from the same source. Store that as a new processing result rather than replacing the evidence associated with an earlier decision. Reviewers may need to compare the old and new values.
Decide whether reprocessing is for evaluation, draft improvement, or a new business action. Those modes need different permissions. An evaluation run should not post records simply because it uses the same extraction pipeline as production.
Choose an implementation boundary that supports change
Keep file reception, extraction, validation, review, and destination integration separated through clear internal interfaces. They can live in one application initially. The separation helps replace a parser or adjust a schema without changing every operating step.
Persist stage outcomes so work can resume from a known point. If destination submission fails, there is usually no reason to repeat successful file validation and extraction. If the source changes, create a new version and invalidate only the outcomes that depend on the changed evidence.
Define exportability before selecting a vendor. The organisation should understand how it retrieves original documents, structured results, corrections, and workflow history. Evaluate this through a real export and re-import exercise where long-term ownership matters.
Finally, reserve staff time for the review experience. A technically strong extraction service can still fail to deliver value if reviewers must open several applications and re-enter every correction. The useful unit of delivery is the completed intake workflow, including the people who handle its exceptions.
Walk one document through the proposed system
Before buying or building a broad intake platform, select one document family and demonstrate the entire journey. Include a clean submission, a correction, a duplicate, an ambiguous match, and a downstream timeout.
For each case, ask whether staff can identify the source, understand the result, see the next owner, and recover without guessing. These questions reveal more about production readiness than an extraction demo with a carefully chosen page.
Start with a clear acceptance boundary and a reviewable output. Expand document coverage only when the operating evidence supports it. That approach lets AI reduce reading and re-entry work while the business retains a reliable record of what arrived, what was understood, and what happened next.