1. Rowfire
  2. Use cases

Win back users after 14 days without a login

Start a Braze win-back campaign when a user hasn't logged in for 14 days. A PostgreSQL trigger with a computed clock fires on the absence itself.

  • PostgreSQL
  • Braze
  • Lifecycle
  • once per user per month

The trigger

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

SELECT u.id AS user_id,
       u.email,
       u.first_name,
       a.name AS account,
       u.last_login_at,
       u.last_login_at + interval '14 days' AS inactive_at
FROM users u
JOIN accounts a ON a.id = u.account_id
WHERE u.deactivated_at IS NULL
  AND a.is_internal = false

An inactive user is an absence: nothing happens on day 14, so there is no moment for the application to emit an event. The query makes one. Table and column names are a sketch; adapt them to your schema.

The clock is inactive_at, computed as 14 days after the last login, and the key is user_id. Each poll picks up users whose inactive_at has just passed.

The Braze side

Bind the catalogue’s Braze track_event action with:

  • external_id: {{ user_id }}
  • event name: inactive_14_days

and trigger the win-back campaign on that custom event in Braze. The campaign decides the message; Rowfire decides the moment and how often.

Backtest it before switching it on: it shows how many users would have entered the campaign each day over past data. For trials that never got started, see rescue trials that never activated.

Questions

What happens when the user logs back in?

last_login_at moves forward, so inactive_at moves 14 days past the new login. The user only matches again after another 14 quiet days.

Could someone get the campaign twice in a row?

Not within a month: the rule fires at most once per user per month, so a user who drifts in and out isn't messaged on every lapse.