Retention

Feature announcement email to a segment

On launch day, an announcement to every user who connected GitHub, delivered in each user’s late morning, and a push three days later to those who have not tried it.

EmailPushtrigger.datedelaytimeWindowbranchperformedgoalreentry: never
import { eq, not, performed, trigger, workflow } from 'sendwend';
import { e, u } from './contract';
import { email, push } from './templates';

/** Who the launch is for: everyone who ever connected GitHub. */
const githubUsers = performed(e.integration_connected, (p) =>
  eq(p.provider, 'github')
);

/**
 * Feature announcement to a segment: on launch day, everyone who
 * connected GitHub hears about GitHub sync; three days later, the ones
 * who have not tried it get a push. Turning it on is the goal.
 *
 * A date trigger starts the journey once, for every user its `filter`
 * holds for at that time, long-standing users included (a segment-entry
 * trigger would only catch new entrants). The time is UTC, so a
 * `timeWindow` then holds each user until their own late morning.
 */
export const featureAnnouncement = workflow({
  id: 'feature_announcement',
  name: 'Feature announcement',
  trigger: trigger.date('2027-01-12 06:00:00', { filter: githubUsers }),
  reentry: { mode: 'never' },
  goal: {
    condition: performed(e.github_sync_enabled),
    within: '14 days',
  },
})
  .timeWindow({ between: ['10:00', '12:00'] })
  .email(email.githubSync, { name: u.name })
  .delay('3 days')
  .branch([
    not(performed(e.github_sync_enabled)),
    (w) => w.push(push.githubSync, {}),
  ]);
Compiled canvasDrag to pan

When to use it

When a new feature matters to a known part of your users and should reach them on a set date. Announcing to the users who already use the related feature makes the email relevant and keeps everyone else’s inbox quiet.

How it works

  1. 1A date trigger fires once at 06:00 UTC on launch day, for every user who has ever connected GitHub.
  2. 2timeWindow holds each user until 10:00 to 12:00 in their own time zone.
  3. 3The announcement email goes out.
  4. 4Three days later, a single-arm branch sends a push to users who have not enabled the feature.
  5. 5Enabling GitHub sync within 14 days is the goal.

Why it's built this way

A date trigger, not a segment trigger

trigger.enters would only catch users who newly connect GitHub. trigger.date asks every known user at that time, long-standing ones included, which is what an announcement needs.

UTC start, local delivery

The trigger time is UTC. The timeWindow after it turns one global start into a late-morning email in each user’s time zone.

A filter with a payload condition

The audience is performed(e.integration_connected, (p) => eq(p.provider, 'github')): an event in the user’s history with a matching payload, no segment needed.

Make it yours

  • Set the date to your launch; a time already past when first deployed is not run.
  • Change the audience to any condition: a plan, a segment, a past event.
  • Replace the follow-up push with an email if your users do not have the app.

What to measure

Feature adoption within 14 days among the announced audience.

Also see Milestone celebration email and push.