Salesforce

Security

Salesforce CRM integration with managed OAuth. Manage accounts, contacts, leads, opportunities, campaigns, tasks, reports, SOQL queries, and SObject records through the Salesforce REST API.

Install

openclaw skills install salesforce-ops

Salesforce

Salesforce

Connect to Salesforce to manage accounts, contacts, leads, opportunities, campaigns, tasks, reports, and SObject records. Query data with SOQL, create and update records, manage files and attachments, and work with Salesforce objects via the REST API.

This skill uses ClawLink for hosted connection flows and credentials so you do not need to configure Salesforce OAuth access yourself.

Setup in 3 Steps

Step 1: InstallStep 2: Pair AccountStep 3: Connect Salesforce
InstallPairApp-specific connection GIF coming soon
Run the install command in OpenClawSign in and approve the deviceOpen the dashboard and connect Salesforce

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│  Salesforce API  │
│   (User Chat)   │     │   (OAuth)    │     │  (SObjects,      │
│                 │     │              │     │  Reports, SOQL)  │
└─────────────────┘     └──────────────┘     └──────────────────┘
         │                    │                      │
         │  1. Install Plugin │                      │
         │  2. Pair Device    │                      │
         │  3. Connect Salesforce │                   │
         │                    │  4. OAuth Proxy      │
         │                    │  5. Request Forward  │
         │                    │                      │
         ▼                    ▼                      ▼
   ┌──────────┐        ┌──────────┐         ┌──────────┐
   │   SKILL  │        │ Dashboard│         │ Salesforce│
   │   File   │        │   Auth   │         │  Cloud   │
   └──────────┘        └──────────┘         └──────────┘

Install

Install the verified ClawLink plugin from ClawHub. After the user confirms, complete the full setup so ClawLink tools are visible in the next OpenClaw chat.

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Then tell the user: "OpenClaw has been restarted. Send /new as a standalone message to start a fresh chat, then ask for Salesforce again."

Quick Start

# Get account details
clawlink_call_tool --tool "salesforce_get_account" --params '{"account_id": "YOUR_ACCOUNT_ID"}'

# Search across objects with SOSL
clawlink_call_tool --tool "salesforce_execute_sosl_search" --params '{"query": "FIND {Alice*} RETURNING Contact"}'

# Create a new lead
clawlink_call_tool --tool "salesforce_create_lead" --params '{"last_name": "Smith", "company": "Acme Corp", "email": "alice@acme.com"}'

Authentication

All Salesforce tool calls are authenticated automatically by ClawLink using the user's connected Salesforce account via OAuth.

No OAuth setup is required in chat. ClawLink manages the OAuth flow and token refresh automatically.

Getting Connected

  1. Install the ClawLink plugin (see Install above).
  2. Pair the plugin with clawlink_begin_pairing if it is not configured yet.
  3. Open https://claw-link.dev/dashboard?add=salesforce and connect Salesforce via OAuth.
  4. Call clawlink_list_integrations to verify the connection is active.

Connection Management

List Connections

clawlink_list_integrations

Response: Returns all connected integrations. Look for salesforce in the list.

Verify Connection

clawlink_list_tools --integration salesforce

Response: Returns the live tool catalog for Salesforce.

Reconnect

If Salesforce tools are missing or the connection shows an error:

  1. Direct the user to https://claw-link.dev/dashboard?add=salesforce
  2. After they confirm, call clawlink_list_integrations to verify
  3. Then call clawlink_list_tools --integration salesforce

Security & Permissions

  • Access is scoped to the Salesforce org and OAuth scopes granted during connection.
  • All write operations require explicit user confirmation. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
  • Destructive actions (delete account, delete lead, delete opportunity) are marked as high-impact and must be confirmed.
  • SOQL and SOSL queries read data without modification — no confirmation required for read operations.

Tool Reference

Account Management

ToolDescriptionMode
salesforce_get_accountRetrieve a specific account by ID with all available fieldsRead
salesforce_create_accountCreate a new account in Salesforce (returns ID at data.response_data.id)Write
salesforce_delete_accountPermanently delete an account from SalesforceWrite
salesforce_associate_contact_to_accountAssociate a contact with an account by updating its AccountId fieldWrite

Contact & Lead Management

ToolDescriptionMode
salesforce_get_contactRetrieve a specific contact by ID with all available fieldsRead
salesforce_get_leadRetrieve a specific lead by ID with all available fieldsRead
salesforce_create_contactCreate a new contact in SalesforceWrite
salesforce_create_leadCreate a new lead (LastName and Company required; org validation may require additional fields)Write
salesforce_delete_contactPermanently delete a contact from SalesforceWrite
salesforce_delete_leadPermanently delete a lead from SalesforceWrite
salesforce_add_contact_to_campaignAdd a contact to a campaign by creating a CampaignMember recordWrite
salesforce_add_lead_to_campaignAdd a lead to a campaign (both IDs must reference active, existing records)Write
salesforce_apply_lead_assignment_rulesApply configured lead assignment rules to route a lead to the appropriate ownerWrite

Opportunity Management

ToolDescriptionMode
salesforce_get_opportunityRetrieve a specific opportunity by ID with all available fieldsRead
salesforce_create_opportunityCreate a new opportunity in SalesforceWrite
salesforce_delete_opportunityPermanently delete an opportunity from SalesforceWrite
salesforce_clone_opportunity_with_productsClone an opportunity and optionally its line itemsWrite
salesforce_add_opportunity_line_itemAdd a product (line item) to an opportunityWrite

Campaign Management

ToolDescriptionMode
salesforce_get_campaignRetrieve a specific campaign by ID with all available fieldsRead
salesforce_create_campaignCreate a new campaign (name required; type, status, start_date, end_date often required by org validation)Write
salesforce_delete_campaignPermanently delete a campaign from SalesforceWrite

Task Management

ToolDescriptionMode
salesforce_create_taskCreate a new task to track activities related to contacts, leads, or other recordsWrite
salesforce_complete_taskMark a task as completed with optional completion notesWrite

Notes & Attachments

ToolDescriptionMode
salesforce_get_noteRetrieve a specific note by ID (private notes require sufficient permissions)Read
salesforce_create_noteCreate a new note attached to a Salesforce record (no deduplication — identical calls create duplicates)Write
salesforce_delete_notePermanently delete a note from SalesforceWrite

Files & Collaboration

ToolDescriptionMode
salesforce_get_file_informationRetrieve comprehensive metadata for a file (ownership, sharing, download URLs, rendition status)Read
salesforce_get_file_contentReturn binary content of a Salesforce file for download or retrievalRead
salesforce_get_file_sharesGet information about objects with which a file has been sharedRead
salesforce_delete_filePermanently delete a file from SalesforceWrite
salesforce_get_chatter_resourcesAccess Chatter resources directory (feeds, groups, users, emojis, streams)Read

Search & Query

ToolDescriptionMode
salesforce_execute_sosl_searchExecute a SOSL search to search across multiple Salesforce objects simultaneouslyRead
salesforce_get_query_job_resultsRetrieve results for a completed Bulk API v2 query job in CSV formatRead
salesforce_get_sobject_by_external_idRetrieve a Salesforce record by matching an external ID field valueRead

SObject & Record Operations

ToolDescriptionMode
salesforce_get_s_object_recordRetrieve a single Salesforce record by ID from any sObject typeRead
salesforce_get_a_batch_of_recordsRetrieve multiple Salesforce records in a single request (up to 200 records)Read
salesforce_create_s_object_recordCreate a new record of any standard or custom Salesforce object typeWrite
salesforce_delete_sobjectDelete a single Salesforce record by its ID (idempotent — deleting same record multiple times returns success)Write
salesforce_delete_sobject_collectionsDelete up to 200 records in one request with optional rollbackWrite
salesforce_clone_recordClone an existing Salesforce record (optionally apply field updates to the clone)Write
salesforce_create_sobject_treeCreate nested parent-child record hierarchies in a single atomic operation (up to 200 records, 5 levels deep)Write
salesforce_execute_sobject_quick_actionExecute a specific quick action on an sObject to create records with pre-configured defaultsWrite

Bulk Data Operations

ToolDescriptionMode
salesforce_get_job_failed_record_resultsGet records that failed during a Bulk API 2.0 ingest operationRead
salesforce_get_job_successful_record_resultsGet records successfully processed during a bulk operationRead
salesforce_get_job_unprocessed_record_resultsGet records not processed during a bulk operation (job aborted or interrupted)Read
salesforce_close_or_abort_jobClose (state: UploadComplete) or abort (state: Aborted) a Bulk API v2 ingest jobWrite

Metadata & Discovery

ToolDescriptionMode
salesforce_get_all_custom_objectsRetrieve all Salesforce objects (standard and custom) with metadataRead
salesforce_get_all_fields_for_objectRetrieve all fields (standard and custom) for a Salesforce objectRead
salesforce_get_apiDiscover available REST API resources for a specified Salesforce API versionRead
salesforce_get_org_limitsRetrieve organization limits with max and remaining allocationsRead
salesforce_get_record_countsGet total record counts for specified Salesforce objectsRead
salesforce_get_object_list_viewsDiscover available filtered views of records for an objectRead
salesforce_get_compact_layoutsRetrieve compact layout information for multiple Salesforce objectsRead

List Views & Records

ToolDescriptionMode
salesforce_get_list_view_resultsRetrieve results of a list view for a specified sObject (2,000 record limit)Read
salesforce_get_list_view_records_by_idReturn record data for a list view by its IDRead
salesforce_get_list_view_records_by_nameRetrieve paginated records matching a list view's filters and sortingRead
salesforce_get_mru_list_view_recordsGet records from the most recently used (MRU) list view for an objectRead
salesforce_get_child_recordsGet child records for a parent record and child relationship nameRead
salesforce_get_related_list_records_contactsRetrieve related list records with filtering and pagination parametersRead

Reports & Dashboards

ToolDescriptionMode
salesforce_get_dashboardGet detailed metadata for a specific dashboard (components, layout, filters)Read

Custom Fields & Objects

ToolDescriptionMode
salesforce_create_custom_fieldCreate a custom field on a Salesforce object using the Tooling APIWrite
salesforce_create_custom_objectCreate a custom object in Salesforce using the Metadata APIWrite

Code Examples

Get an account by ID

clawlink_call_tool --tool "salesforce_get_account" \
  --params '{"account_id": "YOUR_ACCOUNT_ID"}'

Create a new lead

clawlink_call_tool --tool "salesforce_create_lead" \
  --params '{
    "last_name": "Smith",
    "company": "Acme Corp",
    "email": "alice@acme.com",
    "lead_source": "Web"
  }'

Create a task

clawlink_call_tool --tool "salesforce_create_task" \
  --params '{
    "subject": "Follow up with Alice",
    "status": "Not Started",
    "priority": "High",
    "who_id": "CONTACT_ID",
    "what_id": "ACCOUNT_ID"
  }'

Search for contacts with SOSL

clawlink_call_tool --tool "salesforce_execute_sosl_search" \
  --params '{"query": "FIND {Alice*} RETURNING Contact(Id, Name, Email)"}'

Clone a record

clawlink_call_tool --tool "salesforce_clone_record" \
  --params '{"record_id": "YOUR_RECORD_ID"}'

Discovery Workflow

  1. Call clawlink_list_integrations to confirm Salesforce is connected.
  2. Call clawlink_list_tools --integration salesforce to see the live catalog.
  3. Treat the returned list as the source of truth. Do not guess or assume what tools exist.
  4. If the user describes a capability but the exact tool is unclear, call clawlink_search_tools with a short query and integration salesforce.
  5. If no Salesforce tools appear, direct the user to https://claw-link.dev/dashboard?add=salesforce.

Execution Workflow

┌─────────────────────────────────────────────────────────────┐
│  READ OPERATIONS (Safe)                                     │
│  list → get → search → describe → call                      │
│                                                             │
│  Example: Get account → List contacts → Show results         │
└─────────────────────────────────────────────────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────┐
│  WRITE OPERATIONS (Require Confirmation)                    │
│  describe → preview → confirm → call                        │
│                                                             │
│  Example: Describe tool → Preview changes → User approves   │
│           → Execute create                                   │
└─────────────────────────────────────────────────────────────┘
  1. For unfamiliar tools, ambiguous requests, or any write action, call clawlink_describe_tool first.
  2. Use the returned guidance, schema, whenToUse, askBefore, safeDefaults, examples, and followups to shape the call.
  3. Prefer read, list, search, and get operations before writes when that reduces ambiguity.
  4. For writes or anything marked as requiring confirmation, call clawlink_preview_tool first.
  5. Execute with clawlink_call_tool. Pass confirmation only after the preview matches the user's intent.
  6. If the tool call fails, report the real error. Do not invent results or restate the failure as a missing capability unless the live catalog supports that conclusion.

Notes

  • SOQL queries (salesforce_query) return JSON results; SOSL searches (salesforce_execute_sosl_search) return search result objects.
  • IDs for records must reference existing records — names or emails cannot be substituted for IDs in create operations.
  • Org-level validation rules may require additional fields beyond the tool's documented minimums — check error responses for failing fields.
  • The Bulk API v2 requires closing (state: UploadComplete) or aborting (state: Aborted) ingest jobs for processing to begin.
  • SOQL date literals: LAST_N_DAYS:n, NEXT_N_DAYS:n, THIS_WEEK, THIS_MONTH, THIS_QUARTER, THIS_YEAR.
  • sObject names in tool parameters use the API name (e.g., Account, Contact, Lead, Opportunity).

Error Handling

Status / ErrorMeaning
Tool not foundThe tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration salesforce.
Missing connectionSalesforce is not connected. Direct the user to https://claw-link.dev/dashboard?add=salesforce.
INVALID_FIELDThe specified field does not exist on the sObject. Use salesforce_get_all_fields_for_object to discover valid fields.
INVALID_IDThe provided record ID does not exist or is not accessible.
REQUIRED_FIELD_MISSINGA required field is missing from the request. Check the tool schema with clawlink_describe_tool.
ENTITY_IS_DELETEDThe target record has been deleted and cannot be modified.
WRITE_REJECTEDUser did not confirm a write action. Always confirm before executing writes.

Troubleshooting: Tools Not Visible

  1. Check that the ClawLink plugin is installed:
    openclaw plugins list
    
  2. If the plugin is installed but tools are missing, tell the user to send /new as a standalone message to reload the catalog.
  3. If a fresh chat does not help, run:
    openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
    openclaw gateway restart
    
  4. After restart, tell the user to send /new again and retry.

Troubleshooting: Invalid Tool Call

  1. Ensure the integration slug is exactly salesforce.
  2. Use clawlink_describe_tool to verify parameter names and types before calling.
  3. For write operations, always call clawlink_preview_tool first.
  4. Verify record IDs exist before using them in write operations — use read tools to confirm IDs first.

Resources

Related Skills


Powered by ClawLink — an integration hub for OpenClaw

ClawLink Logo