Automatically sync leads from Viewers to Salesforce. When someone submits their information through your widget, a new Lead is created in Salesforce with all their details - ready for your sales team to work.
This integration requires a PRO plan.
How It Works
When a lead is captured on your site, Viewers creates a new Lead record in Salesforce with the contact’s name, email, company information, and any enrichment data. Your sales team sees new leads in Salesforce without any manual data entry.
What You’ll Need
- A Salesforce account with admin permissions
- Ability to create Connected Apps in Salesforce
- Your Salesforce My Domain URL
Step 1: Find Your My Domain URL
- Log into Salesforce
- Click the gear icon (upper right) → Setup
- In the Quick Find box, search for My Domain
- Copy the URL under Current My Domain URL
It looks something like:
https://yourcompany.my.salesforce.com
Keep this handy - you’ll paste it into Viewers later.
Step 2: Create a Connected App
- In Setup, search for App Manager (not External Client App Manager)
- Click New Connected App
- Fill in the basic info:
- Connected App Name:
Viewers - API Name: (auto-fills)
- Contact Email: Your email address
- Connected App Name:
- Check Enable OAuth Settings
- Set Callback URL:
https://viewers.com/api-salesforce-callback.php - Under Selected OAuth Scopes, add these two scopes:
- Manage user data via APIs (api)
- Perform requests at any time (refresh_token, offline_access)
- Click Save
Step 3: Get Your Consumer Key and Secret
After saving, Salesforce needs a few minutes to create the app.
- Wait 2–10 minutes for Salesforce to finish provisioning
- Click Manage Consumer Details
- Salesforce will send a verification code to your email
- Enter the code to verify your identity
- Copy your Consumer Key (Client ID)
- Copy your Consumer Secret (Client Secret)
Keep these credentials private - they grant access to your Salesforce data.
Step 4: Configure in Viewers
- Log in to your Viewers dashboard
- Go to Automations
- Find Salesforce and click to configure
- Enter your My Domain URL
- Enter your Consumer Key (Client ID)
- Enter your Consumer Secret (Client Secret)
- Configure your sync options (see below)
- Save and authorize the connection
Configuration Options
Contact Types to Sync
Choose which modules should create Leads in Salesforce. You might want all lead types, or only specific ones.
Available modules:
For example, if chat conversations are your highest-intent leads, you might only sync those to Salesforce and handle other types differently.
Sync Type
Control which leads get synced to Salesforce:
All Valid Emails Syncs all contacts with verified email addresses. Use this if you want every lead in Salesforce regardless of whether they have company data.
Enriched Leads Only Only syncs contacts that have company/contact enrichment data (company name, phone, website, etc.). This filters out personal email addresses and leads without business information.
Use enriched-only if your sales team only wants qualified B2B leads with company context.
What Gets Synced to Salesforce
When a lead is created in Salesforce, these fields are mapped:
| Viewers Field | Salesforce Lead Field |
|---|---|
name | Name (First/Last) |
email | |
company.name | Company |
company.phone | Phone |
company.website | Website |
question | Description |
page_url | Lead Source (or custom field) |
Enrichment data like employee count, revenue, and coworker emails can be mapped to custom fields if you’ve created them in Salesforce.
Best Practices
Use “Enriched Leads Only” for cleaner data If your sales team gets frustrated by leads without company information, filter them out at the source. Only qualified leads hit Salesforce.
Create custom fields for enrichment data Salesforce’s standard Lead object doesn’t have fields for employee count or revenue. Create custom fields to capture this valuable data.
Set up Lead assignment rules Use Salesforce’s Lead Assignment Rules to automatically route new Viewers leads to the right rep based on criteria like company size or location.
Deduplicate with matching rules Configure Salesforce’s Duplicate Management to handle leads that already exist in your system.
Troubleshooting
“Invalid grant” or authorization errors?
- Your Consumer Key or Secret may be incorrect - double-check them
- The Connected App may not be fully provisioned yet - wait 10 minutes and try again
- Your refresh token may have expired - reauthorize the connection in Viewers
Leads not appearing in Salesforce?
- Verify the integration is enabled and saved in Viewers
- Check that the lead type you’re testing is selected in “Contact Types to Sync”
- Look in Salesforce’s API logs for error messages
- Make sure your Salesforce user has permission to create Leads
Duplicate leads being created?
- Set up Salesforce Duplicate Rules to match on email address
- Viewers sends all qualifying leads - Salesforce handles deduplication
Missing fields in Salesforce?
- Standard Salesforce fields are limited - create custom fields for enrichment data
- Some leads won’t have company data (personal emails, new businesses)
Frequently Asked Questions
Does this sync to Leads or Contacts? Leads. Viewers creates new Lead records. Your existing Lead-to-Contact conversion process in Salesforce handles the rest.
Will it update existing Leads? No. Viewers creates new Lead records. Use Salesforce’s duplicate management to match and merge with existing records.
Can I map to custom fields? The standard integration maps to common Lead fields. For custom field mapping, contact us about advanced configuration.
How quickly do leads sync? Immediately for “All Valid Emails.” For “Enriched Leads Only,” there may be a brief delay while enrichment completes.
What Salesforce editions are supported? Any Salesforce edition that supports Connected Apps and the REST API (most editions except some legacy ones).
Can I sync to multiple Salesforce orgs? Not currently. The integration connects to one Salesforce org at a time.
Need Help?
If you have questions about connecting Viewers to Salesforce, contact us.