Skip to main content

Signature

churn.listWatches(options?: CallOptions): Promise<WatchedUser[]>

Return value

interface WatchedUser {
  userId: string
  threshold: number
  webhook: string
  cooldown: string
}

Example

const watches = await churn.listWatches()

for (const w of watches) {
  console.log(`${w.userId} → alert at ${w.threshold} score, cooldown ${w.cooldown}`)
}

Use cases

  • Audit which users are being monitored
  • Sync watches with your CRM or CS tool
  • Clean up stale watches for cancelled users