The problem
Every supplier invoice that arrived at Smet Jet required a manual chain of steps: find the matching purchase order in Salesforce, link the records, download the PDF from Exact Online, upload it to Salesforce, and trigger the approval. Five steps, every invoice, dozens of times a week.
A supplier invoice comes in through Exact Online. Someone from finance opens Salesforce, searches for the purchase order reference, links the two records manually, downloads the PDF, uploads it to Salesforce, and submits the approval. If the PO reference is unclear or missing, the whole chain stops while someone figures it out. This is not a complex problem — it's just one that nobody had automated yet.
The steps themselves aren't difficult — they're just repetitive and entirely deterministic. If the PO reference is on the invoice, every subsequent step follows the same logic. That's exactly the kind of work a system should handle.
How it works
We built a Python automation running on Modal that polls Exact Online for new supplier invoices. When one arrives, it runs through the full matching and linking process — no manual input required for the 80% of invoices that have a clean PO reference.
The automation polls Exact Online via REST API on a short interval. When a new supplier invoice is found, it's pulled for processing. The full invoice data — line items, amounts, supplier details, and any reference fields — is extracted immediately.
The system identifies the purchase order reference from the invoice. References aren't always in the same field, so the extraction logic accounts for where Smet Jet's suppliers typically place them — header fields, line item descriptions, and free-text reference fields.
The extracted reference is queried against open purchase orders in Salesforce via REST API. The system checks for an exact match first, then applies fuzzy matching for minor formatting differences. When neither is sufficient — ambiguous references, partial matches, or supplier formatting quirks — an AI agent steps in to reason over the candidates and select the most likely match. This covers the edge cases that rule-based logic alone would send to the exception queue.
The invoice is linked to the matched purchase order in Salesforce. The PDF is downloaded from Exact Online and uploaded as an attachment on the Salesforce record — so the full paper trail is in one place without anyone copying files manually.
For matched invoices, the approval workflow kicks off automatically. For the ~20% of invoices where no PO reference is found or no open order matches — service invoices, edge cases, missing references — the system routes them to a review queue with all relevant context attached, so finance can resolve exceptions without hunting through systems.
What changed
Finance opens Exact, finds the invoice, opens Salesforce, locates the purchase order, links the records, downloads the PDF, uploads it to Salesforce, submits for approval. Five steps, every invoice, every time.
Invoice arrives in Exact. The system handles everything: extraction, matching, linking, PDF upload, approval trigger. Finance only touches the ~20% of invoices that need a human decision. Everything else is done.
The 20% that can't be matched automatically — missing references, service invoices, unrecognised suppliers — land in a structured review queue with all context attached. Nothing gets lost in the gap between systems.
The automation runs on Modal — no server to maintain, no cron jobs to babysit. It scales with invoice volume and costs nothing when there's nothing to process.
The finance team didn't need to change how they work — they just stopped doing the part that didn't require a human. The decisions stay with them. The copying and linking doesn't.