Skip to content

From my practice · AI

Example implementation, an 80-person company

Document workflow on a local AI model

6,000documents a month, all on the company's server
Illustration: a finance controller approves a document on a tablet, documents pass through checkpoints into the company's server, a robot watchdog beside it
Client
A sales and service company, 80 people (example)
Tools
Local AI model, scan reading, EHF, email
Scope
Document workflow, approvals, security, reports

Situation

A sales and service company with 80 employees receives about 6,000 documents a month: invoices, orders, delivery notes, contracts and correspondence. Everything went through email inboxes and three people in the finance team. The board wanted automation, on one condition: no document may leave the company's server.

How we solved it

  1. Intake

    Email inboxes, the scanner and EHF e-invoices feed a single queue on the company's server.

  2. AI opinion

    A local model reads the document, matches it to the order and the delivery and rates it: matching, to check or suspicious.

  3. Approvals

    Each document has its own path: a person in the team, a manager above NOK 50,000, the board above NOK 250,000.

  4. Security

    A changed supplier account number, a duplicate or an unusual amount holds the payment until it is cleared.

  5. Watchdog and reports

    A watchdog keeps an eye on every stage, and the board gets alerts and weekly statistics.

Detailed analysis

The company and the problem

The company employs 80 people and sells and services equipment for industry. About 6,000 documents come in every month: 1,200 purchase invoices, 900 delivery notes, 700 orders, 150 contracts and amendments, 250 HR documents and about 2,800 emails with attachments. Three people in finance retyped data, chased missing approvals and answered questions about where a given invoice was.

The board set one firm condition: documents of clients, suppliers and employees must not go to external AI services. Everything has to run on the company's server.

Architecture on the company's server

A server with a graphics card runs a local language model and scan reading. Documents go into a single queue: from dedicated email inboxes, from the scanner at reception and as EHF e-invoices. Each stage is a separate service that takes a job from the queue, does its part and saves the result with a full history.

  • Reading: the text from a scan or a PDF, the document type and the key fields, that is the supplier, account number, amounts, dates and order numbers.
  • Matching: the invoice against the order and the delivery note, that is quantities, prices and dates.
  • AI opinion: a short assessment in plain words, matching, to check or suspicious, with the reasoning and a confidence level.
  • Audit trail: every decision of the model and of a person is recorded, with the date and the reason.

Human approvals along the way

AI never pays or posts anything by itself. A matching document goes to a person in the team, who approves it with one click. Invoices above NOK 50,000 also go to a manager, and above NOK 250,000 to the board. A document to check goes back with the AI opinion to a person who can correct it, and a suspicious one goes straight to the financial controller.

Security triggers and anomalies

Some situations stop a document regardless of the AI opinion and the approvals.

  • A supplier account number that differs from the supplier record: the payment is held and verified by phone at a known number.
  • A duplicate: the same invoice a second time, even with a different number or in a different file.
  • A new supplier with no contract or order: an extra approval.
  • Anomalies: a price more than 15% above history, invoices split just below an approval limit, documents outside working hours.
  • In the first quarter the system stopped 3 fraud attempts with a swapped account number.

The system watchdog

A separate watchdog checks every minute whether each service is running, how many documents are waiting in the queue and for how long, whether the model responds and whether the disk is running out of space. When something has been stuck for more than 15 minutes, the IT person gets an alert on the phone, and after the fix a message that everything is back to normal.

Information for the board

The board gets alerts only for matters that need a decision: a suspicious document, a held payment, an overdue approval. Once a week a summary arrives: how many documents came in, how many went through automatically, where they got stuck, the average processing time and who has overdue approvals.

What it means in numbers

Per month, with 6,000 documents. Before means manual handling by email, after means the system on the company's server. Figures from the first quarter of operation, rounded.

  • Documents without manual retyping

    Before: 0%

    After: 99%

  • Team time spent on document handling

    Before: about 400 hours

    After: about 110 hours

  • From receiving an invoice to posting it

    Before: 6 days

    After: 1 day

  • Invoices paid late

    Before: about 9%

    After: below 1%

The finance team gained about 290 hours a month, almost two full-time jobs, which now go to exceptions, suppliers and analysis.

Result

78% of documents go through reading and matching without corrections, and people handle the exceptions and approvals. The time from receiving an invoice to posting it fell from 6 days to 1 day, and not a single document left the company's server.

6,000

documents a month, all on the company's server

Illustration: a four-step process diagram with check marks

This is an example implementation: it shows how I design such systems, and the names and figures are illustrative.

This is your situation if

  • Your company is drowning in invoices, orders and emails with attachments.
  • You want automation, but your data must not leave the company.
  • The board wants to know where documents get stuck and what it costs.

Have a similar matter?

Aleksander Mariański, Authorised accountant in Norway, PhD in computer science

Book a consultation on a similar matter