Closed-lost debrief
Your CRM posts the deal to a webhook when it moves to Closed lost, with the notes, emails and call summaries attached. Claude reads the history, picks the real reason from your list with the evidence for it, says what would have changed the outcome, and suggests when and why to re-engage. The debrief goes to your CRM and to the sales channel.
- Write debrief Claude API · Opus 5
- Update CRM Shell
- Post to Slack Shell
What each step does
Write debrief
Claude API · Opus 5Reads the deal history and picks the loss reason, with evidence, lessons and a re-engage date.
Update CRM
ShellSends the reason and debrief to your CRM.
Post to Slack
ShellPosts the debrief to the sales channel.
From copy to first run
- Copy the pipeline JSON with the button above.
- In Jimothy, open Pipelines → New pipeline, paste it under “Or import a pipeline JSON” and click Import.
- Fill in the variables below under Pipeline settings → Variables.
- Triggers → Add trigger → Webhook. Have your CRM (or a Zapier step) post deals that move to Closed lost, with the fields below.
Send title (company), description (the deal’s notes, emails and call summaries), key (the deal id) and the extra fields amount, owner and competitor.
What to fill in
The prompts and commands read these as {{vars.<name>}}. The examples are placeholders: replace them with your own.
| Variable | What to put in it | Example |
|---|---|---|
reasons | Your loss reasons. The debrief picks exactly one. | price, missing feature, competitor, timing, no decision, champion left, poor fit |
crmWebhookUrl | Where the debrief goes, e.g. a Zapier hook that sets the loss reason and a follow-up task. | — |
slackWebhookUrl | A Slack incoming webhook for the sales channel. | — |
Show the pipeline JSON
{
"jimothyPipeline": 1,
"name": "Closed-lost debrief",
"description": "Works out why a deal was lost, files the reason in your CRM, and sets a date to re-engage.",
"icon": "rocket",
"color": "#0369a1",
"repo": {
"mode": "scratch"
},
"concurrency": 3,
"variables": {
"reasons": "price, missing feature, competitor, timing, no decision, champion left, poor fit",
"crmWebhookUrl": "",
"slackWebhookUrl": ""
},
"steps": [
{
"id": "debrief",
"name": "Write debrief",
"type": "agent",
"description": "Reads the deal history and picks the loss reason, with evidence, lessons and a re-engage date.",
"harnessId": "anthropic-api",
"model": "claude-opus-5",
"timeoutMinutes": 10,
"passPattern": "^\\s*REASON:\\s*\\S",
"prompt": "Deal {{issue.key}}: {{issue.title}}, {{issue.raw.amount | default:\"amount unknown\"}}, owner {{issue.raw.owner | default:\"unknown\"}}, competitor {{issue.raw.competitor | default:\"none recorded\"}}.\n\nHistory:\n{{issue.description | truncate:60000}}\n\nWrite a closed-lost debrief. Start with exactly one line \"REASON: <one of: {{vars.reasons}}>\", then the line \"*Closed lost: {{issue.title}}* ({{issue.raw.amount | default:\"amount unknown\"}})\". Then:\n*Evidence*: two or three quotes or facts from the history that show it\n*What would have changed it*: specific, about our process or product, not the buyer\n*Re-engage*: a month and the trigger to watch for, or \"Don't\" with why\n*Lesson for the team*: one sentence\nBase everything on the history; say when it doesn't support a conclusion."
},
{
"id": "crm",
"name": "Update CRM",
"type": "shell",
"description": "Sends the reason and debrief to your CRM.",
"dependsOn": [
"debrief"
],
"timeoutMinutes": 2,
"command": "printf '{\"deal\":%s,\"reason\":%s,\"debrief\":%s}' {{issue.key | json}} {{steps.debrief.output | first_line | json}} {{steps.debrief.output | json}} | curl -fsS -X POST -H 'Content-Type: application/json' --data @- {{vars.crmWebhookUrl}}"
},
{
"id": "post",
"name": "Post to Slack",
"type": "shell",
"description": "Posts the debrief to the sales channel.",
"dependsOn": [
"debrief"
],
"timeoutMinutes": 2,
"command": "printf '{\"text\":%s}' {{steps.debrief.output | json}} | curl -fsS -X POST -H 'Content-Type: application/json' --data @- {{vars.slackWebhookUrl}}"
}
]
}More for sales, and beyond
Discovery call prep
When someone books a call, researches the company and the person and posts a one-page call brief to Slack before the meeting.
SalesCall notes → CRM and follow-up
Turns a call transcript into structured CRM fields and a follow-up email. You approve the email; both go to your CRM.
SalesSecurity questionnaire answers
Answers an RFP or security questionnaire from your library of past answers and policies, cites the source for each, and marks what needs an expert.