The Starting Point: A Growing AP Bottleneck

For a mid-sized industrial machinery manufacturer in the DACH region with 120 employees, the Accounts Payable (AP) department had become a critical chokepoint in the financial workflow. The finance team, consisting of just four dedicated staff members, was overwhelmed by the volume of incoming documentation. Over 60% of their working hours were consumed by the tedious, error-prone task of manually keying data from paper and PDF invoices into the ERP system.

The situation was deteriorating rapidly. The backlog of unprocessed invoices had grown to over 1,200 per month, creating a significant risk for cash flow management. More critically, the slow processing cycles meant the company was consistently missing out on early payment discounts offered by suppliers. The CFO recognized that this manual approach was not only inefficient but also unsustainable as the company continued to grow its supplier network to over 300 different vendors. The primary requirement was clear: a solution that could handle unstructured data from diverse supplier formats without requiring custom coding for every new vendor, thereby reducing the manual workload and eliminating the backlog.

The Challenges

Implementing automation in a manufacturing environment with a complex supply chain presented several specific hurdles that went beyond simple digitization.

1. Heterogeneous Document Formats: With over 300 suppliers, the incoming invoices varied wildly in layout, font, and structure. Some were standardized electronic data interchange (EDI) formats, while others were scanned faxes or PDFs with non-standard layouts. A simple rule-based OCR solution would have failed to parse these variations accurately.

2. Data Quality in Master Records: The supplier master data in the ERP system was not perfectly clean. Inconsistent naming conventions (e.g., “Acme Corp” vs. “Acme Corporation”) meant that even if the invoice data was extracted correctly, mapping it to the correct vendor account was difficult. The LLM needed a reliable foundation to build upon.

3. Trust and Accuracy Thresholds: The finance team was wary of automated errors. A single incorrect payment could damage supplier relationships or lead to compliance issues. The system needed a robust mechanism to flag uncertainty, ensuring that only high-confidence transactions were posted automatically.

The Tech Stack

We designed a hybrid pipeline that leverages the strengths of optical character recognition for raw data extraction and the semantic understanding capabilities of a Large Language Model for logic and mapping.

  • Document Ingestion Gateway: An automated intake layer that monitors specific email inboxes and connects to physical scan stations, normalizing all incoming files into a standardized queue.
  • High-Accuracy OCR Engine: A specialized OCR tool designed to extract not just text, but also layout data and table structures, preserving the spatial relationship between fields like invoice number, date, and total amount.
  • LLM Processing Core: A fine-tuned Large Language Model that interprets ambiguous fields, resolves supplier name variations, and validates tax logic based on jurisdictional rules.
  • ERP Integration API: A secure, bi-directional API connector that pushes validated data directly into the existing ERP system for three-way matching (Purchase Order, Goods Receipt, Invoice).
  • Human-in-the-Loop Dashboard: A custom interface for finance staff to review flagged items, correct errors, and provide feedback to continuously improve the model’s accuracy.

Implementation: From Data to Logic

The project was executed over a six-week period, divided into three distinct phases to ensure stability and accuracy.

Projektverlauf in 6 Phasen: Audit existing AP workflow and data sources, Clean supplier master data for LLM mapping, Deploy OCR layer for raw text extraction …

Phase 1: Data Ingestion and Cleaning (Weeks 1-2) We began by establishing the ingestion pipeline. This involved setting up the email connectors and configuring the scan stations. Simultaneously, we performed a deep clean of the supplier master data. This step was crucial; we standardized vendor names and ensured unique identifiers were present. Without this foundation, the LLM’s mapping capabilities would have been compromised.

Phase 2: Model Fine-Tuning and OCR Calibration (Weeks 3-4) We fed a historical sample of 5,000 invoices into the OCR engine to calibrate its extraction accuracy. The raw text and layout data were then passed to the LLM. We fine-tuned the model using a subset of these invoices, teaching it to recognize specific patterns in the top 50 highest-volume suppliers. The LLM was configured to output structured JSON data, including a confidence score for each field.

Phase 3: Parallel Testing and Integration (Weeks 5-6) We ran the automation pipeline in parallel with the manual process. Every invoice was processed by both the system and a human. We compared the results to identify discrepancies. During this phase, we refined the LLM’s logic for handling edge cases, such as split invoices or multi-currency transactions. The API integration with the ERP was tested for three-way matching logic, ensuring that the automated postings aligned with existing procurement controls.

How We Measured It

To ensure the results were objective and reproducible, we defined a clear set of Key Performance Indicators (KPIs) before the rollout.

  • Backlog Volume: Measured as the number of invoices in the “Pending Approval” status in the ERP at the end of each week. We compared the weekly average before and after deployment.
  • Manual Effort: Tracked via time-study logs from the finance team. We recorded the average minutes spent per invoice during the manual phase and compared it to the time spent on exception handling during the automated phase.
  • Discount Capture: Calculated by comparing the percentage of eligible early payment discounts actually claimed against the total number of eligible invoices offered by suppliers. This was audited against bank statements and supplier contracts.
  • Error Rate: Defined as the number of payment errors (wrong amount, wrong vendor, duplicate payment) per 1,000 transactions. This was monitored through the ERP’s audit trail and finance team incident reports.

The Results

Within three months of full deployment, the impact on the finance department was immediate and quantifiable. The automation handled 85% of all incoming invoices without human intervention. The remaining 15% were edge cases that required human review, but these were significantly fewer in number and complexity than the previous 100% manual workload.

AP Efficiency Metrics: Before vs. After: Vorher-Nachher-Vergleich der Kennzahlen in %

Key performance improvements included:

  • 40% reduction in total accounting backlog volume: The backlog dropped from over 1,200 invoices to approximately 720, allowing the team to clear historical debt and maintain a zero-backlog status during peak periods.
  • 70% decrease in manual data entry time per invoice: The average time spent per invoice dropped from 12 minutes to 3.6 minutes, primarily because the team only handled exceptions rather than every single document.
  • 15% increase in captured early payment discounts: With faster processing, the finance team could now meet payment deadlines more consistently, resulting in tangible cash flow savings.
  • Zero critical payment errors in the first quarter of operation: The human-in-the-loop mechanism successfully caught all potential errors before they reached the bank, maintaining 100% accuracy in automated postings.

The finance team redirected their saved hours toward supplier relationship management and financial analysis. This shift transformed the AP function from a reactive cost center into a proactive, strategic partner within the organization.

Lessons Learned

This project highlighted that simple rule-based OCR is no longer sufficient for diverse B2B landscapes. The combination of OCR and LLMs allows for flexible handling of unstructured documents, but success depends on several critical factors.

Data Quality is King: Clean supplier master data was essential for LLM mapping accuracy. We spent significant time in Phase 1 cleaning this data. Without it, the LLM would have generated many false positives, overwhelming the review queue. We recommend auditing master data before any AI-driven AP automation project.

Human-in-the-Loop Builds Trust: Maintaining a review queue for edge cases was not just a safety net; it was a trust-building mechanism. The finance team saw that the system was honest about its uncertainty. This transparency encouraged them to rely on the automation more over time. We advise against aiming for 100% automation immediately; starting with 85-90% and letting the human team handle the rest builds confidence.

Phased Rollout Reduces Risk: Starting with the top 50 suppliers allowed for rapid validation before scaling. These suppliers accounted for 70% of the volume. By perfecting the process for these high-volume, often standardized invoices, we gained momentum and accuracy before tackling the long tail of smaller, more varied suppliers.

What We Would Do Differently Today

While the project was successful, there are areas where we would refine the approach in future engagements.

1. Invest More in Pre-Project Data Auditing: We underestimated the time required to clean the supplier master data. In future projects, we would recommend a dedicated two-week pre-project phase solely for data governance and cleaning, ensuring the foundation is solid before any technical implementation begins.

2. Expand the Review Queue Interface: The initial human-in-the-loop dashboard was functional but lacked advanced filtering options. The finance team found it difficult to prioritize certain types of exceptions. We would now include more granular filtering capabilities and bulk-action tools to further streamline the exception handling process.

3. Integrate Supplier Portal Feedback: We did not initially feed back errors to the suppliers. In a future iteration, we would integrate a supplier portal that notifies vendors when their invoice format causes processing errors, encouraging them to adopt standardized formats and further reducing the exception rate over time.

For manufacturing companies with complex supply chains, this approach transforms AP from a cost center into an efficient, data-driven function. The combination of OCR and LLMs provides the flexibility needed to handle the diversity of B2B documentation, while the human-in-the-loop design ensures accuracy and trust.

Passend dazu