# Refill conversion — Phase 1 current-state audit

> **Goal:** get from 40% → 60% portal refill completion. Phase 1 diagnoses where in the funnel patients are dropping off; intervention design follows in a later phase.
> **Owner:** Kyle Salata (kyle@advancedrx.co).
> **Status:** Phase 1 in progress (started 2026-04-27).
> **Read together with:** `../magic-link-portal-login.md` (already-concluded prior work — login friction is the _suspected_ drop-off; this audit tests that hypothesis with data).

## Scope

Phase 1 = **diagnosis only.** Maps the patient journey from refill-reminder dispatch through completed portal order, identifies where the 60% loss concentrates, surfaces measurement gaps. Does NOT propose interventions (magic link, SMS-conversational, wizard simplification) — those are downstream of this work.

**Hard constraints:**

- SMS-originated and email-originated funnels treated as separate cohorts, never aggregated. The two channels likely behave differently and the right intervention may differ by channel.
- Cohort/denominator audit is a primary deliverable, not a sub-bullet. If patients are completing refills via phone/walk-in/auto-refill, the 40% denominator may be wrong.
- Cross-system integration work (e.g., building SFMC→SF engagement sync) is **OUT of Phase 1 scope.** Gap list documents what we can't measure; decision on whether to instrument comes after Phase 1 lands.

## Deliverables

| #   | File                                                 | Type                                                                                           | Status                         |
| --- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------ |
| 1   | `business-context/workflows/portal-refill-funnel.md` | Durable capability reference                                                                   | Pending                        |
| 2   | `cohort-definition.md`                               | Denominator audit (primary)                                                                    | Pending                        |
| 3   | `measurability-matrix.md`                            | Per-stage × channel data source map                                                            | Pending                        |
| 4   | `gap-list.md`                                        | Unmeasurable stages, prioritized                                                               | Pending                        |
| 5   | `baseline-analysis.md`                               | Numbers where measurable, by channel — **scope depends on sandbox-data constraint, see below** | Blocked pending Kyle direction |

Plus opportunistic rows in root `CORRECTIONS.md` if documentation drift surfaces.

## The 12-stage funnel being mapped

1. Refill-eligible cohort (patients with prescriptions due for refill)
2. Reminder sent — SMS and/or email dispatched
3. Reminder delivered — carrier/ESP delivery receipt
4. Reminder engaged — open (email) / click (SMS+email)
5. Landing — portal page hit
6. Authenticated — community session established
7. Refill viewed — patient lands on the refill flow with their Rx in scope
8. Added to cart — `CartItem` created
9. Checkout entered — shipping/payment screens reached
10. Order submitted — `Order` activated
11. Order paid — `OrderPayment__c` captured
12. Refill fulfilled — order ships

## Sandbox-data constraint (open decision for Kyle)

The MCP toolset is locked to `ClaudeTest`. Per `business-context/storefront-data-audit.md` line 30, Developer Sandboxes ship with metadata + reference data but **no transactional records** — no Accounts, no Orders, no WebCart rows, no community Users, no `Refill_Reminder__c` rows in the relevant volumes. Live record counts only exist in production.

**Implication for deliverable #5 (baseline-analysis.md):** Claude cannot pull real numbers itself. Three options:

| Option                                          | What happens                                                                                      | Tradeoff                                    |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| (a) Kyle runs SOQL against prod, pastes results | Claude produces SOQL queries; Kyle executes; Claude analyzes                                      | Real numbers in Phase 1; loop overhead      |
| (b) Defer numbers entirely                      | Deliverable #5 ships as "queries-ready-to-run-in-prod" with no analysis; numbers wait for Phase 2 | Phase 1 lands faster; no baseline yet       |
| (c) Partial/Full sandbox refresh                | Brings transactional data into ClaudeTest; Claude can query directly                              | Sandbox refresh cost + time; recurring need |

**Default if no decision:** Claude proceeds with deliverables #1–4 (do not depend on prod data) and ships #5 as queries-ready-to-run.

## Reading order for anyone joining mid-flight

1. `../magic-link-portal-login.md` (already-concluded prior work)
2. `business-context/workflows/patient-texting-refill-reminders.md` (refill-reminder dispatch)
3. `business-context/storefront-data-audit.md` (8-layer storefront map + active bugs)
4. This directory's deliverables, in numeric order
