Sub topic 7
Running a Re-engagement Campaign Before You Suppress
This chapter assumes you know the basic email terms (list, campaign, bounce, unsubscribe) and how an email service provider (ESP) sends mail. It also assumes you can read simple SQL and Python. You have already defined engagement and chosen an inactivity window. Now you give inactive subscribers one last, clearly bounded chance to respond before you stop mailing them.
Why ask before you suppress
An inactivity window finds people who have not clicked or purchased in a long time. Some of them have lost interest. Others still read your mail but never click, or use a privacy feature that hides their behavior. A re-engagement campaign separates these groups. It asks each person to confirm that they want to stay.
The campaign also gives you a record. If you later suppress an address, you can show that you asked first and waited a fixed time.
Pick the audience
Start with the query from the earlier chapter. It returns subscribed addresses that joined more than 180 days ago and have no click or purchase in the last 180 days.
SELECT s.id,
s.email,
MAX(e.occurred_at) AS last_engaged_at
FROM subscribers s
LEFT JOIN engagement_events e
ON e.subscriber_id = s.id
AND e.event_type IN ('click', 'purchase')
WHERE s.status = 'subscribed'
AND s.subscribed_at < now() - interval '180 days'
GROUP BY s.id, s.email
HAVING MAX(e.occurred_at) IS NULL
OR MAX(e.occurred_at) < now() - interval '180 days';Remove addresses covered by your exceptions (covered in a later chapter) before you send. Send in small batches, not all at once, so a problem shows up early.
Track each subscriber's stage
Each subscriber is in one of four stages. This function maps a subscriber to a stage from three dates.
from datetime import datetime, timedelta
def sunset_stage(
subscribed_at: datetime,
last_engaged_at: datetime | None,
reengagement_sent_at: datetime | None,
now: datetime,
window_days: int = 180,
grace_days: int = 30,
) -> str:
reference = last_engaged_at or subscribed_at
if now - reference < timedelta(days=window_days):
return "active"
if reengagement_sent_at is None:
return "send_reengagement"
if now - reengagement_sent_at < timedelta(days=grace_days):
return "waiting"
return "suppress"The stages are:
active: engaged inside the window. Do nothing.send_reengagement: inactive, and no message sent yet.waiting: message sent, grace period still running.suppress: grace period ended with no engagement.
Notice that a click on the re-engagement message updates last_engaged_at. That moves the subscriber back to active on the next run, so the same function handles both outcomes.
Write the message
Keep the message plain and specific.
- Subject line: say what you want. "Do you still want to hear from us?" works better than a discount gimmick.
- One clear action: a single button or link, such as "Yes, keep me subscribed". A click is the success signal, because it is a deliberate act.
- A stated deadline: for example, "Click by 15 January or we will stop sending." This matches your grace period.
- An easy exit: include the unsubscribe link. Someone who leaves by choice does less harm than someone who reports you as spam.
Avoid sending many reminders. One message and at most one follow-up is enough. More reminders to disinterested people produce spam complaints, which is the harm you are trying to avoid.
Define success before you send
Write the success criterion down first. A simple rule is: a subscriber is re-engaged if they click the confirmation link or make a purchase before the deadline. Opens do not count, for the reasons covered earlier.
Expect most recipients not to respond. A response rate in the low single digits to low teens is common, so do not treat a small number as failure. The goal is a clean list, not a large win-back.
Common errors
- Sending to everyone at once. A bad subject line or broken link then reaches the whole segment. Use batches.
- No deadline. Without a date, the "waiting" stage never ends and nobody gets suppressed.
- Resetting the clock on any open. This undoes your engagement definition.
- Forgetting the link works. Test the confirmation link and confirm it writes a click event to
engagement_events.
Exercise
A subscriber joined 400 days ago and last clicked 200 days ago. You received no re-engagement history for them, and you use a 180-day window with a 30-day grace period. What does sunset_stage return? What does it return 31 days after you send the message if they have not clicked?
Show answer
It first returns "send_reengagement", because 200 days exceeds the 180-day window and no message was sent. After the message goes out, it returns "waiting" for 30 days. At 31 days with no click, it returns "suppress".