Integrating with Salesforce

Guide to integrating Top Provider with Salesforce using Web-to-Lead and webhook delivery

Salesforce Integration Overview

Top Provider supports seamless integration with Salesforce CRM using the Web-to-Lead feature. By configuring a webhook endpoint in Top Provider to submit leads as x-www-form-urlencoded data, you can automatically create new Salesforce leads from every qualified Top Provider opportunity.

Key benefits:

  • Real-time lead delivery to Salesforce
  • No code or middleware required
  • Customizable field mapping
  • Supports Salesforce assignment rules and auto-responses

Prerequisites

Before you begin, ensure you have:

  • Salesforce admin access
  • Web-to-Lead enabled in your Salesforce org
  • A public Salesforce Web-to-Lead endpoint (generated by Salesforce)
  • Access to the Top Provider Seller Portal with integration permissions
  • A list of lead fields you want to capture (Lead Fields Reference)

Step-by-Step Integration Guide

1. Enable Web-to-Lead in Salesforce

  • In Salesforce Setup, search for Web-to-Lead and open the settings.
  • Enable Web-to-Lead.
  • Set your default lead creator and auto-response template as needed.
  • See Salesforce official docs for detailed instructions.

2. Generate Your Web-to-Lead Form

  • In the Web-to-Lead settings, click Create Web-to-Lead Form.
  • Select the lead fields you want to capture (match these to Top Provider fields for best results).
  • Set the Return URL (where users are redirected after form submission; this can be any valid URL, but is not used by Top Provider).
  • Click Generate to get your form HTML. Copy the form action URL—this is your Salesforce Web-to-Lead endpoint.
  • See SF Ben's step-by-step guide for screenshots and tips.

3. Create a Webhook Endpoint in Top Provider

  • In the Seller Portal, go to Settings > Delivery.
  • Click + Add a new notification recipient and select Webhook.
  • Set the Webhook URL to your Salesforce Web-to-Lead endpoint (from step 2).
  • Set Data Format to Form (x-www-form-urlencoded).
  • (Optional) Add any required HTTP headers or constants.
  • Click Save to create the endpoint.

4. Map Top Provider Fields to Salesforce Fields

  • In your webhook settings, click Details > Settings > Adjust Field Mappings.
  • Map each Top Provider field to the corresponding Salesforce field name (as shown in your generated form HTML, e.g., first_name, last_name, email).
  • For a full list of available fields, see our Lead Fields Reference.
  • Ensure all Salesforce-required fields are mapped and that field names match exactly.

5. Test the Integration

  • In Top Provider, use the Test Endpoint button to send a sample lead to Salesforce.
  • In Salesforce, check your Leads list for the new test lead.
  • Use Salesforce's debug mode (uncomment the debug lines in your form HTML if needed) to troubleshoot field mapping or submission issues.

Field Mapping Tips & Common Pitfalls

  • Required Fields: Salesforce requires certain fields (e.g., last_name, company). Ensure these are always mapped and populated.
  • Field Names: Use the exact field names from your Salesforce form HTML (case-sensitive).
  • Data Types: Match data types (e.g., use plain text for text fields, valid emails for email fields).
  • reCAPTCHA: If enabled, submissions must include valid reCAPTCHA tokens. Top Provider does not support reCAPTCHA in webhook delivery—disable this for automated integrations.
  • Duplicate Rules: If you have duplicate rules in Salesforce, ensure they do not block Web-to-Lead submissions from your default lead creator.

Troubleshooting

IssueSolution
Lead not appearing in SalesforceCheck field mappings, required fields, and Salesforce limits
Error in SalesforceUse debug mode in your form HTML to view errors
Fields missing or unmappedEnsure all required fields are mapped and names match exactly
reCAPTCHA errorsDisable reCAPTCHA for this endpoint or use a different integration method
Duplicate rule errorsAdjust duplicate rules to allow Web-to-Lead submissions

FAQ