Conversion

Trial expiring email sequence

For a 14-day trial: a day-10 message shaped by how the trial went, a “trial ends tomorrow” reminder by push or email, and a note once it ends. A purchase stops it.

EmailPushtrigger.eventpayload refsdelaytimeWindowbranchnested branchpreferflow()segmentsperformedgoalreentry: never
import { flow, performed, trigger, workflow } from 'sendwend';
import { e, u } from './contract';
import { activated } from './segments';
import { email, push } from './templates';

/** The trial's start: its payload says which plan is on trial. */
const trial = trigger.event(e.trial_started);

/**
 * Activated trials: a recap of what they built, for a team or for one
 * person.
 */
const recap = flow((w) =>
  w.branch(
    [
      performed(e.teammate_invited),
      (w) => w.email(email.trialTeamRecap, { name: u.name }),
    ],
    (w) => w.email(email.trialSoloRecap, { name: u.name })
  )
);

/**
 * Trial ending sequence for a 14-day trial: on day 10 a message that
 * depends on how the trial went, a reminder the day before it ends, and
 * a note once it has. A purchase is the goal and stops the sequence
 * wherever it is.
 *
 * Day 10 is a nested branch: activated users get a recap (itself split
 * by whether they invited anyone, kept shallow as the `recap`
 * fragment); the rest get a five-minute start. The plan comes from the
 * triggering event, so the messages name the plan that was actually on
 * trial.
 */
export const trialEndingSequence = workflow({
  id: 'trial_ending_sequence',
  name: 'Trial ending sequence',
  trigger: trial,
  reentry: { mode: 'never' },
  // 14 days of trial plus a week after it: a purchase in that window
  // counts as a conversion.
  goal: { condition: performed(e.purchase), within: '21 days' },
})
  .delay('10 days')
  .branch('day 10', [activated, recap], (w) =>
    w.email(email.trialQuickStart, { name: u.name })
  )
  .delay('3 days')
  .timeWindow({ between: ['09:00', '21:00'] })
  .prefer([push.trialEndsTomorrow, email.trialEndsTomorrow], {
    plan: trial.payload.plan,
  })
  .delay('1 day')
  .email(email.trialEnded, { name: u.name, plan: trial.payload.plan });
Compiled canvasDrag to pan

When to use it

For any time-boxed trial. The end of a trial is a deadline the user did not set and may have forgotten; telling them before it passes, with a message that reflects what they actually did, is both a courtesy and the main conversion moment of a trial.

How it works

  1. 1A trial_started event starts it; its payload says which plan is on trial.
  2. 2On day 10, a branch: activated users get a recap (team or solo, a nested branch); others get a five-minute quick start.
  3. 3On day 13, timeWindow holds until daytime and prefer sends “your trial ends tomorrow” by push or email, naming the plan.
  4. 4On day 14, the trial-ended email names the plan too.
  5. 5A purchase within 21 days of the start is the goal: it ends the journey wherever it is.

Why it's built this way

Day 10 depends on day 1 to 9

A recap of a team’s work and a quick start for someone who never began are different emails. The branch picks one; the nested branch inside the recap fragment splits teams from solo users without a second level of nesting in the main chain.

The plan comes from the event

trial.payload.plan is a snapshot of the trial that started the journey, so the reminder names the plan that was on trial even if the profile changes meanwhile.

A goal window past the trial

within: 21 days keeps counting a week after the trial ends: a purchase made after the trial-ended email is still that sequence’s conversion.

Make it yours

  • Match the delays to your trial length; they add up to the trial’s last day.
  • Replace activated with your own sign of a healthy trial, such as a second active user.
  • Add an offer to the trial-ended email for users who were activated but did not buy.
  • Swap prefer for both a push and an email if missing the deadline is costly for the user.

What to measure

Trial-to-paid conversion within 21 days of the trial start.

Also see Pre-churn save flow when auto-renew is turned off.