Skip to main content

AI Intelligence Layer

PILLAR integrates Anthropic’s Claude AI to provide contextual intelligence across scoring, signals, account analysis, and recommended actions. All AI features use the Claude API with organization-scoped data isolation.

AI Capabilities

1. Pre-Computed Signal Actions

When CRITICAL signals are generated, Claude analyzes the full account context and produces role-specific recommended actions.
ComponentDetail
ModelClaude (via Anthropic API)
TriggerScoring cron detects CRITICAL signal
InputSignal data + account context (ARR, health, contacts, deals, renewal date)
OutputContextual action, reasoning, urgency, confidence score
Storagesignals.ai_action (JSONB)
Cost~$0.01 per signal, capped at 10 per cron run
FallbackRule-based actions from role-actions.ts
Example output:
{
  "action": "Schedule executive sponsor call with Springfield SD. Their renewal is in 45 days with $350K ARR at risk. Superintendent Dr. Williams has been unresponsive since January.",
  "reasoning": "High-value renewal with declining engagement and no executive touchpoint in 8 months. Executive intervention increases save rate by 3x on deals over $100K.",
  "urgency": "immediate",
  "confidence": 92
}

2. Account Intelligence

On-demand AI analysis accessible via Account 360.
EndpointPurpose
/api/ai/account-intelligenceDeep account analysis with deal strategy, risk assessment, expansion opportunities
/api/ai/narrativeAI-generated account narrative for meeting prep and QBRs
/api/ai/action-planStrategic action plan generation for specific accounts
/api/ai/coachingRep coaching suggestions based on deal patterns
/api/ai/board-narrativeBoard-ready narrative generation for executive reporting

3. Role-Specific Action Routing

Each signal type has role-appropriate recommended actions defined in role-actions.ts:
RoleAction StyleExample
CRO/CEOStrategic, executive-level”Schedule executive sponsor call. Your involvement increases save rate by 3x.”
VP SalesCoaching, pipeline-focused”Coach rep on deal strategy. Review next steps and decision timeline.”
VP CSRetention, relationship-focused”Assign save play to senior CSM. Review renewal terms.”
RevOpsAnalytical, data-focused”Pull renewal history and usage data. Prepare executive briefing package.”
Rep/CSMTactical, action-oriented”Execute save play tasks. Schedule customer check-in within 48 hours.”

4. Weekly Digest Intelligence

The weekly digest email includes AI-curated highlights:
  • Top risk accounts with context
  • Pipeline movement summary
  • Recommended focus areas for the week

Configuration

SettingLocationDefault
ANTHROPIC_API_KEYVercel Environment VariablesRequired for AI features
AI enrichment capScoring cron10 signals per org per run
TemperatureAI action generation0.2 (low, for consistency)
Max tokensAI action generation300

Data Privacy

  • AI prompts include only the authenticated organization’s data
  • No cross-org data leakage in AI context
  • AI outputs are stored per-signal, scoped by org_id
  • Anthropic does not train on API data (per their data policy)

AI-Generated Fields

TableFieldTypeDescription
signalsai_actionJSONBAI-generated recommended action with reasoning and confidence
accountsai_adoption_summaryTEXTStarbridge AI adoption analysis
accountsstartup_friendliness_summaryTEXTStarbridge startup friendliness analysis
accountspropensity_to_spend_summaryTEXTStarbridge spending propensity analysis
accountsprocurement_summaryTEXTStarbridge procurement navigation guide