# Purchase invoices into e-arveldaja or Merit without retyping

> How AI reads a purchase invoice, checks for duplicates and prepares a draft in e-arveldaja or Merit, so a person only approves the entry.

2026-11-11, Codeline Studio. Source: https://www.codelinestudio.eu/blog/purchase-invoices-into-e-arveldaja-or-merit-without-retyping

Every month, someone in your company opens purchase invoices one by one. They read the supplier, the date, the amounts and the VAT. Then they type the same numbers into the accounting software. Then they check that they did not enter the same invoice twice.

This work is necessary. It is also repetitive, slow and easy to get wrong. This article explains how an AI workflow can do the typing for e-arveldaja or Merit, and why a person still approves every entry. These are the two accounting programs we see most often in Estonian small companies.

## How invoices arrive today

In most Estonian companies, purchase invoices arrive in three forms:

- **A PDF attached to an email.** This is the most common form for small suppliers.
- **A structured e-invoice.** This is a machine-readable file that the supplier's software sends through an e-invoice operator. The data is already in fields, so nobody needs to read it.
- **Paper or a photo.** Receipts from a shop, a fuel station or a hardware store.

The workflow must handle all three. E-invoices are the easy part. PDFs and photos need AI to read them.

## The workflow, step by step

### 1. Collect

The workflow watches one place where invoices arrive. Usually this is a dedicated email address, such as invoices@, or a shared folder. Every PDF, e-invoice or photo that arrives there starts the workflow.

### 2. Extract the fields

The AI reads the document and extracts the fields the accounting entry needs:

- Supplier name and registry code
- Supplier VAT number
- Invoice number
- Invoice date and due date
- Net amount, VAT amount and total
- VAT rate for each line
- Bank account (IBAN) and reference number
- Line items, if your bookkeeping needs them

For an e-invoice, the workflow reads these fields directly from the file. For a PDF, the AI reads the text and the layout. For a photo, it reads the image first.

Each field gets a check. If the total does not equal net plus VAT, or a required field is missing, the invoice goes to a person with a short note. For example: "VAT amount unclear" or "Invoice number not found".

### 3. Check for duplicates

Duplicates happen often. A supplier sends the invoice by email and again as an e-invoice. A reminder arrives with the same invoice attached. Somebody forwards it "just in case".

Before it creates anything, the workflow checks the accounting software. Does an invoice with the same supplier and the same invoice number already exist? If not, is there one with the same amount and a close date? Any match stops the workflow and goes to a person.

### 4. Match the supplier

The workflow looks for the supplier in your accounting software by registry code. If the supplier is new, it can check the company in the Estonian business register and prepare a new supplier record. A person approves new suppliers.

The workflow also compares the bank account on the invoice with the one already saved for that supplier. If the IBAN is different, the workflow shows a clear warning. A changed bank account is a classic sign of invoice fraud. A person must confirm the change with the supplier by phone.

### 5. Suggest the accounts

The AI suggests the expense account and the VAT treatment. It looks at how you booked earlier invoices from the same supplier. Fuel goes to vehicle costs. Software subscriptions go to IT costs. A new type of cost goes to a person with a suggestion, not a decision.

### 6. Create a draft

Now the workflow creates the purchase invoice in your accounting software as a draft. It attaches the original PDF or e-invoice, so the source document stays with the entry.

Both e-arveldaja and Merit have an API. An API is an interface that lets other software read and write data without a person who clicks through screens.

In e-arveldaja, a new purchase invoice can stay as a draft. A draft does not change the books until someone confirms it. Where a draft is not possible, we keep the invoice in a review queue until a person approves it. Either way, nothing becomes final without a person.

### 7. A person approves

Your accountant or bookkeeper opens the list of drafts. Each draft shows the original document next to the extracted data. Unclear fields are marked. The person checks the draft, changes what needs changing and confirms it.

To approve a correct draft takes much less time than to type it. A wrong draft takes about as long as typing. We use the corrections to improve the rules and the examples, so over time more drafts are correct.

## What the AI does not do

- It does not confirm entries.
- It does not pay invoices.
- It does not change a supplier's bank account.
- It does not delete anything.

Payments, confirmations and deletions stay with a person. In our workflows, this is a fixed rule, not a setting.

## Access and data

The workflow gets an API key with only the permissions it needs: read suppliers and invoices, create drafts and attach files. If the accounting software allows narrower keys, we use them. The key is stored on the server, not in an email or a chat.

Invoices can contain personal data, for example the name of a sole trader. We document which fields the workflow uses and where it stores them. Our applications and databases run in the EU.

Every step is logged: which document arrived, what the AI extracted, which checks it ran and who approved the draft. If your auditor asks where an entry came from, you can show it.

## What changes for the bookkeeper

The bookkeeper's job does not disappear. It changes from typing to checking. Instead of reading a PDF and typing twelve fields, the bookkeeper compares two columns and clicks confirm.

The bookkeeper also gets a clear list of problems: unclear amounts, new suppliers, changed bank accounts and possible duplicates. These are the cases where human judgement matters. The routine cases no longer hide them.

## An example

For example, a 15-person construction company receives about 200 purchase invoices a month. Half are PDFs from small suppliers. The rest are e-invoices and receipts. Today, the bookkeeper spends several days a month to type and check them.

With the workflow, the bookkeeper opens a list of drafts each morning. Most need only a check and a click. Some need a correction. A few need a phone call to the supplier.

The volumes and the time here are illustrative. In the audit, we count your real invoices and your real time.

## Related workflows

The same pattern works for sales invoices and payment reminders. If invoices arrive in a shared inbox with everything else, [email triage](/blog/email-triage-with-ai-for-a-10-person-team) can send them to this workflow. To learn how the AI connects to accounting software safely, read [MCP for business owners](/blog/mcp-for-business-owners).

## Start with the process audit

If your team still retypes purchase invoices, start with a [process audit](/en#audit). In one week, we map how invoices move from the supplier to the books and find where time and errors go. You get 3–5 automation opportunities with time saved, risk and price, and a fixed-price offer for the first workflow. The audit costs €1,490 + VAT.
