InsightForce
Slack intelligence for AgentForce
Built on Agentforce and a hand-crafted OAS 3.0 spec against the Slack Web API. The pipeline runs on Salesforce platform primitives — External Credential, Named Credential, External Service, and Invocable Actions — terminating in four Agent Actions in Agent Builder. All intelligence persists into a six-object custom data model. No middleware, no iPaaS. Requires Salesforce Enterprise, an Agentforce license, and Slack Business+ or Enterprise Grid.
InsightForce — Solution Overview
InsightForce is a Salesforce-native Slack intelligence layer built on Agentforce. It captures organizational signal from Slack conversations, structures it into a purpose-built Salesforce data model, and surfaces it through an AI agent that leadership can query directly from within the CRM. No middleware. No manual extraction. No third-party sync.
The integration pipeline is built entirely on Salesforce platform primitives: a hand-crafted OAS 3.0 spec registered as an External Service, authenticated via External Credential and Named Credential, and exposed as Invocable Actions that feed four Agent Actions in Agentforce Agent Builder. The agent uses Flex prompt templates for auto-categorization and executive digest generation, and writes all captured intelligence into a six-object custom data model.
How It Works
When a user queries the InsightForce agent, it routes the request to one of four topics — Search & Retrieve, Capture & Categorize, Trend Detection, or Leadership Digest. Each topic maps to one or more Agent Actions backed by live Slack API calls: channel search, conversation history retrieval, thread traversal, and message write-back. Retrieved content is processed through prompt templates and persisted into Salesforce as structured records, making every captured insight searchable, reportable, and actionable from inside the org.
The agent operates on a shared bot token (xoxb-) with scoped OAuth permissions and routes all API traffic through Salesforce's Named Credential framework, keeping authentication centralized and auditable.
Integration Architecture
The end-to-end pipeline follows a single pattern:
OAS 3.0 Spec → External Service → Named Credential → Invocable Action → Agent Action → Agentforce Agent
Four Slack operations are defined in the spec and registered as External Service operations in Salesforce:
Operation | Method | Slack Endpoint |
|---|---|---|
searchSlackContext | GET | /search.messages |
getConversationHistory | GET | /conversations.history |
getThreadReplies | GET | /conversations.replies |
postMessage | POST | /chat.postMessage |
Authentication uses a Custom-type External Credential with a Bearer token on a shared principal. The Named Credential binds to https://slack.com/api as the base URL. Each External Service operation auto-generates an Invocable Action, which is then manually registered as an Agent Action and scoped to the InsightForce agent in Agent Builder.
Data Model
Six custom objects, deployed in three waves to resolve cross-object dependencies.
Insight__c — Core Intelligence Record
Every captured Slack signal lands here. The central object in the data model.
Field | Type | Notes |
|---|---|---|
Slack_Message_ID__c | Text(255) | Unique external ID, used for upsert |
Slack_Channel_ID__c | Text(255) | Source channel reference |
Slack_Thread_TS__c | Text(50) | Thread timestamp for reply traversal |
Message_Text__c | Long Text Area(32768) | Raw Slack message content |
Author_Slack_ID__c | Text(50) | Slack user ID of originating author |
Category__c | Picklist | Product Feedback, Decision, Risk, Action Item, Question, Signal |
Urgency__c | Picklist | Critical, High, Medium, Low |
Captured_Date__c | DateTime | Auto-set on record creation |
Summary__c | Long Text Area(2000) | Agent-generated summary via prompt template |
Status__c | Picklist | New, Under Review, Actioned, Archived |
Source_URL__c | URL | Deep link back to originating Slack message |
Contributor__c — Slack User Profiles
Slack users enriched with Salesforce context. Created or updated at capture time.
Field | Type | Notes |
|---|---|---|
Slack_User_ID__c | Text(50) | Unique external ID |
Slack_Display_Name__c | Text(255) | |
Slack_Real_Name__c | Text(255) | |
Email__c | Used to resolve to Salesforce User record | |
Salesforce_User__c | Lookup(User) | Optional — resolved post-capture |
Department__c | Text(255) | |
Title__c | Text(255) | |
Insight_Count__c | Roll-Up Summary | COUNT of related Insight__c records |
Trend__c — Detected Themes
Agent-identified recurring themes across Insight__c records. Created and incremented by the Trend Detection topic.
Field | Type | Notes |
|---|---|---|
Trend_Name__c | Text(255) | Agent-generated label |
Description__c | Long Text Area(2000) | |
First_Detected__c | DateTime | |
Last_Updated__c | DateTime | |
Signal_Count__c | Roll-Up Summary | COUNT of related Insight_Reference__c records |
Category__c | Picklist | Mirrors Insight__c category values |
Status__c | Picklist | Emerging, Active, Resolved |
Product_Feature_Request__c — Structured Product Signal
Created when the categorization prompt template identifies product feedback. Links back to the source Insight__c record.
Field | Type | Notes |
|---|---|---|
Insight__c | Lookup(Insight__c) | Source insight record |
Feature_Title__c | Text(255) | |
Description__c | Long Text Area(2000) | |
Requested_By__c | Lookup(Contributor__c) | |
Priority__c | Picklist | P0, P1, P2, P3 |
Vote_Count__c | Number | Incremented on duplicate signal detection |
Status__c | Picklist | Open, In Review, Planned, Declined |
Correction_of_Error__c — Risk and Process Failure Capture
Created when categorization identifies a process failure, misalignment, or risk signal in Slack.
Field | Type | Notes |
|---|---|---|
Insight__c | Lookup(Insight__c) | Source insight record |
Title__c | Text(255) | |
Root_Cause__c | Long Text Area(2000) | |
Identified_By__c | Lookup(Contributor__c) | |
Date_Identified__c | Date | |
Resolution__c | Long Text Area(2000) | |
Status__c | Picklist | Open, In Progress, Resolved |
Severity__c | Picklist | Critical, High, Medium, Low |
Insight_Reference__c — Trend Junction Object
Many-to-many junction between Insight__c and Trend__c. Carries an agent-assigned relevance score.
Field | Type | Notes |
|---|---|---|
Insight__c | Master-Detail(Insight__c) | |
Trend__c | Master-Detail(Trend__c) | |
Relevance_Score__c | Number(5,2) | 0.00–1.00, assigned by trend detection prompt |
Notes__c | Text Area(1000) |
Object Relationships
Deployment Sequence
Three-wave deployment to satisfy Salesforce metadata dependency resolution.
Wave | Objects Deployed | Dependency Reason |
|---|---|---|
1 | Contributor__c, Trend__c, Insight__c | No cross-object lookups; standalone objects |
2 | Product_Feature_Request__c, Correction_of_Error__c | Lookup dependencies on Insight__c and Contributor__c |
3 | Insight_Reference__c | Master-Detail on both Insight__c and Trend__c |
Agent Topics and Actions
Topic | Agent Actions Used | Output |
|---|---|---|
Search & Retrieve | searchSlackContext, getConversationHistory | Ranked message results returned in-agent |
Capture & Categorize | getConversationHistory, getThreadReplies | Insight__c record created or upserted |
Trend Detection | Internal — queries Insight__c | Trend__c records created; Insight_Reference__c written |
Leadership Digest | Internal + postMessage | Executive summary generated; optionally posted to Slack |
Prompt Templates
Both templates use the Agentforce Flex Template type and are invoked inline by Agent Actions.
Auto-Categorization
Input: raw Message_Text__c. Output: JSON payload mapping to Category__c, Urgency__c, and Summary__c. Markdown stripped before upsert.
Executive Summary
Input: merged Insight__c records from a configurable lookback window, filtered by urgency threshold. Output: structured digest covering recurring themes, key decisions, open risks, and recommended actions. Can be piped directly to postMessage for Slack delivery to a designated leadership channel.
Requirements
Requirement | Minimum |
|---|---|
Salesforce Edition | Enterprise |
Agentforce | Actions + Agent Builder license |
Slack Plan | Business+ or Enterprise Grid |
Slack OAuth Scopes | channels:history, channels:read, search:read, chat:write |



