Skip to main content

Salesforce Integration

Connect and manage Salesforce CRM data including accounts, contacts, leads, and opportunities through ConstellationAPI.

Overview

Salesforce integration uses Apideck's CRM Unified API, providing a consistent interface to Salesforce's customer relationship management features.

Prerequisites

  • Salesforce account with appropriate permissions
  • Apideck account with Salesforce integration enabled
  • Tenant created in ConstellationAPI

Authorization

Step 1: Create Vault Session

curl -X POST http://localhost:3007/auth/vault-session \
-H "Content-Type: application/json" \
-H "X-API-KEY: your-internal-key" \
-H "X-Tenant-Id: my-tenant" \
-d '{
"integration": "salesforce"
}'

Step 2: Authorize

  1. Open the sessionUri from the response
  2. Complete OAuth flow in Apideck Vault
  3. Grant necessary permissions

Common Operations

List Accounts

curl http://localhost:3007/salesforce/accounts \
-H "X-API-KEY: your-internal-key" \
-H "X-Tenant-Id: my-tenant"

Create Account

curl -X POST http://localhost:3007/salesforce/accounts \
-H "Content-Type: application/json" \
-H "X-API-KEY: your-internal-key" \
-H "X-Tenant-Id: my-tenant" \
-d '{
"name": "Acme Corporation",
"description": "Technology company",
"industry": "Technology",
"website": "https://acme.com"
}'

Create Opportunity

curl -X POST http://localhost:3007/salesforce/opportunities \
-H "Content-Type: application/json" \
-H "X-API-KEY: your-internal-key" \
-H "X-Tenant-Id: my-tenant" \
-d '{
"title": "Enterprise Deal",
"monetaryAmount": 50000,
"currency": "USD",
"winProbability": 75,
"closeDate": "2024-12-31",
"stage": "Negotiation"
}'

Best Practices

  1. Data Consistency: Maintain consistent naming conventions
  2. Relationships: Link contacts to accounts properly
  3. Opportunity Management: Track stages and probabilities accurately
  4. Data Validation: Validate required fields before creating records