Skip to content
Guide

A rules engine for finance teams

A rules engine applies your own rules to every item that comes in, the same way every time. It keeps the rules apart from the software that runs them, so the people who own a process can change its rules without changing code. In accounts payable, each rule says: when these conditions are true, and unless an exception applies, do this. Code a bill to an account, send it to the right approver, post it with no review, or file the email it arrived in. In Numra you write a rule as a sentence, Numra turns it into conditions and actions, tests it on the invoices of the last 90 days, and saves it when you confirm. AI drafts the rule and reads the invoices. Code applies the rule, so the result never depends on a model’s judgement.

The four kinds of rule

Rule What it decides Example
Coding The account, tax rate, description and due date of each line, whether a purchase order is needed, and whether a bill is already paid Code every Penwith Haulage invoice to 5100 Freight
Approval Who approves an invoice, and in what order Over £5,000, Sarah Kelly then David Kearney
Straight-through Which invoices post with no review, and the amount above which a person looks Post the monthly Vodafone bill with no review, unless it is over £600
Inbox What happens to each email in the accounts payable mailbox File statements under Statements and draft a reply asking for a missing PDF

How a rule is built

Every rule has three parts.

  • When: conditions that must all be true, such as the supplier, the company, the total, the account or words in the description.
  • Unless: exceptions that stop the rule, such as one supplier or one cost centre.
  • Then: what the rule does. An approval rule can name several people in order.

Conditions use plain operators: is, is not, is one of, contains, starts with, is over, is at least, is under, is up to and is between.

Writing a rule in plain English

  1. Say it. Type the rule as you would explain it to a colleague, in Numra or in Claude, ChatGPT or Gemini.
  2. Check the draft. Numra shows the rule as a sentence and as its when, unless and then parts. If part of your sentence cannot be expressed, Numra says which part.
  3. Test it. Numra shows what the rule would do on the invoices of the last 90 days, and warns if it conflicts with another rule.
  4. Confirm. The rule is saved only when you confirm it. Every change is kept in the rule’s history.

Which rule wins

When more than one rule could apply, the most specific wins. Numra tries rules for one supplier in one company first, then rules for one supplier, then rules for one company, and rules for every invoice last. So a company-wide approval rule and a special route for one supplier can sit side by side.

Turning an approval matrix into rules

An approval matrix, or delegation of authority, says who can approve what. Each line becomes one approval rule.

Your matrix says The approval rule
Up to £1,000: the budget holder When the total is up to £1,000, then the budget holder approves
£1,000 to £5,000: the Finance Manager When the total is between £1,000 and £5,000, then Sarah Kelly approves
Over £5,000: the Finance Manager, then the CEO When the total is over £5,000, then Sarah Kelly, then David Kearney
Rent is approved by the CFO only When the account is 7100 Rent, then the CFO approves

Numra also has settings that sit beside the rules, such as an approver who cannot validate the same invoice and a fallback approver when nobody is named.

Who can change which rules

  • Accounts payable users write and change coding rules.
  • Admins write and change approval and straight-through rules.
  • Approvers see the invoices that wait for them, not the rules.

The same roles apply in the Numra app and in your AI assistant.

Rules are part of Accounts Payable. See Configuration for how Numra is set up around your processes.

Sources

Questions

What is a rules engine?

A rules engine applies your own rules to each item that comes in. Each rule says: when these conditions are true, and unless an exception applies, do this. In accounts payable, the items are supplier invoices and the emails they arrive in.

Does AI decide what a Numra rule does?

No. AI turns your sentence into a draft rule and reads the invoices. Code applies the rules, so the same invoice always gets the same result.

How do I set up an invoice approval matrix?

Write each line of your delegation of authority as an approval rule: the conditions, such as amount, supplier or cost centre, and the people who approve in order. Add exceptions for the suppliers or accounts that follow a different route.

What happens when two rules could apply?

The most specific rule wins. Numra tries rules for one supplier in one company first, then rules for one supplier, then one company, then rules for every invoice.

Can I test a rule before I save it?

Yes. Numra shows what the rule would do on the invoices of the last 90 days, or the emails of the last 90 days for an inbox rule, and warns about conflicts before you save.

Who can change rules?

Accounts payable users change coding rules. Admins change approval and straight-through rules. Approvers see the invoices that wait for them, not the rules.

Run accounts payable on your own rules.

Book a demo to see Numra write, test and apply your coding and approval rules.

Read more: Configuration