Skip to content

Commit cf7c6e8

Browse files
committed
docs(approvals): document out-of-office delegation (#1322)
Add an "Out-of-office delegation" section to the approvals guide: how to declare a sys_approval_delegation row, which approver types reroute (individual: user/field/manager), the half-open resolution-time window, chain/cycle behaviour, the ooo_substitute audit + notification, and the group-approver boundary (position leave stays ADR-0091). Notes reassign for single in-flight requests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ypkQikZ55oWUHUnMebwXA
1 parent 130854f commit cf7c6e8

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

content/docs/automation/approvals.mdx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,43 @@ internal timer (~5 min). Without a `job` service registered, SLA timers are
215215
**display-only** and no escalation ever fires.
216216
</Callout>
217217

218+
### Out-of-office delegation
219+
220+
An approval routes to a specific person, and people take leave. Declare an
221+
**out-of-office delegation** so an approver's individually-routed slots reroute
222+
to a backup while they're away — the approval never freezes:
223+
224+
```bash
225+
curl -b cookies.txt -X POST \
226+
https://your-app.example.com/api/v1/data/sys_approval_delegation \
227+
-H "Content-Type: application/json" \
228+
-d '{
229+
"delegator_id": "usr_alice",
230+
"delegate_id": "usr_bob",
231+
"valid_from": "2026-05-26T00:00:00Z",
232+
"valid_until": "2026-05-30T00:00:00Z",
233+
"reason": "Annual leave"
234+
}'
235+
```
236+
237+
When a request opens, approvers that resolve to a **specific individual**
238+
(`type: user`, `type: field`, `type: manager`) are checked against active
239+
delegations and rerouted to the delegate. The window is half-open
240+
`[valid_from, valid_until)` (UTC), evaluated **at resolution time** — no
241+
background job — so a lapsed delegation simply stops applying. Chains
242+
(A → B → C) are followed and cycle-safe. The delegate acts under **their own
243+
identity**; the reroute is recorded as an `ooo_substitute` audit action and both
244+
the delegate and the skipped approver are notified.
245+
246+
<Callout type="info">
247+
**Group-routed approvers are not rerouted.** `type: position` / `team` /
248+
`department` / `org_membership_level` keep their whole membership, so there is
249+
nothing to skip; a position-holder's leave is handled by position delegation
250+
(ADR-0091), not here. Out-of-office delegation is self-service — create your own
251+
row via the data API (Setup → Approvals → *Delegations (OOO)*). For a single
252+
in-flight request, `reassign` hands one slot to another user directly.
253+
</Callout>
254+
218255
### Error codes
219256

220257
| Code | HTTP | Meaning |

0 commit comments

Comments
 (0)