Feature · Customer lifecycle
Win-back campaigns
Define a campaign once; stubkit's cron runs daily at 06:00 UTC and emails every user whose subscription transitioned to the trigger status (cancelled or expired) exactly N days earlier. Each recipient gets a fresh 7-day customer portal URL appended to the email as a CTA.
Fields per campaign
| Field | Meaning |
|---|---|
| trigger_status | cancelled | expired |
| trigger_offset_days | 1–365. Send email this many days after the event. |
| email_subject | Plain text subject line. |
| email_body | HTML body. Sanitized before sending (script/iframe/on-handlers stripped). |
| paywall_offering_slug | Optional — reference for analytics attribution. |
Dedupe
win_back_deliveries has a UNIQUE index on(campaign_id, user_external_id). A user is never emailed twice for the same campaign, regardless of how often the cron runs or whether ±12h window matching picks them up more than once.
REST endpoints
GET/POST /v1/admin/win-back-campaignsPATCH/DELETE /v1/admin/win-back-campaigns/:idGET /v1/admin/win-back-campaigns/:id/deliveries— deliveries + status totals.