HubSpot Sync
Bidirectional sync between Keva customers and HubSpot contacts
Sync Keva customer profiles with HubSpot contacts automatically. Keep your customer data synchronized across both systems as tickets flow through Keva.
Prerequisites
Before setting up HubSpot sync:
- HubSpot account with API access (Free CRM or higher)
- Keva HubSpot connector connected via OAuth
- Admin permissions in both HubSpot and Keva
Connect HubSpot
Step 1: Authorize OAuth
- Go to Settings then Integrations then HubSpot
- Click Connect
- Sign in to HubSpot
- Select your HubSpot portal (if you have multiple)
- Authorize Keva to access your HubSpot data
- You'll be redirected back to Keva
Step 2: Verify Connection
After connecting, you should see:
- Connection status: Connected
- Portal ID
- Last sync timestamp
What Gets Synced
Contacts (Primary)
Customer profiles sync to HubSpot Contacts:
| Keva Field | HubSpot Property | Direction |
|---|---|---|
| Bidirectional | ||
| name | firstname + lastname | Bidirectional |
| phone | phone | Bidirectional |
| company | company | Bidirectional |
| jobTitle | jobtitle | Bidirectional |
| location | city | To CRM |
| notes | notes | Bidirectional |
Companies (Optional)
Link customers to HubSpot Companies for B2B context:
| Keva Field | HubSpot Property | Direction |
|---|---|---|
| company | name | From CRM |
| industry | industry | From CRM |
| website | website | From CRM |
| employeeCount | numberofemployees | From CRM |
Deals (Read-Only)
Access deal information for context:
| HubSpot Property | Use in Keva |
|---|---|
| dealname | AI context |
| amount | Priority scoring |
| dealstage | Customer status |
Configure Field Mappings
Access Field Mapping
- Go to Settings then CRM Sync then HubSpot
- Click Field Mappings
- Select object type (Contact, Company)
Add a Mapping
- Click Add Mapping
- Select Keva field from dropdown
- Select HubSpot property from dropdown
- Choose sync direction:
- Bidirectional: Syncs both ways
- To CRM: Keva to HubSpot only
- From CRM: HubSpot to Keva only
- Optionally add transformation
- Click Save
Auto-Mapping (AI-Assisted)
Let Keva suggest mappings based on field names:
- Click Auto-Map Fields
- Keva analyzes your HubSpot properties
- Review suggestions with confidence scores
- Accept, reject, or modify each mapping
- Save accepted mappings
Describe Fields
Fetch available HubSpot properties:
- Click Refresh Properties
- Keva fetches all Contact/Company properties
- Use these in your custom mappings
Name Handling
HubSpot uses separate firstname and lastname properties:
- To HubSpot: "Jane Smith" becomes firstname="Jane", lastname="Smith"
- From HubSpot: firstname + lastname becomes "Jane Smith"
The sync handles multi-word names intelligently:
- "Mary Jane Watson" becomes firstname="Mary Jane", lastname="Watson"
Sync Triggers
Automatic (Event-Driven)
Sync happens automatically when:
| Event | Action |
|---|---|
| New ticket from unknown customer | Search or create HubSpot contact |
| Customer profile updated | Update HubSpot contact |
| HubSpot contact updated | Update Keva profile (via webhook) |
Deduplication
When creating contacts, Keva prevents duplicates:
- Searches HubSpot by email first
- If contact exists, links and updates
- If not found, creates new contact
- Stores HubSpot contact ID for future syncs
Manual Sync
Sync a single customer:
- Go to the ticket or customer profile
- Click the HubSpot icon in the sidebar
- Click Sync Now
Batch Sync
Sync all customers:
- Go to Settings then CRM Sync then HubSpot
- Click Run Batch Sync
- Monitor progress (100 customers per batch)
Webhook Setup (Inbound Sync)
To receive real-time updates from HubSpot:
Step 1: Create Private App (Recommended)
In HubSpot:
- Go to Settings then Integrations then Private Apps
- Click Create a private app
- Name:
Keva CRM Sync - Scopes: Select
crm.objects.contacts.readandcrm.objects.contacts.write - Create app and copy the access token
Step 2: Configure Webhook Subscriptions
Using HubSpot's Webhooks API:
- Go to Settings then Integrations then Webhooks
- Or use HubSpot's API to create subscriptions:
POST https://api.hubapi.com/webhooks/v3/{appId}/subscriptions
{
"eventType": "contact.propertyChange",
"propertyName": "*",
"active": true,
"targetUrl": "https://app.keva.support/api/webhooks/hubspot"
}Step 3: Configure in Keva
- Go to Settings then CRM Sync then HubSpot then Webhooks
- Enter your HubSpot App ID (for signature verification)
- Save configuration
Webhook Security
Keva verifies HubSpot webhooks using X-HubSpot-Signature-v3:
- HubSpot signs each webhook request
- Keva validates signature using your app secret
- Invalid signatures are rejected with 401
Troubleshooting
"Contact not found" Error
Cause: Email doesn't match any HubSpot contact.
Solution:
- Verify email format matches exactly
- Check for leading/trailing spaces
- HubSpot treats emails case-insensitively
"Property doesn't exist" Error
Cause: Mapped HubSpot property not found.
Solution:
- Use internal property name, not label (e.g.,
jobtitlenotJob Title) - Click Refresh Properties to update available fields
- Create the property in HubSpot if it's custom
"CONFLICT" Error (409)
Cause: Concurrent update to the same contact.
Solution:
- Keva automatically retries with exponential backoff
- If persistent, check for other integrations updating same contacts
- Review sync frequency settings
"Duplicate contact" Warning
Cause: Contact with same email already exists.
Solution:
- Keva searches by email before creating
- If duplicate detected, links to existing contact
- Check HubSpot for duplicate contacts and merge if needed
Sync Showing "Pending" Status
Cause: Background job not processing.
Solution:
- Check Inngest dashboard for function status
- Verify HubSpot OAuth token is valid
- Reconnect HubSpot if token expired (tokens refresh automatically)
Webhook Not Triggering
Cause: Webhook subscription not active or misconfigured.
Solution:
- Verify subscription is active in HubSpot
- Check target URL is exactly
https://app.keva.support/api/webhooks/hubspot - Test with HubSpot's webhook testing tool
- Check Keva logs for incoming webhook requests
Rate Limiting (429 Error)
Cause: Too many API requests to HubSpot.
Solution:
- Keva automatically implements retry with backoff
- Batch sync is rate-limited to 100 customers per run
- Wait and retry if doing manual bulk operations
Best Practices
Initial Setup
- Connect via OAuth - More secure than API key
- Start with default mappings - Customize after testing
- Test with sandbox - Use HubSpot's test portal first
Field Mapping
- Map essential fields first - Email, name, company
- Use bidirectional carefully - Prevents data conflicts
- Add defaults for required fields - Prevents validation errors
Performance
- Schedule batch sync during off-hours - Respects rate limits
- Monitor sync history regularly - Catch errors early
- Clean up failed syncs - Resolve mapping issues promptly
Data Quality
- Validate email formats - HubSpot requires valid emails
- Handle duplicates - Review and merge in HubSpot
- Use consistent naming - Helps AI identify customers
API Reference
Trigger Sync Programmatically
POST /api/crm/hubspot/sync
Authorization: Bearer keva_live_xxx
Content-Type: application/json
{
"customerId": "uuid-of-customer",
"connectorId": "uuid-of-hubspot-connector"
}Get Available Properties
GET /api/crm/hubspot/describe?object=Contact
Authorization: Bearer keva_live_xxxResponse
{
"properties": [
{
"name": "email",
"label": "Email",
"type": "string",
"fieldType": "text"
},
{
"name": "firstname",
"label": "First Name",
"type": "string",
"fieldType": "text"
}
]
}Test Field Mapping
POST /api/crm/hubspot/test-mapping
Authorization: Bearer keva_live_xxx
Content-Type: application/json
{
"connectorId": "uuid",
"customerId": "uuid",
"dryRun": true
}Response
{
"preview": {
"email": "jane@example.com",
"firstname": "Jane",
"lastname": "Smith",
"company": "Acme Inc"
},
"warnings": [],
"errors": []
}Comparison with Salesforce
| Feature | HubSpot | Salesforce |
|---|---|---|
| Free tier | Yes | No |
| OAuth setup | Simpler | More complex |
| Webhook config | API-based | Workflow rules |
| Rate limits | 100/10sec | 100,000/day |
| Custom fields | Properties | Custom fields |
| Deduplication | Email-based | Rule-based |
Choose HubSpot if:
- You're on HubSpot's free CRM
- You want simpler setup
- You need marketing automation context
Choose Salesforce if:
- You're enterprise-focused
- You need complex workflow rules
- You have existing Salesforce infrastructure