Skip to content

feat: signup nudge email sequence for members without a chapter - #2835

Draft
mroderick wants to merge 1 commit into
masterfrom
feat/signup-nudge-email-sequence
Draft

feat: signup nudge email sequence for members without a chapter#2835
mroderick wants to merge 1 commit into
masterfrom
feat/signup-nudge-email-sequence

Conversation

@mroderick

@mroderick mroderick commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Implements #2384: automated emails to members who signed up via the website but haven't subscribed to a chapter.

A bounded two-stage sequence, recorded in member_email_deliveries (typed log from #2832):

  1. Signup nudge — members created 7–14 days ago with no chapter subscription, not banned
  2. Follow-up — members whose nudge row is at least a month old, still no subscription, not banned

Stage eligibility is derived from the typed log rows; delivery-confirmed writes (via the EmailDelivery concern, email_type: signup_nudge / signup_nudge_followup) mean a lost send retries within the stage-1 window and no member receives the same stage twice — enforced by the (member_id, email_type) unique index. Members who subscribe at any point exit the sequence. The plan (reviewed via ce-doc-review) is at docs/plans/2026-08-31-signup-nudge-email-sequence-plan.md.

Email copy is placeholder — real copy comes via Slack (per the issue) and lands as a follow-up commit before merge.

What happens when (plain language)

Every day, one scheduled job looks at recent sign-ups and sends at most two emails — then never bothers anyone again:

  • A week after someone signs up, they get a short nudge: pick a codebar chapter.
    Sent exactly once — the send is recorded in a log whose database index makes a second copy impossible, even if the job re-runs.
  • One month after that nudge, if they still haven't subscribed to any chapter, they get one gentle follow-up.
  • After that, silence. Even a member who never subscribes gets no third email, ever.

People who are exempt at every stage:

  • anyone who subscribes to a chapter (they leave the sequence immediately and get the normal chapter welcome email instead),
  • anyone banned from codebar,
  • anyone who signed up more than two weeks before this ships (the sequence only looks forward — nobody gets a backfilled backlog of old nudges).

Members who signed up but never finished the signup form are included — the nudge is for everyone who created an account and walked away.

Driving it: one daily task (rake chaser:signup_nudges) that must be added to the Heroku Scheduler after merge — see the ops note above.

Ops note ⚠️

After merge, add a Heroku Scheduler entry: rake chaser:signup_nudges, daily — same mechanism as rake chaser:three_months. Without it the feature ships dark. Post-merge verification (first scheduled run creates signup_nudge rows for the current cohort): Morgan.

Steps to verify

  • make test — service spec covers the full stage matrix (window edges, subscribed/banned, both rows = terminal, follow-up anchored to the nudge's send time); mailer specs cover headers, body, and typed logging; rake spec covers the entry point.

@mroderick
mroderick force-pushed the feat/signup-nudge-email-sequence branch 2 times, most recently from be363d4 to 2fcdcde Compare September 1, 2026 09:33
Two-stage sequence for members who signed up but never subscribed to a
chapter: a nudge 7-14 days after signup and a follow-up one month after
the nudge, then the sequence ends. Stage state lives in the typed
member_email_deliveries log (email_type signup_nudge /
signup_nudge_followup, written post-delivery via the EmailDelivery
concern), so a lost send is retried within the stage-1 window and no
member is emailed twice per stage.

Daily entry point: rake chaser:signup_nudges (Heroku Scheduler entry
required as an ops step). Email copy is placeholder until copy arrives
via Slack.

Closes #2384
@mroderick
mroderick force-pushed the feat/signup-nudge-email-sequence branch from 2fcdcde to 3d1ae67 Compare September 1, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant