Approval Workflow - Product Specification

Author: Product Team Status: Draft Last Updated: 2026-02-04


1. Problem Statement

When an invoice arrives and is processed by Orcha, it currently flows straight to DATEV export without any human approval gate. Mid-sized companies (our target: ~500 employees, EUR 50-100M revenue) are legally and operationally required to have approval controls over expenditures. The higher the amount, the more senior the person who needs to sign off.

Today, these companies handle approvals manually (email chains, paper signatures, or separate tools like Candis/SAP). This creates:

2. Goal

Build an approval workflow engine into Orcha that:

  1. Automatically determines who needs to approve each invoice based on cost centers and amounts
  2. Reaches approvers where they already work (Teams, email) without requiring them to have an Orcha account
  3. Can orchestrate approvals natively or dispatch them to external tools the company already uses
  4. Provides a complete, auditable record of every approval decision
  5. Handles real-world complications: people on vacation, non-responsive approvers, partial approvals across departments

3. Success Metrics

Metric Target
Average approval cycle time (invoice received to fully approved) < 2 business days
Approval completion rate without manual intervention > 80%
Percentage of invoices with complete audit trail 100%
AP team time spent on approval routing (manual work) Reduce by 70%

4. Core Concepts

4.1 Cost Center Groups

A single invoice often covers multiple departments. For example, an office supply invoice might have items billed to Marketing (cost center 10), Engineering (cost center 20), and Operations (cost center 30).

Each cost center group is approved independently. The Marketing head approves Marketing's portion. The Engineering lead approves Engineering's portion. They don't need to wait for each other.

4.2 Decision Matrix

Each company configures a decision matrix that answers two questions:

  1. Who approves for this cost center? - An ordered chain of up to 5 levels (e.g., team lead, department head, VP, CFO, board)
  2. How many levels are needed for this amount? - Higher amounts require more levels

Example for Cost Center 10 (Marketing):

Amount Range Levels Required Who
Under EUR 500 0 (auto-approved by Orcha) System checks pass -> approved
EUR 500 - EUR 4,999 1 Marketing Manager
EUR 5,000 - EUR 24,999 2 Marketing Manager + VP Marketing
EUR 25,000+ 3 Marketing Manager + VP Marketing + CFO

4.3 Approval Channels

Approvers interact through one of three channels:

The channel is configured per company, not per person.

4.4 Approver Identity

Approvers do not need an Orcha account. Only the AP/accounting team needs Orcha access. A CFO can approve a EUR 50,000 invoice by tapping a button in Teams or clicking a link in an email, without ever logging into Orcha.


5. User Roles

AP Team (Accounts Payable)

Approver (Internal or External)

Admin (Orcha Team)


6. User Flows

6.1 Happy Path: Invoice Approved

1. Invoice arrives via email inbox
2. Orcha extracts data (OCR + AI)
3. System groups line items by cost center
4. For each cost center group:
   a. System looks up the decision matrix
   b. Determines required approval levels based on amount
   c. Notifies all required approvers simultaneously (Teams/email)
5. Each approver receives a notification with:
   - Vendor name, invoice number, due date
   - Their cost center's line items and amount
   - The original invoice PDF
   - Approve / Reject buttons
6. Approvers tap "Approve"
7. When all approvers across all cost center groups have approved:
   -> Invoice is automatically exported to DATEV

6.2 Rejection

1. An approver rejects the invoice (with a comment explaining why)
2. All other pending approvals for that cost center group are cancelled
3. The AP team receives a notification:
   "Invoice #12345 from Vendor X was rejected by John Doe (Marketing Manager).
    Reason: 'Amount doesn't match our PO. Should be EUR 4,200 not EUR 4,800.'"
4. The invoice appears in the AP team's Approval Queue under "Rejected"
5. AP team can:
   - Correct the issue and re-submit for approval
   - Contact the vendor
   - Approve directly if they have authority

6.3 No Cost Center Assigned

1. Invoice arrives, AI can't determine the cost center for some line items
2. Those line items appear in the AP team's Approval Queue under "Needs Assignment"
3. AP team assigns cost centers to the line items
4. Normal approval flow kicks in for the newly assigned groups

6.4 No Matrix Match

1. Invoice has a cost center that isn't configured in the decision matrix
2. The invoice appears in the AP team's Approval Queue
3. AP team can:
   - Manually assign approvers for this specific invoice
   - Approve directly
   - Ask admin to add this cost center to the matrix

6.5 Auto-Approval (Small Amounts)

1. Invoice for EUR 120 arrives, below the company's auto-approve threshold (EUR 500)
2. All formal checks pass (valid VAT, no fraud flags, no duplicate)
3. System auto-approves with "Approved by Orcha (automated)" in the audit trail
4. Invoice exports to DATEV immediately
5. AP team can see the auto-approval in the document's history

6.6 Approver Non-Response (Timeout & Escalation)

1. Approver receives notification on Monday morning
2. Tuesday morning (1 business day later): Approver gets a reminder
3. Thursday morning (3 business days later): No response
4. System escalates:
   - If a higher-level approver exists: they receive the request
     with a clear "ESCALATION" label explaining the original approver didn't respond
   - If this was already the highest level: AP team is notified
     "Approval for Invoice #12345 has timed out. Manual action required."
5. Invoice appears in AP team's queue under "Escalated"

6.7 Approver Out of Office

1. System sends approval email to an approver
2. An OOO auto-reply comes back to Orcha's reply inbox
3. System detects the auto-reply and checks if a deputy is configured
4. If deputy exists:
   - Deputy receives the approval request
   - Audit trail shows: "Delegated from John Doe (OOO) to Jane Smith (deputy)"
5. If no deputy configured:
   - Normal timeout/escalation takes over

6.8 Recall (Cancellation)

1. AP team discovers an invoice is a duplicate while approval is in progress
2. AP team clicks "Recall" on the document
3. All pending approval steps are cancelled
4. All approvers who already received notifications get a cancellation notice
5. Invoice returns to review state

6.9 Edits During Approval

Scenario A: Non-routing edit
1. Approver notices the GL account is wrong (should be 6100, not 6000)
2. Approver changes it and approves
3. The original AI prediction is preserved in version history
4. Approval continues normally with the corrected data

Scenario B: Routing edit
1. Approver notices line items are assigned to the wrong cost center
2. Approver changes the cost center from 10 (Marketing) to 20 (Engineering)
3. The approval chain for Marketing's group is cancelled (no longer relevant)
4. A new approval chain starts for Engineering's group (different approvers)
5. Other cost center groups that weren't affected continue uninterrupted

6.10 External Tool Dispatch

1. Company uses Candis for approvals, connected to Orcha via adapter
2. Invoice arrives, Orcha evaluates the decision matrix as usual
3. Instead of sending email/Teams notifications, Orcha sends the approval
   request to Candis (invoice data, PDF, required approvers)
4. Candis handles the approval UX in its own interface
5. When Candis reports back "approved", Orcha marks it approved
   and triggers DATEV export
6. Full audit trail shows: "Approved via Candis by John Doe at 2026-02-04 10:30"

6.11 Same Approver, Multiple Cost Centers

1. Department head oversees 3 cost centers on the same invoice
2. They receive 3 separate approval notifications (one per CC group)
3. They approve/reject each independently
4. Each decision is tracked separately in the audit trail

7. Notification Content

What approvers see (in Teams card or email):

Header: "Invoice Approval Required" (or "ESCALATION: ..." or "REMINDER: ...")

Summary:

Detail:

Actions:


8. AP Team Approval Queue

A dedicated page in the Orcha web app where the AP team manages approvals that need attention.

Queue Categories

Category What it shows Actions available
Needs Assignment Invoices where AI couldn't determine cost center Assign cost centers -> triggers approval
No Matrix Match Cost centers not configured in the decision matrix Manually assign approvers, or approve directly
Rejected An approver rejected - shows who and why Fix and re-submit, contact vendor, approve directly
Escalated Final-level timeout, no one left to escalate to Take manual action, approve directly
Timed Out (External) External tool hasn't responded Retry dispatch, switch to internal, handle manually

Each item shows: vendor, invoice number, amount, cost center, what happened, and when.


9. Audit Trail

Every approval decision creates an immutable audit record containing:

Data Version History

Every edit to invoice data (whether by AI, human review, or approver) is preserved:

This means a company can always answer: "What did the AI originally extract, and who changed what?"


10. Edge Cases & Business Rules

Edge Case Behavior
Invoice with 0 line items that have cost centers Routes entirely to AP queue for assignment
All line items on same cost center Single approval request (no splitting)
Amount is exactly on a tier boundary (e.g., exactly EUR 1,000) Falls into the higher tier
Approver approves, then the invoice is recalled Approval is void, document returns to review
Same person is approver at Level 1 AND Level 2 Gets two separate notifications, must approve both
Deputy is also OOO Normal timeout/escalation handles it (no recursive deputy lookup)
External tool is down when dispatch happens Retry with backoff. After repeated failure, AP queue "Timed Out"
Invoice is edited (non-routing) after some approvals Already-completed approvals stay valid, flow continues
Invoice amount changes during approval (routing edit) Affected CC group's approval restarts with new tier evaluation
Auto-approval threshold met but fraud check fails No auto-approval. Routes to normal human approval chain.
Two invoices from same vendor, same amount (potential duplicate) Flagged by existing duplicate check. If flagged, cannot be auto-approved.
Approver clicks approve link twice Second click shows "Already approved" confirmation page
Token used after recall Shows "This approval has been cancelled" page

11. Configuration (Managed by Orcha Admin)

Per Company Settings

Setting Description Default
Approval enabled On/off toggle Off
Notification channel Teams or email Email
AP team email Where rejections and escalations go Required
Auto-approve threshold Amount below which Orcha auto-approves (if checks pass) None (disabled)
Reminder timing Business hours before first reminder 24h
Escalation timing Business hours before escalation 72h

Per Cost Center Configuration

Field Description
Cost center number Which CC this rule applies to
Amount tiers List of (min, max, required_levels)
Approver chain Per level: email, display name, deputy email, deputy name
Dispatch type Internal (Orcha handles) or External (dispatched to connected tool)

External Tool Adapters

Field Description
Tool name Human-readable (e.g., "Candis", "SAP Concur")
Endpoint URL Where Orcha sends approval requests
Authentication How to authenticate with the tool
Callback verification Shared secret for verifying inbound results

12. Out of Scope (For Now)


13. Open Questions

  1. SLA for external tool callbacks: How long should we wait for an external tool to report back before marking it as timed out? (Suggestion: same as human escalation timing - 3 business days)
  2. Auto-approval criteria: Beyond amount threshold, what formal checks must pass for auto-approval? (Suggestion: no fraud flags, no duplicate flags, valid VAT, all line items have cost centers and GL accounts)
  3. Bulk operations: Should the AP team be able to approve multiple items from the queue at once?
  4. Notification language: Should approval notifications be in German, English, or follow the tenant's language setting?
  5. PDF access for external approvers: Pre-signed S3 URLs expire. How long should PDF links remain valid? (Suggestion: 7 days, regenerable on demand)