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 |
| Topics | Agent skills and topic definitions with instructions |
| Tools | 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 App Manager
Click New Connected App in the top-right corner
Configure the basic information:
- Connected App Name:
CapsuleSecurity - API Name:
CapsuleSecurity(auto-populated) - Contact Email: Enter your admin email address
- Connected App Name:
Enable OAuth and configure the required scopes and security settings.
Scroll down to the API (Enable OAuth Settings) section
Check Enable OAuth Settings
Enter the Callback URL:
https://portal.us-east1.capsulesecurity.io/integrations/callback/AGENTFORCEAdd the following Selected OAuth Scopes (click Add for each):
- Manage user data via APIs (api)
- Perform requests at any time (refresh_token, offline_access)
- Access chatbot services (chatbot_api)
- Access the Salesforce API Platform (sfap_api)
Configure security settings:
- Check Require Secret for Web Server Flow
Click Save at the bottom of the page
Click Continue on the confirmation dialog
Your Connected App settings should look like this:

| Scope | Purpose |
|---|---|
| api | Access Salesforce data and metadata |
| refresh_token, offline_access | Maintain persistent connection for scheduled syncs |
| chatbot_api | Access Agentforce conversation and bot data |
| sfap_api | Access the Salesforce API Platform for agent configuration |
Enable Einstein auditing to capture agent conversations in Capsule. Without this, conversation data may not be available.
In Setup, search for Einstein Setup in the Quick Find box
Click Einstein Setup
Ensure Einstein is turned On
Locate Einstein Audit and Feedback Data and toggle it On
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
Link your Connected App to your Agentforce agent to enable API access.
In Setup, search for Agentforce Agents in the Quick Find box
Click the name of your agent
Click Open in Builder
In Agentforce Builder, click the Connections tab
If you see an option to turn on the updated connections experience, click Turn It On
Select the Messaging connection
Scroll down to the External Apps section
Click Add External App
Select API as the connection type
Choose your CapsuleSecurity connected app from the dropdown
Click Save
Retrieve the Consumer Key and Secret from your Connected App.
Click the gear icon in the top-right corner and select Setup
In the Quick Find box, search for App Manager
Find CapsuleSecurity in the list
Click the dropdown arrow on the right side of the row and select View
Scroll down to the API (Enable OAuth Settings) section
Next to Consumer Key and Secret, click Manage Consumer Details
You may need to verify your identity (Salesforce will send a verification code)
Copy the Consumer Key and Consumer Secret
- Store these credentials securely
- Never share them in emails, chat, or code repositories
- The Consumer Secret is only shown once—copy it immediately
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:
- Consumer Key: Paste from Step 5
- Consumer Secret: Paste from Step 5
Click Connect
You will be redirected to Salesforce to authorize the connection
Review the permissions and click Allow
You will be redirected back to Capsule upon successful connection
- 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 |
| Topics | Topic | Agent skills with instructions and guidance |
| 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 |
| External Services | Tool | External service integrations |
| Predictive Models | Tool | ML models used for predictions |
| Slack Channels | Access Channel | Slack deployment integrations |
When Einstein Audit is enabled, Capsule also captures:
- User messages — Input from users interacting with agents
- Agent responses — Generated responses from Agentforce
- Topic classifications — How the agent categorized the conversation
- Tool invocations — Actions and tools executed during the conversation
- Session metadata — Timestamps, session IDs, and channel information
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 its topics and tools
Navigate to Observability
Filter by Activity Type → Session
Look for recent Agentforce conversations
Click on a session to view the full conversation transcript
- Ensure the Connected App is saved and activated
- Wait a few minutes for Salesforce to propagate the changes
- Verify you have the correct OAuth scopes configured
- 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:
https://portal.us-east1.capsulesecurity.io/integrations/callback/AGENTFORCE - Ensure all required OAuth scopes are selected
- Check that Client Credentials Flow is enabled
- Verify the agent is Activated in Agentforce
- Check that the Connected App is linked to the agent (Step 4)
- 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