Skip to main content

TCPA

How to ensure TCPA-compliant lead generation

Many US businesses use Heyflow to collect phone leads and need documented consent before calling or texting. A one-to-one consent rule planned by the FCC for January 2025 was vacated by a US court and later removed by the FCC, so it does not apply. Consent requirements can still vary by use case and state, and lead buyers often ask for consent that names them. Heyflow gives you the building blocks below; the exact consent wording should be reviewed by your own legal counsel.

❗ Heyflow provides the technical building blocks for collecting consent. We cannot provide legal advice or a ready-made disclosure text. Please have your consent wording reviewed by your legal counsel.

🔎 Need proof of the consent event for your lead buyers? Connect TrustedForm or Jornaya to your flow.

To ensure your lead generation complies with the Telephone Consumer Protection Act (TCPA), it's crucial to obtain explicit written consent from your users before initiating contact. With Heyflow, you can effectively achieve this by incorporating consent requests, such as checkboxes, into your flows.


There are two ways to ensure TCPA-compliance in your flow:


Option 1: Simple Setup with a single vendor

If it’s clear who will contact the lead in the future, you can use a straightforward setup by adding the Checkbox block to your flow and configuring the necessary settings. Here’s how:


​1. Adding the Checkbox
In your Heyflow editor, open the "Blocks" tab. Under the "Input" category, locate the "Simple Checkbox" block. Drag and drop it to your desired position within the flow.
​

2. Customizing the Content
Edit the checkbox text to reflect the specific consent required for the intended communication. For example: "I consent to receive marketing communications via phone and email from [your company]."
​

💡 Tip: We recommend inserting links to your privacy policy or terms and conditions to maintain transparency.

3. Design and Formatting
Highlight the checkbox text and use the formatting tools to adjust the font, size, and color to align with your flow's design. Customize the checkbox appearance by selecting appropriate icons and colors that match your brand identity.
​

4. Validation and Mandatory Fields
​Ensure the checkbox is marked as required, preventing users from proceeding without providing consent. Define clear and understandable error messages for instances where users attempt to navigate to the next screen without checking the box.


Option 2: Advanced Setup with multiple vendors

When multiple buyers or vendors may contact a lead, ensuring compliance and maintaining transparency requires a more advanced setup. For example, this might occur if you're reselling leads to different vendors based on specific criteria, such as a lead’s ZIP code.

How can this approach help you?

  • Dynamic Buyer Assignment: Automatically assign the appropriate buyer based on criteria like the lead's entered ZIP code, creating a seamless and accurate experience.

  • Compliance-Friendly UI: Dynamically update the buyer’s name within the flow, fostering transparency and helping you adhere to TCPA requirements.

  • Customizable Flexibility: Adapt the setup to other criteria—such as location, preferences, or business needs—offering a tailored experience for your leads.

Currently, this advanced setup requires adding custom JavaScript that uses the Flow API to your flow.

❗Please note: These features are not available in all plans. If it’s not included in your plan, get your TCPA kit by letting us know in the chat.


Example Scenario: Selling Leads Based on ZIP Code

Let’s set this up for the scenario when you’re reselling leads and depending on the ZIP code, another company would contact the lead. The following allocation should apply:

  • If a ZIP code is between 10000 and 20000, leads will be routed to "Foobar Inc".

  • If a ZIP code is between 20001 and 30000, leads will be routed to "Woobar Inc".

  • If a ZIP code is between 30001 and 40000, leads will be routed to "Barfoo Inc".

  • If a ZIP code is between 40001 and 50000, leads will be routed to "Barwoo Inc".

  • If a ZIP code is between 50001 and 60000, leads will be routed to "Foobarus Inc".

  • If a ZIP code is between 60001 and 70000, leads will be routed to "Woobarus Inc".

  • If a ZIP code is between 70001 and 80000, leads will be routed to "Foobarus Inc" .

  • If a ZIP code is between 80001 and 90000, leads will be routed to "Woobarus Inc",.

  • If a ZIP code is between 90001 and 99999, leads will be routed to "Blubb Inc”.

Generally, there are three steps we need to consider in our advanced setup:

  1. Prepare the Input: Add a required Input Block with a matching system label, and use regex and the native input type to ensure that only valid inputs are possible.

  2. Simple Checkbox: Add a native Simple Checkbox block on the submit screen that will display the buyer's name based on the ZIP code entered earlier in the flow.

  3. Custom JavaScript with the Flow API: Use the Flow API to read the ZIP code, determine the matching buyer, update the checkbox label with the buyer’s name, and store the buyer with the response, ensuring the correct lead allocation.

Step 1: Input Preparation

After adding an Input Block to your flow where you would like to collect the user's zip code, please follow these steps to configure the block:

  1. Set the Input Block to Required to ensure that the user enters their zip code.
    ​

  2. Under Labels & Variables, enter the system label that corresponds to the JavaScript variable in order to link this field with our checkbox (in this example, the label is zip).
    ​

  3. Under Validation, click on Show regular expression and enter the regex code that will validate the input (in our case we want to see 5 digits: ^[0-9]{5}$). Then, select Leave to trigger the validation when the user leaves the input field. Adjust the error message if necessary.
    ​

  4. Expert Tip: Under Validations, set the native input type according to the required input, e.g. in our case numbers, to make sure users only insert numbers and no letters.

💡You can find more detailed instructions for configuring the input field, regex, and variables, by clicking here.

Step 2: Simple Checkbox

Add the native Simple Checkbox block at the location in the flow where you want your consent checkbox to be displayed (see Option 1 above) and mark it as required. Enter a default consent text. The script in Step 3 updates this text with the buyer's name.

❗ Please don't use a custom HTML checkbox or change the flow's elements directly with JavaScript (e.g. document.getElementById). These methods are not supported and may break. Use the native block and the Flow API instead.

Step 3: Custom JavaScript with the Flow API

To enhance this functionality, use custom JavaScript to define specific ZIP code ranges. When a user enters a ZIP code within a particular range, the lead is automatically routed to the corresponding buyer.

The script then updates the label of the native checkbox with setLabel() so it displays the name of the designated buyer, and stores the buyer with the response via additionalResponseData.

💡You can find the Code editor on the left side of the Build section. Here, click on JavaScript at the top.

This JavaScript dynamically assigns the buyer’s name based on the ZIP code provided:

const zipRangeMap = {
"10000-20000": "Foobar Inc",
"20001-30000": "Woobar Inc",
"30001-40000": "Barfoo Inc",
"40001-50000": "Barwoo Inc",
"50001-60000": "Foobarus Inc",
"60001-70000": "Woobarus Inc",
"70001-80000": "Foobarus Inc",
"80001-90000": "Woobarus Inc",
"90001-99999": "Blubb Inc"
}
function findPartner(zip) {
const zipCode = Number(zip);
const matchingRange = Object.keys(zipRangeMap).find((key) => {
const [lower, higher] = key.split("-").map(Number);
return zipCode >= lower && zipCode <= higher;
});
return matchingRange ? zipRangeMap[matchingRange] : null;
}
// Making use of the Flow API <https://help.heyflow.com/en/articles/11736753-flow-api>
window.addEventListener('heyflow-change', (event) => {
const flowAPI = event.detail.flowAPI.v1;
const zip = flowAPI.getBlockByID("YOUR-ZIP-BLOCK-ID").getValue();
const partner = findPartner(zip);
if (partner) {
flowAPI.getBlockByID("YOUR-CHECKBOX-BLOCK-ID").setLabel(`<p>I agree to be contacted by ${partner} ...</p>`);
flowAPI.additionalResponseData.set("tcpa_buyer", partner);
}
});

💡 Replace YOUR-ZIP-BLOCK-ID and YOUR-CHECKBOX-BLOCK-ID with the IDs of your ZIP input block and your Simple Checkbox block. You can learn more about the Flow API here.

💡You can learn more about JavaScript here.

❗Important: Please test your setup thoroughly before going live. Our team can help with Heyflow features and the Flow API, but cannot write or debug your custom code.

Did this answer your question?