Follow-up email (operator)
A short sequence of emails that helps a new user get from signing up to a result they understand, and later shows what larger simulated panels add. It is off by default and goes only to accounts that ticked the marketing box and confirmed by email.
What it does
| Step | Sent | To accounts that | Subject |
|---|---|---|---|
| start | 1 day after admission | have saved no study | Write your first study |
| ready-to-run | 2 days after a study was saved | have not run their free survey | Your study is ready to run |
| read-result | 1 day after the first result | have a result | How to read your result |
| reality-check | 5 days after the first result | have a result | Check it with five people from your audience |
| bigger-panel | 9 days after the first result | have a result, and bundles are on sale | What 1,000 simulated respondents show that 50 cannot |
| price-test | 14 days after the first result | have a result, and bundles are on sale | Test the price, not just the pitch |
Rules the sequence always obeys:
- Confirmed consent only. An account that never ticked the box, or has not confirmed, gets none.
- Each step is sent to an account once at most.
- At most one email from us per account in 24 hours, counting service emails too.
- A step whose moment passed more than 30 days ago is skipped, so switching the sequence on does not send a backlog to old accounts.
- The two steps about larger panels wait until
BUNDLES_ON_SALEis set, so no email offers what cannot be bought. - Every email has an Unsubscribe link, the one-click unsubscribe headers that mail programs show as their own button, and the sender's postal address.
Getting started (operator, in this order)
Finish Email setup first. Follow-up email from a domain that is not set up properly damages delivery of the sign-in emails too.
Have the consent wording, the privacy policy and this sequence checked by counsel (PRD OQ-9).
Set on the server, by name:
Name Meaning UNSUBSCRIBE_SECRETA long random value. It signs the unsubscribe links. Changing it breaks the links in emails already sent MAIL_POSTAL_ADDRESSThe sender's postal address, shown in every follow-up email FOLLOWUP_ENABLED1switches the sequence onBUNDLES_ON_SALE1only when larger panels can actually be boughtRestart the workers. The sequence is sent by the workers on their normal pass.
Check with a test account: tick the box, confirm, wait for the first step, and use both the Unsubscribe link and your mail program's own unsubscribe button.
If any of the first three settings is missing, no follow-up email is sent at all.
Unsubscribing
- The link in the email opens a page with one button, Unsubscribe. No sign-in is needed.
- A mail program's own unsubscribe button works without opening any page.
- Either way the account's consent is recorded as withdrawn at once, and no further step is sent.
- The user can say yes again on the Account page; that needs a new confirmation.
What is recorded
followup_sent holds which step each account has received. email_log holds every attempt with
the kind followup-<step> and whether the provider accepted it. Neither holds the address or the
text.
Changing the sequence
The steps, their timing and their words are in marketsim_api/followup.py. Each email should
teach one thing and ask for one action. Tests check that every step has a text version, the
unsubscribe link and headers, the postal address, no images and no tracking, and that the wording
never presents a simulation as proof.
Limits
- The after-purchase sequence is designed (spec 02) but not built: there is nothing to buy yet.
- There is no screen yet showing sends and unsubscribes per step; query the two tables.
- The emails about larger panels are general. Showing each user their own too-small segments is planned with the bundles.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| No follow-up email is sent | One of FOLLOWUP_ENABLED, UNSUBSCRIBE_SECRET, MAIL_POSTAL_ADDRESS is missing on the workers; or no account has confirmed consent |
Set all three and restart the workers; check marketing_consents for confirmed rows |
| A user got no email although they ticked the box | They have not pressed the link in the confirmation email | They can send it again from the Account page |
| A step did not arrive on the expected day | Another email from us went to that account in the last 24 hours | It is sent on the next pass after the 24 hours |
| "This unsubscribe link is not valid. You can also withdraw on your account page." | The link was cut off, or UNSUBSCRIBE_SECRET changed since the email was sent |
The user can withdraw on the Account page; do not change the secret again |
| "This link is incomplete. Use the Unsubscribe link in the email again, or withdraw on your account page." | The unsubscribe page was opened without its two values | Use the link from the email |
| Someone says they still get email after unsubscribing | They are getting service emails about their own surveys, which are not follow-up | Explain the difference; they stop when the account has no running survey |
| After unsubscribing the page says "We will send you no more tips or offers. Messages about your own surveys still reach you." | This is the confirmation | Nothing to do |