skills/sixtysecondsapp/use60/Slack Pipeline Query

Slack Pipeline Query

SKILL.md

Available Context & Tools

@_platform-references/org-variables.md @_platform-references/capabilities.md

Slack Pipeline Query

Goal

Give the user a fast, structured pipeline snapshot they can read in Slack in under 10 seconds. Include stage breakdown, quota tracking, and pipeline coverage so they can assess their quarter at a glance.

Response Structure

Header

"Pipeline Summary — Q{N} {Year}" (calculate current quarter from current month)

Top-Level Fields (2x2 grid)

  • Total Pipeline: sum of all active deal values
  • Weighted Value: probability-weighted pipeline value
  • Active Deals: total deal count
  • At Risk: count of deals with risk score >= 60, or ":white_check_mark: None"

Stage Breakdown

"By Stage:" followed by bullet list sorted by stage value descending: • *Stage Name*: N deal(s) — £Value

Group deals by their stage field and sum values per stage.

Quota Section (show only if target data is available)

Fields: Target | Gap to Target | Pipeline Coverage | Quarter Phase

  • Gap to Target: weighted_value - target
    • Positive gap (over target): ":white_check_mark: On track"
    • Negative gap (under target): ":warning: £{gap} gap"
  • Pipeline Coverage: total_value / target formatted as {N}x
    • Healthy: ≥ 3x
    • Warning: 2-3x
    • At risk: < 2x
  • Quarter Phase: derive from current month position
    • Month 1 of quarter: "early Q{N}"
    • Month 2: "mid Q{N}"
    • Month 3: "late Q{N}"

Footer

Context: link to full pipeline view | "Ask me 'which deals are at risk?' for details"

Data Sources

  • Pipeline snapshot: execute_action("get_pipeline_snapshot", { owner: slack_user_id })
    • Returns: total_value, weighted_value, deal_count, target (nullable)
  • Active deals: execute_action("list_deals", { status: "active", owner: slack_user_id })
    • Used for stage breakdown
  • Risk scores: execute_action("get_deal_risk_scores", { owner: slack_user_id })
    • Used for at-risk count

Quarter Calculation

const now = new Date();
const month = now.getMonth(); // 0-11
const quarterNumber = Math.floor(month / 3) + 1;
const quarterMonth = month % 3; // 0=early, 1=mid, 2=late

Response Constraints

  • Currency values: format as £/$ with K/M shorthand for readability (e.g., £1.2M, £450K)
  • Show stage breakdown even when no quota target is available
  • If no deals exist: return plain text "No pipeline data available. Create some deals to get started."
  • At-risk count: only count risk score >= 60, not all risk scores
  • Pipeline coverage ratio: round to 1 decimal (e.g., 2.4x)

Error Cases

  • No pipeline data / no deals: Plain text: "No pipeline data available. Create some deals to get started."
  • No quota target set: Show pipeline metrics without the quota section — do not show empty target fields
  • Missing risk scores: Show "—" for at-risk count rather than erroring
Weekly Installs
0
First Seen
Jan 1, 1970