Skip to main content

5 posts tagged with "automation"

View All Tags

Account Prioritization with AI: Claude Code vs Spreadsheets [2026]

· 10 min read
MarketBetter Team
Content Team, marketbetter.ai

Ask any sales rep: "How do you decide who to call first?" You'll get answers like:

  • "I work alphabetically through my list"
  • "Whatever came in most recently"
  • "Gut feeling based on company size"
  • "Whoever my manager tells me to"

None of these are strategies. They're coping mechanisms for a broken system.

The best accounts—the ones with the highest likelihood to close and the highest deal value—are often buried in a spreadsheet, never contacted. Meanwhile, reps waste hours on accounts that were never going to buy.

AI Account Prioritization System

This guide shows you how to build an AI-powered account scoring system with Claude Code that identifies your highest-potential accounts automatically. Stop guessing. Start knowing.

The Real Cost of Poor Prioritization

Here's what happens when sales teams prioritize badly:

Time Waste:

  • Average SDR spends 2+ hours daily deciding who to contact
  • 67% of time is spent on accounts that will never convert
  • Best accounts get the same attention as worst accounts

Revenue Loss:

  • 35-50% of deals go to the vendor that responds first
  • High-fit accounts that go uncontacted convert at competitor sites
  • Reps hit quota on volume, miss it on value

Burnout:

  • Calling dead accounts kills morale
  • "Spray and pray" feels pointless (because it is)
  • Top performers leave for companies with better systems

Spreadsheet Chaos vs AI Organization

The data is clear: teams that score and prioritize accounts effectively see 30% higher conversion rates and 20% shorter sales cycles.

Why Traditional Lead Scoring Fails

Most lead scoring systems are built on two flawed premises:

Flaw 1: Static Rules

"Companies with 500+ employees get 10 points."

This ignores:

  • Industry context (500 at a tech startup vs. 500 at a hospital = totally different)
  • Current buying signals
  • Relationship history
  • Market timing

Flaw 2: Incomplete Data

You score what you can measure, but the most predictive signals are often qualitative:

  • "They mentioned they're evaluating competitors"
  • "Their CTO attended our webinar AND read our pricing page"
  • "They just raised a Series B and need to scale sales"

Claude Code can synthesize both structured and unstructured data to create scoring that actually predicts conversions.

The Architecture of AI Account Scoring

Here's how an intelligent prioritization system works:

1. Data Aggregation

Pull from every source: CRM, enrichment tools, website behavior, email engagement, social signals.

2. ICP Matching

Score firmographic fit against your ideal customer profile.

3. Intent Detection

Identify behavioral signals that indicate active buying.

4. Relationship Mapping

Account for existing touchpoints and engagement history.

5. Timing Analysis

Factor in buying cycles, budget periods, and urgency signals.

6. Composite Scoring

Combine all factors into a single prioritization score.

Building the System with Claude Code

Step 1: Define Your ICP Criteria

First, codify what makes an account "ideal":

const ICP_CRITERIA = {
firmographic: {
employeeRange: { min: 50, max: 1000, weight: 0.2 },
revenueRange: { min: 5000000, max: 100000000, weight: 0.15 },
industries: {
include: ['SaaS', 'Technology', 'Financial Services', 'Healthcare'],
exclude: ['Government', 'Education'],
weight: 0.15
},
geographies: {
include: ['US', 'Canada', 'UK', 'Germany'],
weight: 0.05
}
},

technographic: {
required: ['Salesforce', 'HubSpot'],
positive: ['Outreach', 'SalesLoft', 'Gong'],
negative: ['Competitor X', 'Legacy CRM'],
weight: 0.15
},

departmentSignals: {
hasSalesTeam: { minSize: 5, weight: 0.1 },
hasMarketingTeam: { minSize: 2, weight: 0.05 },
hasRevOps: { weight: 0.1 }
}
};

Step 2: Aggregate Data Sources

Pull everything you know about each account:

async function aggregateAccountData(companyId) {
// CRM data
const crmData = await crm.getCompany(companyId);
const contacts = await crm.getContacts({ companyId });
const deals = await crm.getDeals({ companyId });
const activities = await crm.getActivities({ companyId });

// Enrichment data
const enrichment = await clearbit.enrich(crmData.domain);
const techStack = await builtwith.getTechStack(crmData.domain);

// Website behavior
const webActivity = await analytics.getCompanyActivity(companyId, {
days: 30
});

// Email engagement
const emailEngagement = await emailPlatform.getEngagement(companyId);

// Social signals
const linkedInActivity = await linkedin.getCompanySignals(crmData.domain);

// News and events
const recentNews = await newsApi.getCompanyNews(crmData.name, { days: 90 });

// Competitor mentions
const competitorSignals = await detectCompetitorActivity(companyId);

return {
company: crmData,
contacts,
deals,
activities,
enrichment,
techStack,
webActivity,
emailEngagement,
linkedInActivity,
recentNews,
competitorSignals
};
}

Step 3: Score with Claude Code

Now use Claude to synthesize all signals into a comprehensive score:

async function scoreAccount(accountData) {
// Calculate structured scores
const icpScore = calculateICPScore(accountData, ICP_CRITERIA);
const engagementScore = calculateEngagementScore(accountData);
const intentScore = calculateIntentScore(accountData);

// Use Claude for qualitative analysis
const qualitativeAnalysis = await claude.messages.create({
model: 'claude-3-5-sonnet-20241022',
max_tokens: 1000,
system: `You are a B2B sales strategist analyzing accounts for
prioritization. You excel at identifying hidden buying signals and
assessing account quality beyond basic metrics.

Provide:
1. OPPORTUNITY_SCORE (0-100): Likelihood to close
2. VALUE_SCORE (0-100): Potential deal size relative to effort
3. TIMING_SCORE (0-100): Urgency/readiness to buy
4. KEY_INSIGHTS: 2-3 critical observations
5. RECOMMENDED_APPROACH: Best first touch strategy`,
messages: [{
role: 'user',
content: `Analyze this account for prioritization:

COMPANY: ${accountData.company.name}
INDUSTRY: ${accountData.enrichment.industry}
SIZE: ${accountData.enrichment.employeeCount} employees
REVENUE: $${accountData.enrichment.annualRevenue}
TECH STACK: ${accountData.techStack.join(', ')}

RECENT ACTIVITY:
- Website visits: ${accountData.webActivity.pageviews} (${accountData.webActivity.uniqueVisitors} unique)
- Pages viewed: ${accountData.webActivity.topPages.join(', ')}
- Email engagement: ${accountData.emailEngagement.openRate}% open, ${accountData.emailEngagement.clickRate}% click
- Last activity: ${accountData.webActivity.lastActivity}

CONTACTS:
${accountData.contacts.map(c => `- ${c.name} (${c.title}): ${c.engagementScore} engagement`).join('\n')}

RECENT NEWS:
${accountData.recentNews.map(n => `- ${n.headline}`).join('\n')}

COMPETITOR SIGNALS:
${accountData.competitorSignals.length > 0 ? accountData.competitorSignals.join('\n') : 'None detected'}

RELATIONSHIP HISTORY:
- Previous deals: ${accountData.deals.length}
- Total activities: ${accountData.activities.length}
- Last touch: ${accountData.activities[0]?.date || 'Never'}

Provide your analysis as JSON.`
}],
response_format: { type: 'json_object' }
});

const aiAnalysis = JSON.parse(qualitativeAnalysis.content[0].text);

// Combine all scores
return {
companyId: accountData.company.id,
companyName: accountData.company.name,
scores: {
icp: icpScore,
engagement: engagementScore,
intent: intentScore,
opportunity: aiAnalysis.OPPORTUNITY_SCORE,
value: aiAnalysis.VALUE_SCORE,
timing: aiAnalysis.TIMING_SCORE
},
composite: calculateComposite({
icp: icpScore,
engagement: engagementScore,
intent: intentScore,
...aiAnalysis
}),
insights: aiAnalysis.KEY_INSIGHTS,
recommendedApproach: aiAnalysis.RECOMMENDED_APPROACH,
tier: determineTier(/* composite score */)
};
}

function calculateComposite(scores) {
// Weighted combination
return (
scores.icp * 0.2 +
scores.engagement * 0.15 +
scores.intent * 0.25 +
scores.OPPORTUNITY_SCORE * 0.2 +
scores.VALUE_SCORE * 0.1 +
scores.TIMING_SCORE * 0.1
);
}

Step 4: Create the Daily Prioritized List

Generate a ranked list for each rep every morning:

async function generateDailyPrioritization(repId) {
// Get rep's assigned accounts
const accounts = await crm.getAccountsByRep(repId);

// Score all accounts (parallelize for speed)
const scoredAccounts = await Promise.all(
accounts.map(async account => {
const data = await aggregateAccountData(account.id);
return scoreAccount(data);
})
);

// Sort by composite score
const ranked = scoredAccounts.sort((a, b) => b.composite - a.composite);

// Assign daily tiers
const dailyList = {
mustTouch: ranked.slice(0, 5).map(addContactReason),
highPriority: ranked.slice(5, 15).map(addContactReason),
standard: ranked.slice(15, 50).map(addContactReason),
nurture: ranked.slice(50).map(addContactReason)
};

// Push to CRM and Slack
await crm.updateDailyPriorities(repId, dailyList);
await slack.sendDM(repId, formatPriorityList(dailyList));

return dailyList;
}

function addContactReason(account) {
return {
...account,
whyNow: generateWhyNow(account),
suggestedAction: getSuggestedAction(account),
talkingPoints: getTalkingPoints(account)
};
}

Account Scoring Dashboard

Real-World Example: Tech Company Prioritization

Input: 500 accounts assigned to an SDR

AI Analysis Output (top 3):

[
{
"companyName": "CloudScale Inc",
"composite": 94,
"scores": {
"icp": 92,
"engagement": 88,
"intent": 96,
"timing": 98
},
"insights": [
"CEO visited pricing page 3x this week",
"Currently using Competitor X (known pain: data accuracy)",
"Just closed Series B—scaling sales team is top priority"
],
"recommendedApproach": "Reference Series B news, position as infrastructure for scaling sales team. CEO is actively evaluating—this is hot.",
"whyNow": "Series B + active pricing page visits = buying now"
},
{
"companyName": "DataFlow Systems",
"composite": 87,
"scores": {
"icp": 95,
"engagement": 75,
"intent": 89,
"timing": 82
},
"insights": [
"VP Sales attended our webinar last week",
"Hiring 5 SDRs according to LinkedIn",
"No current solution in place"
],
"recommendedApproach": "Reference webinar attendance, offer to help structure their new SDR team. Timing is good with their hiring push.",
"whyNow": "Building SDR team from scratch = greenfield opportunity"
},
{
"companyName": "NextGen Analytics",
"composite": 84,
"scores": {
"icp": 88,
"engagement": 91,
"intent": 78,
"timing": 75
},
"insights": [
"3 different people from the company have downloaded content",
"Tech stack includes Salesforce + Outreach",
"Last contacted 6 months ago—went dark after demo"
],
"recommendedApproach": "Re-engage with new angle. Multiple stakeholders engaged now vs. single contact before. Ask what's changed.",
"whyNow": "Re-engagement opportunity with broader buying committee"
}
]

Continuous Learning: The Feedback Loop

The system improves by tracking outcomes:

async function logPrioritizationOutcome(accountId, outcome) {
const originalScore = await getHistoricalScore(accountId);

await analyticsDb.log({
accountId,
scoredAt: originalScore.timestamp,
composite: originalScore.composite,
outcome: outcome, // 'converted', 'stalled', 'lost', 'disqualified'
daysToOutcome: daysBetween(originalScore.timestamp, new Date()),
dealValue: outcome === 'converted' ? await getDealValue(accountId) : null
});

// Quarterly: Retrain weights based on what actually converted
if (isQuarterEnd()) {
await retrainScoringWeights();
}
}

async function retrainScoringWeights() {
const outcomes = await analyticsDb.getOutcomes({ months: 6 });

// Analyze which factors actually predicted conversions
const analysis = await claude.messages.create({
model: 'claude-3-5-sonnet-20241022',
messages: [{
role: 'user',
content: `Analyze these prioritization outcomes and recommend
weight adjustments:

CONVERSIONS:
${outcomes.filter(o => o.outcome === 'converted').map(summarize).join('\n')}

LOSSES:
${outcomes.filter(o => o.outcome === 'lost').map(summarize).join('\n')}

Current weights: ${JSON.stringify(currentWeights)}

What factors were most predictive? Recommend new weights.`
}]
});

// Update scoring algorithm
await updateScoringWeights(analysis);
}

Integration with Daily Workflow

Make prioritization seamless:

Morning Slack Notification

// 7am daily
cron.schedule('0 7 * * *', async () => {
const reps = await crm.getActiveReps();

for (const rep of reps) {
const priorities = await generateDailyPrioritization(rep.id);

await slack.sendDM(rep.slackId, {
blocks: [
{
type: 'header',
text: `🎯 Your Priority Accounts for Today`
},
{
type: 'section',
text: `*Must Touch (5 accounts)*\n${priorities.mustTouch.map(a =>
`• *${a.companyName}* (Score: ${a.composite}) — ${a.whyNow}`
).join('\n')}`
},
{
type: 'actions',
elements: [
{
type: 'button',
text: 'View Full List',
url: `https://crm.com/priorities/${rep.id}`
}
]
}
]
});
}
});

CRM Priority Field Updates

async function syncToCRM(priorities) {
for (const account of [...priorities.mustTouch, ...priorities.highPriority]) {
await crm.updateCompany(account.companyId, {
priority_tier: account.tier,
ai_score: account.composite,
last_scored: new Date(),
recommended_action: account.suggestedAction,
score_reasoning: account.insights.join(' | ')
});

// Create task if high priority
if (account.tier === 'mustTouch') {
await crm.createTask({
companyId: account.companyId,
subject: `Priority Touch: ${account.companyName}`,
notes: account.whyNow,
dueDate: new Date()
});
}
}
}

Measuring Prioritization ROI

Track these metrics:

MetricBefore AIAfter AIImprovement
Time deciding who to call2.1 hrs/day0.2 hrs/day-90%
Contact rate on Tier 1 accounts24%41%+71%
Conversion rate (all)2.8%4.6%+64%
Average deal size$28K$36K+29%
Quota attainment78%94%+21%

The compound effect: If better prioritization increases conversions by 64% and deal size by 29%, and you're running 1,000 qualified accounts/quarter at a $30K baseline ACV, that's an additional $620K in ARR quarterly.

Advanced: Dynamic Reprioritization

Don't just score once—reprioritize throughout the day:

// Real-time triggers
async function handleSignificantEvent(event) {
const { accountId, eventType, data } = event;

const significantEvents = [
'pricing_page_visit',
'competitor_search',
'demo_request',
'executive_engagement',
'funding_announcement'
];

if (significantEvents.includes(eventType)) {
// Immediately rescore
const newScore = await scoreAccount(await aggregateAccountData(accountId));

// If jumped to Tier 1, alert immediately
if (newScore.tier === 'mustTouch' && (await getPreviousTier(accountId)) !== 'mustTouch') {
await sendUrgentAlert(accountId, newScore, event);
}
}
}

async function sendUrgentAlert(accountId, score, triggerEvent) {
const rep = await crm.getAccountOwner(accountId);

await slack.sendDM(rep.slackId, {
text: `🚨 *HOT ACCOUNT ALERT*\n\n*${score.companyName}* just jumped to Tier 1!\n\nTrigger: ${triggerEvent.eventType}\n${score.whyNow}\n\nDrop what you're doing. This one's live.`
});
}

Getting Started with MarketBetter

Building AI account prioritization from scratch is powerful but complex. MarketBetter provides the complete solution:

  • Daily SDR Playbook — Every rep gets their prioritized list each morning
  • Real-time scoring — Accounts reprioritize based on live signals
  • AI-powered reasoning — Not just a score, but why and what to do
  • CRM integration — HubSpot, Salesforce out of the box
  • Learning loop — Improves automatically based on your conversion data

Stop letting your best accounts go unworked. Stop wasting time on accounts that were never going to buy. Let AI tell you exactly where to focus.

Book a Demo →

Key Takeaways

  1. Poor prioritization costs deals — 67% of rep time goes to accounts that won't convert
  2. Static lead scoring fails — Rules can't capture qualitative buying signals
  3. Claude Code enables intelligent scoring — Synthesize structured + unstructured data
  4. Make it actionable — Daily ranked lists with clear reasoning and suggested actions
  5. Continuous learning — Track outcomes and retrain weights quarterly

Your CRM is full of gold. The problem is it's mixed in with thousands of accounts that look the same on the surface. AI-powered prioritization separates signal from noise—so your team spends 100% of their time on accounts that can actually close.

AI Meeting Follow-Up Automation with OpenClaw [2026]

· 9 min read
MarketBetter Team
Content Team, marketbetter.ai

Every sales rep knows the pain: you finish a great discovery call, and now you need to spend 20-30 minutes logging notes, updating the CRM, drafting follow-up emails, and creating tasks. Multiply that by 5-8 calls per day, and you're losing 2-3 hours daily to administrative work that doesn't close deals.

What if your meetings could follow up on themselves?

AI Meeting Follow-Up Workflow

In this guide, you'll learn how to build an automated meeting follow-up system using OpenClaw that captures action items, updates your CRM, drafts personalized follow-up emails, and creates calendar tasks—all within minutes of your call ending.

The Hidden Cost of Manual Follow-Up

Let's do the math on what manual meeting follow-up actually costs:

TaskTime per MeetingDaily (6 meetings)WeeklyMonthly
CRM notes5 min30 min2.5 hrs10 hrs
Follow-up email draft8 min48 min4 hrs16 hrs
Task creation3 min18 min1.5 hrs6 hrs
Calendar scheduling4 min24 min2 hrs8 hrs
Total20 min2 hrs10 hrs40 hrs

That's a full work week every month spent on post-meeting admin. For an SDR making $70,000/year, that's $16,000 in lost productivity annually—per rep.

Before and After: Manual vs Automated Follow-Up

What OpenClaw Brings to Meeting Follow-Up

OpenClaw is an open-source AI gateway that connects language models to your existing tools. For meeting follow-up, this means:

  • Transcript processing — Ingest transcripts from Zoom, Gong, Chorus, or any meeting tool
  • Intelligent extraction — Claude identifies action items, commitments, objections, and next steps
  • CRM integration — Automatically push structured data to HubSpot, Salesforce, or Pipedrive
  • Email drafting — Generate personalized follow-up emails based on conversation context
  • Task automation — Create to-dos and calendar events with proper assignments

The best part: it runs 24/7, processes meetings within minutes, and costs a fraction of enterprise alternatives.

Architecture Overview

Here's how the automated follow-up system works:

  1. Trigger — Meeting ends, transcript becomes available (via webhook or polling)
  2. Ingest — OpenClaw agent receives the transcript via cron job or message
  3. Process — Claude analyzes transcript, extracts structured data
  4. Execute — Agent updates CRM, drafts emails, creates tasks
  5. Notify — Rep receives Slack/WhatsApp summary with one-click approvals

Terminal: OpenClaw Processing a Meeting

Setting Up the Meeting Follow-Up Agent

Step 1: Create the Agent Configuration

First, define your meeting follow-up agent in OpenClaw:

# agents/meeting-followup.yaml
name: MeetingFollowUp
description: Processes meeting transcripts and automates follow-up tasks

triggers:
- type: webhook
path: /webhooks/meeting-complete
- type: cron
schedule: "*/15 * * * *" # Check for new transcripts every 15 min

tools:
- hubspot
- gmail
- calendar
- slack

prompts:
system: |
You are a meeting follow-up specialist. When given a transcript:

1. EXTRACT: Key discussion points, pain points mentioned, objections raised
2. IDENTIFY: Action items with owners (us vs them)
3. DETERMINE: Next steps and timeline commitments
4. DRAFT: Personalized follow-up email
5. UPDATE: CRM with structured notes

Always maintain the prospect's exact language for pain points.
Flag any buying signals or red flags.

Step 2: Define the Extraction Schema

Create a structured output format so every meeting produces consistent data:

interface MeetingExtraction {
// Basic info
meetingDate: string;
attendees: string[];
duration: number;

// Discussion
keyTopics: string[];
painPoints: {
description: string;
verbatimQuote: string;
severity: 'low' | 'medium' | 'high';
}[];

// Sales signals
buyingSignals: string[];
objections: {
objection: string;
response: string;
resolved: boolean;
}[];

// Next steps
actionItems: {
task: string;
owner: 'us' | 'them';
dueDate?: string;
}[];

// Outputs
crmNotes: string;
followUpEmail: {
subject: string;
body: string;
};
nextMeetingAgenda?: string[];
}

Step 3: Build the Processing Logic

Here's the core agent logic that processes each transcript:

// Process incoming transcript
async function processTranscript(transcript, meetingMetadata) {
// Extract structured data using Claude
const extraction = await claude.analyze({
model: 'claude-3-5-sonnet',
system: EXTRACTION_PROMPT,
messages: [
{
role: 'user',
content: `Meeting: ${meetingMetadata.title}
Date: ${meetingMetadata.date}
Attendees: ${meetingMetadata.attendees.join(', ')}

Transcript:
${transcript}`
}
],
response_format: { type: 'json_object' }
});

// Update CRM
await hubspot.updateDeal(meetingMetadata.dealId, {
notes: extraction.crmNotes,
next_step: extraction.actionItems[0]?.task,
last_meeting_date: meetingMetadata.date
});

// Create tasks for our action items
for (const item of extraction.actionItems.filter(a => a.owner === 'us')) {
await hubspot.createTask({
subject: item.task,
dueDate: item.dueDate || addDays(new Date(), 2),
associatedDealId: meetingMetadata.dealId
});
}

// Draft follow-up email
await gmail.createDraft({
to: meetingMetadata.prospectEmail,
subject: extraction.followUpEmail.subject,
body: extraction.followUpEmail.body
});

// Notify rep
await slack.sendMessage({
channel: meetingMetadata.repSlackId,
text: formatSummary(extraction)
});

return extraction;
}

Real-World Example: Discovery Call Processing

Let's walk through what happens when a discovery call ends:

Input: 45-minute discovery call with a VP of Sales at a mid-market SaaS company

Extracted Data:

{
"keyTopics": [
"Current SDR productivity challenges",
"Manual lead research taking 2+ hours daily",
"Inconsistent follow-up timing"
],
"painPoints": [
{
"description": "SDRs spending too much time on research",
"verbatimQuote": "My reps are spending half their day just trying to figure out who to call",
"severity": "high"
},
{
"description": "No systematic approach to prioritization",
"verbatimQuote": "Everyone just works their own list their own way",
"severity": "medium"
}
],
"buyingSignals": [
"Asked about implementation timeline",
"Mentioned budget is allocated for Q2",
"Requested pricing for 15 seats"
],
"objections": [
{
"objection": "Concerned about data accuracy",
"response": "Explained our multi-source verification",
"resolved": true
}
],
"actionItems": [
{
"task": "Send ROI calculator customized for 15 reps",
"owner": "us",
"dueDate": "2026-02-11"
},
{
"task": "Schedule technical deep-dive with their ops team",
"owner": "us",
"dueDate": "2026-02-14"
},
{
"task": "Review current CRM data quality",
"owner": "them",
"dueDate": "2026-02-12"
}
]
}

Auto-Generated Follow-Up Email:

Subject: Next Steps: ROI Calculator + Technical Deep-Dive

Hi Sarah,

Great conversation today about streamlining your SDR workflow.
I heard you loud and clear—your reps spending half their day on
research instead of selling is exactly the problem we solve.

As promised, I'm working on:
1. A customized ROI calculator for your 15-rep team (coming Tuesday)
2. Setting up a technical session with your ops team (targeting Friday)

On your end, you mentioned reviewing your current CRM data quality
to understand the baseline—that'll help us show the before/after
impact clearly.

Quick question: Would Thursday at 2pm CT work for the technical
deep-dive, or is Friday better?

Best,
[Rep Name]

Zoom Integration

// Webhook handler for Zoom recording completion
app.post('/webhooks/zoom', async (req, res) => {
const { recording_files, topic, start_time, participants } = req.body.payload;

// Find transcript file
const transcriptFile = recording_files.find(f => f.file_type === 'TRANSCRIPT');

if (transcriptFile) {
const transcript = await downloadZoomTranscript(transcriptFile.download_url);
await processTranscript(transcript, {
title: topic,
date: start_time,
attendees: participants.map(p => p.name)
});
}

res.sendStatus(200);
});

Gong Integration

// Poll Gong for completed calls
async function pollGongCalls() {
const recentCalls = await gong.getCalls({
fromDateTime: subtractHours(new Date(), 1),
toDateTime: new Date()
});

for (const call of recentCalls) {
if (call.transcript && !processedCalls.has(call.id)) {
await processTranscript(call.transcript, {
title: call.title,
date: call.started,
attendees: call.parties.map(p => p.name),
dealId: call.crmData?.dealId
});
processedCalls.add(call.id);
}
}
}

Fireflies.ai Integration

// Fireflies webhook for transcript ready
app.post('/webhooks/fireflies', async (req, res) => {
const { transcript_url, meeting_title, attendees, date } = req.body;

const transcript = await fetch(transcript_url).then(r => r.text());

await processTranscript(transcript, {
title: meeting_title,
date: date,
attendees: attendees
});

res.sendStatus(200);
});

Advanced: Sentiment-Based Follow-Up Timing

Not all meetings are equal. A call where the prospect was enthusiastic deserves faster follow-up than one where they seemed hesitant. Add sentiment analysis to your extraction:

// Analyze overall meeting sentiment
const sentimentAnalysis = await claude.analyze({
messages: [{
role: 'user',
content: `Analyze the prospect's sentiment in this meeting.
Rate their engagement (1-10), buying intent (1-10),
and urgency (1-10).

Transcript: ${transcript}`
}]
});

// Adjust follow-up timing based on sentiment
const followUpDelay = calculateDelay(sentimentAnalysis);

function calculateDelay({ engagement, buyingIntent, urgency }) {
const score = (engagement + buyingIntent + urgency) / 3;

if (score >= 8) return 'immediate'; // Hot lead - same day
if (score >= 6) return 'next_day'; // Warm - next business day
if (score >= 4) return '2_days'; // Neutral - give them space
return '3_days'; // Cool - longer nurture
}

Handling Edge Cases

Multi-Person Meetings

When multiple prospects attend, split follow-ups appropriately:

// Identify primary and secondary contacts
const roles = await claude.analyze({
messages: [{
role: 'user',
content: `Based on this transcript, identify:
1. Primary decision maker
2. Technical evaluator (if present)
3. Champion/internal advocate (if present)

For each, extract their key concerns and interests.

Transcript: ${transcript}`
}]
});

// Create tailored follow-ups for each stakeholder
for (const stakeholder of roles.identified) {
await createPersonalizedFollowUp(stakeholder);
}

Meetings Without Clear Next Steps

Sometimes calls end ambiguously. Handle these gracefully:

if (extraction.actionItems.length === 0) {
// Create a "check-in" follow-up task
await hubspot.createTask({
subject: `Check-in: ${meetingMetadata.prospectCompany} - No clear next steps`,
dueDate: addDays(new Date(), 3),
notes: `Meeting ended without clear next steps.
Reach out to re-engage or close as stalled.

Key topics discussed: ${extraction.keyTopics.join(', ')}`
});

// Alert rep to the ambiguity
await slack.sendMessage({
channel: meetingMetadata.repSlackId,
text: `⚠️ No clear next steps from your call with ${meetingMetadata.prospectName}.
Review the summary and decide: pursue or pause?`
});
}

The ROI of Automated Follow-Up

Based on teams running this system:

MetricBeforeAfterImprovement
Time to CRM update8 minInstant100% faster
Time to follow-up email12 min2 min (review only)83% faster
Follow-up sent within 1 hour15%95%6x improvement
Action items completed on time60%92%+53%
Rep capacity (calls/day)69+50%

The speed-to-lead improvement alone often pays for the entire system. Prospects who receive personalized follow-ups within an hour of a call are 3x more likely to reply than those contacted the next day.

Getting Started with MarketBetter

While OpenClaw gives you the building blocks, MarketBetter provides the complete solution:

  • Pre-built meeting integrations — Zoom, Gong, Chorus, Teams, Google Meet
  • CRM sync — HubSpot, Salesforce, Pipedrive out of the box
  • Daily SDR Playbook — Meeting follow-ups feed directly into tomorrow's action items
  • Smart prioritization — High-sentiment calls get fast-tracked automatically

The meeting follow-up automation is just one piece of the AI SDR puzzle. Combined with lead research, personalized outreach, and pipeline monitoring, it creates a system where your reps spend 90% of their time actually selling.

Book a Demo →

Key Takeaways

  1. Manual follow-up costs ~40 hours/month per rep — That's $16,000+ in lost productivity annually
  2. OpenClaw enables DIY automation — Connect transcripts to CRM updates, emails, and tasks
  3. Structured extraction is key — Define schemas for consistent, actionable data
  4. Sentiment analysis improves timing — Hot leads get faster follow-up automatically
  5. Edge cases need handling — Multi-stakeholder meetings and ambiguous calls require special logic

Stop letting post-meeting admin steal your selling time. Whether you build with OpenClaw or go with a turnkey solution, automated meeting follow-up is no longer optional—it's the standard for high-performing sales teams in 2026.

AI Objection Handling: Build a Real-Time Battle Script Generator [2026]

· 11 min read
MarketBetter Team
Content Team, marketbetter.ai

"We need to think about it."

Those six words have killed more deals than any competitor ever could. And most sales reps respond with some variation of "I understand, when should I follow up?"—essentially handing the deal to the graveyard of "we'll get back to you."

The best closers don't just handle objections—they anticipate them, reframe them, and use them as springboards to close. The problem? That skill takes years to develop. Most reps never get there.

Real-Time Objection Handling System

What if every rep could have a top performer whispering in their ear during every call? With AI, they can. This guide shows you how to build a real-time objection handling system that generates contextual battle scripts on demand—turning your entire team into elite closers.

The Objection Problem in B2B Sales

Here's the brutal data:

  • 44% of sales reps give up after one objection
  • 92% give up after four "no's"
  • 80% of sales require five follow-ups after the initial meeting
  • Top performers are 2.5x more likely to persist through objections

Objection Response Strategy Map

The gap between average and excellent isn't effort—it's skill. Specifically, the skill of knowing exactly what to say when a prospect pushes back. That skill can now be automated.

Why Generic Battle Cards Fail

Most companies have battle cards. They sit in a Google Drive folder, forgotten after onboarding. Here's why:

Too Generic: "If they mention price, emphasize value." Thanks, that's helpful.

Too Long: Nobody's reading a 3-page response during a live call.

Not Contextual: The response to "it's too expensive" is completely different when talking to a startup CTO vs. an enterprise procurement team.

Static: Written once, never updated with what actually works.

The solution isn't better battle cards—it's dynamic battle scripts generated for each specific situation.

The Architecture of AI Objection Handling

Here's how a modern objection handling system works:

1. Real-Time Transcription

Capture what the prospect says as they say it.

2. Objection Detection

AI identifies when an objection is raised and categorizes it.

3. Context Enrichment

Pull in deal history, prospect info, and what's worked before.

4. Script Generation

Generate a tailored response for this specific situation.

5. Delivery

Surface the script to the rep via screen overlay, Slack, or voice whisper.

AI Copilot for Sales Calls

Building the System with Claude Code + OpenClaw

Step 1: Objection Detection

First, build the detection layer that identifies objections in real-time:

const OBJECTION_CATEGORIES = [
{ id: 'price', patterns: ['too expensive', 'budget', 'cost', 'cheaper', 'price'], severity: 'high' },
{ id: 'timing', patterns: ['not right now', 'next quarter', 'not ready', 'too soon'], severity: 'medium' },
{ id: 'competition', patterns: ['looking at', 'comparing', 'competitor', 'other options'], severity: 'high' },
{ id: 'authority', patterns: ['need to talk to', 'not my decision', 'get approval', 'run it by'], severity: 'medium' },
{ id: 'trust', patterns: ['never heard of', 'new company', 'references', 'case studies'], severity: 'low' },
{ id: 'status_quo', patterns: ['we\'re fine', 'not broken', 'current solution works', 'happy with'], severity: 'high' },
{ id: 'urgency', patterns: ['think about it', 'get back to you', 'need time', 'not urgent'], severity: 'critical' }
];

async function detectObjection(transcript) {
// First pass: pattern matching for speed
for (const category of OBJECTION_CATEGORIES) {
const pattern = new RegExp(category.patterns.join('|'), 'i');
if (pattern.test(transcript.latestUtterance)) {
return { detected: true, category: category.id, severity: category.severity };
}
}

// Second pass: AI classification for nuanced objections
const classification = await claude.messages.create({
model: 'claude-3-5-sonnet-20241022',
max_tokens: 200,
messages: [{
role: 'user',
content: `Is this an objection? If so, classify it:

"${transcript.latestUtterance}"

Categories: price, timing, competition, authority, trust, status_quo, urgency, none

Output JSON: { "isObjection": boolean, "category": string, "severity": "low"|"medium"|"high"|"critical" }`
}]
});

return JSON.parse(classification.content[0].text);
}

Step 2: Context Gathering

When an objection is detected, gather all relevant context:

async function gatherObjectionContext(dealId, objection) {
// Get deal and contact info
const deal = await crm.getDeal(dealId);
const contact = await crm.getContact(deal.primaryContactId);
const company = await crm.getCompany(deal.companyId);

// Get conversation history
const previousCalls = await crm.getCallNotes(dealId);
const emails = await crm.getEmails(dealId);

// Find similar objections that were overcome
const successfulHandles = await objectionDb.find({
category: objection.category,
industry: company.industry,
outcome: 'overcome'
});

// Get competitor intel if competition objection
let competitorIntel = null;
if (objection.category === 'competition') {
const mentioned = extractCompetitorMentions(previousCalls);
competitorIntel = await getCompetitorBattlecards(mentioned);
}

return {
deal,
contact,
company,
conversationHistory: [...previousCalls, ...emails],
successfulHandles,
competitorIntel,
currentCallTranscript: objection.transcript
};
}

Step 3: Dynamic Script Generation

Now, generate a response tailored to this exact situation:

async function generateObjectionResponse(objection, context) {
const systemPrompt = `You are a world-class sales coach generating
real-time objection handling scripts. Your responses:

1. ACKNOWLEDGE the concern (don't dismiss or argue)
2. CLARIFY to understand the real issue
3. RESPOND with context-specific evidence
4. ADVANCE toward next steps

Guidelines:
- Keep total response under 30 seconds of speaking time (~75 words)
- Use the prospect's exact language when possible
- Reference specific things from their situation
- Include one concrete data point or example
- End with a question that moves forward

NEVER:
- Sound scripted or robotic
- Use generic platitudes
- Argue or get defensive
- Ignore the emotional component`;

const response = await claude.messages.create({
model: 'claude-3-5-sonnet-20241022',
max_tokens: 500,
system: systemPrompt,
messages: [{
role: 'user',
content: `Generate an objection response for this situation:

OBJECTION CATEGORY: ${objection.category}
EXACT WORDS: "${objection.exactPhrase}"

PROSPECT CONTEXT:
- Name: ${context.contact.name}
- Title: ${context.contact.title}
- Company: ${context.company.name} (${context.company.industry})
- Company Size: ${context.company.employeeCount}
- Deal Value: $${context.deal.amount}

CONVERSATION CONTEXT:
- Stage: ${context.deal.stage}
- Days in pipeline: ${context.deal.daysInPipeline}
- Previous objections overcome: ${context.conversationHistory.filter(c => c.objectionOvercome).length}

${context.competitorIntel ? `COMPETITOR MENTIONED: ${context.competitorIntel.name}
Key Differentiator: ${context.competitorIntel.primaryDifferentiator}` : ''}

SUCCESSFUL HANDLES FOR SIMILAR SITUATIONS:
${context.successfulHandles.slice(0, 2).map(h =>
`- "${h.objection}" → Response: "${h.response}" → Outcome: ${h.outcome}`
).join('\n')}

Generate a natural, conversational response the rep can use RIGHT NOW.`
}]
});

return {
script: response.content[0].text,
category: objection.category,
followUpQuestions: await generateFollowUps(objection, context),
resources: await findRelevantResources(objection, context)
};
}

Step 4: Delivery to the Rep

Get the script to the rep in real-time:

// Option 1: Screen overlay
async function overlayDelivery(response, sessionId) {
await callAssistant.showOverlay(sessionId, {
type: 'objection_response',
category: response.category,
script: response.script,
followUps: response.followUpQuestions,
ttl: 60000 // Visible for 60 seconds
});
}

// Option 2: Slack whisper
async function slackDelivery(response, repId) {
await slack.sendDM(repId, {
text: `🎯 *Objection Detected: ${response.category}*\n\n${response.script}`,
attachments: [{
title: 'Follow-up Questions',
text: response.followUpQuestions.join('\n• ')
}]
});
}

// Option 3: Voice whisper (for phone calls)
async function voiceWhisper(response, callSessionId) {
// Text-to-speech through the rep's earpiece
await twilio.whisper(callSessionId, {
text: `Objection: ${response.category}. Try: ${response.script.substring(0, 100)}`,
voice: 'concise'
});
}

Objection-Specific Templates

Here are production-tested templates for common objections:

Price Objection

const PRICE_TEMPLATE = {
pattern: /too expensive|budget|cost|price/i,
contextQuestions: [
'What other solutions were they comparing to?',
'What\'s their current spend on this problem?',
'Who else is involved in budget decisions?'
],
responseFramework: `
ACKNOWLEDGE: "I hear you—{dealSize} is a meaningful investment."

CLARIFY: "Help me understand: is it that the total cost is higher than
expected, or that you're not yet seeing how the ROI justifies it?"

RESPOND (if ROI unclear): "Companies like {similarCustomer} in {industry}
typically see {specificROI} within {timeframe}. For your team of
{teamSize}, that translates to roughly {calculatedSavings}."

RESPOND (if truly budget-constrained): "I appreciate the transparency.
A few options: We could start with {reducedScope} at {lowerPrice}, or
structure payments {alternativePayment}. What works better for your
planning cycles?"

ADVANCE: "What would you need to see to feel confident this pays for
itself within {paybackPeriod}?"
`
};

Status Quo Objection

const STATUS_QUO_TEMPLATE = {
pattern: /we're fine|not broken|current solution works|happy with/i,
contextQuestions: [
'What are they currently using?',
'How long have they been using it?',
'What triggered this conversation in the first place?'
],
responseFramework: `
ACKNOWLEDGE: "It sounds like things are working—that's great.
Most of our best customers weren't in crisis mode either."

CLARIFY: "I'm curious though—you took this meeting for a reason.
Was there something specific that made you want to explore alternatives?"

RESPOND: "The companies that wait for things to break usually find
the switch costs 3-4x more because they're doing it under pressure.
{similarCustomer} told us they wished they'd moved six months earlier—
they left {specificAmount} on the table waiting."

ADVANCE: "What would 'good enough' need to become 'not good enough'
for you to prioritize this?"
`
};

"Need to Think About It" Objection

const STALL_TEMPLATE = {
pattern: /think about it|get back to you|need time|not urgent/i,
contextQuestions: [
'What specific concerns haven\'t been addressed?',
'Who else needs to be involved?',
'What\'s their actual timeline?'
],
responseFramework: `
ACKNOWLEDGE: "Totally fair—this is a meaningful decision."

CLARIFY: "When you say you need to think about it, is it more about
{option1: 'getting alignment with others'}, {option2: 'comparing to
other options'}, or {option3: 'making sure it fits the budget'}?"

RESPOND (alignment): "Who else needs to weigh in? I'd be happy to
jump on a quick call with {stakeholder} to answer their specific
questions—usually helps move things along."

RESPOND (comparison): "What specifically are you hoping the other
options offer that you haven't seen from us? I want to make sure
you have what you need to compare apples to apples."

RESPOND (budget): [See price objection framework]

ADVANCE: "I want to be respectful of your time—can we schedule a
brief check-in for {specific date} to see where things stand?
That way you have time to think, and I can answer any questions
that come up."
`
};

Learning from Outcomes

The system gets smarter over time by tracking what works:

async function logObjectionOutcome(objectionId, outcome, repFeedback) {
await objectionDb.update(objectionId, {
outcome: outcome, // 'overcome', 'stalled', 'lost'
repFeedback: repFeedback,
scriptUsed: true
});

// If successful, boost similar responses
if (outcome === 'overcome') {
const objection = await objectionDb.get(objectionId);
await updateSuccessWeights({
category: objection.category,
industry: objection.industry,
dealSize: objection.dealSize,
response: objection.generatedScript
});
}
}

// Use success data to improve future generations
async function getWeightedExamples(category, context) {
const examples = await objectionDb.find({
category,
industry: context.company.industry,
dealSizeRange: getDealSizeRange(context.deal.amount),
outcome: 'overcome'
});

// Sort by success rate and recency
return examples
.sort((a, b) => b.successScore - a.successScore)
.slice(0, 5);
}

Real-World Example: Handling a Competitive Objection

Situation:

  • Prospect: VP of Sales at a 200-person fintech
  • Objection: "We're also looking at ZoomInfo and Apollo."
  • Deal Stage: Evaluation
  • Deal Size: $48,000/year

Context Gathered:

  • They've been in ZoomInfo trial for 2 weeks
  • Discovery call mentioned "data quality" as key concern
  • Industry benchmark: 30% of fintech companies cite ZoomInfo data decay issues

Generated Response:

"That makes sense—ZoomInfo and Apollo are solid options. I'm curious: after two weeks with ZoomInfo, how are you finding the data quality, especially for your fintech prospects? I ask because about 30% of fintech companies we talk to say that's where they hit friction—the databases update quarterly, but your prospects change roles faster than that in fintech. What's been your experience?"

Why it works:

  • Doesn't bash competitors
  • Acknowledges they're legitimate options
  • Surfaces a known pain point for their industry
  • Uses a question to let THEM discover the limitation
  • Based on actual industry data, not generic claims

Integration with Gong/Chorus

For teams already using conversation intelligence:

// Gong webhook for real-time transcription
app.post('/webhooks/gong/transcript', async (req, res) => {
const { callId, transcript, speakerSegments } = req.body;

// Get latest prospect utterance
const prospectSegments = speakerSegments.filter(s => s.speaker === 'prospect');
const latestUtterance = prospectSegments[prospectSegments.length - 1];

// Check for objection
const objection = await detectObjection({
latestUtterance: latestUtterance.text,
fullTranscript: transcript
});

if (objection.detected) {
const dealId = await crm.getDealByCallId(callId);
const context = await gatherObjectionContext(dealId, objection);
const response = await generateObjectionResponse(objection, context);

// Deliver to rep
const rep = await getRepByCallId(callId);
await overlayDelivery(response, rep.sessionId);
}

res.sendStatus(200);
});

Measuring Impact

Track these metrics to prove ROI:

MetricBefore AIAfter AIImprovement
Objection-to-advance rate32%54%+69%
Average attempts before giving up2.14.7+124%
Time to respond to objection8 sec3 sec-63%
Rep confidence (self-reported)5.2/107.8/10+50%
Deal win rate22%28%+27%

The compounding effect: If better objection handling increases your win rate by 6 points, and you're running 100 deals/month at $40K ACV, that's an additional $2.4M in ARR annually.

Getting Started with MarketBetter

Building real-time objection handling is powerful, but it requires integration across transcription, CRM, and delivery systems. MarketBetter provides the complete solution:

  • Real-time objection detection — Identifies objections as they happen
  • Context-aware scripts — Pulls from deal history, competitor intel, and proven responses
  • Multi-channel delivery — Screen overlay, Slack, or voice whisper
  • Learning loop — Gets smarter with every call, tracking what actually works

Combined with AI lead research, automated follow-ups, and pipeline monitoring, it creates a system where your reps always know exactly what to say.

Book a Demo →

Key Takeaways

  1. Objections kill deals, but only when mishandled — Top performers are 2.5x more likely to persist
  2. Generic battle cards don't work — Context-specific, real-time responses do
  3. AI enables dynamic generation — Claude + Codex can generate scripts in seconds
  4. Delivery matters — Get the response to the rep before the moment passes
  5. The system learns — Track outcomes to improve over time

Every objection is actually a buying signal in disguise. The prospect cares enough to push back. With AI-powered objection handling, your team will know exactly how to turn that pushback into a closed deal.

How to Auto-Generate Sales Proposals with Claude Code [2026]

· 10 min read
MarketBetter Team
Content Team, marketbetter.ai

Your sales team just had a great discovery call. The prospect is ready for a proposal. Now comes the bottleneck: someone needs to spend 2-4 hours pulling together a customized deck with the right case studies, accurate pricing, and messaging that addresses this specific buyer's pain points.

What if that proposal could write itself?

AI Proposal Generation Workflow

With Claude Code and the right architecture, you can reduce proposal generation from hours to minutes—while actually increasing personalization. This guide shows you how to build an AI proposal generator that pulls context from your CRM, incorporates meeting notes, and produces polished documents ready for review.

Why Manual Proposals Kill Deal Velocity

Proposals are a critical bottleneck in the sales cycle. Here's why:

Time Cost:

  • Average proposal takes 2-4 hours to create
  • Senior AEs spend 6-8 hours/week on proposals
  • At $150K OTE, that's ~$18K/year per AE on document creation

Quality Variance:

  • Junior reps produce weaker proposals than veterans
  • Copy-paste errors creep in (wrong company names, outdated pricing)
  • Generic messaging fails to address specific prospect concerns

Velocity Impact:

  • Deals stall waiting for proposals
  • Prospects go cold while documents are in progress
  • Competitors who respond faster win the deal

Time Savings: Manual vs AI Proposals

The math is simple: faster proposals = higher close rates. Teams that respond to pricing requests within 1 hour are 7x more likely to close than those who wait 24+ hours.

The Anatomy of a Great Proposal

Before automating, understand what makes proposals convert:

1. Personalization That Shows You Listened

  • References to specific pain points from discovery
  • Industry-relevant examples and metrics
  • Prospect's own language reflected back

2. Clear Value Narrative

  • Business impact, not feature lists
  • ROI calculations specific to their situation
  • Timeline to value that feels realistic

3. Social Proof That Resonates

  • Case studies from similar companies (size, industry)
  • Relevant testimonials and metrics
  • Recognizable logos when possible

4. Transparent Pricing

  • Clear breakdown of what's included
  • Options that give them control
  • Investment framed against expected return

5. Easy Next Steps

  • Single clear CTA
  • Low-friction way to move forward
  • Multiple contact options

Building the Proposal Generator with Claude Code

Step 1: Design Your Proposal Schema

First, define the structure Claude will generate:

interface Proposal {
metadata: {
prospectCompany: string;
prospectContact: string;
generatedDate: string;
validUntil: string;
version: string;
};

executiveSummary: {
headline: string;
painPointsSummary: string[];
proposedSolution: string;
expectedOutcomes: string[];
};

situationAnalysis: {
currentState: string;
challenges: Challenge[];
businessImpact: string;
};

solution: {
overview: string;
capabilities: Capability[];
implementation: ImplementationPlan;
};

socialProof: {
caseStudies: CaseStudy[];
testimonials: Testimonial[];
relevantLogos: string[];
};

investment: {
options: PricingOption[];
comparison: string;
roi: ROICalculation;
};

nextSteps: {
cta: string;
timeline: string[];
contacts: Contact[];
};
}

Step 2: Create the Context Gatherer

Claude needs rich context to generate personalized proposals. Build a function that aggregates everything:

async function gatherProposalContext(dealId) {
// Get CRM data
const deal = await hubspot.getDeal(dealId, {
associations: ['contacts', 'companies', 'meetings', 'notes']
});

// Get company info
const company = deal.associations.companies[0];
const companyData = {
name: company.name,
industry: company.industry,
size: company.numberOfEmployees,
revenue: company.annualRevenue,
website: company.website,
description: company.description
};

// Get meeting transcripts/notes
const meetingNotes = deal.associations.meetings.map(m => ({
date: m.meetingDate,
notes: m.notes,
attendees: m.attendees
}));

// Get relevant case studies from our database
const caseStudies = await findRelevantCaseStudies({
industry: company.industry,
companySize: company.numberOfEmployees
});

// Get product/pricing info
const productInfo = await getProductCatalog();
const pricingTiers = await getPricingForDealSize(deal.amount);

// Compile competitors mentioned
const competitorMentions = extractCompetitorMentions(meetingNotes);

return {
deal,
company: companyData,
meetings: meetingNotes,
caseStudies,
products: productInfo,
pricing: pricingTiers,
competitors: competitorMentions
};
}

Step 3: Build the Generation Prompt

The prompt is where the magic happens. Here's a production-tested approach:

const PROPOSAL_SYSTEM_PROMPT = `
You are an expert B2B sales proposal writer. Your proposals have an
exceptional win rate because you:

1. Lead with the prospect's specific pain points, using their exact language
2. Connect each capability to measurable business outcomes
3. Include relevant social proof (similar company size, industry)
4. Present pricing as an investment with clear ROI
5. Make next steps frictionless

STYLE GUIDELINES:
- Write in confident but not arrogant tone
- Use "you" and "your" heavily (prospect-focused)
- Avoid jargon unless the prospect used it first
- Keep sentences punchy—average 15 words
- Use numbers and specifics over generalities

FORMATTING:
- Output as JSON matching the Proposal interface
- Include 2-3 case studies maximum
- Provide 2-3 pricing options (good/better/best)
- Keep executive summary under 200 words
`;

async function generateProposal(context) {
const response = await claude.messages.create({
model: 'claude-3-5-sonnet-20241022',
max_tokens: 8000,
system: PROPOSAL_SYSTEM_PROMPT,
messages: [{
role: 'user',
content: `Generate a proposal for the following opportunity:

PROSPECT COMPANY:
${JSON.stringify(context.company, null, 2)}

DEAL CONTEXT:
- Deal Size: $${context.deal.amount}
- Stage: ${context.deal.stage}
- Products of Interest: ${context.deal.products?.join(', ')}

MEETING NOTES (Discovery Insights):
${context.meetings.map(m => `
[${m.date}]
${m.notes}
`).join('\n---\n')}

AVAILABLE CASE STUDIES:
${JSON.stringify(context.caseStudies, null, 2)}

PRICING TIERS:
${JSON.stringify(context.pricing, null, 2)}

${context.competitors.length > 0 ? `
COMPETITORS MENTIONED:
${context.competitors.join(', ')}
(Address differentiators tactfully)
` : ''}

Generate a complete, personalized proposal.`
}],
response_format: { type: 'json_object' }
});

return JSON.parse(response.content[0].text);
}

Step 4: Transform to Final Format

Claude outputs structured JSON. Now transform it to your preferred format:

async function renderProposal(proposalData, outputFormat = 'docx') {
switch (outputFormat) {
case 'docx':
return await renderToWord(proposalData);
case 'pdf':
return await renderToPDF(proposalData);
case 'slides':
return await renderToSlides(proposalData);
case 'notion':
return await renderToNotion(proposalData);
default:
return proposalData; // Return raw JSON
}
}

async function renderToWord(proposal) {
const doc = new Document({
sections: [{
properties: {},
children: [
// Cover page
new Paragraph({
children: [
new TextRun({
text: `Proposal for ${proposal.metadata.prospectCompany}`,
bold: true,
size: 48
})
],
alignment: 'center'
}),

// Executive Summary
new Paragraph({
children: [
new TextRun({ text: 'Executive Summary', bold: true, size: 32 })
]
}),
new Paragraph({
children: [
new TextRun({ text: proposal.executiveSummary.headline, bold: true })
]
}),
...proposal.executiveSummary.painPointsSummary.map(point =>
new Paragraph({ children: [new TextRun(`${point}`)] })
),

// ... continue for all sections
]
}]
});

return await Packer.toBuffer(doc);
}

Generated Proposal Mockup

Real-World Example: SaaS Proposal Generation

Let's walk through a complete example:

Input Context:

  • Company: Acme Corp (500 employees, Manufacturing, $80M revenue)
  • Deal: $45,000/year platform subscription
  • Discovery Notes: "SDR team of 12, currently using spreadsheets to track prospects. Manager complained they're 'flying blind' on pipeline. Asked about Salesforce integration."

Generated Proposal (excerpts):

{
"executiveSummary": {
"headline": "From Flying Blind to Crystal Clear: Transforming Acme's SDR Performance",
"painPointsSummary": [
"Your 12-person SDR team currently operates without centralized visibility—you described this as 'flying blind' on pipeline",
"Spreadsheet-based tracking creates data silos and makes it impossible to spot trends or coach effectively",
"Without integrated systems, reps waste hours on manual data entry instead of selling"
],
"proposedSolution": "MarketBetter's AI-powered SDR platform consolidates your prospecting, outreach, and pipeline management into a single source of truth—with native Salesforce integration you specifically asked about.",
"expectedOutcomes": [
"50% reduction in time spent on manual data entry",
"Real-time pipeline visibility for managers",
"15-20% increase in meetings booked per rep"
]
},

"socialProof": {
"caseStudies": [
{
"company": "Precision Manufacturing Co",
"industry": "Manufacturing",
"size": "450 employees",
"challenge": "SDR team working off disconnected spreadsheets",
"result": "67% increase in pipeline visibility, 23% more meetings in first quarter",
"quote": "Finally, I can see what my team is actually doing without asking for status updates."
}
]
},

"investment": {
"options": [
{
"name": "Growth",
"seats": 12,
"annual": 36000,
"features": ["Core platform", "Basic automation", "Standard integrations"],
"recommendation": false
},
{
"name": "Scale",
"seats": 12,
"annual": 45000,
"features": ["Core platform", "Advanced automation", "Salesforce integration", "Priority support"],
"recommendation": true,
"whyRecommended": "Includes the Salesforce integration you specifically need"
},
{
"name": "Enterprise",
"seats": 12,
"annual": 60000,
"features": ["Everything in Scale", "Dedicated CSM", "Custom reporting", "API access"],
"recommendation": false
}
],
"roi": {
"currentCostOfInefficiency": "$15,000/month in lost productivity",
"expectedSavings": "$8,000/month",
"paybackPeriod": "6 months"
}
}
}

Handling Edge Cases

Multiple Stakeholders

When proposals need to address different personas:

async function generateMultiStakeholderProposal(context) {
const stakeholders = context.meetings
.flatMap(m => m.attendees)
.filter(a => a.role !== 'our_team');

// Identify personas
const personas = await claude.analyze({
messages: [{
role: 'user',
content: `Categorize these stakeholders:
${JSON.stringify(stakeholders)}

Categories: Executive, Finance, Technical, End-User`
}]
});

// Generate proposal with persona-specific sections
return generateProposal({
...context,
stakeholderPersonas: personas,
additionalInstructions: `
Include these targeted sections:
- Executive Summary (for ${personas.executive?.name})
- Technical Specifications (for ${personas.technical?.name})
- ROI Analysis (for ${personas.finance?.name})
`
});
}

Competitive Situations

When prospects mention competitors, address it tactfully:

if (context.competitors.includes('competitor-x')) {
context.additionalInstructions += `
The prospect mentioned evaluating Competitor X. Include:
- A brief, factual comparison (no FUD)
- Differentiation on the specific pain points they mentioned
- A case study of a customer who switched from Competitor X

Keep comparison professional—never bash the competitor.
`;
}

Custom Pricing Requests

When standard tiers don't fit:

if (context.deal.customPricingRequested) {
const customPricing = await calculateCustomPricing({
baseSeats: context.deal.seatCount,
addOns: context.deal.requestedAddOns,
term: context.deal.contractTerm,
volume: context.company.numberOfEmployees
});

context.pricing = {
custom: true,
breakdown: customPricing,
flexibility: 'Pricing reflects your specific requirements. Let\'s discuss if anything needs adjustment.'
};
}

Integration with Your Workflow

Trigger: CRM Stage Change

// HubSpot workflow trigger
app.post('/webhooks/hubspot/deal-stage-change', async (req, res) => {
const { dealId, newStage } = req.body;

if (newStage === 'proposal_requested') {
// Gather context
const context = await gatherProposalContext(dealId);

// Generate proposal
const proposal = await generateProposal(context);

// Render to PDF
const pdf = await renderProposal(proposal, 'pdf');

// Save to deal
await hubspot.uploadFile(dealId, pdf, 'proposal.pdf');

// Notify rep
await slack.notify(context.deal.owner, {
text: `📄 Proposal generated for ${context.company.name}`,
actions: [
{ text: 'Review', url: `https://app.hubspot.com/deals/${dealId}` },
{ text: 'Send to Prospect', callback: 'send_proposal' }
]
});
}

res.sendStatus(200);
});

Human-in-the-Loop Review

Always allow reps to review before sending:

async function queueForReview(proposal, dealId) {
// Create review task
await hubspot.createTask({
dealId,
subject: 'Review Generated Proposal',
priority: 'HIGH',
notes: `AI-generated proposal is ready for review.

Check:
- [ ] Pain points accurately captured
- [ ] Pricing correct
- [ ] Case studies relevant
- [ ] No copy/paste errors

Make edits directly in the attached document.`,
dueDate: addHours(new Date(), 4)
});
}

Measuring Success

Track these metrics to quantify proposal automation ROI:

MetricBeforeAfterImpact
Time to proposal3 hours15 min-92%
Proposals/week/rep28+300%
Win rate25%31%+24%
Response time2 days4 hours-83%
Copy errors12/month0/month-100%

The compounding effect is significant. If faster proposals increase close rates by just 6%, and your reps can produce 4x more proposals, the revenue impact is dramatic.

Getting Started with MarketBetter

Building your own proposal generator is powerful, but it takes time. MarketBetter offers proposal automation as part of the complete AI SDR platform:

  • One-click proposals from any deal in HubSpot or Salesforce
  • Smart case study matching based on prospect industry and size
  • Dynamic pricing that pulls from your CPQ configuration
  • Brand-compliant templates that match your company guidelines
  • Version tracking so you know what was sent when

Combined with AI lead research, automated follow-ups, and pipeline monitoring, it creates a system where proposals are generated in the flow of work—not a bottleneck that delays them.

Book a Demo →

Key Takeaways

  1. Manual proposals waste senior AE time — $18K/year per rep on document creation
  2. Speed wins deals — Responding in 1 hour vs 24 hours increases close rate 7x
  3. Claude Code enables intelligent generation — Pull CRM data + meeting context + case studies
  4. Structure matters — Define schemas so output is consistent and renderable
  5. Always human-in-the-loop — AI generates, humans approve and send

Your proposals are often the first professional deliverable a prospect sees. Make sure they're personalized, polished, and prompt. With AI, you can have all three.