Team & campaigns

Slack alert for high-value sign-ups

When someone from a company of 200 or more signs up, sales hears about it in Slack at once, and again two days later if the account has not created a document.

Slacktrigger.eventtrigger filterwaitUntilperformedreentry: neverSlack
import { gte, performed, trigger, workflow } from 'sendwend';
import { e, u } from './contract';
import { slack } from './templates';

/**
 * High-value sign-up alert for the team: when someone from a company of
 * 200 or more signs up, sales hears about it in Slack at once; if that
 * account has not created a document two days later, sales hears again,
 * because that is the moment a human offer of help is worth most.
 *
 * Message steps are not only for users: this workflow never contacts
 * the user at all. The trigger's `filter` tests the profile before an
 * instance exists, so the other sign-ups never enter and never show up
 * in this workflow's numbers.
 */
export const highValueSignupAlert = workflow({
  id: 'high_value_signup_alert',
  name: 'High-value sign-up alert',
  trigger: trigger.event(e.sign_up, {
    filter: gte(u.company_size, 200),
  }),
  reentry: { mode: 'never' },
})
  .slack(slack.highValueSignup, {
    name: u.name,
    email: u.email,
    companySize: u.company_size,
  })
  .waitUntil(performed(e.doc_created), {
    timeout: '2 days',
    onTimeout: (w) =>
      w.slack(slack.highValueStalled, { email: u.email }),
  });
Compiled canvasDrag to pan

When to use it

For self-serve products that also sell to larger companies. A large company signing up on its own is a lead your sales team wants to know about the same day; one that stalls is the moment a person offering help is most welcome.

How it works

  1. 1A sign_up event starts it, only when the profile’s company_size is 200 or more (the trigger’s filter).
  2. 2A Slack message with the name, email and company size goes to the sales channel at once.
  3. 3waitUntil waits two days for a first document.
  4. 4If none comes, a second Slack message tells sales the account has stalled.

Why it's built this way

A workflow that never contacts the user

Message steps are not only for users: Slack and Discord templates post to your team through incoming webhooks, read from the Worker’s environment.

Filtered before it starts

The trigger’s profile filter is checked before an instance exists. Smaller sign-ups never enter, so the workflow’s counts are exactly the high-value accounts.

Stalling is the signal

An account that activates on its own needs less from sales than one that signs up and stops. The timeout sub-flow alerts only for the second.

Make it yours

  • Use your own definition of high value: a plan, an email domain, a seat count.
  • Post to Discord instead, with a discordTemplate.
  • Write the lead into your CRM with a custom action next to the Slack post.

What to measure

Sales-touched conversions among high-value sign-ups, and time from sign-up to first contact.

Also see Win-back email campaign with an escalating offer.