Salesforce Integration

Connect Salesforce CRM data to Metalogue

Salesforce Integration

Connect your Salesforce org to index contacts, accounts, opportunities, and more.

Quick Start

const connector = await client.createConnector({
  connector_type: 'salesforce',
  display_name: 'Company Salesforce',
  credentials: {
    instance_url: 'https://company.salesforce.com',
    access_token: 'xxxxxxxxxxxx',
    refresh_token: 'xxxxxxxxxxxx',
  },
});

await client.syncConnector(connector.connector_id, true);

Authentication

OAuth 2.0 (Recommended)

GET /v1/connectors/salesforce/oauth-url

Metalogue handles the OAuth flow and token refresh automatically.

Synced Content

ObjectDescriptionIndexed Fields
AccountsCompaniesName, Description, Industry
ContactsPeopleName, Email, Title
OpportunitiesDealsName, Stage, Amount, Notes
CasesSupport ticketsSubject, Description, Comments
LeadsProspectsName, Company, Status
TasksActivitiesSubject, Description
NotesAttached notesTitle, Body

Configuration

{
  "settings": {
    "objects": ["Account", "Contact", "Opportunity", "Case"],
    "include_attachments": true,
    "sync_deleted": false,
    "custom_objects": ["CustomObject__c"]
  }
}

SOQL Filtering

Filter records using SOQL:

{
  "settings": {
    "filters": {
      "Opportunity": "StageName != 'Closed Lost' AND CreatedDate >= LAST_N_DAYS:90",
      "Account": "Type = 'Customer'"
    }
  }
}

Example Queries

// Find deals related to enterprise pricing
const results = await client.query({
  text: 'enterprise pricing negotiation',
  filters: {
    connector_type: 'salesforce',
    document_type: 'opportunity'
  }
});

Real-time Sync

Enable Platform Events for real-time updates:

  1. Install Metalogue managed package
  2. Enable Platform Events in Settings
  3. Configure webhook endpoint

Rate Limits

  • API calls: Based on Salesforce edition
  • Bulk API used for large syncs

Next Steps