Resources · Checks

Every check Temlavo runs on an invoice.

Each result lists its checks in validation.checks. These 15 checks cover arithmetic, currency and dates, duplicates, document type, extraction issues, required data, and line-item coverage. Each one is marked with whether your review policy can change it.

On this page

How checks work

  • A check blocks when its severity is review and its status is not pass. Any blocking check makes the result needs_review; warnings leave it completed.
  • A finding’s message is the sentence in the “What it catches” column, and a finding with info severity has none. A stored result keeps the wording it was created with.
  • When an arithmetic check’s inputs are missing or unclear, it is not_evaluable with info severity. A missing amount is never calculated and added to the result, except a total that the invoice’s charges and its payable plus deductions both give exactly.
  • Money math uses exact decimals, never floating point. Evaluated arithmetic checks return the equation, the calculated value and the difference.

review_requiredboolean

true when at least one check blocks, which makes the status needs_review.

checksarray of objects

Every check that ran, with its outcome. See checks.

Fields of each item

codestring

The check that ran, such as total_consistency. New codes may be added; see every check.

statusstring

The outcome.

pass
The check passed.
fail
The check found a problem.
not_evaluable
The inputs were missing or unclear, so the check could not decide.

severitystring

How much a failed check matters. A check blocks when its severity is review and its status is not pass.

info
Informational only.
warning
Worth a look; the result can still be completed.
review
Needs a person when the check fails or can't decide.

messagestring · nullable

An explanation for people, or null. Never branch on it.

pathsarray of JSON Pointers

The invoice fields the finding is about, such as /data/totals/total, so you can highlight them in your own review screen.

detailsJSON value · nullableOptional

Check-specific data, such as the equation, calculated value and difference of an arithmetic check.

Excerpt from the Total mismatch sample
{
  "code": "total_consistency",
  "status": "fail",
  "severity": "review",
  "message": "The invoice total does not equal the subtotal less discount, plus shipping, other charges and any tax the subtotal does not already include.",
  "paths": [
    "/data/totals/total"
  ],
  "details": {
    "equation": "subtotal - discount + shipping + other_charges + tax = total",
    "reason": "evaluated",
    "actual_total": {
      "amount": "1006.80",
      "currency": "USD"
    },
    "calculated_total": {
      "amount": "1036.8",
      "currency": "USD"
    },
    "difference": {
      "amount": "-30",
      "currency": "USD"
    }
  }
}

Branch on status, severity and validation.review_required, not on message text. New check codes may be added over time.

Arithmetic

Recalculates invoice, tax and row equations from the extracted amounts with exact decimal math.

CheckWhat it catchesResult
line_item_arithmeticSeverity set by line-item policy

A row’s quantity × unit price does not equal its line total.

Warning under advisory (default); needs review under review_on_failure and required. Exact results and the currency’s standard minor-unit rounding are accepted.

See the Row warning sample
tax_arithmeticAlways on

A tax line’s taxable amount × rate does not equal its tax amount.

Needs review. When it is unclear whether the taxable amount already includes the tax, either reading may match. Exact results and the result rounded to the currency’s minor unit in any direction (nearest, down or up) are accepted, as is tax taken out of the taxable amount plus the tax as a tax-inclusive price. Tax rounded line by line rarely shows on the page, so with a complete item list a difference within half a minor unit per line item and per invoice-level discount or charge is left undecided, and a larger one fails. With an incomplete list any difference is left undecided, because the lines that would bound it are missing.

total_consistencyAlways on

The invoice total does not equal the subtotal less discount, plus shipping, other charges and any tax the subtotal does not already include.

Needs review. Additions are exact, with no rounding tolerance. A discount reduces the size of the subtotal, so on a credit note it reduces the credit.

See the Total mismatch sample
line_items_sum_consistencySeverity set by line-item policy

The row amounts add up to neither the subtotal nor the total.

Warning under advisory (default); needs review under review_on_failure and required. Rows that include tax may add up to the total instead; their tax basis is not inferred. Runs when the item list is marked complete and the subtotal is present. A row without a line total counts as quantity × unit price only when it is priced that way and has no row discount; any other row without one skips the check. Allows for rounding: half a minor unit per row, plus the unit-price rounding of calculated rows. Undecided when tax-inclusive rows meet an invoice-level discount or charge.

amount_due_consistencyAlways on

The amount due does not equal the invoice total less payments, credits and amounts withheld, plus any earlier balance carried forward and payable rounding.

Needs review. Runs when the amount due is printed. Additions are exact. When nothing is printed between the total and the amount due, the two must be equal, except that a balance of zero, which no printed payment explains, means the invoice was paid and is left undecided. Undecided when an item between them is unclear or of another kind, such as a commission deducted at payment, and when the amount due is only part of the total, such as an instalment or a requested deposit.

tax_sum_consistencyAlways on

The tax lines do not add up to the printed total tax.

Needs review. Runs when the extraction marks the tax lines as the complete breakdown of the printed total tax. Allows half a minor unit per tax line, because a total tax rounded once can differ from the sum of separately rounded lines; a larger difference fails.

Currency and dates

Catches mixed currencies and dates that cannot both be right.

CheckWhat it catchesResult
currency_consistencyAlways on

Amounts, or the invoice currency and its amounts, use different currencies.

Needs review. Amounts are never relabeled or converted.

date_consistencyAlways on

The due date is earlier than the issue date.

Needs review. Runs when both dates are present.

Duplicates

Compares each submission with earlier completed or needs-review submissions that had duplicate detection on, in the same account and accounting entity.

CheckWhat it catchesResult
exact_document_duplicateOn by default · can be turned off

The same source file was submitted before.

Needs review. Returns the earlier document ID.

possible_invoice_duplicateOn by default · can be turned off

An earlier invoice has the same supplier name and invoice number.

Needs review. Matches even when the earlier invoice arrived as a different file. Returns the earlier document ID. Matching is not fuzzy and does not use dates or amounts.

See the Possible duplicate sample

Document type

Checks that the upload is one invoice before its data is trusted.

CheckWhat it catchesResult
document_classificationAlways on

The upload may not be a single invoice.

Needs review. A clear non-invoice, such as a receipt, or an upload with several invoices fails instead and is not billed.

Extraction issues

Surfaces values the model found conflicting, ambiguous or unreadable instead of silently picking one.

CheckWhat it catchesResult
semantic_issueSeverity depends on policy
  • fail: Printed values conflict.
  • not_evaluable: A printed value is ambiguous or unreadable.

Conflicts and unclear values in required fields require review; other unclear values are warnings. Under advisory, conflicts confined to line items are warnings. Under required, unclear item coverage, a whole row, a row total or a row’s only usable identifier requires review.

Required data

Requires the fields every invoice needs, plus any fields your workflow depends on.

CheckWhat it catchesResult
critical_field_unresolvedAlways on

One or more fields every invoice needs could not be resolved.

Needs review. The fields every invoice needs are /data/vendor/name, /data/invoice/number, /data/invoice/issue_date, /data/invoice/currency, /data/totals/total. This baseline cannot be turned off.

required_field_unresolvedAdded by your policy

One or more fields you required could not be resolved.

Needs review. Choose from 17 supported fields in policy.required_fields, such as the PO number, due date or customer tax ID.

See the Missing PO number sample

Line-item coverage

Requires usable item rows when your workflow cannot accept a header-only result.

CheckWhat it catchesResult
line_items_requirementAdded by your policy

Line items are missing or incomplete, and the line-item policy requires them.

Needs review. Flags no rows, an item list marked partial or unavailable, and rows missing a line total or with neither a description nor a product code. Runs only when policy.line_items is required.

What checks do not do

  • Checks compare the extracted values with each other. They do not re-read or independently verify the source document, so completed is not a guarantee of accuracy or approval to pay.
  • Tax arithmetic checks the math on the invoice, not tax compliance.
  • Amount due is reconciled with the total through the payments, credits and earlier balances printed between them; an amount due that is only part of the total, such as an instalment, is left undecided. Row amounts are added up only when the item list is marked complete, and a match does not prove that every printed row was captured.
  • Review policy changes how some checks affect the outcome; it is not a custom rules engine. Configure review policy.