Publishing and SharingPre-Filling an Opt-In from a Share Link or Embed

Pre-Filling an Opt-In from a Share Link or Embed

Add a visitor's name and email to a share link or embed, so a workflow's Opt-In Step saves the lead and moves on without asking them again.

Skip the Opt-In When You Already Know the Visitor

If the page or email that sends people to your tool already knows their name and email, such as a members' area, a thank-you page or an email from your CRM, there's no need to ask again. Add the name and email to the end of the tool's share link, or to your embed code, and the workflow's Opt-In Step saves them as a lead and moves straight on. The visitor never sees the Opt-In form. This works only on share links and embeds, for a workflow with an Opt-In Step.

Before You Start

  • The workflow has an Opt-In Step. See Opt-In Step.
  • Both fields are mapped. In the Opt-In Step's settings, Name Field and Email Field must both be set, not Not Set. They're set when you add the Step. If either is Not Set, the visitor sees the Opt-In form as usual.
  • You have a share link. See Share Links. For an embed, see Embedding a Tool.
  • Your page or email can fill in each visitor's details, such as with your website's or CRM's merge fields.

The Three Details

Add these to the end of the address:

NameWhat it holdsRequired
tf_first_nameThe visitor's first nameYes
tf_emailThe visitor's email addressYes
tf_last_nameThe visitor's last nameNo

With tf_last_name, the lead's name is the first and last name together, such as "Sam Rivera". Without it, the name is the first name.

Put a ? after the share link, then each detail as name=value, with & between them:

YOUR_SHARE_LINK?tf_first_name=Sam&tf_last_name=Rivera&tf_email=sam%40example.com

Replace YOUR_SHARE_LINK with the link you copied from Share. In most email platforms and CRMs, you put a merge field where each value goes, so each person gets a link with their own details.

Add Them to an Embed

Copy the embed code

Open the tool, click Share, then Embed Code, and click Copy. See Embedding a Tool.

Find the address in the code

The code holds an address that starts src=" and ends with ?embed=1&referrer=.

Add the details

Right after referrer=, add & and each detail, with & between them, before the closing quote mark:

src="YOUR_SHARE_LINK?embed=1&referrer=&tf_first_name=Sam&tf_email=sam%40example.com"

Fill in each visitor's details

Replace the sample values with your page's own fields for the signed-in visitor, so each person gets their own details. Then paste the code into your page.

Leave the rest of the embed code as it is.

Encode the Values

Some characters have a special meaning in an address, so they have to be written another way. Most website builders and CRMs do this for you when they fill in a merge field. If you type values by hand:

CharacterWrite it as
@%40
+%2B
A space%20
&%26

An email with a + in it, such as sam+news@example.com, must have the + written as %2B. Otherwise it arrives as a space, the address isn't valid, and the visitor sees the Opt-In form instead.

What the Visitor Sees

When the run reaches the Opt-In Step, the visitor sees a moment of "Working..." while ThoughtFlow saves their details, then the next Step. The lead is saved exactly as if they had typed it in, and it shows in the workflow's Leads list. See Leads.

Only the name and email are filled in. If you added other fields to the Opt-In Step, such as a phone number, they're left empty, and any later Step that uses them gets no value.

When the Form Shows Anyway

The visitor sees the Opt-In form, with nothing filled in, when:

  • tf_first_name or tf_email is missing or blank.
  • tf_email isn't a valid address, such as one with a missing @ or a + that wasn't encoded.
  • Name Field or Email Field on the Opt-In Step is Not Set.
  • ThoughtFlow couldn't save the details after a few tries.

They can fill it in and carry on as usual. A tf_last_name on its own does nothing.

Test It

Build a test link

Add your own first name and an email you can check to the share link.

Open it in a private window

Open the link where you're not signed in, and run the workflow past the Opt-In Step. You shouldn't see the Opt-In form.

Check the lead

Open the workflow's Leads list. Your test is at the top, marked Yes under Anonymous in the export.

Pre-filling works only on share links and embeds. Members who run the workflow inside your App always see the Opt-In form.