Skip to main content

12 — Notification Configs

What it is: Per-program settings that control which notifications fire and how they're configured. The purchase flow uses three keys (below), each enable/disable-able independently; NotificationKey also defines six payment_plan_* keys (reminder/success/failure × text/email) that use this same table but are dispatched by Cortex.


Table: tbl_notification_configs

One row per (programId, notificationKey) combination.

FieldNotes
programIdFK to tbl_flex_programs
notificationKeywhich notification (see types below)
isEnableddefault false — notifications are opt-in
valueJSONB — channel-specific config (templates, recipients, etc.)

Notification types

KeyWho receives itNotes
purchase_textFanpurchase-confirmation SMS — static per-client { message }, sent for every order
purchase_buyer_emailFansender name/email, subject, color, static custom text only — no personalization tokens
purchase_client_emailTeam/client"account X bought at time Y" notification

Payment-plan notifications use the same table (the six payment_plan_* keys in NotificationKey) but are dispatched by the Cortex cron (cortex-backend notifications module), not by this backend.


Key rules

  • All notifications default to disabled
  • Buyer email supports only static text — no {{name}}, {{event}} merge fields
  • One config per key per program (unique constraint enforced)
  • Write operations from dashboard only — this backend is read