post-completion flow: survey, referral program, review ask

- Migration 081: referral_codes, referral_uses, exit_surveys tables
- API: POST /api/v1/survey, POST /api/v1/referral/check, GET /api/v1/referral/:email
- Worker: completion_emails.py — sends completion + 24h follow-up (survey + referral)
- Survey page: /survey/?order=X&rating=N — star rating, feedback, Google review ask
- Referral: REF-FIRSTNAME codes, $25 credit per referred order, no limit
- Low ratings (1-3 stars) trigger Telegram alert for admin follow-up
- Cron: every 15 minutes
This commit is contained in:
justin 2026-05-30 21:22:14 -05:00
parent 6b20ba7f08
commit ad3d189b2b
6 changed files with 655 additions and 0 deletions

View file

@ -134,6 +134,14 @@ worker_crons:
on_calendar: "*-*-* 08:00:00 UTC"
persistent: true
# Post-completion emails — every 15 minutes.
# Sends completion confirmations + 24h follow-up (survey + referral).
- name: pw-completion-emails
description: Send post-completion and follow-up emails
module: scripts.workers.completion_emails
on_calendar: "*-*-* *:0/15:00 UTC"
persistent: false
# Florida entity downloader — daily 07:30 UTC.
# Downloads daily diffs from FL Sunbiz SFTP (free public access).
- name: pw-fl-entity-downloader