Use Cases
Common Use Cases
- Deal stage change alerts
- Closed-won celebrations
- At-risk deal warnings
- Pipeline review reminders
Before You Begin
Prerequisites
- Salesforce account with API access
- Slack workspace with bot
Walkthrough
Step-by-Step Guide
1
Configure Salesforce MCP Server
Set up with your Salesforce connected app credentials.
2
Configure Slack MCP Server
Set up with your Slack bot token.
3
Monitor Pipeline Changes
Poll Salesforce for opportunity stage changes and post to Slack.
async function monitorDeals() {
const changed = await salesforce.query("SELECT Id, Name, StageName, Amount, Owner.Name FROM Opportunity WHERE LastModifiedDate > LAST_N_MINUTES:5 AND StageName != null");
for (const opp of changed.records) {
if (opp.StageName === "Closed Won") {
await slack.sendMessage({ channel: "#wins", text: `🎉 Deal closed! *${opp.Name}* - $${opp.Amount.toLocaleString()} by ${opp.Owner.Name}` });
}
}
}4
Add Deal Risk Alerts
Alert when deals are stuck in a stage too long or past their close date.
Examples
Code Examples
typescript
Risk Monitor
async function checkAtRiskDeals() {
const stale = await salesforce.query("SELECT Name, StageName, LastModifiedDate FROM Opportunity WHERE IsClosed=false AND LastModifiedDate < LAST_N_DAYS:14");
if (stale.totalSize > 0) {
await slack.sendMessage({ channel: "#sales", text: `⚠️ ${stale.totalSize} deals haven't been updated in 14+ days` });
}
}Help
Troubleshooting
How do I avoid duplicate notifications?+
Can I route to different channels per team?+
Quick Info
DifficultyBeginner
Time Estimate30 minutes
Tools
Salesforce MCP ServerSlack MCP Server