AI workflows and agents
AI-assisted approval of incoming invoices
Invoices from e-mail are extracted, checked against rules and reach accounting after a person approves.
Fictional scenario. An example situation that illustrates the approach. It is not a client project and describes no measured results.
Business problem
A fictional distributor receives about a thousand invoices a month by e-mail. Entry is manual, errors are found late and approval depends on one person.
Assumptions
- Invoices are PDFs or photos in Latin and Cyrillic script.
- The ERP has an API for draft documents.
- Approval rules by amount and supplier are written down.
Constraints
- No invoice is posted without a person.
- Data stays in the EU.
- No change to the accounting process in the first phase.
Reference architecture
Components by stage — an illustration, not a running system and not a certified design.
01Trigger
- Invoice mailbox
- Upload from a portal
02Input
- Original kept unchanged
- OCR and field extraction
03AI and rules
- Extraction model
- VAT number and amount checks
- Match with the purchase order
04Review
- Approval queue
- Low confidence → a person
05Output
- Draft in the ERP
- Decision log
The diagram as a list
| Stage | Components |
|---|---|
| Trigger | Invoice mailbox, Upload from a portal |
| Input | Original kept unchanged, OCR and field extraction |
| AI and rules | Extraction model, VAT number and amount checks, Match with the purchase order |
| Review | Approval queue, Low confidence → a person |
| Output | Draft in the ERP, Decision log |
Interfaces
| From | To | Via |
|---|---|---|
| Mailbox | Intake service | IMAP/Graph API, read-only |
| Intake service | ERP | REST API, drafts |
| Queue | Accountant | Web interface |
Data flow
- The invoice arrives and the original is stored unchanged.
- Fields are extracted with a confidence score.
- Deterministic rules check amounts, VAT and the order.
- A person approves or corrects; the draft goes to the ERP.
- Every decision is logged.
Security boundaries
- Read-only mailbox account.
- The ERP API key is in a secrets store, not in code.
- Personal data in notes is masked before the model.
Where a person approves
- Every invoice above the threshold is approved by a person.
- A new supplier always goes to review.
Delivery phases
01 · Discovery
Sample invoices, rules and target fields.
02 · Pilot
One supplier, extraction and review only, no ERP writes.
03 · Integration
ERP drafts behind approval; more suppliers.
04 · Operation
Evaluation set, error and cost monitoring.
Limitations
- Handwritten invoices need manual handling.
- Quality depends on the scan quality.
Trade-offs
- More human review early on in exchange for fewer errors.
- Drafts instead of direct writes — slower but reversible.
Related services
Related assessments
Integration patterns used
Workshops and assessments
Facing something similar?
We start with an assessment of where you are and propose a realistic first phase.
