GUIDES
Sales Assistant
Build an AI sales assistant that qualifies inbound leads through conversational discovery, scores them automatically, schedules demos for hot leads, and syncs everything to your CRM.
Lead Qualification Flow
The sales agent follows a structured discovery process:
- 1.Greet and understand the prospect's initial interest
- 2.Ask qualifying questions (company size, current solution, pain points)
- 3.Score the lead (hot / warm / cold) based on BANT criteria
- 4.For hot leads: offer to schedule a demo immediately
- 5.Sync all data to the CRM with the conversation context
Create the Agent
sales-agent.ts
const salesAgent = await client.agents.create({
name: "Sales Assistant",
model: "claude-sonnet-4-20250514",
systemPrompt: `You are a B2B sales assistant for Acme SaaS.
## Your Goal
Qualify inbound leads through natural conversation. Gather BANT info:
- Budget: What's their budget range?
- Authority: Are they a decision maker?
- Need: What problem are they solving?
- Timeline: When do they need a solution?
## Qualification Scoring
- HOT: Has budget, is decision maker, active need, timeline < 3 months
- WARM: Missing 1-2 BANT criteria but shows genuine interest
- COLD: Missing 3+ criteria or just browsing
## Rules
- Never be pushy — be helpful and consultative
- Ask ONE question at a time (don't overwhelm)
- Share relevant case studies when appropriate
- For HOT leads, proactively offer to schedule a demo
- Always save lead data to CRM before ending conversation
## Tone
- Professional but approachable
- Knowledgeable about the product
- Focus on their problems, not our features`,
tools: [
{
name: "score_lead",
description: "Score a lead based on gathered information",
parameters: {
type: "object",
properties: {
score: { type: "string", enum: ["hot", "warm", "cold"] },
company: { type: "string" },
companySize: { type: "string" },
budget: { type: "string" },
timeline: { type: "string" },
notes: { type: "string" },
},
required: ["score", "company"],
},
handler: "https://api.example.com/webhooks/leads/score",
},
{
name: "schedule_demo",
description: "Schedule a product demo with the prospect",
parameters: {
type: "object",
properties: {
email: { type: "string", format: "email" },
name: { type: "string" },
preferredDate: { type: "string", format: "date" },
preferredTime: { type: "string" },
timezone: { type: "string" },
},
required: ["email", "name"],
},
handler: "https://api.example.com/webhooks/demos/schedule",
},
{
name: "update_crm",
description: "Create or update a lead in the CRM",
parameters: {
type: "object",
properties: {
email: { type: "string", format: "email" },
name: { type: "string" },
company: { type: "string" },
score: { type: "string" },
conversationSummary: { type: "string" },
tags: { type: "array", items: { type: "string" } },
},
required: ["email", "name"],
},
handler: "https://api.example.com/webhooks/crm/update",
},
{
name: "get_case_study",
description: "Retrieve a relevant case study for the prospect's industry",
parameters: {
type: "object",
properties: {
industry: { type: "string" },
companySize: { type: "string", enum: ["startup", "smb", "enterprise"] },
},
required: ["industry"],
},
handler: "https://api.example.com/webhooks/content/case-study",
},
],
parameters: { temperature: 0.5, maxTokens: 1024 },
memory: { enabled: true, maxTurns: 40, summarize: true },
});
Conversation Example
Example flow
// User: "Hi, I'm looking at your product for our team"
// Agent: "Welcome! I'd love to help. Could you tell me a bit about
// your company and what problem you're looking to solve?"
// User: "We're a 50-person fintech startup. We need to automate
// our customer onboarding process."
// Agent: [Calls score_lead with initial data]
// "That's a great use case! Several fintech companies use
// our platform for exactly that. What's your current
// onboarding process look like?"
// ... after several turns ...
// Agent: [Calls score_lead: "hot"]
// [Calls schedule_demo]
// "Based on what you've shared, I think a demo would be the
// best next step. I've sent you a calendar invite for
// Thursday at 2pm. Looking forward to showing you how we
// can cut your onboarding time by 60%!"
// [Calls update_crm with full context]
Note
Train your agent with real conversation transcripts from your best sales reps. Include examples of how they handle objections and common questions.
Metrics to Track
MetricTarget
Lead qualification rate> 80% of conversations scored
Demo booking rate> 25% of hot leads
Avg qualification time< 5 minutes
CRM sync rate100% of qualified leads
Cost per qualified lead< $0.50