Invoice Extraction AI Employee

The Invoice Extraction AI Employee is built from the Invoice Extraction curated template (category: Finance). It is a form AI Employee (AIE): you submit an invoice, and it extracts the key fields — vendor, amounts, line items, dates — then validates them against configurable business rules before the invoice moves into your AP process. It eliminates manual data entry and catches common discrepancies (math errors, missing fields) before they reach your accounting system.

Workflow

The template ships a two-agent workflow that runs left to right:

NodeAgent typeWhat it does
Extract Invoice FieldsextractionExtracts vendor, invoice number, dates, currency, subtotal, tax, total, payment terms, and line items into a defined output schema, flagging any field that is illegible or missing.
Validate Against Rulesrule_validationChecks the extracted data against your AP business rules and reports each rule as pass or fail with details.

A start node feeds the invoice into the graph, and a publish node exposes the extracted and validated invoice. The edges run start → extract → validate → publish.

The Extract Invoice Fields node ships with an invoice output schema in its type_config. For example:

{
  "output_schema": {
    "type": "object",
    "properties": {
      "vendor_name":    { "type": "string", "description": "Name of the vendor or supplier" },
      "invoice_number": { "type": "string", "description": "Invoice number or reference" },
      "invoice_date":   { "type": "string", "description": "Date the invoice was issued" },
      "due_date":       { "type": "string", "description": "Payment due date" },
      "currency":       { "type": "string", "description": "Currency code (e.g. USD, EUR)" },
      "subtotal":       { "type": "number", "description": "Subtotal before tax" },
      "tax_amount":     { "type": "number", "description": "Tax amount" },
      "total_amount":   { "type": "number", "description": "Total amount due" },
      "payment_terms":  { "type": "string", "description": "Payment terms (e.g. Net 30)" },
      "line_items":     { "type": "array", "items": { "type": "object",
                           "properties": { "description": { "type": "string" }, "quantity": { "type": "number" },
                                           "unit_price": { "type": "number" }, "amount": { "type": "number" } } } }
    },
    "required": ["vendor_name", "invoice_number", "invoice_date", "total_amount", "line_items"]
  }
}

The Validate Against Rules node ships with these business rules in type_config:

{
  "rules": {
    "operator": "AND",
    "conditions": [
      { "rule": "Line item amounts must sum to subtotal within $0.01 tolerance" },
      { "rule": "Tax amount must be between 0% and 25% of subtotal" },
      { "rule": "Total must equal subtotal + tax_amount within $0.01 tolerance" },
      { "rule": "Due date must be on or after invoice date" },
      { "rule": "Invoice number must not be empty" }
    ]
  }
}

Starting configuration

The template clones in with this configuration, which you can change in the builder:

  • Model selection — Let Fusion Pick (EmaFusion™ chooses the model per request).
  • Optimization priority — Most accurate.
  • Conversation context — disabled (this is a single-submission form workflow, not a chat).
  • Feedback — enabled, with thumbs-up / thumbs-down reasons and free-text comments.
  • Data protectioninvoice_number, vendor_name, and total_amount are pre-marked as protected fields.

Recommended data sources: none required — the template works directly on the invoices you submit. Connect a Knowledge base only if your invoices reference internal vendor codes or terms the agent should resolve.

How to use

After you select Use template and the AI Employee opens in the builder:

  1. Customize the extraction fields. Edit the output schema in the Extract Invoice Fields node to match your invoice formats.
  2. Adjust the validation rules. Edit the rules in the Validate Against Rules node to match your AP policies — approval thresholds, accepted tax rates, vendor requirements.
  3. Connect output Tools. Add Tools to push validated invoices to your ERP or accounting system. See Tools.
  4. Publish and submit. Publish the workflow, then submit invoices and receive extracted fields with a pass/fail validation report.

Data protection. This template pre-marks invoice_number, vendor_name, and total_amount as protected fields so sensitive values can be tokenized before they leave your environment. Review the protected-field list against your data-handling policy after cloning. See PII and governance.

Example inputs

  • A vendor PDF invoice for professional services, Net 30 terms.
  • A multi-line-item supplier invoice with a partial discount applied.
  • A foreign-currency invoice that needs the currency code captured.

Last updated: Jul 3, 2026