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
- Open the
sessionUrifrom the response - Complete OAuth flow in Apideck Vault
- 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
- Data Consistency: Maintain consistent naming conventions
- Relationships: Link contacts to accounts properly
- Opportunity Management: Track stages and probabilities accurately
- Data Validation: Validate required fields before creating records