# Real-world scenarios

## Overview

This article walks through two practical scenarios that illustrate how the Supplier Invoicing Manager handles incoming supplier invoices. The first covers a clean invoice that passes all matching checks and is approved without any human involvement. The second covers an invoice where a discrepancy is detected, a human reviewer is brought in to make a decision, and the Digital Worker handles the supplier follow-up automatically.

### Scenario 1: Clean Invoice, Auto-Approval

This scenario covers the most common type of interaction: a supplier submits an invoice that matches the corresponding purchase order and goods receipt note within configured tolerance thresholds.

**What triggers it:** A supplier invoice arrives via email to the AP team's monitored inbox, with the invoice attached as a PDF.

**What the Digital Worker does:**

1. The Invoice Intake & Parsing skill captures the email, extracts the invoice document, and converts the header and line-level details, invoice number, supplier, amounts, dates, PO reference, and line items, into structured financial fields.
2. The 3-Way Match skill retrieves the corresponding purchase order and goods receipt note from IFS Cloud and compares them against the invoice line by line, checking quantities, prices, and totals.
3. No discrepancies are found. All values fall within configured tolerance thresholds.
4. The invoice is auto-approved. The ERP is updated instantly with the invoice status, and the invoice copy is attached to the record.

**Result:** The invoice is fully processed, from email receipt to ERP update, without any manual intervention. The AP team receives visibility into what was processed without needing to touch the invoice themselves. What would have previously required opening the attachment, locating the PO, performing the match manually, and updating the system is handled entirely in the background.

### Scenario 2: Invoice with a Discrepancy, Exception Routing and Supplier Follow-Up

This scenario covers an invoice where the amount on the supplier's invoice does not match the corresponding purchase order. The Digital Worker detects the mismatch, routes it to a human reviewer with full context, and handles the supplier communication once a decision is made.

#### Step 1: Invoice Received and Parsed

A supplier invoice arrives via email. The Digital Worker picks it up immediately, extracts the invoice data, and begins the three-way matching process, comparing the invoice against the purchase order and goods receipt records in IFS Cloud.

#### Step 2: Discrepancy Detected

During matching, the system identifies that the invoice amount does not match the purchase order. Rather than letting the discrepancy move forward unchecked, or rejecting the invoice outright, the Digital Worker flags the specific mismatch and classifies it for review.

The Charge & Variance Interpretation skill assesses the variance in context. If the discrepancy is explainable as a legitimate charge within tolerance (such as a freight fee or tax variance), it may be resolved automatically. In this case, the numbers don't reconcile, and the issue is passed to Exception Handling for human review.

#### Step 3: Exception Routed to Reviewer

The AP team receives a notification, via Microsoft Teams or the configured channel, with the invoice details and a clear explanation of what doesn't match. The reviewer can see the original PO amount, the invoiced amount, and the specific line items involved. Everything needed to make a decision is surfaced in the notification; no additional investigation is required.

#### Step 4: Reviewer Provides Decision

The reviewer assesses the situation and provides their decision. This takes seconds rather than the time it would have taken to locate the relevant records, investigate the discrepancy, and compose an email to the supplier manually.

#### Step 5: Supplier Communication Handled Automatically

Once the reviewer's decision is captured, the Digital Worker takes over. It emails the supplier directly to flag the discrepancy and request a correction, no manual inbox monitoring, no composing of emails from scratch. The communication is generated based on the invoice context and the reviewer's decision, sent immediately, and tracked.

**Result:** The discrepancy was caught before it reached the ERP. The reviewer made a fast, informed decision with full context in front of them. The supplier was contacted automatically with a clear, professional message. The entire chain of events, detection, escalation, decision, and supplier communication, is recorded for audit purposes.

#### What These Scenarios Illustrate

**Clean invoices require no human involvement.** When an invoice matches the PO and receipt within tolerance, the Digital Worker handles extraction, matching, approval, and ERP update end to end. AP teams are informed without needing to act.

**Discrepancies are caught before they reach the ERP.** The three-way match happens during the validation stage, before any data is posted. This prevents incorrect financial records from being created and avoids the rework that would follow an incorrect posting.

**Variance interpretation reduces unnecessary escalations.** Not every mismatch becomes an exception. The system interprets charges in context, classifying freight, taxes, and service fees, and resolves what it can within configured tolerance before routing anything to a human.

**Reviewers get decisions, not investigations.** When an exception does reach a human, it arrives with the relevant details, the specific discrepancy, and the decision options already laid out. Reviewers focus on the judgment call, not on finding the information needed to make it.

**Supplier follow-up is handled automatically.** Once a decision is made, the Digital Worker manages the supplier communication, drafting and sending the message based on the invoice context and the decision provided. Teams stay focused on decisions, not admin.

**Every action is auditable.** The full chain, intake, matching, variance classification, escalation, decision, and communication, is recorded consistently for every invoice processed. There is no gap in the audit trail regardless of whether the invoice was auto-approved or required human review.


---

# 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/real-world-scenarios.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.
