# Preset: Clinic / Practice

**File:** `clinic.preset.json` · **id:** `clinic` · **version:** 2.1.0 · **default:** no
**Source:** Generalized from proven clinic builds with the intake industry pack "clinic" (insurance_or_cash, new_patient_offer, compliance_notes); v2 depth per the owner review of 2026-08-26.

## When it is selected
Routes from the "Clinic / practice" business type and the `clinic` / `practice` / `chiro` / `dental` / `pt` / `functional_medicine` aliases. Med spas route to `med_spa`; a time-boxed launch event routes to `clinic_launch_a2p`.

## What it builds (skeleton, v2 depth)
- **Users** — one per `brief.team.staff[]` entry. Every alert, task and assignment step points at a `userRef`; in the skeleton that is the role placeholder `user.owner`, resolved at fill time from `team.notifyName` (alerts) and `team.callsName` (tasks, assignment). No staff yet → the steps stay, pointed at `user.__pending__`, and the build reports them as waiting.
- **1 pipeline** — "Patient Pipeline": New Patient Lead → Contacted → Visit Booked* → Showed* → Care Plan Accepted → Active Patient → Lost. Overridden by `goal.salesStages` when the brief supplies them.
- **6 custom fields** — Lead Source, What Brings You In, Insurance Status, Appointment Date*, New Patient Offer Used*, Estimated Lifetime Value.
- **24 tags** — source, lifecycle, the hand-off trigger tags (`nurture-start`, `winback-start`, `missed-call`, `no-show`), and interest tags mirrored from the interest field.
- **4 custom values** — business_name, business_phone, owner_first_name, booking_link. Every message reads business name / phone / signature / links from these, so the copy stays right when details change.
- **1 calendar** — New Patient Visit (round_robin, Mon-Fri 8-17 default, 45-minute slots, `teamMemberRefs` → the plan users).*
- **1 intake form + 1 funnel** — "New Patient Request" (first/last/email/phone required + what brings you in + insurance status) and a New Patient Visit opt-in page (the new-patient offer, what the first visit is, A2P consent block) plus a Thank You page with the booking widget.
- **15 email + 17 SMS templates** — complete, send-ready copy written to `references/copy-guide.md`. The build stage rewrites every one from the real brief (offer, pain points, objections, prices, lead magnet) and keeps the cadence, the single CTA and the merge fields.
- **8 workflows, 32 customer touches** — see the table.

\* conditional on `goal.bookingNeeded == true`.

## Workflows

| Workflow | Trigger | Actions | Touches | Span of waits | Stops on reply |
|---|---|---|---|---|---|
| Speed to Lead | form_submission | 15 | 5 | 1.1 days | yes |
| Missed Call Text-Back | call_status (missed: no-answer/busy/voicemail) | 7 | 2 | 1 h | yes |
| Lead Nurture (30 days) | contact_tag (tag.nurture_start) | 28 | 11 | 31 days | yes |
| Replied - Stop & Route | customer_reply | 9 | 0 | instant | no |
| Win-back (30 days) | contact_tag (tag.winback_start) | 13 | 5 | 31 days | yes |
| Care plan Follow-up | contact_tag (tag.quote_sent) | 14 | 4 + a call task | 10 days | yes |
| Review Requests | contact_tag (tag.review_ask) | 8 | 3 | 7 days | yes |
| Visit Booked - Confirm & Move | appointment (confirmed) | 8 | 2 | instant | no |
| Visit Reminders | appointment (confirmed) | 5 | 3 | instant | no |
| No-Show Rescue | appointment (noshow) | 14 | 4 | 7 days | yes |

- **Speed to Lead** (15 actions): instant text + email, opportunity card, the contact assigned to whoever takes calls, alert to a real person, a call task due today, a 2nd touch at 20 minutes, a 3rd at 3 hours, a 4th and 5th by the next day, then the hand-off tag `nurture-start` as the last action.
- **Lead Nurture** (28 actions, 11 touches, 31 days of waits): give, give, ask. Ends with `lifecycle-lapsed` + the `winback-start` hand-off.
- **Win-back** (13 actions, 5 touches, 31 days of waits): one reason to come back per message, then `lifecycle-lost`.
- **Replied - Stop & Route**: the exit workflow. Pulls the contact out of every sequence, notes it, marks contacted, alerts a person and creates a 15-minute reply task.
- **Missed Call Text-Back**: `call_status` trigger scoped to no-answer / busy / voicemail, inbound. Text within seconds, tag, alert, call-back task, one more text an hour later.
- **New Patient Visit → Confirm & Move, Reminders, No-Show Rescue**: booking stops every sequence and moves (or creates) the opportunity; reminders at 24 h and 2 h; a no-show gets a same-day call task, text and email, two more touches, then hands off to Win-back and moves the card back to Contacted.

### Added in v2.1.0 (2026-09-06): the two features the Assessment prices

- **Care plan Follow-up** (feature `quote_followup`): starts from the `quote-sent` tag the operator applies when a care plan goes out (by hand, from a quoting tool, or from a stage). Text on day 1, email on day 3, text on day 6 plus a call task, last email on day 10; any reply stops it; ends by tagging `quote-no-reply`. Hand-off `handoff.quote_tag` explains the tag.
- **Review Requests** (feature `review_requests`): starts from the `review-ask` tag applied when the work is done. Text two hours later with the Google link from the `review_link` custom value, email on day 3, last text on day 7; any reply stops it (a complaint reaches a person, not a second nudge); ends by tagging `review-asked`. Hand-off `handoff.review_link` collects the link.

Every workflow now belongs to a feature (`src/intake-to-build/features.ts`) so a client's Blueprint builds what they bought; the reply router is the foundation every messaging feature stands on.

### Why sequences hand off with a tag, not add_to_workflow
Every hand-off is `add_contact_tag` + a `contact_tag` trigger. Both halves are live-proven shapes captured from working GHL workflows (`templates/action-schemas.json`). `add_to_workflow` has no captured native shape there and has not been proven at runtime, so a preset may not use it. Each sequence removes its own trigger tag as its first action so a later hand-off can start it again.

## How the brief shapes it
| Brief signal | Effect |
|---|---|
| `goal.salesStages` present | replaces the default pipeline stages (workflow stage refs are mapped to the nearest equivalent) |
| `goal.bookingNeeded == false` | drops the calendar, booking stage/tag/fields, the three appointment workflows and the calendar handoffs |
| `channels.sms == true` | keeps SMS templates, the send_sms actions, Missed Call Text-Back and the A2P gating; otherwise they drop (the email-only nurture still spans 31 days) |
| staff answers present | fills `users`; every `userRef` resolves to a real person |
| staff empty | every `userRef` → `user.__pending__`; the steps stay; `handoff.add_staff` holds those workflows DRAFT |
| `flags` | `needs_a2p` / `stripe_not_connected` / `calendar_oauth_needed` / `email_domain_needed` add the matching handoff |
| `business.name`, `offer.*`, `audience.*`, `extended.*` | fill object names, custom values and ground every template rewrite |

## Compliance rule for every rewrite
The templates say "your visit", "what brought you in", "what you came in for". They never say what that is. Keep it that way when the build stage rewrites from the brief, even if the brief names a specialty; the specialty may appear in the business name and the landing page, not in a text or email to a lead. `handoff.compliance_review` puts the final read on the operator.

## Copy notes
Compliance first: no message names a condition, diagnosis, treatment or medication, and the intake pack's compliance_notes are honored on rewrite. The through-line is "the first visit is mostly listening": what happens minute by minute, how insurance and cash pricing work in plain words, no surprise bills, and why the easy-to-fix stage is the cheap stage. Texts ask one-word questions (new / ongoing / check-up; mornings / afternoons; YES / later).

## v2.1.0 (2026-09-15)

Two workflows the Assessment prices and no preset built: **Quote Follow-up** (starts from the `quote-sent` tag; text next day, email day 3, last text day 5, then a call task for the owner and the `quote-stale` tag) and **Review Request** (starts when a booked visit is marked showed; text at two hours with the `review_link` custom value, email three days later). Held DRAFT behind the A2P and phone-number handoffs like every other text-bearing workflow (Quote Follow-up also behind staff, for its call task); their emails wait on the sending-domain handoff.
