Skip to content

Form Submission Agent

Overview

The Form Submission Agent is an AI-powered lead scoring system that automatically evaluates the quality of form submissions based on your business criteria. The agent analyzes contact form data and assigns a quality score (0-100) along with reasoning to help you prioritize high-value leads.

How It Works

When a form submission is received, the agent:

  1. Retrieves your custom prompt - The AI uses the business prompt you've configured to understand your ideal customer profile
  2. Analyzes the form data - All form fields (name, email, message, custom fields, etc.) are evaluated
  3. Generates a score - Returns a score from 0-100 indicating lead quality
  4. Provides reasoning - Explains why the score was assigned

Scoring Scale

  • 0-20: Very unlikely match, no relevant indicators
  • 21-40: Unlikely match, minimal relevant information
  • 41-60: Possible match, some relevant indicators but unclear
  • 61-80: Likely match, good indicators present
  • 81-100: Excellent match, strong indicators of ideal customer

Setting Up Your Prompt

Accessing the Form Submission Prompt Page

  1. Log in to the Lead Behavior App
  2. Navigate to AgentsForm Submission Prompt
  3. You'll see the prompt editor with a default prompt template

Writing an Effective Prompt

Your prompt should clearly describe your ideal customer profile. The more specific you are, the better the AI can evaluate leads.

Example: SaaS Company

I run a B2B SaaS company that provides project management software for teams of 10-500 people.
My ideal customers are:
- Project managers, operations managers, or C-level executives
- Working at companies with 10-500 employees
- In industries like technology, consulting, or professional services
- Looking to improve team collaboration and productivity
- Have budget for business software (typically $5-50k annually)

Red flags include:
- Students or personal use
- Companies with less than 10 employees
- Requests for free/personal accounts
- Generic or spam-like messages

Polite customers who use phrases like "please" and "thank you" are wonderful and a plus.

Example: Local Service Business

I'm a high-end residential landscaping company in the Austin, TX area.
My ideal customers are:
- Homeowners (not commercial properties)
- Located in Austin, Round Rock, or surrounding areas
- Own homes valued at $500k+
- Interested in full landscape design, not just maintenance
- Mentioning specific projects like outdoor kitchens, pools, native gardens
- Budget of $20k+ for projects

Red flags include:
- Requesting only lawn mowing or basic maintenance
- Commercial properties
- Located outside our service area
- Budget under $10k

Updating Your Prompt

  1. Edit the prompt in the text area
  2. Test your prompt (see the next section)
  3. Click Update Prompt to save
  4. Your new prompt will be used for all future form submissions

Testing Your Prompt

The testing interface allows you to see how your prompt will score different types of form submissions before going live.

Step 1: Enter Test Form Data

The page includes default test fields:

Step 2: Customize Test Data

  1. Modify the existing fields to match your actual form structure
  2. Click Add More Test Fields to add additional fields
  3. Use the same field names as your actual forms (e.g., company, phone, budget, industry)

Step 3: Run the Test

  1. Click Test Prompt
  2. The agent will analyze the form data using your current prompt
  3. Results appear below showing:
    • Score: The quality score (0-100)
    • Reasoning: Why the agent assigned that score

Step 4: Iterate

  1. Adjust your prompt based on the test results
  2. Try different scenarios (good leads, bad leads, edge cases)
  3. Run multiple tests with various form data combinations
  4. Click Update Prompt when satisfied with the results

Testing Scenarios to Try

Test your prompt with these scenarios to ensure it works correctly:

High Quality Lead Example (Target: 80-100)

name: Sarah Johnson
email: [email protected]
company: TechCorp Inc
role: VP of Operations
team_size: 45
message: We're looking for a project management solution for our growing team. Currently using spreadsheets and need something more robust. Budget is flexible for the right solution.

Medium Quality Lead Example (Target: 40-60)

name: John Smith
email: [email protected]
message: Tell me more about your services

Low Quality Lead Example (Target: 0-20)

name: Student User
email: [email protected]
message: Need free account for school project
company: N/A

Edge Cases to Test

  1. Incomplete data: Missing key fields like email or company
  2. Spam indicators: Generic messages, suspicious patterns
  3. International leads: If you only serve specific regions
  4. Competitor research: Someone clearly not a customer
  5. Job seekers: People looking for employment, not services

Integration with HubSpot

Once your prompt is configured and tested, you can integrate it with HubSpot workflows to automatically score incoming leads.

Prerequisites

  • HubSpot account with workflow access
  • Lead Behavior app connected to HubSpot
  • Form Submission Agent prompt configured and tested

Setup Steps

  1. In HubSpot, go to AutomationWorkflows
  2. Create a new workflow triggered by Form Submission
  3. Add a Webhook action
  4. Configure the webhook to call the Lead Behavior agent endpoint
  5. Map the form fields to the agent API request
  6. Use the score and reasoning in subsequent workflow actions

TIP

See the HubSpot Installation Guide for detailed integration instructions.

Best Practices

Do's

Be specific - Include concrete criteria like company size, industry, job titles
Mention red flags - Tell the AI what to avoid (students, competitors, etc.)
Use examples - Reference specific keywords or phrases that indicate quality
Test thoroughly - Run multiple scenarios before deploying
Iterate - Refine your prompt based on real results
Include budget indicators - If budget is important, specify ranges
Define your geography - Mention service areas if location matters

Don'ts

Don't be too vague - "Good leads" isn't specific enough
Don't overly restrict - Being too narrow may miss good opportunities
Don't skip testing - Always test before deploying
Don't set and forget - Review and adjust based on real-world performance
Don't ignore edge cases - Test unusual scenarios

Troubleshooting

Score is Always Too High/Low

Solution: Adjust your prompt to be more/less strict. Add specific criteria and red flags.

Reasoning Doesn't Make Sense

Solution: Your prompt may be unclear. Rewrite it with more specific, actionable criteria.

Test Returns No Results

Solution: Check that:

  • All test fields have values
  • Your prompt is saved
  • You have an active internet connection

Scores Seem Random

Solution:

  • Make your prompt more objective with concrete criteria
  • Avoid subjective terms like "good" or "quality"
  • Use measurable indicators (company size, job title, budget, etc.)

FAQ

Q: How long does scoring take?
A: Typically 1-3 seconds per submission.

Q: Can I use different prompts for different forms?
A: Currently, one prompt applies to all form submissions per account. Contact support if you need multiple prompts.

Q: Does the agent learn over time?
A: The agent uses your prompt consistently. To "train" it, update your prompt based on results.

Q: What happens if the form data is empty?
A: The agent will return a low score with reasoning indicating insufficient information.

Q: Can I see the full prompt sent to the AI?
A: The system combines your business prompt with instructions for the AI. Your custom prompt is the main input for evaluation.

Q: Is my data secure?
A: Form data is processed through Google's Vertex AI with enterprise security. Data is not stored by the AI model or Leadbehavior.

Next Steps

  1. Install the HubSpot Integration
  2. Review agent performance in your dashboard
  3. Refine your prompt based on real-world results

Support

Need help? Contact us at [email protected] or visit our support portal.