☁️

driver-salesforce

Official
driver

Connect to Salesforce CRM with OAuth support. Query, create, and update Salesforce objects seamlessly.

ostack add driver-salesforce

Documentation

Salesforce Driver for ObjectStack

Official Salesforce CRM integration with full API support.

Features

  • ✅ OAuth 2.0 authentication
  • ✅ SOQL query support
  • ✅ CRUD operations on all objects
  • ✅ Bulk API support
  • ✅ Metadata API access

Installation

ostack add driver-salesforce

Quick Start

import { SalesforceDriver } from '@objectstack/driver-salesforce';

const sf = new SalesforceDriver({
  clientId: process.env.SF_CLIENT_ID,
  clientSecret: process.env.SF_CLIENT_SECRET,
  redirectUri: 'http://localhost:3000/callback'
});

// Authenticate
await sf.authenticate();

// Query records
const accounts = await sf.query('SELECT Id, Name FROM Account LIMIT 10');

// Create record
const newContact = await sf.create('Contact', {
  FirstName: 'John',
  LastName: 'Doe',
  Email: 'john@example.com'
});

// Update record
await sf.update('Contact', contactId, {
  Phone: '555-1234'
});

Bulk Operations

// Insert multiple records efficiently
const jobs = await sf.bulk.insert('Account', [
  { Name: 'Company A' },
  { Name: 'Company B' },
  { Name: 'Company C' }
]);

License

MIT © ObjectStack Team