sales · intermediate

Lead Qualification

Separate real sales opportunities from partnerships, support requests, spam, and unclear inbound messages.

choicenoulscore

When to use it

Example state

{
  "message": "We have 35 support agents and need SSO. Can we get a security review and pricing call this week?",
  "source": "contact_form"
}

Decision questions

choiceinbound_type

Choose the route for this inbound message.

  • sales — A potential customer evaluating a purchase
  • partnership — A proposed business collaboration
  • support — An existing customer seeking help
  • spam — Unsolicited generic promotion
  • unclear — Purpose is unclear
noulqualified

Does the message contain concrete evidence of a sales opportunity worth human follow-up?

scorepriority

Score follow-up priority from 0 to 3.

  1. 0 — no sales follow-up
  2. 1 — weak or early interest
  3. 2 — concrete need or evaluation
  4. 3 — concrete need plus near-term procurement action

Expected structured output

An inbound route, qualification probability, and ordered follow-up priority score.

TypeScript example

import { choice, noul, score, TypeSafeClient } from "@typesafe-ai/sdk";

const client = new TypeSafeClient();

const result = await client.systemOne({
  state: {
    message:
      "We have 35 support agents and need SSO. Can we get a security review and pricing call this week?",
    source: "contact_form",
  },
  questions: {
    inbound_type: choice("Choose the route for this inbound message.", {
      sales: "A potential customer evaluating a purchase",
      partnership: "A proposed business collaboration",
      support: "An existing customer seeking help",
      spam: "Unsolicited generic promotion",
      unclear: "Purpose is unclear",
    }),
    qualified: noul(
      "Does the message contain concrete evidence of a sales opportunity worth human follow-up?"
    ),
    priority: score("Score follow-up priority.", [
      "No sales follow-up",
      "Weak or early interest",
      "Concrete need or evaluation",
      "Concrete need plus near-term procurement action",
    ]),
  },
});

Why this design works

Limits and boundaries

Sources and inspiration

Continue

Browse all templates, learn the official SDK shape, or estimate production volume with the cost calculator.