Connect your Salesforce Agentforce environment to Capsule Security for complete visibility into your AI agents, topics, actions, and conversation activity.
This integration syncs your Agentforce agents and captures conversation data:
| Category | What Gets Captured |
|---|---|
| Agents | Agentforce bots with configuration, status, and metadata |
| Subagents | Subagents with instructions |
| Tools | Tools the subagents can use like Apex actions, Flows, APIs, Prompt Templates, External Services |
| Data Sources | Retrievers and knowledge base components |
| Channels | Slack and other deployment channels |
| Conversations | User messages, agent responses, and tool invocations |
Before you begin, ensure you have:
- Agentforce enabled with at least one activated agent
- Data Cloud enabled (required for Einstein Audit and Feedback Data)
- Salesforce Administrator or equivalent permissions
- Einstein enabled in your org (required for conversation auditing)
Create a Connected App in Salesforce to enable secure OAuth authentication with Capsule.
Click the gear icon in the top-right corner and select Setup
In the Quick Find box on the left, search for External Client App Manager
Click New External Client App in the top-right corner
Basic Information:
- External Client App Name:
CapsuleSecurity - API Name:
CapsuleSecurity(auto-populated) - Contact Email: Enter your admin email address
- External Client App Name:
API
- Enable OAuth
- Callback URL
https://portal.eu-west4.capsulesecurity.io/integrations/callback/AGENTFORCE https://portal.us-east1.capsulesecurity.io/integrations/callback/AGENTFORCEAdd the following Selected OAuth Scopes (click Add for each):
- Manage user data via APIs (api)
Flow Enablement:
- Client Credential Flow
Security (Default Values):
- Require Secret for Web Server Flow
- Require secret for Refresh Token Flow
- Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows
Click Create at the bottom of the page. Your Connected App settings should look like this:

- Under Policies open OAuth Policies click Enable Client Credentials Flow and add the user we should use its scope
| Scope | Purpose |
|---|---|
| api | Access Salesforce data and metadata |
- Go to settings and under OAuth Settings and click Consumer Key and Secret
Enable Einstein auditing to capture agent conversations in Capsule. Without this, conversation data may not be available.
In Setup, search for Einstein Audit, Analytics, and Monitoring Setup
Turn on:
- Audit and Feedback
- Agentforce Session Tracing
Einstein Audit and Feedback Data enables conversation logging for Agentforce agents. This allows Capsule to capture:
- User messages and agent responses
- Topic classifications
- Tool invocations and results
- Session metadata
Connect your Salesforce org to Capsule using the credentials from Step 5.
Log in to the Capsule Security portal
Click Integrations in the left sidebar
Find the Salesforce Agentforce card and click Set up Integration
Enter your credentials:
- Domain name: From the URL
- Consumer Key: Paste from Step 1
- Consumer Secret: Paste from Step 1
Click Connect
- Initial sync begins automatically
- First sync may take several minutes depending on data volume
- View synced agents in Inventory → Agents
- View conversations in Observability → Filter Activity Type - Session
Capsule captures the following data from your Agentforce environment:
| Entity Type | Category | Description |
|---|---|---|
| Agentforce Agents | Model Agent | Bot configuration, status, languages, tone settings |
| Apex Actions | Tool | Custom Apex code invoked by agents |
| Flow Actions | Tool | Salesforce Flow automations triggered by agents |
| API Actions | Tool | REST API endpoints called by agents |
| Prompt Templates | Tool | Templates for generating agent responses |
| Retrievers | Data Source | Knowledge base and data retrieval components |
| RAGs | Data Source | Agent RAGs |
| External Services | Tool | External service integrations |
| Predictive Models | Tool | ML models used for predictions |
| Slack Channels | Access Channel | Slack deployment integrations |
After setup, verify that data is syncing correctly.
In Capsule, navigate to Inventory → Agents
Look for your Agentforce agents in the list
Click on an agent to view it
Navigate to Observability
Look for recent Agentforce conversations
Click on a session to view the full conversation transcript
- Verify Einstein Audit and Feedback Data is enabled
- Check that your agent is activated and has handled conversations
- Initial sync may take several minutes
- Verify the Callback URL matches exactly the URL is step 1
- Ensure all required OAuth scopes are selected
- Check that Client Credentials Flow is enabled
- Verify the agent is Activated in Agentforce
- Ensure your Salesforce user has permission to access the agent
For help with this integration:
- Email: support@capsule.security
- Include: Your Salesforce Org ID, integration status, and any error messages
For Salesforce Agentforce issues:
- Salesforce Help: help.salesforce.com
- Agentforce Documentation: developer.salesforce.com/docs/einstein/genai