Salesforce Integration

OAuth2 Client Credentials

Connect your AI agent to Salesforce CRM. Manage leads, opportunities, contacts, and cases through server-to-server authentication.

What your agent can do

With Salesforce credentials, your agent gets access to the full Salesforce REST API.

Lead management

Create leads, update statuses, convert leads to contacts, and assign owners based on routing rules.

Opportunity tracking

Create and update opportunities, advance pipeline stages, and log close dates and amounts.

Contact records

Search, create, and update contact records. Associate contacts with accounts and opportunities.

Case management

Open support cases, assign priority and category, route to queues, and track resolution.

Reports

Query report data, pull pipeline summaries, and retrieve dashboard metrics via the Analytics API.

Prerequisites

  • A Salesforce account (any edition with API access)
  • System Administrator profile or permissions to create Connected Apps
  • API access enabled for your Salesforce edition
  • A ClawTrust agent on any plan (Starter, Pro, or Enterprise)

Step-by-step setup

Create a Connected App in Salesforce with Client Credentials flow enabled.

1

Create a Connected App

In Salesforce, go to Setup > App Manager > New Connected App. Name it "ClawTrust Agent" and enable OAuth Settings.

2

Configure OAuth scopes

Select the scopes your agent needs: "Manage user data via APIs (api)", "Perform requests at any time (refresh_token, offline_access)". Set the callback URL to https://clawtrust.ai/api/oauth/callback.

3

Enable Client Credentials flow

Under "Client Credentials Flow", enable it and assign a Run As user. This allows server-to-server authentication without a browser login.

4

Copy your credentials

From the Connected App detail page, copy the Consumer Key (Client ID) and Consumer Secret (Client Secret).

5

Add to ClawTrust

In your agent's dashboard, go to Credentials > Add Credential. Select "OAuth2 Client Credentials", paste your Client ID and Secret, and set allowed domains to *.salesforce.com and *.force.com.

Credential details

Type

OAuth2 Client Credentials

Fields

Client ID (Consumer Key)

Client Secret (Consumer Secret)

Instance URL (e.g., https://yourorg.my.salesforce.com)

Allowed domains

*.salesforce.com*.force.com

Auth flow

Server-to-server (no browser login required)

Example actions

Once connected, you can ask your agent to perform actions like these.

"Create a new lead for Jane Smith at TechCorp, email jane@techcorp.com"

Creates a Lead record with populated name, company, and email fields.

"Move the TechCorp opportunity to Negotiation stage, amount $85,000"

Updates the opportunity stage and amount in your pipeline.

"Open a high-priority case for billing dispute from account TechCorp"

Creates a Case linked to the account with high priority and billing category.

"Show me all opportunities closing this month over $50,000"

Queries SOQL for opportunities with matching close date and amount filters.

Ready to connect your agent to Salesforce?

Add your Connected App credentials and your agent starts managing CRM data immediately.