Story: Email Blast Cohort Export
Story: Email Blast Cohort Export
Key:
blast · Label: story:blast · Role: Ops (Lucas / Ava)Story
As ops, I need to grab a scoped list of parent emails for a blast campaign (e.g., "all Queens who haven't signed") in one copy-paste, so I can move from "which parents?" to "send the email" without a data migration.
Why
Email blasts are gated on the 7-step approval flow per
feedback_email_blast_nuclear_gate. That gate assumes the recipient list is already defined. Building the recipient list is the slow step: someone has to filter by program, team, contract status, maybe jersey status, and pull emails. Doing that in SQL is expensive (new query per cohort); doing it in the admin UI is one-by-one and error-prone. Streamlit filters + a copy-paste text area collapses that to seconds.Acceptance criteria
- Any filter combination on the Offered section produces a matching comma-separated email list in a copy-paste text area below the dataframe.
- Email list is deduplicated (one parent → one email even if they have multiple kids in the cohort).
- Empty/null emails are excluded silently.
- Label on the text area explicitly says "Parent emails for this view (copy for blast)" so the user knows the list is scoped to the current filter.
Current implementation
Already built in
app.py lines 85–86. Matches acceptance criteria. Captured here for traceability.Related tickets (likely future work)
- Extend the export to the Declined pool (re-offer campaigns).
- Extend to the Jerseys unpaid pool (payment reminder campaigns).
- Optional: "Export to CSV" button for exports that need phone + name alongside email.
Out of scope
- Actually sending the email — that goes through
gmail-sdk/ basketball-api blast endpoint and the 7-step approval gate. The Streamlit app only produces the list.