Document scans
Goal
Photograph or upload supplier invoices so AI extracts fields; you confirm them, then BlueMatrix creates a purchase bill (draft or posted) and optional payment / bank match follow-up.
Who it is for
AP clerks with document_scan.view (inbox/review) and document_scan.manage (capture, apply, discard, reprocess). Applying/posting bills needs purchasing permissions (purchasing.manage / purchasing.post); payments need payments.manage; bank match needs bank.manage.
Preconditions
- Module ai_assistant enabled.
- Phase-1 capture kind is AP bill (
ap.bill) only from the inbox UI. - File: JPG, PNG, or PDF up to 25 MB (phone camera supported via capture control).
- Suppliers and purchase setup available when applying; bank account when posting payment.
Steps
- Open AI → Document scans.
- Under Scan a purchase bill, use Take photo / upload, then start capture (
document_scan.manage). - Wait while status moves Uploaded → Extracting → Ready (page refreshes while OCR runs). Open the row (Review) if not already redirected.
- On Review scan:
- Confirm Supplier (party), OCR supplier name, Invoice #, dates, currency, notes, and line amounts/accounts/tax.
- Create draft bill or Create & post bill; or Re-run OCR / discard if wrong.
- After a posted bill with open balance: propose/post Payment (pick bank account) and use Bank reconciliation hints to Match nearby unmatched bank lines of the same amount.
- Use Open bill to jump to the purchase bill.
Result
Scan lifecycle: uploaded → extracting → ready → applied | discarded | failed. Applied scans create a purchase bill; payment and bank match update AP and reconciliation when those steps succeed.
Hard stops
- Unknown document kind or action not allowed in current status → domain error.
- No extraction / validation errors on apply → fix fields or re-run OCR.
- Post the purchase bill before proposing a payment; Bill has no open balance; Select a bank account first.
- Missing Gemini/OCR configuration → extract may fail (status
failed). - Without
document_scan.manage, capture UI is hidden.