Finance package

Invoice three-way match

Match each incoming invoice to its purchase order and goods receipts, pay matches within tolerance and route exceptions to accounts payable.

Headless / APIIntermediate~15 min setupv1.0.0

About this package

What it does

Invoice three-way match checks every vendor invoice against what was ordered and what was received before it is paid. Your AP or OCR capture system posts the invoice (number, vendor, PO number, total, currency and lines) to the workflow; there is no form to fill in.

The workflow reads the purchase order and the goods receipts from your ERP, works out the quantity variance (invoiced minus received) and the price variance against the received value, and evaluates the Match tolerance decision table with the vendor's risk rating. Exact matches and small variances are scheduled for payment on the due date from the vendor's payment terms, and the invoice is marked matched.

Anything else becomes a "Resolve match exception" task for accounts payable, with a two-day SLA, a reminder and escalation to the clerk's manager. AP can approve the variance and pay, put the invoice on hold and email the vendor for a credit note, or reject it. Adapt the tolerance rules, the ERP paths and the vendor emails to your process.

Headless / API

Headless: your AP / OCR capture system posts each invoice to the start API or an inbound webhook. People only see the invoices that fail the match.

Another system starts it over REST or an inbound webhook. No UI is needed; people only appear where a decision needs a human.

The flow

Step by step

  1. 1

    Invoice received

    The AP / OCR system posts the invoice number, vendor, PO number, total, currency, invoice date and lines.

  2. 2

    Read the PO and receipts

    Get purchase order returns the vendor, risk rating and payment terms; Get goods receipts returns the quantity and value received.

  3. 3

    Calculate the variances

    Quantity variance is invoiced minus received; price variance is the invoice total minus the received value, also as a percentage.

  4. 4

    Apply the tolerance rules

    The Match tolerance decision table returns matched, within tolerance or exception, with the approver and a hold reason.

  5. 5

    Pay the match

    Matched invoices are scheduled for payment on the due date from the payment terms and marked matched in the ERP.

  6. 6

    Resolve exceptions

    AP approves the variance, holds the invoice and requests a credit note, or rejects it, and the vendor is emailed.

Invoice three-way match — An invoice from the AP / OCR system is matched against its purchase order and goods receipts. Matches within tolerance are scheduled for payment; exceptions go to AP to approve, request a credit note or reject. The same canvas you get in the designer after installing.

Forms

Inputs and task forms

The inputs a caller passes when it starts a run, and the forms people complete when the process needs a decision.

Start inputs

Invoice three-way match

Passed by the calling system

Invoice number * invoice_number · textVendor invoice number as captured by the AP / OCR system
Vendor id * vendor_id · textVendor id in the ERP (V-2001…)
PO number * po_number · textPurchase order number quoted on the invoice
Invoice total * invoice_total · number0Invoice total excluding tax, in the invoice currency
Currency currency · textISO currency code
Invoice date invoice_date · dateYYYY-MM-DDInvoice date (YYYY-MM-DD); payment terms count from here
Lines lines · json{ … }Invoice lines: [{ line, sku, description, quantity, unit_price, amount }]
Invoice document document_url · urlhttps://…Link to the invoice image or PDF in the AP system
AP clerk (user id) ap_clerk_id · textOptional: user id of the AP clerk who resolves exceptions (overrides the install-time default)

User Task

Resolve match exception

Match exception: {{vendor_name}} invoice {{invoice_number}} ({{currency}} {{abs_variance}} variance)

Variance reason * reason · choice
Price differenceShort shipmentFreight or surchargeDuplicate invoiceMissing goods receiptOther
Amount to pay approved_amount · numberPrefilled: {{invoice_total}}
Credit note amount credit_note_amount · numberPrefilled: {{abs_variance}}
Resolution note * resolution_note · text
Approve varianceRequest credit noteReject

Headless

Call it from your systems

Every workflow can be started over REST, MCP or the CLI, whatever its trigger, with the sample input below. Runs start straight away on the published version; replace <workflow id> with the id the install created.

REST

shell
curl -X POST "$USERTASKS_URL/api/v1/workflows/start" \
  -H "Authorization: Bearer $USERTASKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workflow_id":"<workflow id>","variables":{"invoice_number":"INV-55410","vendor_id":"V-2001","po_number":"PO-4500123","invoice_total":11500,"currency":"NZD","invoice_date":"2026-10-20","lines":[{"line":1,"sku":"BRG-6204","description":"Ball bearing 6204-2RS","quantity":200,"unit_price":12.5,"amount":2500},{"line":2,"sku":"MTR-0750","description":"Electric motor 0.75 kW","quantity":10,"unit_price":900,"amount":9000}],"document_url":"https://files.example.com/ap/inv-55410.pdf"}}'

CLI

shell
usertasks workflows inputs <workflow id>          # the start form: keys, types, required
usertasks workflows run <workflow id> --input invoice_number=INV-55410 --input vendor_id=V-2001 --input po_number=PO-4500123 --input invoice_total=11500 … --wait

Inbound webhook

shell
usertasks webhooks create <workflow id>          # prints the hook slug and secret once
curl -X POST "$USERTASKS_URL/api/webhooks/inbound?hook=<slug>" \
  -H "Authorization: Bearer <webhook secret>" -H "Content-Type: application/json" \
  -d '{"invoice_number":"INV-55410","vendor_id":"V-2001","po_number":"PO-4500123","invoice_total":11500,"currency":"NZD","invoice_date":"2026-10-20","lines":[{"line":1,"sku":"BRG-6204","description":"Ball bearing 6204-2RS","quantity":200,"unit_price":12.5,"amount":2500},{"line":2,"sku":"MTR-0750","description":"Electric motor 0.75 kW","quantity":10,"unit_price":900,"amount":9000}],"document_url":"https://files.example.com/ap/inv-55410.pdf"}'

What's included

9 assets, ready to adapt

TypeNameDetails
Email templateCredit note requestSent to the vendor when AP asks for a credit note to cover a match variance.
Email templateInvoice rejectedSent to the vendor when AP rejects the invoice.
IntegrationERP
API referenceGet goods receiptsGET /goods-receipts — Goods received against a purchase order, summed per line, with the received value at PO prices.
API referenceGet purchase orderGET /purchase-orders/{{po_number}} — Purchase order header and lines from the ERP, including the vendor risk rating, payment terms and remittance email.
API referenceSchedule paymentPOST /payments — Approve the invoice for payment and schedule it in the payment run on its due date.
API referenceUpdate invoice statusPATCH /invoices/{{invoice_number}} — Set the AP status of an invoice (matched, on hold, rejected) with a reason visible to the AP team.
Decision tableMatch tolerance6 rules — Three-way match outcome from the price and quantity variance and the vendor risk rating. First matching rule wins.
WorkflowInvoice three-way match26 steps — An invoice from the AP / OCR system is matched against its purchase order and goods receipts. Matches within tolerance are scheduled for payment; exceptions go to AP to approve, request a credit note or reject.

Requirements

What you connect it to

Credentials never travel in a package. The install wizard asks for what your environment must provide, or installs it incomplete until you finish setup.

Needs

  • REST API — A REST API integration: set its base URL and credentials on install.
  • Assignees — People in your workspace to receive the User Tasks (picked on install).
  • Inbound webhook — An inbound webhook created for the workflow, so other systems can start it.
  • Email (optional) — Email delivery configured for the instance (EMAIL_PROVIDER), used for notifications.

After installing

  1. ERP integration: set the base URL of your ERP API and an API token. The references expect GET /purchase-orders/{po}, GET /goods-receipts?po=…, POST /payments and PATCH /invoices/{number}; adjust paths and response models to your ERP in Integrations.
  2. Assignee: pick the default AP clerk who resolves match exceptions (callers can pass ap_clerk_id per invoice).
  3. Edit the Match tolerance decision table to your tolerance policy (percentage and absolute limits, vendor risk handling).
  4. Inbound webhook: create a webhook for the workflow and point your AP / OCR system at it, or call the start API.
  5. Email (optional): configure EMAIL_PROVIDER so the credit note request and rejection emails reach vendors (the steps continue on error).

Asked for on install

  • Integration “ERP”Required

    • Tokenconfig.auth_config.token
    • Base urlconfig.base_urldefault https://erp.example.com/api· optional
  • Workflow “Invoice three-way match” assigneesRequired

    • User for step “Resolve match exception”nodes.13.config.assignee_id

Install

Install it in your workspace

Works on UserTasks cloud and on any self-hosted instance. Installing creates the assets above; nothing runs until you complete setup and start it.

In the app

  1. Download invoice-three-way-match-1.0.0.utpkg.
  2. Open Automations → Packages and drag the file onto the page (or choose Import package). Browse gallery there lists every gallery package without downloading by hand.
  3. Pick the file. The wizard verifies the checksum, every file hash and the signature, and shows the readme.
  4. Review the changes (what is created) and the data rows.
  5. Fill in the requirements, or tick Keep incomplete and finish later with Complete setup.
  6. Done: the workflow is published and active once setup is complete.

With the CLI

shell
curl -fLO https://usertasks.com/gallery/invoice-three-way-match-1.0.0.utpkg
usertasks packages inspect invoice-three-way-match-1.0.0.utpkg       # offline: checksum, hashes, signature
usertasks packages install invoice-three-way-match-1.0.0.utpkg --dry-run
usertasks packages install invoice-three-way-match-1.0.0.utpkg       # prompts for each requirement
usertasks packages install invoice-three-way-match-1.0.0.utpkg --keep-incomplete --yes   # in CI; finish with:
usertasks packages complete invoice-three-way-match -f values.yaml

Verify the download

File SHA-256
12adff1c2ab43867989b4192276c0f48bd73f7c00d32d054933aa37fd002ddda
Package checksum (what is signed)
sha256:64d4fe93fb5e67a14166c773768f1636340d1315b05ce31b3a497471baacafcd
Signer
Unsigned preview build — compare the SHA-256 above

shasum -a 256 invoice-three-way-match-1.0.0.utpkg should print the file SHA-256. How gallery packages are signed.

Versions

Version 1.0.0

  1. v1.0.02026-10-26First release.

Installing a newer version upgrades in place: local credentials and requirement values are kept, and changes you made are flagged first. How packages work

More packages

Related

Browse the whole gallery