Video

Use AI to Classify Lead Quality from Open-Ended Form Responses

Tips & Tricks Operations Video
black rectangle with leandata tips and tricks logo

Most lead forms include an open-ended field asking prospects to describe their use case or what they’re trying to solve. That response often contains strong buying signals — urgency, budget, team size — but because it’s unstructured text, it typically gets ignored in routing logic. This video walks through how to use LeanData’s AI Inference Node to interpret those responses, classify lead quality, and route accordingly.

What You Will Learn

  • Configure the AI Inference Node to send free-text field values to an AI provider for classification
  • Write a structured prompt that returns a predictable, branchable output — High, Medium, or Low
  • Define an output variable to store the AI’s response for use in downstream routing logic
  • Build a Decision Node that routes leads based on the quality tier returned by the AI
  • Handle Timeout and Error edge cases to ensure no leads stall if the AI call fails
  • Stamp the classification back onto the lead record in Salesforce for reporting visibility

Why This Matters

Unstructured form data is one of the most common sources of untapped signal in the lead funnel. Without a way to interpret it, every lead gets treated the same — regardless of whether a prospect described a specific pain point with an approved budget or just typed “exploring options.” Connecting that signal to routing decisions means your best reps see high-quality leads first, while generic or low-intent responses flow to nurture automatically. That’s a direct improvement to speed-to-lead for the leads that matter most, without adding manual triage.

Use Cases

  • Add AI-based qualification as a fallback layer when form data alone doesn’t support strong routing decisions
  • Route leads with urgent, specific use cases directly to senior AEs or priority assignment queues
  • Send vague or low-intent form responses to a nurture queue without rep intervention
  • Apply quality-based routing logic on top of existing structured field routing
  • Use lead quality tier as a reportable field in Salesforce to track distribution over time

Transcript

Click to Open

Many forms include an open-ended text field — something like “Tell us about your use case” or “What are you looking to solve?” These responses often contain useful buying signals, but because it’s unstructured text that require some interpretation, there’s no clean way to use it in your routing logic. So what typically happens is that data just sits there, unused, while every lead gets routed the same way regardless of what they wrote.

With the AI Inference Node, you can send that free-text response to an AI model during routing, have it interpret, then classify the lead’s quality, and then use that classification in your downstream routing decisions.

Let’s take a look at how to set this up.

Here I have a Lead Router graph. Leads are coming in, and right now we’re routing based on structured fields — things like title, company size, and so on. But we also have a custom field on the lead object called “Use Case Description” that captures the open-ended form response. We’re not doing anything with that field currently.

So the first thing we’ll do is go to the Action node bar, under Actions, and drag the AI Inference Node onto the graph.

Now, before we can use this, you do need to have a couple of things in place. You’ll need to have authorized an AI provider integration — either OpenAI or Google Gemini — under Integrations in your LeanData settings. And you’ll need to have the AI Inference Node enabled under Admin, Settings, AI Tools. I already have that done here, so we can go ahead and configure the node.

Opening the AI Inference Node, we’ll click Edit Prompt. First, we’ll select our model from the dropdown — I’ll use the one I have available from my authorized provider.

Now for the prompt. This is where we tell the AI what to do with the form response. We have a 2,000 character limit, so we want to be clear and concise. Here’s what I’ll enter:

“Based on the following form response, classify this lead as High, Medium, or Low quality. High quality means the response mentions specific pain points, a timeline, budget, or team size. Medium quality means the response describes a general use case but lacks specifics. Low quality means the response is vague, generic, or not relevant. Respond with only one word: High, Medium, or Low. Here is the form response:”

And then we’ll insert the variable for our free-text field. So we’ll click into the variable picker and select the lead’s Use Case Description field.

Next, we need to define our output. This is where LeanData stores the AI’s response so we can use it later in the graph. We’ll create a new variable — I’ll call it “LeadQualityTier” — and set the data type to Text. In the output instruction, I’ll add: “Return exactly one of: High, Medium, or Low. No other text.”

That output instruction is important because it helps constrain the model’s response to something predictable that we can reliably branch on downstream.

Now let’s test it. Over in the test area, I’ll enter a sample value for the Use Case Description. Let’s try: “We have a team of 50 SDRs and need to fix our lead routing before the end of Q2. Budget is approved.” I’ll click Get Results, and we can see it returns “High.”

Let’s try another one. “Just exploring options for now.” Get Results — and it returns “Low.” That’s exactly what we’d expect.

Once we’re satisfied with the results, we’ll click Done Editing to save the prompt configuration.

Now we need to direct the node’s exit paths. The AI Inference Node has three edges: Next Node for when it gets a successful response, Timeout if the AI provider doesn’t respond in time, and Error for any other failure. We’ll point Next Node to our downstream logic, and for Timeout and Error, we’ll connect those to a fallback routing path — something like your standard round robin — so that no leads get stuck if something goes wrong with the AI call.

For the downstream logic after a successful response, we’ll add a Decision Node. Opening that decision node, we’ll create our branches based on the LeadQualityTier variable. If it equals “High,” we route to a senior AE or a priority assignment. If it equals “Medium,” we route to the standard round robin. And if it equals “Low,” we can route to a nurture queue or a general assignment.

So to recap: when a lead comes in with an open-ended form response, the AI Inference Node sends that text to your AI provider, classifies the lead quality, and stores the result in a variable. Then your decision node branches on that variable to route high-quality leads to your best reps, medium leads through your standard process, and low-quality leads to nurture. And if the AI call times out or errors, leads still get routed through your fallback path.

One more thing worth mentioning — if you want to keep that quality classification for reporting purposes, you could add an Update Record Node after the decision to stamp the LeadQualityTier value back onto the lead record in Salesforce. That way your team has visibility into the distribution of lead quality over time.

I hope that helps!

Tags
AI Lead Routing Operations Tips & Tricks