# Architecture & capabilities

## Overview

The Supplier Invoicing Manager is built on four integrated agentic skills coordinated by a Supervisor Agent (AP & Invoice Processing Manager). This article covers the core skills, the full invoice processing workflow, integration points, and how the system determines when to auto-approve versus when to route for human review.

## Agentic Skills

The Supplier Invoicing Manager operates through four core skills, each handling a distinct stage of the invoice processing lifecycle.

#### Invoice Intake & Parsing

Automatically receives supplier invoices from inbound channels and extracts header and line-level details such as invoice number, amounts, dates, PO references, and line items. This skill handles variability in invoice formats across suppliers, PDFs, scanned images, email body content, and converts unstructured input into structured financial fields that can be validated against ERP records. Invoices arriving from multiple channels are captured and prepared for processing without any manual data entry.

#### 3-Way Match

Validates invoices by matching them against the corresponding purchase order and goods receipt note to ensure accuracy in quantity, price, and totals. The match is performed line by line, using configurable tolerance logic to determine whether a variance falls within acceptable bounds or requires escalation. Where all three records align within tolerance, the invoice is cleared for auto-approval. Where they do not, the mismatch is passed to the Charge & Variance Interpretation skill before any escalation decision is made.

#### Charge & Variance Interpretation

Identifies service charges, taxes, freight, and any price or quantity variances, even when part numbers are missing or invoice formats differ from what the system expects. Rather than treating all variances as equivalent exceptions, this skill classifies each one: determining what the charge represents, whether it has a legitimate basis, and whether it can be resolved automatically or requires human review. This context-aware interpretation reduces the volume of exceptions that reach AP teams by resolving variances that are explainable within the invoice's context.

#### Exception Handling

Routes mismatches or unclear cases to the right approver with a clear explanation of the issue, enabling fast resolution without manual investigation. When an exception is escalated, the reviewer receives the invoice details, the specific discrepancy, and the decision options available. Once a decision is made, the Digital Worker executes the follow-up automatically, including contacting the supplier directly to flag the issue and request a correction if needed. All exceptions are routed consistently using defined matching rules and tolerance thresholds, ensuring no discrepancy is handled ad hoc or inconsistently.

### Invoice Processing Workflow

The following table outlines the full invoice processing workflow from initial intake through to ERP update and supplier communication.

| **Stage**                                | **What the System Does**                                                                              | **Action / Output**                                                                                            | **Channel**       |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------- |
| **Invoice Intake & Parsing**             | Parses invoices from email and PDF; extracts supplier, PO reference, amounts, and line items          | Structures invoice data, validates completeness, triggers processing workflow                                  | Email / OCR / IFS |
| **3-Way Matching**                       | Compares invoice against PO and goods receipt; identifies mismatches in price, quantity, and delivery | Validates invoice accuracy, auto-matches where possible, flags discrepancies                                   | IFS               |
| **Exception Detection & Classification** | Identifies mismatches and tolerance breaches; classifies severity and type of issue                   | Triggers exception workflows, prioritizes by impact, prevents incorrect posting                                | IFS / Teams       |
| **Invoice Posting & ERP Update**         | Validates final data against rules; ensures readiness for posting                                     | Posts invoice to IFS Cloud, maintains audit trail, ensures financial accuracy                                  | IFS               |
| **Supplier Communication & Resolution**  | Detects need for clarification; identifies missing or incorrect invoice details                       | Drafts supplier emails, requests corrections, tracks responses                                                 | Email             |
| **Human-in-the-Loop Decision Support**   | Identifies ambiguous scenarios; provides context for decisions                                        | Surfaces decision options to reviewer, captures approvals or rejections, resumes automated flow after decision | Teams             |

## Integration Points

**Email Systems:** Monitors Microsoft Outlook and Gmail inboxes continuously, capturing supplier invoices with PDF and document attachments in real time.

**ERP Platforms:** Integrates directly with IFS Cloud to read purchase order and goods receipt records, validate invoice data, post approved invoices, and update invoice status automatically.

**Collaboration Platforms:** Uses Microsoft Teams and Slack for exception notifications, approval workflows, and human-in-the-loop decision support.

**Documents:** Integrates with IFS Loops and Google Drive for document storage and invoice record management.

**Enterprise Applications:** Connects with IFS and other enterprise platforms for cross-system data access and financial record management.

## Human-in-the-Loop Design

The Supplier Invoicing Manager is designed so that clean invoices are processed without any human touchpoint, and human judgment is applied only where genuine decisions are required.

The system proceeds independently when:

* Invoice details match the purchase order and goods receipt within configured tolerance thresholds
* Variances are interpretable as legitimate charges (freight, tax, service fees) within tolerance
* The invoice has not been processed before (idempotency check passes)
* All required fields are present and valid

Human review is required when:

* Price, quantity, or total mismatches exceed configured tolerance thresholds
* Variances cannot be classified or resolved automatically
* Invoice references are missing, ambiguous, or cannot be matched to a PO
* Duplicate invoice risk is detected
* The discrepancy requires a business decision before the supplier can be contacted

When an exception is routed for review, the system sends a notification with the invoice details, the specific issue, and the rationale, so the reviewer has everything needed to make a decision without further investigation. Once approved or rejected, the Digital Worker immediately executes the appropriate next step, including any required supplier communication.

## Audit Traceability

Every invoice processed by the Supplier Invoicing Manager generates a complete record of the decisions, validations, and actions taken. This includes the matching outcome for each line item, any variances detected and how they were classified, whether the invoice was auto-approved or escalated, the decision made by the human reviewer if applicable, and any supplier communications sent. This structure ensures that AP operations are fully auditable and that discrepancies are resolved with documented rationale rather than informal resolution.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.theloops.io/digitalworkers/ifs-loops-digital-workers/digital-worker-guides/supplier-invoicing-manager/core-concepts/architecture-and-capabilities.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
