Skip to content
PaalChat Docs

Use cases

Connection health

Spot and fix broken WhatsApp connections before customers notice.

.md

In a nutshell

React to whatsapp.connection callbacks, and give your support team a view built from GET .../whatsapp - status, last error, quality, token expiry and last webhook.

Signals

Signal Source Action
event: revoked or setup_failed whatsapp.connection Show health.last_error, offer "Reconnect"
event: disconnected callback Disable WhatsApp features, offer "Connect"
event: token_expiring (status degraded) callback Ask the admin to reconnect within 7 days
event: suspended callback Tell the business Meta disabled the account; sending resumes when Meta reinstates it
event: paused / resumed callback Show "WhatsApp paused by PaalChat" until resumed
quality_rating: RED GET .../whatsapp Review what is being sent
health.last_webhook_at old for an active customer GET .../whatsapp Contact PaalTech support
Sends failing with 409 not_connected API Same as disconnected

Reconnecting

A new connect link fixes pending, revoked, disconnected and an expiring token (degraded). Reconnecting the same WhatsApp account updates it in place - no history or messages are lost.

A support dashboard

For each customer, call GET /businesses/{external_id}/whatsapp (for example every few hours, and after each callback) and show:

  • status and health.has_credential
  • health.last_error in Meta's words
  • phone_numbers[].display_phone_number, quality_rating, messaging_limit
  • health.token_expires_at (null means no expiry)
  • health.last_webhook_at and health.last_synced_at