Claude API Sales Assistant Chatbot Design Guide
Claude API Sales Assistant Chatbot Design
If you're building a Claude API sales assistant chatbot, the core design decisions are: how you structure the system prompt to control tone and boundaries, how you feed it product and pricing knowledge without hallucination, how you capture and qualify leads mid-conversation, and how you hand off to a human when the bot hits its limits. Get those four right and the implementation details — streaming, tool calls, session storage — fall into place quickly.
This guide walks through a practical architecture for a sales chatbot powered by Claude, covering prompt design, lead qualification logic, tool use for CRM-style actions, and the operational pieces (rate limits, latency, cost control) that determine whether it actually survives contact with real website traffic.
What a sales assistant chatbot needs to do well
A sales chatbot is not a general-purpose assistant. It has a narrow job:
- Answer product and pricing questions accurately, without inventing features or discounts
- Identify qualified leads (budget, use case, timeline, company size)
- Capture contact details naturally instead of forcing a form
- Escalate to a human rep when the conversation needs it
- Stay on-brand in tone and never go off-topic into unrelated support or technical issues
Claude is well suited to this because of strong instruction-following and the ability to use tool calls to trigger structured actions (like logging a lead) mid-conversation, not just generate text.
System prompt structure
Your system prompt is the single most important design artifact. Structure it in sections rather than one long paragraph:
You are the sales assistant for [Company]. You help visitors understand
our product and qualify them as potential customers.
PRODUCT KNOWLEDGE:
- [concise, accurate feature list]
- [pricing tiers, no made-up discounts]
RULES:
- Never invent pricing, features, or release dates not listed above.
- If asked something outside this knowledge, say you'll connect them
with a human rep and offer to collect their email.
- Keep responses under 4 sentences unless explaining a feature in detail.
- Never discuss competitors by name.
QUALIFICATION GOAL:
Try to naturally learn: company size, use case, timeline to purchase.
Once you have two of these, offer to schedule a call.
Keep the product knowledge section short and factual. Long, sprawling system prompts increase token cost on every request and give the model more room to drift. If your catalog is large, retrieve only the relevant product section per conversation instead of stuffing everything into the prompt.
Lead qualification as a tool call
Instead of parsing the model's free text to detect "this is a qualified lead," define a tool the model can call explicitly. This makes qualification deterministic and easy to wire into your CRM.
{
"name": "log_lead",
"description": "Record a qualified sales lead captured during the conversation",
"input_schema": {
"type": "object",
"properties": {
"email": { "type": "string" },
"company_size": { "type": "string" },
"use_case": { "type": "string" },
"timeline": { "type": "string" }
},
"required": ["email"]
}
}
When the model decides the conversation has reached a qualification point, it calls log_lead instead of just saying "great, I'll note that down." Your backend catches the tool call, writes it to your CRM or database, and returns a confirmation that Claude turns into a natural reply. This is far more reliable than regex-matching chat transcripts. See /docs/tools for how tool definitions and responses are structured.
Handling escalation and handoff
Define explicit escalation triggers rather than hoping the model figures it out:
- The visitor asks for a discount or custom contract terms
- The visitor asks a technical question outside the product knowledge section
- The visitor explicitly asks for a human
- Three consecutive turns where the model can't answer confidently
In each case, have the model respond with a consistent handoff message and trigger a request_human tool call that notifies your sales team (Slack webhook, email, or CRM task). This keeps the bot from guessing its way into an inaccurate promise.
Streaming for a natural feel
Sales chat widgets feel sluggish if the full response only appears after several seconds. Stream tokens as they're generated so the first words appear almost immediately:
const res = await fetch("https://api.subtoapi.app/v1/messages", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SUBTOAPI_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "claude-sonnet-4",
stream: true,
system: SALES_SYSTEM_PROMPT,
messages: conversationHistory
})
});
for await (const chunk of streamChunks(res)) {
widget.appendText(chunk);
}
Details on event format and reconnection handling are in /docs/streaming.
Operational considerations
A sales chatbot that sits on your marketing site gets unpredictable traffic — quiet for days, then a spike after a product launch or ad campaign. A few practical points:
- Session state: store conversation history per visitor session (not per page load), so the bot remembers context across a multi-page visit.
- Cost control: cap conversation length and truncate older turns once the context grows large, rather than sending the full history every time.
- Latency: pick a faster model tier for simple FAQ-style exchanges and reserve a stronger model only for complex qualification conversations, if your provider supports per-request model selection.
- Multi-key isolation: if marketing, sales, and support each run separate bots, use separate API keys per team or project so usage and spend are visible independently rather than lumped into one account.
This last point is where a layer like SubToAPI is useful if you're turning Claude access into an internal API: you get per-application keys (sub_live_...), usage metadata per key, and team seats, so your sales bot's token usage doesn't get mixed in with other projects. Setup takes a few minutes — see /docs/quickstart — and the request format matches the standard Messages API shape documented at /docs/messages. Plans start at €9/month on the Solo tier, with Team and Scale tiers for multi-seat setups; check /pricing for details, or start a free trial at /signup.
Questions
Does the chatbot need a vector database for product knowledge? Not necessarily. If your catalog is small, put it directly in the system prompt. For larger catalogs, retrieve only the relevant section per query instead of maintaining a full RAG pipeline — simpler to build and cheaper to run.
How do I stop the bot from making up pricing or discounts? Keep pricing in a fixed, versioned block of the system prompt and add an explicit rule forbidding invented numbers. Pair this with escalation logic so any custom-pricing request routes to a human instead of the model guessing.
Should the bot use the same model for every message? No. Use a lighter, faster model for greetings and FAQ-style turns, and reserve a stronger model for qualification logic or nuanced objection handling, if your setup allows per-request model selection.