Public demo. Data resets daily at 3:00 UTC. Don't store anything sensitive.

expense-approval

v1.0 active

Employee submits an expense; an LLM categorizes and checks policy; manager approves if required; requester is notified.

View instances
Owner
finance-team
SLA
48h
Trigger
api
Tags
financeexpenseapprovalhr

Inputs

employee_email
string · required
employee_name
string · required
department
enum · required
engineering sales marketing operations hr

Outputs

expense_id
string
decision
enum
approved rejected pending_manager
reimbursement_amount
number

Steps

  1. 1

    Submit expense claim

    submit-expense form

    Employee provides receipt details, amount, category, and business justification

    Inputs
    employee_name process.inputs.employee_name department process.inputs.department
    Outputs
    expense_id (string) amount (number) currency (enum) merchant (string) expense_date (date) category (enum) justification (string) receipt (file)
  2. 2

    Check expense against policy

    policy-check judgment

    Assess whether the expense complies with company policy and determine if manager approval is required (threshold: $500 or category hardware/training)

    Inputs
    amount steps.submit-expense.outputs.amount currency steps.submit-expense.outputs.currency category steps.submit-expense.outputs.category justification steps.submit-expense.outputs.justification department process.inputs.department
    Outputs
    decision (enum) policy_notes (string) requires_manager_approval (boolean) rejection_reason (string)
    threshold: 0.88 escalation: manual
  3. 3

    Manager approval

    manager-approval approval if steps.policy-check.outputs.requires_manager_approval == true

    Department manager reviews and approves or rejects the expense

    Inputs
    employee_name process.inputs.employee_name amount steps.submit-expense.outputs.amount category steps.submit-expense.outputs.category justification steps.submit-expense.outputs.justification policy_notes steps.policy-check.outputs.policy_notes
    Outputs
    approved (boolean) manager_notes (string)
  4. 4

    Notify requester of outcome

    notify-requester notification
    Inputs
    employee_email process.inputs.employee_email expense_id steps.submit-expense.outputs.expense_id decision steps.policy-check.outputs.decision amount steps.submit-expense.outputs.amount
Raw definition
---
opensop: '0.1'
process:
  sla:
    target: 48h
    warning: 24h
  name: expense-approval
  tags:
  - finance
  - expense
  - approval
  - hr
  owner: finance-team
  steps:
  - id: submit-expense
    name: Submit expense claim
    type: form
    inputs:
    - from: process.inputs.employee_name
      name: employee_name
    - from: process.inputs.department
      name: department
    outputs:
    - name: expense_id
      type: string
    - name: amount
      type: number
    - name: currency
      type: enum
      values:
      - USD
      - EUR
      - GBP
      - MXN
      - CAD
    - name: merchant
      type: string
    - name: expense_date
      type: date
    - name: category
      type: enum
      values:
      - travel
      - meals
      - software
      - hardware
      - training
      - other
    - name: justification
      type: string
    - name: receipt
      type: file
    timeout: 3d
    on_timeout: notify-and-wait
    description: Employee provides receipt details, amount, category, and business
      justification
  - id: policy-check
    name: Check expense against policy
    type: judgment
    inputs:
    - from: steps.submit-expense.outputs.amount
      name: amount
    - from: steps.submit-expense.outputs.currency
      name: currency
    - from: steps.submit-expense.outputs.category
      name: category
    - from: steps.submit-expense.outputs.justification
      name: justification
    - from: process.inputs.department
      name: department
    outputs:
    - name: decision
      type: enum
      values:
      - approved
      - rejected
      - pending_manager
    - name: policy_notes
      type: string
    - name: requires_manager_approval
      type: boolean
    - name: rejection_reason
      type: string
      required_if: decision == 'rejected'
    judgment:
      escalation: manual
      allow_agent: true
      confidence_threshold: 0.88
      require_human_review: false
    description: 'Assess whether the expense complies with company policy and determine
      if manager approval is required (threshold: $500 or category hardware/training)'
  - id: manager-approval
    name: Manager approval
    type: approval
    inputs:
    - from: process.inputs.employee_name
      name: employee_name
    - from: steps.submit-expense.outputs.amount
      name: amount
    - from: steps.submit-expense.outputs.category
      name: category
    - from: steps.submit-expense.outputs.justification
      name: justification
    - from: steps.policy-check.outputs.policy_notes
      name: policy_notes
    outputs:
    - name: approved
      type: boolean
    - name: manager_notes
      type: string
    timeout: 2d
    condition: steps.policy-check.outputs.requires_manager_approval == true
    on_timeout: escalate
    description: Department manager reviews and approves or rejects the expense
  - id: notify-requester
    name: Notify requester of outcome
    type: notification
    inputs:
    - from: process.inputs.employee_email
      name: employee_email
    - from: steps.submit-expense.outputs.expense_id
      name: expense_id
    - from: steps.policy-check.outputs.decision
      name: decision
    - from: steps.submit-expense.outputs.amount
      name: amount
  inputs:
  - name: employee_email
    type: string
    format: email
    required: true
  - name: employee_name
    type: string
    required: true
  - name: department
    type: enum
    values:
    - engineering
    - sales
    - marketing
    - operations
    - hr
    required: true
  outputs:
  - from: steps.submit-expense.outputs.expense_id
    name: expense_id
    type: string
  - from: steps.policy-check.outputs.decision
    name: decision
    type: enum
    values:
    - approved
    - rejected
    - pending_manager
  - from: steps.submit-expense.outputs.amount
    name: reimbursement_amount
    type: number
  trigger:
    type: api
  version: '1.0'
  on_error:
    notify:
      target: "#finance-ops"
      channel: slack
  description: Employee submits an expense; an LLM categorizes and checks policy;
    manager approves if required; requester is notified.