Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions content/docs/automation/approvals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,10 @@ record is **locked** against edits while pending (`lockRecord`, default `true`),
and the flow run parks until a decision arrives.

Only `approvers` is required on the node; everything else has a default
(`behavior: 'first_response'`, `lockRecord: true`, `maxRevisions: 3`).

<Callout type="warn">
**`type: 'role'` is not a position.** In an approver entry, `role` means the
better-auth membership tier (`owner` / `admin` / `member`). Naming a business
role like `sales_manager` there matches nobody and the request silently has no
approvers — use `{ type: 'position', value: 'sales_manager' }`.
</Callout>
(`behavior: 'first_response'`, `lockRecord: true`, `maxRevisions: 3`). An
approver entry that resolves to no users falls back to a literal `<type>:<value>`
slot that no one matches, so the request opens and then stalls — see the
approver-type warning under [The approval node](#3-the-approval-node).

### The approver finds it in their queue

Expand All @@ -150,10 +146,10 @@ curl -b cookies.txt \
"https://your-app.example.com/api/v1/approvals/requests?status=pending&approverId=usr_123"
```

`approverId` accepts a user id, an email, or `role:<r>` — and takes several
values (comma-separated or repeated) to cover a person's identities in one call.
Other filters: `status`, `object`, `recordId`, `submitterId`, `q`, `limit`,
`offset`.
`approverId` accepts a user id, an email, or a `<type>:<value>` approver literal
(`position:finance_manager`) — and takes several values (comma-separated or
repeated) to cover a person's identities in one call. Other filters: `status`,
`object`, `recordId`, `submitterId`, `q`, `limit`, `offset`.

<Callout type="warn">
**Opening a request notifies nobody.** There is no built-in "you have an
Expand Down