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

# Intake Funnel

> Visualize conversion rates across intake stages from screening through kept appointments for your organization.

The Intake Funnel Analytics dashboard at `/pm/intake-funnel` shows aggregated conversion data across intake stages for a selected date range, with real-time updates and cross-site benchmarking.

## Overview

The page queries the `pm_analytics_funnel_daily` table and aggregates counts across the selected date range to build a five-stage funnel: Screened → Matched → Waitlisted → Appointed → Kept. Summary metric cards show total screened, overall conversion rate (Kept ÷ Screened), appointments kept, and average days to appointment. A bar chart renders each stage; clicking a bar opens a drill-down dialog listing individual leads at that stage. A live Supabase subscription (`useAnalyticsFunnelSubscription`) refreshes data as new events are recorded. A second tab — **Benchmarking** — presents cross-site comparison data via `BenchmarkingView`. A **Compliance Report** button is available in the page header.

## Who it's for

Requires `pm.intake_funnel.view` (`PM_PERMISSIONS.INTAKE_FUNNEL_VIEW`).

## Before you start

* Your role must include `pm.intake_funnel.view`.
* Funnel data is sourced from `pm_analytics_funnel_daily`; the table must be populated for the chosen date range.

## Steps

<Steps>
  <Step title="Select a date range">
    Use the **Filters** control in the page header to choose a rolling window (e.g., last 30 days) or year-to-date. The default is the past 30 days.
  </Step>

  <Step title="Review metric cards">
    Four summary cards display: Total Screened, Conversion Rate, Appointments Kept, and Average Days to Appointment.
  </Step>

  <Step title="Read the funnel chart">
    The bar chart shows each stage label with an info-tooltip definition. Bars are color-coded by stage. The tooltip on hover shows the count and percentage of the prior stage.
  </Step>

  <Step title="Drill into a stage">
    Click any bar to open the **Funnel Stage Leads** dialog, which lists individual leads at that stage for the selected period.
  </Step>

  <Step title="Switch to Benchmarking">
    Select the **Benchmarking** tab to compare funnel performance across sites using the `BenchmarkingView` component.
  </Step>

  <Step title="Export a compliance report">
    Click **Compliance Report** in the header to generate a report for the current date range.
  </Step>
</Steps>

## Key concepts

**Funnel stages** — Five ordered stages tracked in `pm_analytics_funnel_daily`:

| Stage        | Label      | Definition (from UI tooltip)                                                     |
| ------------ | ---------- | -------------------------------------------------------------------------------- |
| `screened`   | Screened   | Leads who completed intake screening assessment                                  |
| `matched`    | Matched    | Leads with an appointment scheduled within the compliance window after screening |
| `appointed`  | Appointed  | Leads who have a confirmed scheduled appointment                                 |
| `kept`       | Kept       | Leads whose appointment was attended (confirmed status)                          |
| `waitlisted` | Waitlisted | Leads placed on the waitlist after matching                                      |

**Conversion rate** — Per-stage rate = count ÷ prior stage count × 100, shown in bar tooltip. Overall rate = Kept ÷ Screened.

**High-risk appointments widget** — `HighRiskAppointmentsWidget` surfaces appointments flagged for no-show risk on the Funnel tab.

**Revenue impact widget** — `RevenueImpactWidget` estimates revenue at risk based on funnel drop-off for the selected period.

<AccordionGroup>
  <Accordion title="Empty state (no data)">
    When no rows exist in `pm_analytics_funnel_daily` for the selected range, the chart area displays "No funnel data for this period."
  </Accordion>

  <Accordion title="Error state">
    A destructive alert with a sanitized error message replaces the page content if the query fails.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Practice Management" icon="briefcase" href="/pm/overview">
    Overview of the Practice Management core.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/pm.tsx
  * src/cores/pm/pages/analytics/IntakeFunnelDashboardPage.tsx
  * src/cores/pm/hooks/useAnalyticsFunnel.ts
  * src/platform/permissions/constants.ts
</Accordion>
