1. Rowfire
  2. Use cases

Share cancellation reasons with the team

Post every cancellation and its stated reason to Slack, and open a Zendesk ticket for paying accounts, from subscriptions in PostgreSQL.

  • PostgreSQL
  • Slack
  • Zendesk
  • Customer success
  • once per subscription

The trigger

One read-only SELECT against PostgreSQL. Rowfire polls it for new rows, and the rule fires once per subscription.

SELECT s.id AS subscription_id,
       a.id AS account_id,
       a.name AS account,
       a.owner_email,
       s.plan,
       s.cancel_reason,
       s.cancel_comment,
       s.canceled_at
FROM subscriptions s
JOIN accounts a ON a.id = s.account_id
WHERE s.canceled_at IS NOT NULL
  AND a.is_internal = false

A cancellation reason is the most direct feedback a customer gives, and it usually sits in a column nobody reads. The clock is canceled_at and the key is subscription_id. Table and column names are a sketch; adapt them to your schema.

Two audiences

  • Slack #customer-voice, for everyone: who left and why.
  • Zendesk, for customer success: a ticket to reach out while the account is still active.
{{ account }} cancelled {{ plan }}: {{ cancel_reason }}. "{{ cancel_comment }}"

A template that names a column the row doesn’t have fails the delivery instead of posting a message with a hole in it, so a typo in a column name shows up as an error to fix, not a confusing post. Shadow mode catches it before anything is sent.

When the subscription actually ends, see revoke access when a subscription lapses.

Questions

Can only paying accounts get a ticket?

Yes. Make a second trigger with AND s.plan <> 'Free' for the ticket rule, or filter however your schema marks paid plans. The Slack rule keeps the full list.

Is this the same as revoking access?

No. Cancelling records intent; access usually ends later, when the subscription lapses. That moment has its own page.