> ## 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.

# Approvals

> Approve or decline Ravenna ticket approval rounds directly from a Microsoft Teams DM with an interactive Adaptive Card.

When an approval round adds you as an approver, Ravenna sends an approval request as a DM in Microsoft Teams. You can approve or decline (with an optional reason) directly from the card.

## Mental model

Approval delivery is independent of the per-ticket chat conversation. When `APPROVAL_ROUND_APPROVER_ADDED` fires, Ravenna sends each newly-added approver a 1:1 chat card via the Bot Framework, regardless of whether the ticket already has a Teams conversation.

This means approval cards are reliably delivered even when the ticket originated from email, Admin, or another channel that has no Teams thread.

***

## Event flow

| Event                           | Behavior                                                                                                |
| ------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `APPROVAL_ROUND_APPROVER_ADDED` | DM each added approver an approval request card.                                                        |
| `TICKET_APPROVAL_COMPLETED`     | Post or update an approval-completed card in the ticket's primary conversation summarising the outcome. |

The approval-completed card uses `isTicketApproved` to render the correct outcome state (approved vs declined).

***

## Submission contract

Approval cards use the same Adaptive Card submission plumbing as other forms:

* `activity.value.actionType = 'approval_approve' | 'approval_decline'`
* Decline submissions include the reason from the `DECLINE_REASON_INPUT_ID` input.

`processFormSubmission` dispatches to `ApprovalService`, which updates the approval round and dispatches downstream events.

After processing, the card is replaced with `buildApprovalConfirmationCard` (or `buildApprovalErrorCard` on failure).

***

## Constraints and gotchas

* Approvers must be provisioned Ravenna users. Ravenna provisions on the fly via Microsoft Graph when an approval card is delivered if the user doesn't exist yet.
* The bot must be able to reach the approver in a 1:1 chat. If the approver has never installed or interacted with the Ravenna app in Teams, the first interaction may require them to accept the bot. Outbound approval DMs send even though inbound DMs are not yet processed in the beta. Approvers only need to click the Approve / Decline buttons on the card.
* Approval delivery uses the bot path (proactive messaging via cached client-credentials bot token). The Graph fallback for creating chats is currently deferred.
* **Biometric / step-up override**: when a workspace requires an additional auth challenge for high-sensitivity approvals, Ravenna sends a biometric-override variant of the card that links the approver to the Admin to complete the challenge. The Teams card itself only records intent; the recorded decision is committed once the override completes.
