SAMPLE AUTOMATION
Invoice Processing Workflow
A complete 7-step automated workflow showing how K0nsult governs every decision, from email receipt to ERP entry, with full audit trail.
// Automation Pipeline
01
Invoice Received (Email Trigger)
T+0ms TRIGGERInput Data
source: email (kontakt@k0nsult.dev) from: billing@techcorp.io subject: "Invoice #TC-2026-0847" attachment: invoice_TC-2026-0847.pdf size: 245 KB received: 2026-03-23T09:14:22Z
Agent Action
agent: A03-MailProcessor action: extract_attachment validation: PDF verified, no macros virus_scan: CLEAN
GOVERNANCE: File safety check passed
02
OCR Extraction
T+340ms EXTRACTEDExtracted Fields
invoice_number: "TC-2026-0847" vendor: "TechCorp International" amount: $4,500.00 currency: "USD" date: "2026-03-23" due_date: "2026-04-22" tax_id: "PL-9512345678" items: 3 line items confidence: 97.2%
Agent Action
agent: K12-OCREngine model: document-ai-v3 pages_processed: 2 fields_extracted: 14 duration: 340ms
GOVERNANCE: Data extraction logged, PII flagged for handling
03
Policy Check & Risk Assessment
T+420ms RISK: MEDIUMRisk Assessment
data_classification: "financial" action_type: "modify" risk_score: 5 / 10 risk_factors: financial_data: +5 under_10k_threshold: -2 known_vendor: -1 modify_action: +2 recurring_invoice: +1 decision: "REVIEW" level: "B"
Policy Engine Output
agent: GOV-PolicyEngine policies_checked: 4 FIN-001: Invoice threshold PASS FIN-002: Vendor whitelist PASS FIN-003: Budget allocation PASS SEC-007: Data handling PASS result: PROCEED (Level B)
GOVERNANCE: Level B — agent processes, human reviews within 24h
04
Vendor Validation & Cross-Check
T+680ms MATCHVendor Database Check
vendor_name: "TechCorp International" vendor_id: VND-TC-0042 tax_id_match: TRUE bank_details_match: TRUE status: "ACTIVE" last_invoice: 2026-02-15 total_invoices: 17 payment_history: 100% on-time
Agent Action
agent: FIN-04-VendorValidator checks_performed: 5 Tax ID verification MATCH Bank account verification MATCH Sanctions screening CLEAR Duplicate invoice check CLEAR Amount variance check NORMAL confidence: 99.1%
GOVERNANCE: Vendor verified against master database
05
Approval — Level B
T+720ms APPROVEDApproval Decision
level: "B" mode: "agent_auto + human_review" auto_approved: true reason: "Under $10k, known vendor, recurring invoice pattern" human_review_deadline: "2026-03-24T09:14Z" reviewer: "FinRep (Team 0n40i4)"
Agent Action
agent: GOV-ApprovalEngine approval_id: APR-INV-20260323-0847 decision: AUTO-APPROVED notification_sent: true notification_to: FinRep, 0n40i4 escalation_if_no_review: "24h"
GOVERNANCE: Level B auto-approved, human review queued for 24h
06
Payment Scheduled — ERP Entry
T+1,050ms SCHEDULEDERP Record Created
erp_entry_id: ERP-2026-03-23-0847 vendor: "TechCorp International" amount: $4,500.00 USD payment_date: "2026-04-20" payment_method: "bank_transfer" gl_account: "6100-TECH-SVC" cost_center: "CC-TECH-OPS" status: SCHEDULED
Agent Action
agent: FIN-07-ERPConnector system: "ERP-Cloud" operation: create_payable three_way_match: PASS PO match: PO-2026-0392 Receipt match: REC-2026-0847 Invoice match: TC-2026-0847 duration: 330ms
GOVERNANCE: Three-way match verified, payment scheduled within terms
07
Audit Trail — Full Decision Chain
T+1,100ms LOGGEDComplete Audit Record
audit_id: AUD-INV-20260323-0847 workflow_id: invoice-processing-001 total_duration: 1,100ms steps_completed: 7 / 7 agents_involved: 5 (A03, K12, GOV-Policy, FIN-04, FIN-07) policies_checked: 4 risk_score: 5 / 10 (MEDIUM) governance_level: "B" approval: AUTO-APPROVED (human review queued 24h) exceptions: 0 data_access_log: K12: read invoice PDF FIN-04: read vendor DB (VND-TC-0042) FIN-07: write ERP (ERP-2026-03-23-0847) retention: "7 years (financial record)" immutable: true hash: sha256:a4f8c2e1...b7d9
Re-animates the entire 7-step workflow pipeline
// Workflow Summary
7
Steps
5
Agents
4
Policies
1.1s
Duration
B
Gov Level
0
Exceptions
// What This Demonstrates
End-to-End Automation
From email receipt to ERP entry, zero manual data entry. The entire pipeline executes in 1.1 seconds.
Policy-Driven Decisions
Every step checks against governance policies. Risk scoring determines the approval level automatically.
Human-in-the-Loop
Level B means the agent auto-approves but a human reviewer has 24h to override. Critical amounts escalate to Level C/D.
Full Audit Trail
Every decision, data access, and action is logged immutably with hashes. 7-year retention for financial records.