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

# Approval Flows

> Understand how approval flows are created and processed

# Approval Flows

When a subscription or quote triggers approval rules, an approval flow is created. This guide explains how flows work, how to manage them, and how to handle edge cases.

***

## Flow Lifecycle

```mermaid theme={null}
stateDiagram-v2
    [*] --> Created: Rules Triggered
    Created --> Pending: Approvers Notified
    Pending --> Approved: All Required Approvals
    Pending --> Rejected: Any Rejection
    Pending --> Canceled: Subscription Deleted
    Approved --> [*]: Ready for Activation
    Rejected --> Pending: Resubmitted
    Rejected --> Canceled: Abandoned
    Canceled --> [*]
```

***

## Flow Creation

### Automatic Creation

Flows are automatically created when:

1. A subscription is created and matches approval rules
2. A subscription is updated in ways that trigger new rules
3. A quote is submitted for approval

### Viewing Flows

1. Navigate to **Approvals** in the main sidebar
2. View all flows in the approval queue
3. Click any flow to see details including:
   * Triggering rules
   * Required approvals
   * Current status
   * Decision history

***

## Approval Strategies

### Any Strategy

Any single group member can approve:

```
Group: Sales Managers (Alice, Bob, Carol)
Required: 1 approval

Alice approves → Request approved
```

### All Strategy

All group members must approve:

```
Group: Executive Team (CEO, CFO, CRO)
Required: 3 approvals

CEO approves → Still pending
CFO approves → Still pending
CRO approves → Request approved
```

### Minimum Strategy

A minimum number of approvals required:

```
Group: Deal Desk (5 members)
Required: 2 approvals

Member 1 approves → Still pending
Member 2 approves → Request approved
```

***

## Making Decisions

### For Approvers

1. Navigate to **Approvals** in the main sidebar
2. Click on a pending approval request
3. Review the subscription/quote details:
   * Products and pricing
   * Discount amounts
   * Contract terms
   * Customer information
4. Choose an action:
   * **Approve**: Grant approval with optional comment
   * **Reject**: Reject with required explanation
   * **Request Changes**: Ask for modifications before deciding

### Adding Comments

Always add comments explaining your decision:

* For approvals: Note why this is acceptable (strategic account, competitive situation, etc.)
* For rejections: Explain what would make it approvable (lower discount, longer term, etc.)

***

## Bulk Actions

Handle multiple approvals at once:

1. Navigate to **Approvals**
2. Select multiple pending requests using checkboxes
3. Click **Bulk Approve** or **Bulk Reject**
4. Add a comment that applies to all selected items
5. Confirm the action

<Tip>
  Bulk actions are useful at end-of-quarter when processing multiple standard requests.
</Tip>

***

## Notifications

### Email Notifications

Approvers receive emails when:

* New approval request is assigned
* Reminder after configured time (default: 24 hours)
* Escalation notification
* Flow completed (approved/rejected)

### Configure Notification Settings

1. Navigate to **Settings → Approvals → Notifications**
2. Configure:
   * Email on new request
   * Reminder timing
   * Escalation timing
   * Escalation recipients

***

## Escalation

### Time-Based Escalation

If approval is not received within the configured time:

1. System sends escalation notification
2. Additional approvers may be added
3. Original approvers are notified of escalation

### Configure Escalation

1. Navigate to **Settings → Approvals → Groups**
2. Select a group
3. Configure escalation settings:
   * Hours before escalation
   * Escalation group
   * Escalation action (notify or add approvers)

***

## Delegation

### Setting Up Delegation

When approvers are unavailable:

1. Navigate to **Settings → My Profile → Delegation**
2. Click **Set Up Delegation**
3. Configure:
   * Delegate to (another user)
   * Start and end dates
   * Reason for delegation
4. Save

### Viewing Active Delegations

1. Navigate to **Settings → Approvals → Delegations**
2. See all active delegations
3. End delegations early if needed

***

## Canceling Flows

### Automatic Cancellation

Flows are automatically canceled when:

* Subscription is deleted
* Quote is voided
* Subscription is reverted to draft

### Manual Cancellation

Sales reps can cancel pending approval requests:

1. Navigate to the subscription or quote
2. Click **Cancel Approval Request**
3. Provide a reason
4. Confirm cancellation

***

## Viewing Flow History

### From Subscription

1. Navigate to **Subscriptions → \[Subscription]**
2. Click **Approval History** tab
3. View all past approval flows

### Audit Trail

Each approval flow maintains a complete audit trail:

* When the flow was created
* Which rules triggered
* Who was notified
* Each decision and comment
* Timestamps for all actions

***

## Re-evaluation

### When Re-evaluation Occurs

Flows are re-evaluated when:

* Subscription is updated (price, discount, terms change)
* Approval rules are modified
* Products are added or removed

### What Happens

1. System re-evaluates against current rules
2. New requirements may be added if changes trigger additional rules
3. Existing approvals are preserved when possible
4. Notifications sent for any new requirements

***

## Best Practices

<CardGroup cols={2}>
  <Card title="Set SLAs" icon="clock">
    Define expected turnaround times and enforce with escalation.
  </Card>

  <Card title="Require Comments" icon="comment">
    Make approvers explain their decisions for audit purposes.
  </Card>

  <Card title="Use Delegation" icon="user-group">
    Ensure coverage during absences with delegation rules.
  </Card>

  <Card title="Monitor Metrics" icon="chart-line">
    Track approval times and bottlenecks for process improvement.
  </Card>
</CardGroup>

***

## Troubleshooting

### Flow Stuck in Pending

1. Check if approvers have been notified
2. Verify approvers have permission to approve
3. Check for delegation settings
4. Consider escalation

### Unexpected Rules Triggered

1. Review rule conditions and priorities
2. Check subscription values against thresholds
3. Verify rule scope (organization vs. plan-specific)

### Approver Not Receiving Notifications

1. Verify email address is correct
2. Check spam/junk folders
3. Verify notification settings are enabled
4. Ensure user is active member of approval group

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Approval Rules" icon="list-check" href="/approvals/approval-rules">
    Configure approval rules.
  </Card>

  <Card title="Overview" icon="clipboard-check" href="/approvals/overview">
    Return to approvals overview.
  </Card>
</CardGroup>
