The finance director of a mid-sized organisation receives two kinds of offer today. One is an AI assistant for everyone: a licence per employee, a chat box next to the ERP system and the promise that everyone will work faster. The other is a new point solution for each problem: one tool for reading invoices, one for accounts receivable, one for group consolidation and one for VAT reporting.
Neither route holds up in a finance department. Don't put AI on a broken process describes how to map a workflow before anything is built.
1. The assistant for everyone leaves no trail
An assistant that each person asks whatever they like can give different answers to the same question, depending on how the question is put and what material has been pasted in. For a draft email that matters little, but account coding should come out the same whoever asks.
The Swedish Bookkeeping Act (BFL, 1999:1078) also requires, in Chapter 5, Section 11, that the company describes the processing carried out in the accounting system, so that it is possible to follow and understand without difficulty how each individual entry has been processed. The Act calls this processing history. A chat box beside the system falls outside it. The reasoning behind the coding stays in a conversation that is not part of the bookkeeping, and all the ERP system shows is that a person made the entry.
2. The point solution does not know your exceptions
A point solution is built for the normal case across many customers, while your exceptions are your own: the split delivery invoiced in two instalments, the intra-group purchase that has to be eliminated, the project number that has to follow through to the right cost centre, the VAT on the foreign service. Those are the cases that take time today, and they are the ones the tool sends back to a person.
Each point solution is also one more supplier, with its own permissions to administer and often its own data processing agreement (DPA). If you are covered by the Swedish Cybersecurity Act (2025:1506), your security work must include the supply chain (Chapter 2, Section 3), and every new tool is one more supplier to assess. What that involves is set out in What the Swedish Cybersecurity Act requires of your suppliers.
3. What works: agents in the background, in your systems
The third way is agents that work in the background, in the ERP system, bank file and inbox you already have. They do the work, and anything that needs a person reaches the right person with the supporting documents alongside.
Take an incoming Bankgiro payment without an OCR reference number. Today it sits there until someone in accounts receivable has time to look into it. An agent reads the sender and the message in the bank file, searches the open customer invoices by customer and amount, and looks for a remittance advice in the inbox. If it adds up exactly, it proposes a match, which code then checks. If it is a part payment, a combined payment for several group companies or a deduction for a complaint, it hands over to whoever looks after the customer, along with what it found.
The person who runs accounts receivable knows which exceptions like these exist and how they are resolved. The agent has to be built around how the work is actually done, and that requires someone to sit next to that person before anything is built.
Much of what comes to light then needs no AI model at all. Duplicate and bank account checks, VAT logic, account coding for known suppliers and the approval workflow are handled by ordinary code. The simplest solution first: ordinary code where that is enough, AI where it is needed, a person where there is ambiguity, accountability or irreversible consequences. The model reads free text and makes suggestions. The decision is made by code or by a person.
4. Where a person takes over is an approval question
Where the agent should hand over to a person is already set out in your approval policy: who may approve what, up to what amount, and what requires two people.
The Swedish Companies Act and the Local Government Act say nothing about what an approval policy should look like, only who is responsible for making sure the control exists. Under the Companies Act (2005:551), the board must ensure that the company's organisation is structured so that the bookkeeping and the management of funds are controlled in a satisfactory manner, and if the board delegates tasks, it must continuously check whether the delegation can be maintained (Chapter 8, Section 4). The CEO must take the measures necessary for the bookkeeping to be carried out in accordance with the law (Chapter 8, Section 29). In a municipality, the committees must ensure that internal control is sufficient to prevent errors and irregularities (Local Government Act, Chapter 6, Section 6).
Neither Act mentions agents. Our reading is that responsibility stays with the board, the CEO and the committee, whoever or whatever carries out a step.
That is why the boundary should be written into the approval policy, where the finance director and the auditor can read it, rather than sitting in a prompt. An amount above a set level, a new supplier, a changed bank account, a deviation from the order beyond a threshold: that is where a person takes over the case. Below the boundary, the agent prepares, code checks and a person approves as before.
The sign-off step is an approval check, not a security control. We assume that an agent can be tricked by content it reads, for example in an invoice or an email from a supplier. So an agent that has read untrusted text must not be able to trigger payments or send data on. Security lies in what the agent can do at all: least privilege, and no tools it does not need.
5. Build for the model sometimes being wrong
A model that reads invoices and emails will sometimes misread or misjudge. Decide in advance where each kind of error is to be caught.
| The error | Example | Where it is caught |
|---|---|---|
| The model extracts the wrong information | The wrong amount, due date or Bankgiro number from a scanned invoice | Code compares it with the order, the supplier register and previous invoices before anything is posted |
| The model reads correctly but judges wrongly | The coding ends up on the wrong cost centre | The approver corrects it, and the correction is saved as a new test case |
| A change makes something that worked worse | A new model version handles credit notes differently | Real cases with known correct answers are run before every release |
The checks in code catch most of it, because they give the same answer every time and can be tested. Prompts, rules and model versions are handled as code changes, and nothing goes into production without your approval for each release. An error in a step that involves money is reported separately, so that it does not disappear into an average.
The agent first runs alongside the existing work, then with every action reviewed, and is given more autonomy step by step. Every action the agent takes is logged and can be traced.
6. What the Bookkeeping Act requires of an agent
Four parts of the Act govern how an agent may handle the bookkeeping.
The voucher comes first (Chapter 5, Sections 6 and 7). Every business transaction must have a voucher, stating among other things when it was compiled, when the transaction took place, what it relates to, the amount and the counterparty. If the company has received information about the transaction, an invoice for example, that is what must be used as the voucher. This also applies when the agent proposes the coding.
Under Chapter 5, Section 11, the structure of the accounting system must also be described. Our reading is that an agent placed in the workflow becomes part of that system. It then has to be possible to follow, entry by entry, what the agent proposed, what was changed and by whom. In that case such a log is processing history, and the Act counts system documentation and processing history as accounting records (Chapter 1, Section 2, point 9), with the same retention rules as the invoice.
For the original, Chapter 7, Sections 1 and 6 apply. Electronic documents containing accounting records that the company has received must be retained in the format and with the content they had when they arrived. An agent that reads a PDF and enters the details into the ERP system therefore does not replace the original. Under the wording in force since 1 July 2024 (SFS 2024:342), the original document may be destroyed once the information has been transferred to another document, but only if the transfer involves no risk of the information being altered or lost.
Location is governed by Chapter 7, Sections 2 and 3 a. Accounting records must be retained until the end of the seventh year after the end of the calendar year in which the financial year ended, and kept in Sweden. The equipment and systems needed to produce them on paper must be kept available in Sweden for the whole period. Electronic documents may be kept in another EU country if the location is notified to the Swedish Tax Agency (or, for companies under its supervision, to the Swedish Financial Supervisory Authority), if the Tax Agency or Swedish Customs is given immediate electronic access on request, and if the information can be printed out in Sweden. The same applies to certain countries outside the EU that have equivalent legal instruments on mutual assistance.
Where the agent reads and writes data is therefore a bookkeeping question as well as a data protection one. Before we build, we classify the information by what it contains: business data, personal data, sensitive information and accounting records. The data class decides which AI model may see it and where it may be stored and processed. That applies whether the solution is built in your Microsoft or Google environment, in another system you have, or run by us. In a Microsoft environment, we lock the chosen deployment with a policy, so that nobody can switch to global deployment by mistake.
How this is to be documented in detail follows from generally accepted accounting practice, which the Swedish Accounting Standards Board (Bokföringsnämnden) is responsible for developing (Chapter 8, Section 1). This is a summary, not legal advice, and your auditor should review the set-up before the agent goes live.
7. Measure before, so you can follow up after
Every workflow should have a baseline before anything is built: cases per month, working time per case, time in the queue and the share of exceptions.
Add what the queues cost: late payment fees, missed early payment discounts and customer invoices that go out later than they could have. Also count what an error costs when it does happen: a duplicate payment, a payment to a bank account that was switched through a fake email, an entry that cannot be explained to the auditor.
The baseline shows which workflow to build first, and it gives the outcome something to be compared with afterwards. If the numbers do not add up, we would rather say no than build. The calculation for a single workflow is worked through in Automating a process: do the maths first.
8. Where to start
Before you respond to either of the two offers: take the finance workflow that causes you the most trouble and go through these questions with the person who does the work today.
- Which steps in the workflow are pure rules, and which need someone to read and make a judgement?
- Where in the workflow do cases stop being the normal case, and where do they end up? That is where you find the exceptions a point solution does not know.
- What does your approval policy say today about amounts, new suppliers and changed bank accounts? Is the boundary written there, or in someone's head?
- Can you trace today how an individual entry was processed, from invoice to payment? If not, start there, before AI.
- Where are vouchers, logs and system documentation stored, and has the location been notified to the Swedish Tax Agency if it is in another country?
- Which real cases from last quarter would you test the agent against, and who decides the correct answers?
- Who owns the workflow, and who may pause the agent, change a rule and roll it back without calling a supplier?
With the answers to these seven questions, you will also know what to order, and whether the workflow needs an AI model at all.
Sources
- Swedish Bookkeeping Act (Bokföringslag (1999:1078)) Chapter 1, Section 2, point 9 a; Chapter 5, Section 6, first paragraph, Section 7, first paragraph, and Section 11; Chapter 7, Section 1, third paragraph, and Sections 2, 3 a and 6; Chapter 8, Section 1. Chapter 7 as amended by SFS 2024:342, in force from 1 July 2024
- Swedish Companies Act (Aktiebolagslag (2005:551)) Chapter 8, Section 4, third and fourth paragraphs, and Section 29, third paragraph
- Swedish Local Government Act (Kommunallag (2017:725)) Chapter 6, Section 6, second paragraph, as amended by SFS 2025:374
- Swedish Cybersecurity Act (Cybersäkerhetslag (2025:1506)) Chapter 2, Section 3, second paragraph, point 4
- OWASP Top 10 for LLM Applications 2025, LLM01 Prompt Injection Direct and indirect prompt injection, and the mitigations on least privilege and human approval for high-risk actions
- Anthropic, Building effective agents The section 'When (and when not) to use agents', and the advice to start with the simplest possible solution