> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravenna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Approval rounds

> Create and manage approval rounds on tickets with configurable policies, threshold rules, sequential or parallel stages, approver management, and admin controls.

Approval rounds are the building blocks of ticket approvals. Each round defines a set of approvers and a policy that determines when the round is complete. Add a single round for simple approvals, chain multiple rounds for multi-stage workflows, or group rounds into a stage so they run in parallel.

## Mental model

Approval rounds are grouped into stages on a ticket, ordered by `stageIndex`. Each round has a policy, a set of approvers, and a status. Rounds sharing a `stageIndex` run in parallel as one stage. Ravenna evaluates each round's policy after every approver action, and advances to the next stage once every round in the active stage is terminal.

***

## Round data model

| Field | Type | Description |
| - | - | - |
| `name` | String (nullable) | Display name for the round |
| `policy` | ANY, ALL, MAJORITY, THRESHOLD | Determines completion criteria |
| `status` | PENDING, ACTIVE, APPROVED, DECLINED, RESET, SKIPPED | Current round state |
| `threshold` | Integer (nullable) | Required approval count for THRESHOLD policy |
| `stageIndex` | Integer | Ordering position; rounds sharing a value run in parallel |
| `filterGroups` | Ticket condition filter (nullable) | Snapshotted from the template round at apply time. If the conditions match against the ticket, the round is created with status `SKIPPED` and never activates. |
| `resetFromRoundId` | String (nullable) | Links to the round this replaced (after reset) |
| `openedAt` | DateTime (nullable) | When the round was activated |
| `closedAt` | DateTime (nullable) | When the round completed |

***

## Approver data model

| Field | Type | Description |
| - | - | - |
| `userId` | String | The approver's user ID |
| `status` | PENDING, APPROVED, DECLINED | Approver's decision status |
| `reason` | String (nullable) | Decline reason |
| `completedAt` | DateTime (nullable) | When the decision was made |
| `deletedAt` | DateTime (nullable) | Soft delete timestamp |

***

## Policy evaluation logic

Policy evaluation happens after each approver action (approve, decline, or remove):

**ANY policy:**

* At least one APPROVED approver → round APPROVED
* Any DECLINED approver → round DECLINED

**ALL policy:**

* All approvers APPROVED → round APPROVED
* Any DECLINED approver → round DECLINED

**MAJORITY policy:**

* More than half of approvers APPROVED → round APPROVED
* Any DECLINED approver → round DECLINED

**THRESHOLD policy** (**Count of approvals** in the UI):

* N or more APPROVED approvers → round APPROVED. If the round has fewer than N approvers, every approver must approve.
* Impossible to reach N (remaining pending + already approved \< threshold) → round DECLINED

After round completion:

* If other rounds in the same `stageIndex` are still ACTIVE → wait for them; the stage is not yet settled.
* If every round in the active stage is terminal and all were APPROVED → activate every round in the next `stageIndex` together (set each to ACTIVE, set `openedAt`).
* If every round is terminal and any were DECLINED → set ticket `approvalStatus` to DECLINED.
* If no later stage exists → set ticket `approvalStatus` to APPROVED or DECLINED based on the stage outcome.

Two rounds in the same parallel stage can settle at nearly the same time. Ravenna serializes the "is the whole ticket done" check with a per-ticket lock so only one settlement path finalizes the ticket.

***

## Sidebar focus logic

The sidebar shows the "focused" round, determined by priority:

1. Active round (status = ACTIVE)
2. Most recently declined round
3. Last round if all are approved
4. First pending round

When approvers are added via the sidebar with no existing rounds, the system auto-creates a round with ANY policy.

***

## Reset behavior

**Single round reset:**

1. Original round status set to RESET
2. New round created with `resetFromRoundId` pointing to the original
3. New round is inserted at the same `stageIndex` as the original
4. New round is set to ACTIVE
5. Carried-over approvers are re-notified

**Full approval reset:**

1. All non-reset rounds are archived (status = RESET)
2. New rounds created matching the original stage layout (including any parallel groupings)
3. Every round in the first stage is activated, ticket status set to IN\_PROGRESS

***

## Workflow integration

The "Add Approvers" workflow action creates a round at the **head** of the linked list:

* If rounds already exist: new round becomes the first round, ticket status resets to IN\_PROGRESS
* If no rounds: creates round and kicks off approval
* Supports assignment strategies: All (all users), Round Robin (one user), Auto (system bot auto-approves)

The "Wait for Approval" action pauses until the ticket's approval status changes from IN\_PROGRESS or the configured timeout (default 3 days) expires. The action branches into three outcome paths: On Declined, On Approved, and On Timeout.

> [!NOTE]
>
> On Declined fires only on an actual decline. Its branch condition requires that the step did not time out. When the timeout expires with no decision, the workflow continues down On Timeout instead. Put anything you want to happen on a stalled approval, such as escalating to a backup approver or notifying the requester, on the On Timeout branch.

***

## Constraints and gotchas

* Only one stage is ACTIVE at a time. Rounds sharing that stage's `stageIndex` are active together.
* The next stage does not activate until every round in the current stage is terminal, even in the parallel case.
* Rounds require at least one approver.
* Removing the last approver from a round deletes the round (via sidebar).
* Removing approvers triggers immediate policy re-evaluation, which can auto-complete the round.
* The same approver appearing in more than one round in a parallel stage is notified once per stage kickoff, not once per round.
* Reset preserves audit history. Reset rounds (status = RESET) are hidden from the UI but remain in the database.
* Round ordering is stored via the `stageIndex` field. Rounds sharing a `stageIndex` run in parallel.
* Reopening a declined ticket by syncing in a new round in a later stage advances correctly past the declined stage without re-approving it.
* `sourceTemplateRoundId` tracks which template round generated each ticket round (for lineage).
* Rounds created from a template can enter status `SKIPPED` at apply time when their snapshotted `filterGroups` match the ticket. Skipped rounds never activate, do not notify approvers, and are treated as terminal for stage advancement. See [Skip conditions](https://docs.ravenna.ai/documentation/service-desk/approvals/templates.md#skip-conditions) on approval templates for how to configure this.


## Related topics

- [Approvals](https://docs.ravenna.ai/documentation/service-desk/approvals/overview.md)
- [Approval templates](https://docs.ravenna.ai/documentation/service-desk/approvals/templates.md)
- [Approvals in workflows](https://docs.ravenna.ai/documentation/workflows/approvals.md)
- [Create ticket approval rounds](https://docs.ravenna.ai/api/ticket-approval-round/create-ticket-approval-rounds.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.