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

# Performance Dashboard

> Visibility into creditor account activity, negotiations, payment activity, and portfolio performance.

## Real-World Example

ABC Collections imports a file with 1,000 consumer accounts. After the import finishes, the Performance Dashboard should update the New Accounts metrics and overall portfolio totals for ABC Collections.

One consumer, Jane, accepts a payment plan and makes her first payment. The dashboard should show Jane in the correct negotiation and payment activity sections. When Jane finishes paying the plan, she should move into completed or settled activity instead of staying in open activity.

The creditor should be able to review summary metrics and export the underlying records for each dashboard section.

## Visual Flow

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["Creditor imports consumer accounts"] --> B["New consumer accounts are created"]
    B --> C["Live portfolio totals update"]
    B --> D["Rolling 30-day New Accounts metric updates"]
    D --> E["Consumer accepts an offer"]
    E --> F["Open Negotiations and Upcoming Plans update"]
    F --> G["Consumer makes scheduled payment"]
    G --> H["Payment Activity updates"]
    H --> I{"Plan completed or settled?"}
    I -->|No| F
    I -->|Yes| J["Completed or Settled metrics update"]
    J --> K["Creditor reviews or exports underlying records"]
    classDef default fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef actor fill:#E0F2FE,stroke:#0284C7,stroke-width:2px,color:#0C4A6E;
    classDef system fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef decision fill:#FEF3C7,stroke:#D97706,stroke-width:2px,color:#78350F;
    classDef risk fill:#FEE2E2,stroke:#DC2626,stroke-width:2px,color:#7F1D1D;
    classDef outcome fill:#DCFCE7,stroke:#16A34A,stroke-width:2px,color:#14532D;
    class A actor;
    class B,C,D,F,H,J,K outcome;
    class E,G system;
    class I decision;
    linkStyle default stroke:#94A3B8,stroke-width:2px;
```

## Performance Categories

* New Accounts.
* Open Negotiations.
* Upcoming Plans.
* Upcoming Payments.
* Scheduled Payments.
* Failed Payments.
* Completed Negotiations.
* Settled Accounts.
* Recent Activity.
* Payment Activity.

## Metric Behavior

### Cumulative Metrics

These metrics represent current live portfolio totals, not rolling 30-day activity:

* Total Account Count.
* Total Dollar Balances.
* Portfolio Balances.
* Open Negotiations.

### Rolling 30-Day Metrics

These activity-based metrics should update dynamically on a rolling 30-day basis:

* New Accounts.
* Upcoming Plans.
* Upcoming Payments.
* Scheduled Payments.
* Failed Payments.
* Completed Negotiations.
* Settled Accounts.
* Recent Activity.
* Payment Activity.

## How It Should Work

* It should help the creditor understand account activity, active negotiations, upcoming plans, upcoming payments, scheduled payments, failed payments, recent activity, completed negotiations, settled accounts, and payment activity.
* New consumer uploads should update New Accounts metrics and overall portfolio totals dynamically.
* Cumulative metrics should represent current live portfolio totals.
* Rolling 30-day metrics should represent recent activity in the matching 30-day window.
* It should show information only for the creditor's own company and allowed sub-accounts.
* It should make it easy to move from a summary number into the related details.
* Each section should support exporting the underlying records.
* Metrics should update as account, negotiation, and payment activity changes.

## How It Should Not Work

* It should not show another creditor's consumers, payments, or reports.
* It should not count inactive or unrelated records in active performance numbers.
* It should not present summary numbers that cannot be traced to the underlying records.
* It should not treat cumulative portfolio totals as rolling 30-day metrics.
* It should not treat rolling 30-day activity metrics as lifetime totals.
* It should not export records outside the creditor's company or permitted sub-accounts.

## Developer Notes

* Dashboard totals must be traceable to the records behind each number.
* Data must stay scoped to the creditor company and permitted sub-accounts.
* Inactive or unrelated records should be excluded from active metrics.
* Cumulative metrics and rolling 30-day metrics should use different date rules.
* Export queries should match the same filters used by the dashboard section.

## Related App Areas

* `routes/creditor/index.php`
* `app/Livewire/Creditor/Dashboard`
* `app/Livewire/Creditor/Dashboard/Stats`
