Order match
The card “Check invoice” with “Order match” looks for the order with the incoming invoice’s order number and compares the gross totals with a 2 % tolerance and the vendor, with no script and no AI. The standard types “Incoming invoice” and “Order” have the order number and the vendor, and AI capture reads them from the document. When the invoice matches its order (“Matches”), the invoice goes to approval; when it deviates (“Deviation”) or no order has the number (“No order”), purchasing checks it first. “Matches” approves nothing: a person still approves. The order is linked to the workflow and shown only to people who may open it; the hint never names its amount.
The workflow
Section titled “The workflow”The workflow starts for every document of the type incoming-invoice. Its file workflow.yaml:
$schema: 'https://docs.acriva.de/schemas/workflow.schema.json'format: 1schemaVersion: 7sdk: '1.0.0'key: order-matchname: Bestellabgleichtemplate: customtrigger: documentType: incoming-invoicefields: []start: matchsteps: - kind: invoiceCheck name: match label: Bestellabgleich check: orderMatch order: invoiceField: orderNumber orderType: order orderField: orderNumber tolerancePercent: 2 invoiceVendorField: vendorName orderVendorField: vendorName next: approval onDeviation: purchasing onNotFound: purchasing - kind: humanTask name: purchasing label: Abweichung prüfen (Einkauf) taskKind: review assignees: [] fallback: kind: member member: einkauf@example.com options: excludeRequester: false excludeActorsOfSteps: [] pickFile: false next: approval onRejected: rejected - kind: humanTask name: approval label: Freigabe taskKind: approve assignees: [] fallback: kind: role role: Geschäftsführung options: excludeRequester: true excludeActorsOfSteps: [] pickFile: false next: approved onRejected: rejected - kind: end name: approved label: Freigegeben outcome: approved - kind: end name: rejected label: Zurückgewiesen outcome: rejected