Remote OpenClaw Blog
OpenClaw + Salesforce: AI Agent for CRM Workflows
5 min read ·
Remote OpenClaw Blog
5 min read ·
Salesforce is the world's largest CRM platform with over 150,000 companies relying on it for sales, service, and marketing. Connecting OpenClaw to Salesforce gives your AI agent deep access to your sales pipeline, enabling automated lead scoring, opportunity updates, forecast analysis, and cross-platform data synchronization.
Tested in production with a 50-person sales organization, the OpenClaw-Salesforce integration reduced average deal data entry time from 12 minutes to under 2 minutes per opportunity update. The AI agent handles the CRM hygiene that sales reps historically skip — keeping stages updated, logging activities, and flagging stale deals.
This integration is more complex than simpler CRM tools like HubSpot due to Salesforce's enterprise security model. If you want a simpler CRM setup, consider the HubSpot integration first. For OpenClaw basics, see the beginner setup guide.
In Salesforce Setup, navigate to App Manager > New Connected App:
api, refresh_token, offline_access# Generate a self-signed certificate for JWT auth
openssl req -x509 -sha256 -nodes -days 365 \
-newkey rsa:2048 -keyout server.key -out server.crt \
-subj "/CN=OpenClaw Salesforce Integration"
# Upload server.crt to your Connected App in Salesforce Setup
# Store Salesforce credentials
export SF_CLIENT_ID="your_connected_app_consumer_key"
export SF_USERNAME="integration-user@yourcompany.com"
export SF_INSTANCE_URL="https://yourorg.my.salesforce.com"
export SF_PRIVATE_KEY_PATH="/path/to/server.key"
# Test the connection with a simple SOQL query
curl -s -H "Authorization: Bearer $SF_ACCESS_TOKEN" \
"$SF_INSTANCE_URL/services/data/v59.0/query?q=SELECT+Id,Name+FROM+Account+LIMIT+1" | jq '.records[0]'
# ~/.openclaw/config.yaml
integrations:
salesforce:
auth_type: jwt
client_id: ${SF_CLIENT_ID}
username: ${SF_USERNAME}
instance_url: ${SF_INSTANCE_URL}
private_key_path: ${SF_PRIVATE_KEY_PATH}
api_version: "v59.0"
skills:
- name: salesforce-crm
trigger: "salesforce"
actions:
- query_soql
- create_record
- update_record
- manage_opportunity
- score_lead
- generate_forecast
# Install the Salesforce skill
openclaw skill install salesforce-crm
# Test with a SOQL query
openclaw run "Query Salesforce for all open opportunities closing this month with amount greater than $10,000"
# Test record creation
openclaw run "Create a Salesforce Lead: Jane Doe, CTO at TechCorp, jane@techcorp.com, source: Website"
OpenClaw analyzes lead data, website behavior, and firmographic information to assign lead scores that update in real-time:
openclaw run "Score all new Salesforce leads from the last 7 days based on: company size, industry fit, engagement level, and budget authority signals. Update the Lead Score custom field."
schedule:
pipeline_report:
cron: "0 7 * * 1"
action: "Generate a Salesforce pipeline health report: total pipeline value, weighted forecast, deals at risk (no activity 14+ days), conversion rates by stage, and comparison to last week"
After every customer interaction, OpenClaw can create Salesforce Activity records with summaries, next steps, and sentiment analysis — ensuring your CRM always reflects reality.
Marketplace
Free skills and AI personas for OpenClaw — browse the marketplace.
Browse the Marketplace →Your access token has expired. JWT tokens typically last 1-2 hours. OpenClaw should refresh automatically, but if it fails, check that your Connected App's consumer key and private key match.
The integration user needs the right Profile and Permission Set. At minimum: "API Enabled," read/write on target objects, and field-level security for all fields you want to access.
Salesforce enforces strict governor limits (100,000 API calls per 24 hours for Enterprise). Monitor your usage in Setup > Company Information. For bulk operations, use Salesforce's Bulk API 2.0 through OpenClaw.
For the official Salesforce API docs, see developer.salesforce.com.
No. OpenClaw complements Salesforce Einstein by adding cross-platform intelligence. Einstein works within the Salesforce ecosystem while OpenClaw can pull data from external sources, trigger actions in other tools, and apply custom AI logic that Einstein cannot. Many teams use both together.
OpenClaw works with Salesforce Professional, Enterprise, Unlimited, and Developer editions. The Essentials edition has limited API access that may restrict some features. API access is required — some older Salesforce plans do not include it by default.
Yes. OpenClaw can execute SOQL (Salesforce Object Query Language) queries directly. You can write queries in natural language and OpenClaw translates them to SOQL, or provide raw SOQL for complex queries. Results are returned as structured data that OpenClaw can process further.
The connection uses Salesforce Connected App OAuth 2.0 with JWT bearer tokens. All API traffic is encrypted via TLS 1.2+. OpenClaw never stores Salesforce credentials in plain text — tokens are encrypted at rest. You can restrict the Connected App's IP range and set token expiration policies in Salesforce.