Slack Coaching Query
Available Context & Tools
@_platform-references/org-variables.md @_platform-references/capabilities.md
Slack Coaching Query
Goal
Give the user actionable sales coaching in Slack — either specific objection-handling advice or a quick performance snapshot. Coaching should be concrete, not generic.
Intent Patterns
Objection Handling (AI-powered)
Triggered when objection_type is extracted from the message.
Use Claude Haiku to generate concise, actionable advice with 2-3 specific response frameworks or phrases.
System prompt: "You are a sales coaching expert. Give concise, actionable advice for handling sales objections. Include 2-3 specific response frameworks or phrases. Keep it under 200 words."
Response format:
- Section:
*Handling: "{objection}"* - Divider
- Section: AI-generated advice (formatted with line breaks for readability)
- Divider
- Context: "Based on general sales best practices. Your team's specific win data will improve this over time."
Fallback (no AI available):
- Section:
*Handling: "{objection}"* - Section: "I'd give you specific advice, but the AI service is temporarily unavailable. General tips:"
- Bullet list: general objection handling principles
- Acknowledge the concern genuinely
- Ask clarifying questions to understand the root cause
- Reframe around value and business outcomes
- Share relevant proof points and case studies
- Context: "Try again in a moment for AI-powered advice."
Performance Snapshot
Triggered when message matches: "how am I", "performance", "doing", "stats", "metric"
Fetch pipeline data and build a quick scorecard.
Response format:
- Section: "Your Performance Snapshot:"
- Fields (2x2):
- Active Deals: count
- Pipeline Value: total value
- Meetings This Week: count of meetings since start of current week
- Weighted Pipeline: probability-weighted value
- Divider
- Context: "For detailed coaching insights, check your weekly coaching digest.\nAsk me 'which deals are at risk?' or 'show my pipeline' for more detail."
General Coaching (context-aware)
Triggered when no specific objection is mentioned and not a performance query.
Generate pipeline-aware tips based on current deal state:
- If deals at risk (score >= 60): "You have N deal(s) at risk — consider focused attention there."
- If many deals in Discovery (3+): "N deals in Discovery — focus on qualifying and advancing these."
- If pipeline looks healthy: "Your pipeline looks healthy. Keep up the momentum!"
Response format:
- Section: "Quick Coaching:"
- Bullet list of context-aware tips
- Divider
- Context: Suggested follow-up questions the user can ask:
- "How should I handle budget objections?"
- "Which deals need attention?"
- "Show my performance stats"
Data Sources
- Performance metrics:
execute_action("get_pipeline_snapshot", { owner: slack_user_id }) - Active deals:
execute_action("list_deals", { status: "active", owner: slack_user_id }) - Risk scores:
execute_action("get_deal_risk_scores", { owner: slack_user_id }) - Meetings:
execute_action("list_meetings", { owner: slack_user_id, days_back: 7 })
Week Calculation for Meeting Count
const now = new Date();
const weekStart = new Date(now);
weekStart.setDate(now.getDate() - now.getDay()); // Sunday of current week
const thisWeekMeetings = meetings.filter(m => new Date(m.start_time) >= weekStart);
Response Constraints
- Objection advice: max 200 words — concise beats comprehensive in Slack
- Include 2-3 specific response frameworks, not abstract principles
- Performance snapshot: use same currency formatting as pipeline query (£/$ with K/M)
- General coaching: max 3 tips — focus on the most impactful actions
- Always end with suggested follow-up questions to drive engagement
- Tone: direct, encouraging, specific — avoid generic motivational phrases
Error Cases
- AI unavailable for objection advice: Show structured fallback with general principles (never return an empty response)
- No pipeline data for performance: Show what's available, note missing data explicitly
- No deals at all: Skip deal-specific coaching tips, focus on prospecting advice