🧭 ClientsFlow — Lead Journeys & Branching Flowchart

Ground truth = the target state of branch feature/funnel-automation (the planned overhaul), with each step flagged live / planned / retired. English narrative · Hungarian subject lines quoted verbatim · regenerated 2026-06-18 from the other session's plan + Q1–Q13 conflict review.

What changed vs production v103

  1. Human gate → preview-&-arm gate (Q13). Outbound email may now run as automated sequences, but a sequence can never start sending silently. The moment a lead enters a stage that arms a sequence, the dashboard raises a preview modal showing every email's exact copy + send schedule. Matt Approves & arms (it then sends on schedule, no further clicks), Edits, or Cancels. Only two sends skip the modal: transactional reminders and the first-touch clear-negative one-liner. A global AUTOSEND_ENABLED kill-switch (default OFF) disables every auto-send at once.
  2. GHL retired entirely. Booking widget + booking-confirmation workflow and Workflow #1/#2 (stage sync) are turned off. /ghl/event stays a 200 inert stub. The dashboard is now the sole pipeline source of truth.
  3. Own booking app. Free/busy-aware over two calendars (work + personal), 07:00–18:00, 15-min grid, 30-min calls, 4h min lead, 14-day horizon. Booking link can be a signed, prefilled, slots-only token. Booking success emails Matt.
  4. No-show: 3 fixed-copy emails (immediate / +24h / +4 days) armed via the preview modal — replaces the old 5-step AI rebook loop.
  5. 3-way negative routing. neg_kind ∈ {angry, negative, soft_objection}: angry → drop/log (existing client → task); clear negative at first touch only → auto one-liner → Lost; soft_objection → AI draft + Negative-Replies card (human). Classifier stays Gemini 2.5 Flash (no model change).
  6. Main inbox surfaced (R3-gated). The blanket "ignore clientsflow.hu" rule is reversed: known deal/lead → card; everything else → Notion "Logged" (not a Kanban card). Warmup/Instantly stays invisible.
  7. UI: a pipeline lead's new email jumps its card to the top with a red glowing pulse + always-visible snippet; armed sequences show a marching-ants dashed border; a "what changed since last open" popup; a manual call scheduler.

Legend

Two orthogonal things are marked on every message: who/what triggers the send and its build status.

Who sends / approves

🟢 AUTO-SENT system sends, no human — only transactional reminders + the first-touch goodbye one-liner ✍️→🟡 DRAFT→APPROVE AI drafts, a human clicks Jóváhagy / Ready to send per email (hand-authored: first reply, proposal email) 🤖⚡ ARMED SEQUENCE multi-email auto sequence — Matt previews all copy + schedule in a modal & clicks Approve & arm once; it then sends on schedule 🟡 MANUAL a human action (call, stage move, set date) — no message

The preview-&-arm invariant: no multi-email sequence ever leaves before Matt has seen its full copy + schedule in a stage-entry modal. The 10-no-edit streak only pre-fills the modal as a one-click "Approve & arm" — it never removes the modal or sends silently. A global AUTOSEND_ENABLED (default OFF) gates every auto-send.

Build status

live shipped & running today planned in the feature/funnel-automation plan, not yet deployed retired deliberately removed (mostly GHL) [[dormant]] code exists but gated off / unreachable [[not in backend]] spec-only, not built

How any inbound reply is handled (the stem every scenario shares)

  1. 🟢 Ingest gate (handle_missive_incoming): drop warm-up/DMARC/Instantly, calendar RSVPs, out-of-office, internal senders, and Layer-0 automated/bulk mail before any AI call. Our own sent mail (_is_ours) still drops. Wise transfer → payment touchpoint.
  2. planned Main inbox surfaced (R3 gate): mail to the main clientsflow.hu inbox now runs the full gate, then routes — known deal / genuine new lead (is_lead, conf ≥ 0.55) → card; everything else → Notion "Logged" (a log view, not a Kanban card). Warmup/Instantly stays invisible. (Reverses the 2026-06-18 "ignore main inbox" rule.)
  3. 🟢 AI classifier (Gemini 2.5 Flash) sets email_type, neg_kind ∈ {angry, negative, soft_objection}, is_lead, is_automated, booking_ok, confidence. Parser defaults neg_kind=soft_objection (safe → human) if absent.
  4. 🟢 Route → Notion Activity row + one reply-review task + Slack card. A reply on a deal with a live sequence clears the sequence (seq_*) immediately.
  5. ✍️→🟡 The rep works the card on 🌅 Ma / the board: Jóváhagy, Elvet (AI learns), Olvasva, Halaszt, Átadás Daninak — and, when a stage arms a sequence, the Approve & arm preview modal.

Everything below begins at step 3's branch on email_type / neg_kind.

Scenarios — every distinct leaf path

Grouped into families A–H by what the lead's reply was. Shared sub-paths (booking → call → proposal) are abbreviated after the first full listing.

A — Positive first reply interested / neutral · new_lead_reply

Scenario 1 — The clean win (full prepayment)
  1. 🟢 Gets the cold email — "Beszéljünk a weboldaladról, {keresztnév}?"
  2. Replies positively (classifier: new_lead_reply, interested)
  3. ✍️→🟡 AI drafts a short personalised opener + the fixed own-booking link block; rep approves → sent in-thread. planned link mode
    *Summary*: hand-authored — always per-email approval. On send an urgent "📞 Hívd fel" call task is created.
  4. 🟡 Lead books a slot via the own-booking app (07–18, freebusy over both calendars).
  5. 🟢 Own-booking confirmation: thank-you page to the lead + concise booking email to matyas@clientsflow.hu + a "what changed" popup event. GHL conf retired
  6. 🟢 Google Meet invite created — "Weboldal Bemutató — {név}"
  7. 🟢 Pre-call reminders auto-send (modal-exempt): 24h "Holnapi megbeszélés", then 2h "Megbeszélés". planned: 24h+2h, body fixed to "2 óra múlva"
  8. 🟡 Rep preps, runs the Google Meet call (Fireflies records).
  9. 🟢 Transcript → AI extracts the post-call form fields → pre-filled form emailed to Mátyás.
  10. 🟡 Rep confirms post-call form page 1 (Payment = Full); page 3 = the sequence editor for proposal-chase. Submit → DocuSeal proposal+contract generated, Stripe link created, stage → Proposal Sent.
  11. ✍️→🟡 AI drafts the proposal email — "Az ajánlatod — {cég} weboldal"; rep checks link/account → sends.
    *Summary*: hand-authored; DocuSeal proposal/contract link + Stripe link. Shows the R4 three-number framing (Teljes ár · Most egy héten belül · {due} után).
  12. Lead signs the DocuSeal doc and pays in full (within 2h) → stage → Prepayment. The proposal-chase sequence (if armed) auto-stops.
  13. ✍️→🟡 Onboarding/welcome-kit email — "Üdv a fedélzeten, {keresztnév}! 🎉 Indulunk"; rep approves.
    *Summary*: Drive folder + client-portal credential form link.
  14. Lead fills the Notion Client Portal RFI / Credentials. [[not in backend]]
  15. 🟡 Rep → Waiting for Dev → 🟢 Slack ping to Dani + Main-Task due today.
  16. 🟡 Dev finishes → Rep → Website Built.
  17. [[dormant]] Handover invite — "Foglaljunk egy átadási hívást, {keresztnév}!" — authored, not auto-sent.
  18. 🟡 Rep runs handover → Handed Over.
  19. [[dormant]] +3 days: review request — "Hogy tetszik az új weboldalad, {keresztnév}?"mark WON.
Scenario 2 — Win on a 50/50 deposit + balance (partial payment)
  1. … same path as Scenario 1 through the proposal …
  2. 🟡 Rep confirms form page 1 (Payment = Partial) → DocuSeal + Stripe deposit link, stage → Proposal Sent. planned: deposit standardised to 50%; PAYMENT_PLANS=[50,100] (70% dropped)
  3. Lead signs + pays the 50% deposit → stage → Prepayment.
  4. ✍️→🟡 Onboarding/welcome-kit email; rep approves.
  5. 🟡 Waiting for Dev → Website Built.
  6. ✍️→🟡 Balance-due email — "Elkészült a weboldalad 🎉 A fennmaradó {balance}…". [[no live copy]]
  7. Balance paid → Fully Paid → Handover → WON.
Scenario 3 — Positive reply, lead doesn't book → nudge ladder → books
  1. 🟢 Cold email → replies positively → ✍️→🟡 first-reply with booking link (hand-authored).
  2. Lead does not book.
  3. ✍️→🟡 followup_nudge stays as today — AI-drafted, human-gated, Day 2 / Day 5 / Day 9 (decision 7: "alright", kept as-is). Distinct trigger from new_lead_unreachable; the one-active-sequence guard keeps them mutually exclusive.
  4. 🟡 Lead books → own-booking confirmation → Meet invite → 24h/2h reminders → call → Proposal (Scenario 1).
Scenario 4 — Positive reply, rep tried to call, no answer → "couldn't reach" sequence
  1. 🟢 Cold email → replies positively → urgent "📞 Hívd fel" task.
  2. 🟡 Rep calls, no answer; clicks "Couldn't reach".
  3. 🤖⚡ Entering this state arms the new_lead_unreachable sequence → preview modal shows every email + schedule. planned
  4. 🟡 Rep clicks Approve & arm (or Edit / Cancel). Card moves to Booking FUP and shows a marching-ants dashed border.
  5. Sequence sends on schedule (absolute-time waits, workday 06:12–18:00 send window) until the lead replies / books / Matt clicks "Stop automatic emails" / deadline.
  6. Lead books → confirmation → call → Proposal.
Scenario 5 — Positive reply, rep phones, agrees a time on the call
  1. 🟢 Cold email → replies positively → "Hívd fel" task.
  2. 🟡 Rep calls, agrees a time, opens the manual call scheduler popup (invitees, event name, duration, description, and a separate confirmation email subject + body). planned
  3. 🟢 "Create Event" → Meet event created + confirmation email sent → 24h/2h reminders → call → Proposal.
Scenario 6 — Positive reply, all nudges sent → ages out (Lost)
  1. 🟢 Cold email → positive → first-reply → no booking → nudge ladder (Day 2/5/9) sent, no action.
  2. 🟡 Rep marks Lezár — nem érdekli or it ages out → Stage: OFF (Lost) → 60-day nurture.

B — Booked but didn't attend no-show

Scenario 7 — No-show → 3-email rebook sequence → books
  1. … booked, Meet invite + reminders sent …
  2. 🟡 Lead does not attend. Rep clicks "No show + no answer → rebook seq."
  3. 🤖⚡ Entering the no-show state arms the 3-email no-show sequence (fixed copy NOSHOW_EMAIL_1/2/3_HU, timed immediate / +24h / +4 days, each embedding the signed booking link). Preview modal shows all 3 + schedule. planned — replaces the old 5-step AI loop
  4. 🟡 Rep Approve & arm → card → Booking FUP, dashed border.
  5. Lead books via the rebook link → sequence stops → call → Proposal.
Scenario 8 — No-show → rep reschedules manually
  1. 🟡 No-show. Rep clicks "No show + reschedule" → the manual call scheduler popup (Scenario 5) → new Meet event + confirmation email → reminders → 2nd attempt.
Scenario 9 — No-show → 3-email sequence, no response → Lost
  1. No-show → 3-email sequence armed & sent (immediate / +24h / +4d), no action.
  2. Sequence reaches its last step with no reply/book → 🟡 Rep → OFF (Lost).

C — Attended the call

Scenario 10 — Attended, timing objection (still interested → parked)
  1. … call happens, post-call form … Rep sets a follow-up date, parks with Halaszt — X nap.
  2. [[not in backend]] Auto "we'll reach out again" confirmation.
Scenario 11 — Attended, a 2nd discovery call is needed
  1. Post-call form → 🟡 Rep opens the manual scheduler (Scenario 5) → 2nd Meet event + confirmation + reminders → 2nd call → Proposal.

D — Proposal sent (chase & payment)

Scenario 12 — Proposal sent, unsigned → proposal-chase sequence → signs & pays
  1. … proposal email sent (hand-authored, approved) …
  2. Lead doesn't sign within the window.
  3. 🤖⚡ The proposal-chase sequence (authored on post-call form page 3: subject + body + wait-hours per step, "Save for this lead only" / "Save as template" / version dropdown) is armed via the preview modal. Stops on sign / reply / proposal_due_date. planned
  4. Lead signs → Stripe pays → Prepayment (sequence stops).
Scenario 13 — Signed, not paid (abandoned cart) → pays
  1. Lead signs DocuSeal but doesn't pay → 🤖⚡ abandoned-cart reminder sequence (armed via modal) (+2h, +1d, +3d) → Lead pays via Stripe → onboarding.
Scenario 14 — Proposal never signs → Lost
  1. Chase sequence runs to deadline, no sign → 🟡 Rep → OFF (Lost) → 60-day nurture.
Scenario 15 — Question on the sent proposal
  1. Lead replies on the proposal thread with a question → ✍️→🟡 AI draft answers + re-offers link (hand-authored, approved; the chase sequence is auto-stopped by the reply) → Lead signs → pays.

E — Negative reply neg_kind ∈ {angry, negative, soft_objection}

Scenario 16 — Angry reply → dropped (existing client → task)
  1. Replies (classifier: neg_kind = angry).
  2. 🟢 Dropped — no draft, no card, log only. planned
  3. 🟡 Exception: an angry known/paid contact still surfaces as a "Client message" task (never silently dropped).
Scenario 17 — Clear "nem érdekel" at first touch → auto goodbye → Lost
  1. Replies (neg_kind = negative)brand-new lead, no prior exchange, confidence ≥ 0.80.
  2. 🟢 Auto one-liner "Köszönöm a visszajelzést, minden jót a továbbiakban!" → Stage: Lost. planned — modal-exempt (R1); any prior back-and-forth → human card instead
Scenario 18 — Soft objection → AI objection draft → human card
  1. Replies (neg_kind = soft_objection — e.g. "nem most", "drága", "küldj infót").
  2. ✍️→🟡 AI objection-handling draft → Negative-Replies card (human). column + reactivation preserved
  3. Rep approves → Lead re-engages → rejoins Family A. OR
  4. 🤖⚡ Rep arms the optional negative-followup sequence (soft-objection only) via the preview modal → +2-day nudge "Érdekes lehet a lehetőség?" → books / 1-week silence → Ghosted.

F — Ghosted / Lost lead writes back

Scenario 19 — Reactivation
  1. Lead in Ghosted/Lost replies interested → 🟢 auto-cleared of negative markers → new_lead → ✍️→🟡 personalised opener + booking link → books. preserved

G — Existing paid client writes in

Scenario 20 — Ongoing-client message
  1. Paid client emails (main inbox now surfaced, R3) → matched to the deal → "Client message" task / ongoing card. planned: main inbox no longer blanket-ignored

H — Non-lead / vendor / system mail

Scenarios 21–23 — Other
  1. 🟢 Other + CRM contact: Activity row, no draft.
  2. 🟢 Other + cold inbox: Review row + "⚠️ Borderline" flag (kept, never dropped).
  3. 🟢 Other + main inbox, no deal match: → Notion "Logged" (log view, not a card). Warmup/Instantly → invisible.

Branching flowchart — from the lead's reply onward

Conditions on the arrows; each box shows the subject line (or "in-thread" / transactional) + a short summary. Colours follow the send-mode legend; cyan = armed auto-sequence (preview-&-armed first), dashed purple = dormant.

flowchart TD
  subgraph Legend ["ℹ️ LEGEND (Send mode)"]
    direction LR
    L1["🟢 AUTO-SENT 
reminders + first-touch goodbye only"]:::auto L2["✍️→🟡 DRAFT→APPROVE
hand-authored, per-email"]:::gate L3["🤖⚡ ARMED SEQUENCE
preview-&-arm modal, then auto"]:::seq L4["🟡 MANUAL ACTION
no message"]:::man L5["[DORMANT / RETIRED]"]:::dorm end subgraph Triage ["1. Inbound Ingest & Triage"] START(["📨 Inbound Reply"]):::start MAIN{"Main inbox?
R3 routing"}:::ai CLS{"🤖 AI Classifier
(Gemini 2.5 Flash)
neg_kind 3-way"}:::ai LOG["📝 Notion 'Logged'
(no card)"]:::man START --> MAIN MAIN -->|"no deal match"| LOG MAIN -->|"known deal / new lead"| CLS end subgraph Booking ["2. Booking & Nudges (own booking app)"] FR["✍️→🟡 First Reply
own-booking link"]:::gate NUDGE["✍️→🟡 Nudge Ladder
Day 2 / 5 / 9 (kept)"]:::gate UNREACH["🤖⚡ new_lead_unreachable
(armed sequence)"]:::seq CALLSET["🟡 Manual Scheduler
event + conf email"]:::man CLS -->|"interested / neutral"| FR FR -->|"no booking"| NUDGE FR -->|"rep called, no answer"| UNREACH FR -->|"rep phoned, agreed time"| CALLSET end subgraph Meeting ["3. Meeting & Reminders"] BOOKED["🟢 Own-booking Conf
page + email to Matt"]:::auto MEET(["🟢 Meet Invite
'Weboldal Bemutató'"]):::auto REMIND["🟢 Reminders 24h & 2h
(modal-exempt)"]:::auto NOSHOW["🤖⚡ No-show Rebook
3 fixed emails (0 / +24h / +4d)"]:::seq FR -->|"books"| BOOKED NUDGE -->|"books"| BOOKED UNREACH -->|"books"| BOOKED CALLSET --> BOOKED BOOKED --> MEET --> REMIND REMIND -->|"attends"| CALL{"🟡 Sales Call"}:::man REMIND -->|"no-show"| NOSHOW NOSHOW -->|"rebooks"| BOOKED end subgraph Proposal ["4. Proposal & Chasing"] PROP["✍️→🟡 Proposal Email
'Az ajánlatod' + DocuSeal/Stripe"]:::gate CHASE["🤖⚡ Proposal Chase
(page-3 authored, armed)"]:::seq ABANDON["🤖⚡ Abandoned Cart
signed, unpaid"]:::seq CALL -->|"ready to buy"| PROP PROP -->|"signs + pays ≤2h"| PREPAY["Stripe Payment"]:::sys PROP -->|"signed, unpaid"| ABANDON PROP -->|"sent, unsigned"| CHASE CHASE -->|"signs"| PREPAY ABANDON -->|"pays"| PREPAY end subgraph Delivery ["5. Onboarding & Delivery"] ONB["✍️→🟡 Welcome Kit
'Üdv a fedélzeten!'"]:::gate DEV["🟡 Waiting for Dev
(Dani Slack ping)"]:::man BAL["✍️→🟡 Balance Due
[NO LIVE COPY]"]:::gate HANDOVER["Handover Invite
[DORMANT]"]:::dorm WON([🏆 WON]):::won PREPAY --> ONB --> DEV DEV -->|"full prepaid"| HANDOVER DEV -->|"50% deposit"| BAL BAL -->|"pays balance"| HANDOVER HANDOVER --> WON end subgraph Negatives ["Negative replies (3-way)"] ANGRY["🟢 Angry → drop/log
(client → task)"]:::auto GOODBYE["🟢 First-touch goodbye
one-liner (modal-exempt)"]:::auto SOFT["✍️→🟡 Soft objection draft
Negative-Replies card"]:::gate NEGFUP["🤖⚡ Negative-followup
+2-day nudge (armed)"]:::seq GHOST([👻 Ghosted]):::term LOST([🪦 Lost — 60d nurture]):::term REACT["🟢 Reactivation"]:::auto CLS -->|"angry"| ANGRY CLS -->|"negative + first touch + conf≥0.80"| GOODBYE CLS -->|"soft_objection"| SOFT GOODBYE --> LOST SOFT -->|"arm follow-up"| NEGFUP SOFT -->|"reply & mark lost"| LOST NEGFUP -->|"books"| BOOKED NEGFUP -->|"1 week silence"| GHOST GHOST -->|"writes back"| REACT LOST -->|"writes back"| REACT REACT --> FR end CLS -->|"proposal_followup"| PF["✍️→🟡 Proposal Reply
Q&A, no book link"]:::gate PF --> PROP CLS -->|"ongoing client"| ONG["Client Message Task"]:::man %% GHL retired GHLX["🔵 GHL booking/stage sync
RETIRED — /ghl/event = inert 200"]:::dorm classDef start fill:#e8f0fe,stroke:#2563eb,stroke-width:2px,color:#1c2230; classDef ai fill:#ffffff,stroke:#5c6675,stroke-width:1.5px,color:#1c2230; classDef auto fill:#e9f7ef,stroke:#1f9d55,color:#13502c; classDef gate fill:#fdf6e3,stroke:#b7791f,color:#6b4a10; classDef seq fill:#e0f7fb,stroke:#0e7490,color:#0b4250; classDef man fill:#eef1f5,stroke:#64748b,color:#33414f; classDef neg fill:#fdecea,stroke:#c0392b,color:#7d1f15; classDef term fill:#eef1f5,stroke:#64748b,stroke-dasharray:4 3,color:#33414f; classDef won fill:#e9f7ef,stroke:#1f9d55,stroke-width:2px,color:#13502c; classDef dorm fill:#f3ecfa,stroke:#8a4baf,stroke-dasharray:5 3,color:#4d2a66; classDef sys fill:#e8f0fe,stroke:#2563eb,color:#15336e;

Copy index — subject · source · send mode · status

MessageSubject line (HU)SourceSend modeStatus
Cold email (first touch)Beszéljünk a weboldaladról, {keresztnév}?Instantly (read-only)🟢 campaignlive
First replyin-threadAI + FIRST_REPLY_BLOCK_HU (own-booking link)✍️→🟡live
Booking confirmationpage + email to Mattown booking app (handle_own_booking)🟢planned (GHL conf retired)
Meet inviteWeboldal Bemutató — {név}MEET_*🟢planned (GCAL-driven)
Reminder 24hHolnapi megbeszélésREMINDER_24H_*🟢 auto (modal-exempt)live
Reminder 2hMegbeszélésREMINDER_*🟢 auto (modal-exempt)planned: 1h→2h, body fixed
Proposal emailAz ajánlatod — {cég} weboldalAI + proposal_followup_email_hu✍️→🟡live
Nudge 1/2/3in-threadNUDGE_INSTR_1/2/3 (Day 2/5/9)✍️→🟡live (kept as-is)
New-lead "couldn't reach"in-threadsequence engine🤖⚡ armedplanned
Proposal chasein-threadpost-call page-3 editor / templates🤖⚡ armedplanned (was cron soft/firm)
Abandoned cartin-thread "Már csak egy lépés 🙌"ABANDONED_CART_INSTR🤖⚡ armedplanned (armed)
No-show rebook ×3in-thread "Lemaradtunk egymásról?"NOSHOW_EMAIL_1/2/3_HU (0/+24h/+4d)🤖⚡ armedplanned — replaces 5-step AI loop
First-touch goodbyein-thread "Köszönöm a visszajelzést, minden jót…"NEGATIVE_REPLY_DEFAULT_HU🟢 auto (modal-exempt)planned (first touch only, conf≥0.80)
Soft-objection draftin-threadAI objection-handling✍️→🟡planned (neg_kind=soft_objection)
Negative +2-day FUPin-thread "Érdekes lehet a lehetőség?"NEG_FUP_BODY_HU🤖⚡ armedplanned (armed, soft only)
Welcome kit / onboardingÜdv a fedélzeten, {keresztnév}! 🎉 Indulunkcopy:email_welcome_kit✍️→🟡live
Balance due (50/50)in-thread "Elkészült a weboldalad 🎉…"BALANCE_DUE_BODY_HU✍️→🟡live, .md subject differs
Contract (megbízási szerződés)DocuSeal doccontract-copy.mdbuild_contract_htmlplanned: 6 sections, 50/50 fee
Handover / review requestFoglaljunk… / Hogy tetszik…copy:email_handover_invite / _review_requestauthored, not auto-sent
GHL booking confirmation + stage syncGHL template / Workflow #1+#2GoHighLevel🔵retired (inert 200 stub)

Regenerated from the parallel session's plan change-the-incoming-recursive-map.md (WS1–WS12 + Q1–Q13 conflict review) and LEAD_JOURNEYS.html. Rendering: Mermaid flowchart syntax.