Skip to content

Connect your Salesforce Agentforce environment to Capsule Security for complete visibility into your AI agents, topics, actions, and conversation activity.

Overview

This integration syncs your Agentforce agents and captures conversation data:

CategoryWhat Gets Captured
AgentsAgentforce bots with configuration, status, and metadata
SubagentsSubagents with instructions
ToolsTools the subagents can use like Apex actions, Flows, APIs, Prompt Templates, External Services
Data SourcesRetrievers and knowledge base components
ChannelsSlack and other deployment channels
ConversationsUser messages, agent responses, and tool invocations

Prerequisites

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)

Step 1: Create a Connected App

Create a Connected App in Salesforce to enable secure OAuth authentication with Capsule.

Steps

  1. Click the gear icon in the top-right corner and select Setup

  2. In the Quick Find box on the left, search for External Client App Manager

  3. Click New External Client App in the top-right corner

  4. Basic Information:

    • External Client App Name: CapsuleSecurity
    • API Name: CapsuleSecurity (auto-populated)
    • Contact Email: Enter your admin email address
  5. API

    • Enable OAuth
    • Callback URL
    https://portal.eu-west4.capsulesecurity.io/integrations/callback/AGENTFORCE
    https://portal.us-east1.capsulesecurity.io/integrations/callback/AGENTFORCE
    • Add 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
  6. Click Create at the bottom of the page. Your Connected App settings should look like this:

Connected App OAuth Settings

  1. Under Policies open OAuth Policies click Enable Client Credentials Flow and add the user we should use its scope

Why these scopes?

ScopePurpose
apiAccess Salesforce data and metadata
  1. 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.

Steps

  1. In Setup, search for Einstein Audit, Analytics, and Monitoring Setup

  2. Turn on:

    • Audit and Feedback
    • Agentforce Session Tracing

Why is this needed?

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

Step 3: Configure the Integration in Capsule

Connect your Salesforce org to Capsule using the credentials from Step 5.

Steps

  1. Log in to the Capsule Security portal

  2. Click Integrations in the left sidebar

  3. Find the Salesforce Agentforce card and click Set up Integration

  1. Enter your credentials:

    • Domain name: From the URL
    • Consumer Key: Paste from Step 1
    • Consumer Secret: Paste from Step 1
  2. Click Connect

After setup

  • 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

What Gets Captured

Capsule captures the following data from your Agentforce environment:

Entity TypeCategoryDescription
Agentforce AgentsModel AgentBot configuration, status, languages, tone settings
Apex ActionsToolCustom Apex code invoked by agents
Flow ActionsToolSalesforce Flow automations triggered by agents
API ActionsToolREST API endpoints called by agents
Prompt TemplatesToolTemplates for generating agent responses
RetrieversData SourceKnowledge base and data retrieval components
RAGsData SourceAgent RAGs
External ServicesToolExternal service integrations
Predictive ModelsToolML models used for predictions
Slack ChannelsAccess ChannelSlack deployment integrations

Verification

After setup, verify that data is syncing correctly.

Check agents

  1. In Capsule, navigate to Inventory → Agents

  2. Look for your Agentforce agents in the list

  3. Click on an agent to view it

Check conversations

  1. Navigate to Observability

  2. Look for recent Agentforce conversations

  3. Click on a session to view the full conversation transcript


Troubleshooting

No conversations appearing in Capsule

  • Verify Einstein Audit and Feedback Data is enabled
  • Check that your agent is activated and has handled conversations
  • Initial sync may take several minutes

OAuth authorization fails

  • 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

Agent not showing

  • Verify the agent is Activated in Agentforce
  • Ensure your Salesforce user has permission to access the agent

Support

For help with this integration:

  • Email: support@capsule.security
  • Include: Your Salesforce Org ID, integration status, and any error messages

For Salesforce Agentforce issues: