AI Models for Routing Invoices for Approval: Models Pick the Department, Rules Pick the Approver
Use an invoice extractor such as Textract AnalyzeExpense or the Document AI Invoice Parser, classify only the invoices that have no known owner, and let ERP workflow rules choose the authorized approver.
The AI models that suit routing invoices for approval are extraction models, such as Amazon Textract AnalyzeExpense or the Google Document AI Invoice Parser, plus a classifier for the invoices whose owner is unknown. That classifier can be AI Builder category classification, a CatBoost model, a prompted LLM or an option scorer. The approver should never come from a model. It should come from the ERP vendor invoice workflow, which applies the current approval matrix, amount thresholds and legal-entity rules. A model that predicts "IT software" is useful, but the person who may approve a USD 40,000 IT invoice is a policy fact.
Invoice routing is three separate decisions, and only one of them needs a trained model.
Routing an invoice for approval sounds like one task. In practice it is three tasks that have different owners and different failure costs.
- Reading the invoice turns a PDF or scan into structured fields, such as supplier, total, currency, purchase order number and line descriptions.
- Finding the owner maps the invoice to a department, cost center or role. Often a purchase order or project code already settles this, and a lookup is enough.
- Choosing the approver applies the approval matrix to that owner, the amount and the legal entity. This step names a person or a group that holds approval authority today.
Models help with step 1 and with the part of step 2 that a lookup cannot settle. Step 3 belongs to rules, because approval authority changes when people change jobs and when policy changes. A model trained on last year's approvals would repeat last year's assignments.
Anthropic's guidance on building agents describes the general pattern. "Routing classifies an input and directs it to a specialized followup task," it says. It adds that routing works where "classification can be handled accurately, either by an LLM or a more traditional classification model/algorithm." The guidance does not say which kind of classifier is better. That has to be tested on a team's own invoices.
Extraction models return fields with confidence values, and those values decide what needs review.
Amazon's API reference says that AnalyzeExpense "synchronously analyzes an input document for financially related relationships between text." It returns SummaryFields, which hold header data such as the vendor name, and LineItemGroups, which hold line items. Each field has a detected label, a detected value and a Confidence number. Fields can also carry a currency code with its own confidence. The API accepts PNG, JPEG, PDF and TIFF files up to 10 MB in a synchronous call.
Google's processor list describes the Invoice Parser as a pretrained, generally available processor that "extracts both header and line item fields." Its field list includes supplier_name, currency, purchase_order, total_amount and a line_item/description field. Google's response guide says that the processor "normalizes the value" for certain fields, such as dates and currency amounts. The parser supports 12 languages, 15 pages in an online request and 200 pages in a batch request. It also supports uptraining.
Recording the processor version keeps the audit trail complete, because Google retires older versions. Google lists named processor versions, such as pretrained-invoice-v2.0-2023-12-06, and it marks an older version with "Deprecation is planned soon." A routing log should record the processor version that read each invoice, so a later change in extraction can be traced.
Extraction alone does not route anything. It supplies the inputs that the lookup and the rules need. Two field values are especially useful for routing: the purchase order number, which often settles ownership, and the line descriptions, which a classifier needs when no purchase order exists.
An ownership lookup settles most invoices before any classifier runs.
Many invoices already point to an owner. A purchase order carries a department and a cost center. A project code points to a project manager. A supplier may be tied to one budget holder in the vendor master. When these links exist, a database lookup is cheaper, faster and easier to audit than a prediction.
Microsoft's reference architecture for supplier invoice approvals, dated August 17, 2026, shows this pattern without any model. A SQL table holds "projects and associated approvers, levels, and email addresses." Power Automate "retrieves the approvers based on the level required." The architecture explains that "the conditional approval uses values within the financial dimensions on the record to determine who needs to be retrieved." The result then passes back to Dynamics 365 to complete the workflow step.
A classifier is needed only for the remainder. That group usually includes invoices with no purchase order, invoices from new suppliers and invoices whose lines mix several cost centers. The larger that group is, the more the choice of classifier matters.
Four kinds of classifier can predict the owning department, and each fits a different situation.
Each option below predicts a category, such as a department or a role. None of them predicts a named employee, because employee assignments belong in the approval matrix.
- AI Builder category classification suits teams on Microsoft Power Platform. Microsoft's overview lists "customer request routing" among its uses and says that it "learns from your previously labeled text items" stored in Dataverse. In a flow, the action returns a
Classificationand aConfidence scorebetween 0 and 1. - A CatBoost model suits teams that have clean labeled history and a data science function. Its documentation says that CatBoost "supports numerical, categorical, text, and embeddings features," so supplier ID, currency, amount and line text can sit in one model.
- A prompted LLM suits text that varies widely, such as free-form service descriptions or supporting emails. It needs no training data, but its answer has to be checked against the allowed list of departments.
- An option scorer suits teams that want a fixed list of choices and a probability for each one. It ranks the options that the application supplies and cannot return an option outside that list.
Parsec's TOD is one published option scorer. Parsec's TOD page says that it ranks the next action from a list of allowed actions, generates no free text and invents no actions. A confidence gate passes uncertain cases unchanged to a parent LLM. The implementation exposes predict(state, options, question, images), which returns one probability per supplied option, summing to 1. The version to record is the v1 release, which Parsec dates to a release evaluation on 29 September 2026. Parsec lists the price as $0.30 per 1,000 decisions, separate from parent-model costs. Its own figures show a weak spot: on the public JevBench set, TOD scored 84.4% against 86.2% for the untrained base model. The release consists of LoRA adapters on Google's gemma-4-12B-it, so users must accept the Gemma 4 licence. Parsec's pages do not describe on-premises deployment for TOD.
The table below summarizes what each option returns, based on its documentation where one exists. It is not a ranking, because no published test compares these options on invoice routing.
| Option | Job in the flow | What it returns |
|---|---|---|
| Textract AnalyzeExpense | Extraction | Summary fields and line items, each with a confidence value |
| Document AI Invoice Parser | Extraction | Header and line-item entities, some with normalized values |
| AI Builder category classification | Department prediction | One class and a confidence score from 0 to 1 |
| CatBoost | Department prediction | A trained model over numeric, categorical and text features |
| Prompted LLM | Department prediction | Free text that must be parsed and checked against the list |
| TOD v1 option scorer | Department prediction | One probability for each supplied option |
A state, a question and a list of options make the classification step reproducible.
The example below is illustrative and has not been tested. It shows the input that an option scorer or a prompted LLM would receive for one invoice that has no purchase order.
state:
supplier: "Northwind Security Ltd" (new supplier, no PO)
currency: EUR
total: 18,400.00
legal_entity: DE01
lines: ["Annual endpoint protection renewal, 450 seats",
"Onboarding workshop, 1 day"]
question: "Which department owns this expense?"
options: ["IT", "Facilities", "Marketing", "Finance",
"Procurement review: owner unclear"]
The question asks for a department, not an approver. The options list is built by the application from the active department table, so a closed department cannot be chosen. The last option gives the scorer a valid choice for an invoice whose owner is unclear.
Suppose that the scorer returns its highest probability for "IT." The application then resolves everything else with rules. It looks up the current IT budget owner for legal entity DE01. It applies the amount threshold that sends invoices above a set value to a second approval stage. It converts EUR to the threshold currency at the rate that policy names. None of these steps uses the model output beyond the department.
Dynamics 365 supports this split directly. Its approval step can be assigned to a participant group or role, a position in a hierarchy, a workflow user or named users. Microsoft's documentation shows a step that runs "only when the following condition is met," with an example of a requisition step required only above USD 10,000. Completion policies cover a single approver, a majority, a percentage or all approvers. Overdue items follow an escalation path. A Power Automate or Dynamics connection that passes the predicted department into these steps is a proposed integration until it is built and tested.
Confidence thresholds should come from measured accuracy, and uncertain invoices should go to accounts payable.
A confidence score is not a probability of correct routing until it has been checked. AI Builder describes its score as "how confident the model is in its prediction," and it reports a separate performance score from precision, recall and F1. Neither number says that 0.9 confidence means 90% correct routing on a team's invoices. The threshold has to be set from held-out results.
These cases should go to accounts payable review instead of automatic routing:
- An invoice whose line descriptions are ambiguous, such as "services rendered," goes to review when the top two departments score close together.
- An invoice with conflicting extracted fields goes to review, for example when the purchase order number belongs to a different supplier or the line totals do not match the header total.
- An invoice from a new supplier goes to review until the supplier has an owner in the vendor master.
- An invoice that the model assigns to an uncommon department goes to review, because rare classes have the least training history.
Dynamics 365 already provides a place for some of these cases. Its "Vendor invoices that failed to import" page lists failed invoices with the error message, vendor account and purchase order. The import job can be secured by legal entity, so each entity's AP team sees only its own exceptions.
Each routed invoice should leave an audit record. The record should hold the source document, the extracted fields with their confidence values and the extractor version. It should also hold the classifier name and version, the option list, the scores, the selected queue, the approval policy version and any human correction. The corrections become the labeled data for the next evaluation.
The right setup depends on the ERP, the invoice volume, the label quality and the privacy rules.
Extraction plus rules is enough when most invoices carry a purchase order or project code, and when the remainder is small enough for AP staff to route by hand. A classifier is worth adding only when the invoices without an owner create steady manual work.
- On Dynamics 365 Finance, Invoice capture already connects to AI Builder. Microsoft's licensing note says that customers get 100 capture transactions per tenant per month and pay USD 300 per 1,000 more, bought for peak capacity.
- At high volume on AWS or Google Cloud, per-page extraction prices are low. Textract lists $0.01 per page for the first million pages in its US West example. Document AI lists $0.10 per count, and one count covers up to 10 pages of a document.
- With reliable routing history, a supervised classifier such as AI Builder or CatBoost has the labels that it needs. With unreliable labels, the history should be cleaned before any model is trained on it.
- With strict privacy requirements, the team should check where each service processes invoice data. A library such as CatBoost can run on the team's own servers.
- With TOD, the team should pin the release version, accept the Gemma 4 licence and follow the repository's serving notes. Those notes say to use
chunked_eageroreagerattention instead ofsdpaand not to use bitsandbytes int8.
At an assumed 10,000 two-page invoices a month, Textract costs $200 at list price and Document AI costs $1,000. Assume that the lookup places 7,000 of them. Sending the 3,000 unowned invoices to Claude Haiku 5.5 with a 2,000-token prompt and a 50-token answer costs about $0.68. Scoring the same 3,000 invoices with TOD costs $0.90, plus the parent-model cost for deferred cases. The model choice for the classification step is therefore a question of accuracy and auditability, not of model fees. Reviewer time is the cost that this example does not price, because it depends on each team's wages and review rate.
A held-out test on recent invoices decides whether any model beats the rules.
No published study compares ERP rules, AI Builder, CatBoost, a prompted LLM and an option scorer on invoice routing. Correct first routing, reassignment rates and cost per invoice for these options have not been measured. Each team therefore needs its own comparison before it makes any performance claim.
- Collect recent invoices with the department that finally approved them. Hold out the most recent months as the test set, so that each option is tested on invoices that are newer than the data used to set it up.
- Measure the existing ERP rules and ownership lookups first. This is the baseline that every model must beat.
- Run each ready-made option without changes on the invoices that the lookup could not settle. Freeze each setup before testing.
- Report correct first routing, reassignment rate, share sent to manual review, latency and total cost per invoice as separate numbers. Report new suppliers and uncommon departments separately as well.
- Consider fine-tuning or a custom classifier only if every frozen option misses the target. Test it on the same held-out set.
Sources
- Amazon Textract, AnalyzeExpense API reference: https://docs.aws.amazon.com/textract/latest/APIReference/API_AnalyzeExpense.html
- Amazon Textract pricing: https://aws.amazon.com/textract/pricing/
- Google Cloud, Document AI processor list: https://docs.cloud.google.com/document-ai/docs/processors-list
- Google Cloud, Document AI handle processing response: https://docs.cloud.google.com/document-ai/docs/handle-response
- Google Cloud, Document AI pricing: https://cloud.google.com/document-ai/pricing
- Microsoft Learn, Overview of category classification model: https://learn.microsoft.com/en-us/ai-builder/text-classification-overview
- Microsoft Learn, Use category classification model in Power Automate: https://learn.microsoft.com/en-us/ai-builder/text-classification-model-in-flow
- Microsoft Learn, Understand category classification model performance: https://learn.microsoft.com/en-us/ai-builder/text-classification-performance
- CatBoost, Categorical features: https://catboost.ai/docs/en/features/categorical-features
- Anthropic, Building effective agents: https://www.anthropic.com/research/building-effective-agents
- Anthropic, Claude pricing: https://platform.claude.com/docs/en/about-claude/pricing
- Microsoft Learn, Accounts payable home page: https://learn.microsoft.com/en-us/dynamics365/finance/accounts-payable/accounts-payable
- Microsoft Learn, Configure approval steps in a workflow: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/fin-ops/organization-administration/configure-approval-step-workflow
- Microsoft Learn, Invoice automation for scanned documents: https://learn.microsoft.com/en-us/dynamics365/finance/accounts-payable/vendor-invoice-automation
- Microsoft Learn, Invoice capture solution overview: https://learn.microsoft.com/en-us/dynamics365/finance/accounts-payable/invoice-capture-overview
- Microsoft Learn, Automate purchase requisition and supplier invoice approvals: https://learn.microsoft.com/en-us/dynamics365/guidance/reference-architectures/finance-operations-purchase-requisition-external-project-management
- Parsec, TOD: https://parseclab.ai/tod/
- Parsec, TOD model card: https://huggingface.co/parsecai/tod
- Parsec, TOD implementation: https://github.com/daseinlabs/tod