Reports - Marketing
CallRail Leads
| Path | /callrail-leads |
|---|---|
| Status | todo |
| Drill-down pages | — |
| Pop-ups | (+2 inline) |
| Tabs | — |
| API routes | /api/callrail/calls |
Business rules
Written when this page is worked on (docs/BUSINESS-RULES.md).
Database tables & columns
| Table | Columns used |
|---|---|
dh_procedures_current view | amount, patient_id, service_date, status |
callrail_calls | answered, archived_at, archived_by, campaign, customer_city, customer_name, customer_phone, customer_phone_hash, customer_state, direction, duration_seconds, first_call, gclid, id, keywords, lead_notes, lead_notes_by, lead_status, lead_status_at, lead_status_by, medium, recording_url, source, source_name, started_at, tags, tracking_label, tracking_phone, utm_source |
dh_patient_procedures | read through the view dh_procedures_current |
dh_patients | dentrix_id, phone_hash |
website_inquiries | created_at, email, id, phone, source |
File structure
Its own files
- apps/
- web/
- src/
- pages/
- CallRailLeads.tsx
- pages/
- src/
- web/
Shared code it uses (followed through its imports and the helpers its API calls; sign-in/access plumbing and UI primitives left out)
- apps/
- web/
- src/
- components/
- reports/
- DentrixSourceNote.tsx
- HowItWorksNote.tsx
- ReportHeader.tsx
- reports/
- hooks/
- useApi.ts
- services/
- api.ts
- components/
- src/
- worker/
- src/
- routes/
- callrail.ts
- services/
- phi-read-contacts.ts
- phi-read.ts
- utils/
- crypto.ts
- phi-access.ts
- phi-crypto.ts
- routes/
- src/
- web/