Salesforce Integration Guide
Sync qualified leads from HoverBot conversations into Salesforce as Leads, Contacts, or Opportunities with webhook-based field mapping.
Prerequisites
- Salesforce Connected App with OAuth 2.0 credentials (client_id, client_secret)
- API-enabled Salesforce edition (Enterprise, Unlimited, or Developer)
- HoverBot workspace admin access
- Defined lead routing rules and field mapping requirements
Architecture Overview
HoverBot conversation → lead.qualified event fires → webhook POST to your middleware or Salesforce directly → Lead/Contact upsert via Salesforce REST API → Optional: Opportunity creation on high-score leads Authentication: OAuth 2.0 client credentials flow Retry: Exponential backoff with 3 retries on transient failures Deduplication: Email-based upsert key prevents duplicate records
Implementation Steps
- Create a Salesforce Connected App
Navigate to Setup → App Manager → New Connected App. Enable OAuth with the
apiscope. Copy the consumer key and secret. - Configure webhook endpoint in HoverBot
In your HoverBot workspace, go to Integrations → Add Webhook. Set the trigger to
lead.qualifiedand point the URL to your middleware or a Salesforce-compatible endpoint. - Map HoverBot fields to Salesforce objects
Map conversation data to Salesforce fields: email → Email, phone → Phone, qualificationScore → custom Lead_Score__c field, intent → Lead Source or custom field, conversation URL → Description.
- Configure upsert logic
Use email as the external ID for upsert operations. This ensures returning visitors update existing records rather than creating duplicates.
- Set up Opportunity creation rules
For leads above your score threshold, create an Opportunity with stage "Qualification" and associate it with the Contact record. Include conversation context in the Opportunity description.
- Enable retry and error handling
Configure exponential backoff for Salesforce API rate limits and transient errors. Log failed deliveries for manual review.
Example Payload
{
"event": "lead.qualified",
"timestamp": "2026-04-05T14:30:00Z",
"lead": {
"email": "prospect@company.com",
"phone": "+1-555-0142",
"firstName": "Alex",
"lastName": "Chen",
"qualificationScore": 87,
"intent": "enterprise_demo",
"source": "website_widget",
"conversationUrl": "https://app.hoverbot.ai/conversations/sf-abc123",
"metadata": {
"companySize": "200-500",
"industry": "Technology",
"budget": "50k-100k"
}
}
}Field Mapping Reference
| HoverBot Field | Salesforce Object | Salesforce Field |
|---|---|---|
| Lead / Contact | ||
| phone | Lead / Contact | Phone |
| qualificationScore | Lead | Lead_Score__c (custom) |
| intent | Lead | LeadSource or Intent__c |
| conversationUrl | Lead / Opportunity | Description |
| metadata.* | Lead / Contact | Custom fields as needed |
Validation Checklist
- Lead is created or updated (upsert on email works correctly)
- Qualification score and intent map to the expected Salesforce fields
- Conversation URL is accessible and provides handoff context for sales reps
- High-score leads trigger Opportunity creation with correct stage
- Failed webhook deliveries are logged and retried with backoff
- Duplicate handling works for returning visitors across multiple conversations