- type
- concept
- created
- Mon Apr 06 2026 02:00:00 GMT+0200 (Central European Summer Time)
- updated
- Tue Apr 07 2026 02:00:00 GMT+0200 (Central European Summer Time)
- sources
- raw/articles/ai-technical-spec.html, raw/plans/invoice-processing-plan, raw/plans/invoice-design-research, raw/plans/openrouter-llm-research, raw/notes/activeContext
- tags
- feature phase-3 ai invoices active
- aliases
- F3.2
Invoice Processing
abstract
AI feature F3.2 (IN PROGRESS) — LlamaParse PDF extraction, WO matching, price anomaly detection >10%, GL code assignment. 2,143 invoices seeded. Smart Lean AI pipeline.Architecture (Smart Lean Pipeline)
6-stage state machine: UPLOADED → AI_PROCESSING → PENDING_REVIEW → APPROVED → SCHEDULED → PAID
Key Capabilities
- PDF upload + wiki/entities/llamaparse extraction
- wiki/entities/openrouter LLM for structured field extraction (Gemini 2.0 Flash, ~$0.0004/invoice)
- Automatic WO matching by vendor + date + amount
- Price anomaly detection (>10% deviation)
- GL code auto-assignment
- PM review with AI confidence indicators
- 4 acceptance criteria
Current State (2026-04-06)
- Layout built: PDF/upload LEFT panel, details RIGHT panel
- 2,143 invoices + 5,765 line items seeded in DB
- PDFs stored at
backend/media/invoices/ - PDF viewer fixed to consistent 500px height
- Remaining: Playwright tests
Accounting Export Integrations (2026-04-06)
When an invoice is approved, 6 export buttons appear in the action bar:
- Yardi Voyager, QuickBooks, Xero, Sage Intacct, Zoho Books — each opens a modal explaining what the live integration does, with a demo-mode disclaimer
- CSV Export — functional, downloads invoice + line items as
.csv
Modal messaging is prospect-friendly: "In the live version, UnitCycle connects directly to {System}..." with system-specific feature bullets.
Schedule Payment Modal (Option C Hybrid) (2026-04-06)
Replaced instant 1-click scheduling with a proper modal:
- Date picker pre-filled with invoice due date
- Payment method toggle (ACH / Check / Wire)
- Demo banner: "In demo mode, this schedules internally. In production, triggers real bank payment."
- New DB fields:
scheduled_payment_date,payment_methodon Invoice model - After scheduling, detail page shows blue badge with date + method
Payment Calendar Page (2026-04-06)
New /payments route — wiki/concepts/payment-calendar:
- KPI cards, tabbed list, mini calendar sidebar, cash flow chart
- Interactive: click calendar days to filter, click KPI cards to switch tabs
- "Today" button in header for quick navigation
Design Research
Analyzed 40+ fintech products (Ramp, Brex, Mercury, Tipalti, Stampli, Rossum) for invoice UI patterns. Key findings: split-panel layout, AI confidence badges, inline field editing.
Sources
- raw/articles/ai-technical-spec.html — full spec with acceptance criteria
- raw/plans/invoice-processing-plan — Smart Lean implementation plan
- raw/plans/invoice-design-research — UI research across 40+ fintech products
- raw/plans/openrouter-llm-research — LLM model selection and cost analysis
Related
- wiki/concepts/ai-roadmap — Phase 3, currently active
- wiki/concepts/payment-calendar — Payment Schedule page built from invoice data
- wiki/entities/llamaparse — PDF extraction tool
- wiki/entities/openrouter — LLM API gateway
- wiki/concepts/tech-stack — infrastructure
- wiki/entities/unitcycle — the platform
Detailed Spec
Full technical specification with models, endpoints, acceptance criteria: → wiki/specs/features/f3.2-invoice-processing