Introduction

Salesforce dominates enterprise CRM. OpenClaw can integrate via the Salesforce API to automate lead assignment, opportunity updates, and pipeline reporting. Here's what we're covering: integration patterns for Salesforce-centric organizations: step-by-step Connected App setup, OAuth flow, SOQL queries, and the workflows that save enterprise sales teams 15–25 hours per week.

Whether you're on Sales Cloud, Service Cloud, or a custom Salesforce org, you'll find actionable steps. We'll cover API authentication, object permissions, and the patterns that work with Salesforce's security model — including Shield for sensitive data.

Salesforce Setup: Step-by-Step

Create a Connected App for API access. Use OAuth 2.0 or a named credential. OpenClaw's HTTP Skill or a custom Salesforce Skill connects to the REST API. Configure appropriate object and field permissions. Consider Salesforce Shield for sensitive data.

Step 1: Create Connected App. Setup > App Manager > New Connected App. Name: OpenClaw. API Name: OpenClaw. Enable OAuth: Yes. Callback URL: https://your-openclaw/callback (or use Client Credentials flow). Scopes: Full access, or: Access and manage your data (api), Perform requests on your behalf (refresh_token, offline_access). Save. Note Client ID and Secret.

Step 2: Create Integration User. Dedicated user for API. Assign profile with API enabled. Grant object permissions: Lead, Contact, Account, Opportunity (Read, Create, Edit as needed). Avoid using admin user.

Step 3: OAuth Flow. Username-Password for server-to-server. Or Web Server flow for user context. Store refresh token. Access token expires in 2 hours — use refresh to get new. OpenClaw or middleware handles refresh.

Step 4: Configure OpenClaw. HTTP Skill. Base URL: https://yourorg.my.salesforce.com/services/data/v59.0 (check API version). Auth: OAuth or Bearer token. Test: GET /sobjects/Lead/describe. Should return schema.

Step 5: IP restrictions (optional). Salesforce can restrict by IP. Add your OpenClaw server IP to Trusted IPs. Or use Named Credential with certificate.

Lead Routing

OpenClaw can evaluate new leads against routing rules, suggest assignment, and update Salesforce. Integrate with round-robin or territory-based logic. Human approval for final assignment in regulated environments.

Workflow. Lead created (trigger, webhook, or polling). OpenClaw reads: Company, Industry, Country, Source. Applies routing rules from memory: "Enterprise + EMEA → Team A. SMB + US → Team B. Round-robin within team." Updates Lead.OwnerId. Or: suggests owner, human approves, then updates.

Territory rules. Complex: geography, segment, product. Store in memory. Agent evaluates. Consider Salesforce Territory Management — OpenClaw can complement or work alongside.

Compliance. Some industries require human assignment. Use OpenClaw for suggestion only. Audit trail: log all routing decisions.

Opportunity Management

Monitor opportunity stage changes, generate activity summaries, and draft next-step recommendations. OpenClaw can pull related data (contacts, activities) to enrich briefings. Sync actions back to Salesforce with appropriate audit trails.

Stage change. Opportunity moves to "Proposal." OpenClaw: Pull opportunity, related contacts, activities. Draft: "Proposal sent to [contact]. Next: schedule demo. Competitor: [from notes]." Post to Slack. Update Opportunity with next step.

Stale deal alert. No activity in 14 days. OpenClaw lists. "Deals at risk: [names]. Suggested: send check-in." AE gets proactive nudge.

Close date. Approaching. OpenClaw: "Deals closing this week: [list]. Any blockers?" Compile for forecast call.

Reporting & Alerts

Pipeline summaries, forecast variance alerts, and deal risk flags. OpenClaw queries Salesforce reports and SOQL, then formats and delivers briefings. Reduces manual report generation.

SOQL examples. SELECT Id, Name, Amount, StageName, CloseDate FROM Opportunity WHERE IsClosed = false. SELECT COUNT() FROM Lead WHERE CreatedDate = LAST_N_DAYS:7. OpenClaw runs SOQL via API. Formats for human consumption.

Report API. Salesforce Report API returns report results. OpenClaw can run report by ID, parse, summarize. "Pipeline by stage: $X in Qualification, $Y in Proposal..."

Alerts. Forecast vs actual. Deal slipped. Large deal stage change. OpenClaw detects, alerts. Configure thresholds in memory.

Implementation Checklist

  • □ Create Connected App. Configure OAuth
  • □ Create integration user. Set permissions
  • □ Test API access. Verify SOQL works
  • □ Add HTTP/Salesforce Skill to OpenClaw
  • □ Create memory: routing rules, templates, thresholds
  • □ Configure triggers or polling for new records
  • □ Run in draft-only. Validate updates
  • □ Enable autonomous for approved workflows
  • □ Document for Salesforce admin: what's automated

Cost Breakdown

OpenClaw: free. Salesforce: your existing plan. Infrastructure: $30–100/month. API: $50–150/month (LLM for scoring, drafting). Implementation: 16–40 hours for enterprise (complex orgs), or $3,000–8,000 professional. Total: ~$2,500–10,000 first year. Enterprise Salesforce integrations are complex — budget for discovery and testing.

Common Pitfalls to Avoid

Pitfall 1: Governor limits. Salesforce has limits: 100 SOQL per transaction, 10K records. Batch. Don't query everything. Use selective SOQL.

Pitfall 2: Validation rules. OpenClaw updates can fail validation. Test. Handle errors. Log. Some validations require specific field values.

Pitfall 3: Sharing. User context matters. Integration user may not see all records. Check sharing rules. Use Run As for specific user context if needed.

Frequently Asked Questions

Does OpenClaw work with Salesforce Shield? Yes. Shield encrypts sensitive fields. API returns decrypted for authorized users. OpenClaw uses integration user's access. Ensure user has Shield permissions. Don't log sensitive field values.

Can we use Salesforce Flow with OpenClaw? Yes. Flow can invoke OpenClaw via HTTP (Callout). OpenClaw processes, returns. Or: OpenClaw triggers Flow via Platform Event. Integrate both ways.

What about Salesforce Einstein? Einstein and OpenClaw are complementary. Einstein: predictive scoring, insights. OpenClaw: automation, drafting, workflow. Use both. OpenClaw can consume Einstein scores.

How do we handle Salesforce releases? Salesforce has 3 releases/year. API version (v59, v60) can change. Test after each release. Pin API version in OpenClaw config. Upgrade deliberately.

Can OpenClaw create custom objects? Yes, with API access. Create, read, update. Ensure integration user has object permissions. Document custom objects in memory.

What about multi-org? Multiple Salesforce orgs need separate Connected Apps, users, configs. Run multiple OpenClaw instances or one with org-specific config. Complex.

Wrapping Up

Salesforce integration brings OpenClaw's intelligence to enterprise sales workflows. Start with pipeline reporting or lead routing. Prove value. Expand. OpenClaw Consult helps design Salesforce automation — we've integrated for enterprises from 50 to 5000 users.