---
title: "Approvals Module"
module_id: "approvals"
version: "1.0.0"
category: "data"
autonomy: "agent-capable"
generated: true
generated_at: "2026-05-04"
---

# Approvals

> Generic approval engine — define rules (entity type + amount threshold + required role) and route requests for sign-off. Used by Purchasing, Expenses, Invoicing and Quotes.

Ships with **1 agent skill**, an **admin UI**.

## Quick Facts

| Property | Value |
|----------|-------|
| **Module ID** | `approvals` |
| **Version** | 1.0.0 |
| **Category** | data |
| **Autonomy** | agent-capable |
| **Core** | No |
| **Capabilities** | `data:read`, `data:write` |
| **MCP-exposed skills** | 1 |
| **Owns tables** | — |

## Skills

These skills are seeded into `agent_skills` when the module is enabled and exposed via MCP.
External operators (FlowPilot, OpenClaw, Claude Desktop, custom MCP clients) can call them directly.

| Skill | Scope | Description |
|-------|-------|-------------|
| `manage_approvals` | internal | Generic approval workflow engine: request approval for an entity, list pending requests, approve/reject/cancel, and evaluate whether an entity needs approval based on amount thresholds. Use when: a… |

## Module API Contract

**Actions:** `request`, `list_pending`, `list_for_entity`, `approve`, `reject`, `cancel`, `evaluate_rule`, `create_rule`, `list_rules`

**Input fields:** `action`, `entity_type`, `entity_id`, `amount_cents`, `currency`, `reason`, `context`, `request_id`, `comment`, `name`, `description`, `amount_threshold_cents`, `required_role`, `priority`

**Output fields:** `success`, `request_id`, `rule_id`, `required`, `required_role`, `message`, `error`

## Used in Processes

This module participates in the following end-to-end business processes:

- [procure-to-pay](../processes/procure-to-pay.md)
- [quote-to-cash](../processes/quote-to-cash.md)

## File Map

| Purpose | Path |
|---------|------|
| Module definition | `src/lib/modules/approvals-module.ts` |
| Hook | `src/hooks/useApprovals.ts` |
| Admin page | `src/pages/admin/ApprovalsPage.tsx` |

## Contributing

To enhance this module, see [Contributing Guide](../contributing/contributing.md).

Key rules:
- Follow `ModuleDefinition<I, O>` contract pattern
- All schema changes require idempotent migrations
- Skills must be self-describing ([Law 2](../concepts/openclaw-law.md))
- Blocks are interfaces, not pipelines ([Law 3](../concepts/openclaw-law.md))
- New skills must pass the [Agent Contract Integrity](../architecture/agent-contract-integrity.md) checklist (`bun run lint:skills`)

---

*This file is auto-generated by `scripts/generate-module-docs.ts`. Do not edit manually — re-run the script after changing the module definition.*