Auto-build a deal battlecard from past wins and losses
When a deal reaches qualification, your rep gets a short brief on the closest past deals, what won or lost them, and which case studies to send.
When a deal in HubSpot moves into a qualification stage, I want an agent to build a short battlecard for whoever owns it. Trigger this from a HubSpot webhook on deal stage changes, and only continue when the new stage is one of my qualification stages. Ignore stage changes that move a deal anywhere else.
Start by pulling the record with Get Deal using the deal ID from the webhook payload. Read the deal name, the associated company, the amount, the current stage and the owner. If industry is not set on the deal itself, follow the associated company and read it with Get Company. Resolve the owner with Get Owner so you have their name and email address.
Then search my Pinecone index of past closed deal notes, win/loss write-ups and case studies with Search Records to find the most similar deals we have already run. Build the query text out of what you just read: company name, industry, deal size, and anything else on the record that describes the shape of the deal. Ask for around ten matches and use reranking so the strongest comparisons come back first.
Only cite a past deal if its similarity score is above a threshold I can adjust. Default the threshold to 0.75 and put it somewhere obvious at the top of the workflow so I can tune it without digging through the logic. Discard everything below the threshold rather than demoting it to a weak mention. If nothing clears the threshold, say plainly that we have no close comparison for this deal in the index and stop there instead of stretching a weak match into false confidence. A brief that tells me there is no precedent is more useful than one that confidently cites a deal that is not really similar.
Write the battlecard as short plain text, no more than about 300 words. Cover which past deals resemble this one and why, what won or lost each of them, the objections that came up and how they were handled, and the two case studies worth sending to this buyer. Name every past deal you cite and note how close the match is, so the rep can judge the evidence rather than taking the summary on trust.
Attach the finished brief to the deal with Create Note, associated with the deal record so it shows up on the timeline. Then send the same text to the deal owner in Slack: open a direct message channel to them with Open a Conversation and post the brief with Send a Message, including a link back to the deal in HubSpot. If the owner cannot be matched to a Slack member, fall back to posting the brief in a sales channel I name and mention the owner by name in the text.
Assume the Pinecone index is already populated with past deal notes, win/loss write-ups and case studies. This workflow only reads from the index, it should never write back to it.
What does this prompt do?
- Fires the moment a deal moves into a qualification stage in your CRM, so the brief arrives while the rep is still working the deal.
- Searches your library of past deal notes, win/loss write-ups and case studies to find the deals that genuinely resemble this one.
- Writes a short battlecard covering what won or lost those deals, the objections that came up, and the two case studies worth sending.
- Saves the brief onto the deal record and sends the same text to the deal owner in Slack.
What do I need to use this?
- A HubSpot account with a sales pipeline that has a qualification stage.
- A Pinecone index that already holds your past deal notes, win/loss write-ups and case studies.
- A Slack workspace so the brief can reach the person who owns the deal.
- Deal owners filled in on your deals, so each brief goes to the right rep.
How can I customize it?
- The similarity threshold, which decides how close a past deal has to be before it gets cited. Raise it for only very strong matches, lower it if you would rather see more comparisons.
- Which pipeline stage sets this off, and how many past deals and case studies the brief includes.
- Where the brief lands: a direct message to the deal owner, or a shared sales channel the whole team can see.
FAQs
What happens if none of our past deals are a good match?
Where does the past deal knowledge actually come from?
Will this change anything in our CRM?
Can the brief go to a shared channel instead of a direct message?
Does this work on a standard HubSpot plan?
Related templates
When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.
Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.
Twice every weekday, the conversations from your social inbox land on the right HubSpot contact timelines, with a Slack recap for sales.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every morning, find the addresses that hard bounced or filed a spam complaint, update the matching HubSpot contacts, and post a short Slack recap.
When a HubSpot deal hits Closed Won, the customer's plan, seats and renewal dates land in your DynamoDB accounts table, with a Slack note showing what changed.
Put your win and loss history to work on every new deal.
Set this up once and every qualifying deal arrives with the relevant history already attached.