Plural SMS Lead Alerts — Expected Output Spec
§1 Expected output
- New optional pref
notification_phone_cc(comma-separated E.164-normalizable numbers), exactly parallel tonotification_email_cc: parsed with the same clean/dedupe/primary-exclusion posture (a shared or twin parser). - Engine (
server/notifications.ts): when SMS fires, it sends to the primarynotification_phoneAND each CC number — one send per number, primary first, CCs after, failures per-number isolated (one bad number never blocks the rest).sms_urgent_onlyapplies to ALL SMS recipients alike. - Card: an "additional SMS numbers" add/remove list beside the existing phone field, same idiom as the email recipients list. API (lead-recipients route) validates each number as E.164-normalizable.
- Existing single-phone tenants are untouched until they add a CC (absent key = today's behaviour, byte-for-byte).
§2 Acceptance checks
- With a CC set, a qualifying lead produces one SMS per number (unit-test the fan-out list construction; do NOT send real SMS in tests).
- Absent key → engine path identical to today (regression pin).
- Invalid CC rejected at the API with a per-field message.
- Removing all CCs restores single-phone behaviour.
- Watcher-vote rule parity: if email CCs are excluded from any dedupe/claim logic ("watcher copies do not vote", notifications.ts ~657), SMS CCs get the same treatment — verify what that rule does and mirror it.
§3 Out of scope
Per-recipient quiet hours; SMS for non-lead events; church parity.