Skip to main content
Automatically engage new leads over SMS the moment they submit a web form, using Invoca’s AI Messaging Agent to qualify them and schedule a callback.
Lead Form Follow-Up via AI Messaging Agent lets you engage new leads automatically over SMS immediately after a form submission. When a prospect submits a lead form on your website, Invoca ingests the data, identifies the originating web session, and triggers an AI-powered SMS conversation. This interaction is designed to qualify the lead and drive a desired outcome, such as scheduling a phone call. This guide covers everything required to set up, configure, and go live with the feature.

How it works

At a high level, the flow is:
  1. A visitor lands on your website and fills out a lead form.
  2. Invoca captures attribution data tied to that web session.
  3. The lead form submission is sent to Invoca via client-side capture (InvocaJS), API, or CRM webhook.
  4. Invoca’s lead ingestion service processes the submission and triggers an SMS AI Agent.
  5. The AI Agent engages the lead over text, qualifying them, answering questions, and working toward the configured outcome.
  6. All interactions — including the lead form, SMS messages, and any resulting calls — are recorded and linked together in Invoca reporting.

Step 1: Configure your lead form

Lead forms are created and managed in the Lead Forms section of the Invoca platform. To create a new form, navigate to Lead Forms, select New Form, and complete the following sections. General
  • Form Name: enter a descriptive name that identifies the form’s purpose or source. This name appears in reporting and throughout the platform — for example, “New Patient Appointment.”
Routing & Numbers
  • Profile: the Profile associated with this form, which determines the business context and available routing options.
  • Campaign: the Campaign this form should be attributed to, letting you segment lead activity by marketing effort, region, or initiative — for example, “Denver Location.”
  • Outbound AI Agent SMS Number: the phone number the AI Agent uses to send outbound SMS messages. This is the number the lead sees when they receive their first text.
  • Inbound Scheduled Callback RingPool: the RingPool used for scheduled callback numbers. When a lead requests a callback, the AI Agent provides a trackable number from this pool to dial directly.
AI Agent Behavior
  • AI Agent: the AI Agent that handles SMS conversations for leads submitted through this form. AI Agents are configured separately and define the tone, knowledge base, and conversational behavior of the bot.
  • Desired Outcome: the goal the AI Agent works toward during each SMS interaction. The currently supported outcome is Schedule Phone Call — the agent qualifies the lead and, upon request, provides a callback number to connect with a live agent.
  • Initial Message: the first SMS message the AI Agent sends after the form is submitted. This message supports dynamic personalization using values from the lead form fields — for example, “Hi! Thanks for reaching out — I’d love to help connect you with our team.”

Step 2: Complete form setup and webhook configuration

Once you save the form, a confirmation screen displays your form’s unique Webhook URL. This URL sends form submission data to Invoca and activates the AI follow-up sequence. It follows this format:
This URL is also accessible at any time from the Lead Forms table or the individual Lead Form page. For complete technical guidance on integrating with the webhook, refer to the Lead Form API documentation.

Step 3: Enable attribution tracking

To connect lead form submissions to Invoca’s attribution data, add a hidden field to your lead form that Invoca can populate with a session ID. If you’re using Client-Side Lead Capture (Step 4, Option A), this hidden field is not required — InvocaJS captures the submission within the web session and handles attribution automatically. The hidden field is only needed for server-side submission via Options B or C. You’ll also need to re-publish your Invoca Tag if this is the first Lead Form you’ve added.

How it works

When an Invoca Tag is active on your website, InvocaJS can automatically detect form elements on the page and inject an attribution ID into a designated hidden field. This value ties the form submission back to the originating web session, letting Invoca associate marketing attribution data with each lead. The attribution ID is formatted as:

Adding the hidden field

Add a hidden <input> element to your HTML form. Invoca automatically populates it as long as the field uses one of the following identifiers: Example:
If this is your first Lead Form, you’ll need to re-publish your Invoca Tag so it can detect the new form, insert the attribution ID, and associate session data with form submissions. Attribution data won’t be available for submissions that don’t include this field. The “Capture Lead Form Attribution Data” option is toggled on in your tag automatically, so you only need to re-publish. Some lead forms hosted on third-party social platforms may not support hidden form fields. In those cases, attribution data won’t be captured for submissions from those sources.

Step 4: Submit form data to Invoca

Once a lead submits your form, that data must be sent to Invoca to trigger the AI follow-up. There are three supported methods.

Option A: Client-side lead capture via InvocaJS

Use this option for the simplest setup, with no server-side development required. Place the InvocaJS tag on the pages of your website that contain web lead forms. When a visitor submits a form, Invoca automatically captures the lead form data client-side and submits it to the /leads webhook set up in Step 2.
  • Tag re-publish required: after the client-side lead capture toggle is enabled on your Invoca Tag, you must re-publish the tag for capture to begin.
  • No hidden Invoca ID form field is needed: because InvocaJS captures the submission directly within the web session, attribution is handled automatically.
  • Check with your Invoca account team on your web lead form configuration: web technology varies from site to site, and your forms may need additional custom JavaScript on your InvocaJS tag.

Option B: Direct API integration

Use this option if your system can make outbound HTTP requests and you can map your form fields to Invoca’s schema. Data must be sent to Invoca via a server-side outbound HTTP request only, not from the client. Send a POST request to your form’s Webhook URL with a JSON body containing the lead’s data:
See the API Field Reference below for a full description of supported fields.

Option C: CRM webhook via middleware

Use this option if your CRM doesn’t support direct API calls to Invoca, or if you’d rather not manage field mapping and data transformation in your own system. Invoca supports a middleware-assisted path through a configurable data mapping and transformation layer. When configured, your CRM triggers a webhook to Invoca’s middleware layer, which handles:
  • Converting content types (XML, form-encoded) to JSON
  • Mapping your CRM’s field names to Invoca’s Marketing Data field partner names
  • Appending required request metadata (for example, event_type, occurred_at)
Data mapping and transformation layer configuration is currently managed directly by the Invoca team on a per-customer basis. To set up middleware-assisted ingestion, contact your Invoca account representative. For Options B and C, create your Invoca API credentials to POST to the endpoint by navigating to IntegrationsManage IntegrationsInvoca APIs+New API Credential. Obtaining and correctly passing SMS consent is a required part of Lead Form Follow-Up setup. Invoca only triggers the AI Agent for a lead if valid consent has been collected and transmitted. You’re responsible for collecting explicit SMS consent from your leads at the point of form submission. Consent must be collected clearly and unambiguously before the lead’s information is submitted, using one of two common approaches: Checkbox opt-in: include a dedicated, unchecked checkbox on your form with plain-language wording, such as:
“By checking this box, I consent to receive automated SMS messages from [Your Business Name] regarding my inquiry.”
Disclosure text: include consent language near the form’s submit button, such as:
“By submitting this form, you agree to receive automated text messages from [Your Business Name]. Reply STOP at any time to opt out. Message and data rates may apply.”
Whichever approach you use, the consent language should be visible, legible, and specific to SMS communications. We recommend consulting your legal counsel to confirm your consent collection practices meet applicable requirements, including TCPA regulations in the United States. Include the lead’s consent status in the API request sent to Invoca using the sms_consent field in the event_data object, with a value of true to indicate the lead has consented:
If sms_consent isn’t passed, or is passed as false, Invoca won’t send the initial SMS message and the AI Agent follow-up won’t trigger.
  • If sms_consent is true, the AI Agent initiates the SMS conversation as configured.
  • If sms_consent is false or absent, no outbound SMS is sent and the lead isn’t contacted.

Opt-out handling

If a lead replies with a recognized opt-out keyword such as STOP or END at any point during the SMS conversation, Invoca immediately halts all further communication with that lead. No additional messages are sent until the lead explicitly opts back in. This behavior is automatic and doesn’t require any action on your part.

API field reference

The following fields are supported in the form fill ingestion API, submitted within a JSON request body:

AI Agent behavior

Once a form submission is successfully ingested, the AI Agent initiates an SMS conversation with the lead within moments. The agent’s behavior is governed by the configuration set on the Lead Form, following this general flow:
  1. Initial Outreach: the agent sends the configured Initial Message to the lead’s phone number.
  2. Qualification: the agent qualifies the lead according to the criteria you’ve provided.
  3. Engagement: the agent answers questions and works toward the configured Desired Outcome.
  4. Scheduling: the agent schedules a phone call, in-store visit, or in-home visit, depending on how you’ve configured the form workflow.
Form fill data — including name, service interest, and any other submitted fields — is passed to the AI Agent as context, enabling a personalized, informed conversation.

Reporting and attribution

All interactions tied to a lead form submission are tracked and linked together in Invoca reporting, giving you a complete view of the consumer journey:
  • Lead Form Event: captured at the time of ingestion, tied to the originating web session via the attribution ID.
  • SMS Interactions: each message in the AI Agent conversation is recorded and associated with the form fill event.
  • Callback Calls: any call made to the RingPool callback number is tracked and linked back to the original form submission.
This end-to-end attribution lets you measure the full impact of your lead forms, from first web visit to completed call.

Frequently asked questions

What if my lead form is hosted on a third-party platform (such as Yelp, Instagram, or another social site) and I can’t add a hidden form field? You can still submit lead data to Invoca from forms on third-party platforms. Since the invoca_attribution_id field can’t be injected into forms you don’t control, the submission arrives without web session attribution data — the lead is still tracked and the AI follow-up triggers as expected, but the form fill event isn’t tied to the originating marketing touchpoint. If attribution matters for a particular lead source, direct traffic to a form hosted on your own website instead. Can I use multiple lead forms across different campaigns or sources? Yes. Each Lead Form has its own configuration and unique Webhook URL. Create as many as needed to support different campaigns, locations, or lead sources, each with its own AI Agent, routing settings, and desired outcome. Does Invoca integrate with my CRM? Invoca offers integrations with a number of popular CRM platforms, including Salesforce and HubSpot. For a full list, visit the Integrations page in the Invoca platform. If your CRM isn’t listed, reach out to your Invoca account representative. What format does the phone number need to be in? Phone numbers must be submitted in E.164 format — the country code prefixed with a ”+” sign, with no spaces, dashes, or parentheses (for example, +13035550100). Incorrectly formatted numbers may fail to process. What happens if a form submission is sent without a phone number? phone_number and sms_consent are the only required fields in event_data. If a submission is received without them, the request is rejected and the AI follow-up doesn’t trigger. We recommend validating that a phone number is present in your form or CRM before sending data to Invoca. How quickly does the AI Agent send the first message after a form is submitted? Invoca sends the first message within seconds of the lead being ingested. The time between form submission and message delivery can vary depending on your CRM’s sync time. What happens if a lead doesn’t respond to the initial SMS? They aren’t labeled as “engaged” in Invoca reporting. Can I preview or test the AI Agent’s conversation before going live? Yes — a preview option is available on the AI Agent builder page in the Invoca platform. Is SMS consent required before the AI Agent contacts a lead? Yes. Prior express written consent is required before sending automated marketing SMS messages to a lead. You’re responsible for collecting this consent at the time of form submission and passing it to Invoca via the sms_consent field. We strongly recommend consulting your legal counsel to confirm your consent collection practices meet applicable requirements, including TCPA regulations in the United States. What happens if a lead replies STOP or otherwise asks not to be contacted? They receive an automated response confirming they’ve been unsubscribed. Recommended lead form compliance language:
“By submitting this form, you agree to receive SMS messages related to your inquiry from [Company Name]. Message and data rates may apply. Reply STOP to opt out.”
If you plan to send promotional or marketing texts (special offers, promotions, and similar), those require a separate, unchecked opt-in checkbox with language such as:
“(Optional) I agree to receive promotional text messages from [Company Name]. Message and data rates may apply. Reply STOP to opt out at any time.”
This checkbox must not be pre-checked, and opting in can’t be required to submit the form. How long does it take for a form fill event to appear in reporting? It appears in near real-time. SMS number registration: as part of setup, you’ll need to register your SMS numbers. See Bandwidth’s toll-free verification handbook for best practices.

Where to go next

Last modified on September 23, 2026