DocsIntegrationsSalesforce Integration

Salesforce Integration

Push Lead Distro AI leads into Salesforce as Lead records using Web-to-Lead or Flow with an authenticated webhook. Setup paths, daily volume limits, and troubleshooting for enterprise lead distribution.

Last updated:

What This Integration Does

Pushes every accepted Lead Distro AI lead into Salesforce as a Lead record. Two supported setup paths: Web-to-Lead (simplest, daily volume cap) and Salesforce Flow with an authenticated webhook (unlimited volume, supports custom fields and validation logic).

Picking a Path

CriteriaWeb-to-LeadFlow (HTTP Callout)
Setup time~10 minutes~30-45 minutes
Daily volume cap500 leads/dayUnlimited
Custom fieldsStandard form fields onlyAny field, with validation
AuthenticationPublic form (org ID + reCAPTCHA)OAuth Bearer token via Connected App
Salesforce edition requiredAny (Essentials+)Enterprise+ for Flow HTTP Callouts
Best forLow volume, standard intakeHigh volume, regulated verticals, complex logic

Path A — Web-to-Lead Setup

  • In Salesforce, go to Setup → Web-to-Lead.
  • Generate a Web-to-Lead form. Note the `oid` value (your Salesforce org ID).
  • Note the field names Salesforce expects — `first_name`, `last_name`, `email`, `phone`, `company`, plus any custom Lead fields you've created.
  • (Optional) Set the Lead Source default to `Lead Distro AI` so all incoming leads are attributed to the integration.
  • In Lead Distro AI, edit the destination buyer and set Delivery Method to Webhook.
  • Set the URL to `https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8`.
  • Set the Content-Type to `application/x-www-form-urlencoded` (not JSON — Web-to-Lead requires form-encoded body).
  • Map Lead Distro AI fields to Salesforce field names, including the required `oid` value.
  • Test with a single lead and verify it appears under Leads in Salesforce.

Web-to-Lead caps at **500 leads per 24-hour period** on most Salesforce editions. If you're routing more than that to a single Salesforce instance, use Path B (Flow with authenticated webhook). Volume above the cap is silently dropped by Salesforce — Lead Distro AI's webhook log will show successful POSTs, but the leads won't appear in Salesforce.


Path B — Salesforce Flow with Authenticated Webhook

  • In Salesforce, create a Connected App under Setup → App Manager → New Connected App.
  • Enable OAuth Settings, set callback URL, scope to `api`. Generate a Consumer Key and Consumer Secret.
  • Create a Named Credential referencing the Connected App for authenticated outbound calls.
  • Build a Flow triggered by an HTTP Callout or an Apex REST endpoint that creates a Lead record from incoming JSON. Map fields, validate, and apply your routing logic on the Salesforce side.
  • Generate an OAuth Bearer token from the Connected App.
  • In Lead Distro AI, edit the buyer and set Delivery Method to Webhook.
  • Set the URL to your Salesforce Flow endpoint.
  • Add a Custom Header `Authorization: Bearer `.
  • Test and verify the Lead appears in Salesforce with all custom fields populated.

Bearer tokens issued by Connected Apps expire — typically 2 hours for access tokens. Use a **refresh token** flow or use Named Credentials (Salesforce auto-refreshes those). For high-volume integrations, set up a refresh job on your side that updates the Lead Distro AI buyer's custom header before each token expiry.

Frequently Asked Questions

What's the Web-to-Lead daily limit in Salesforce?
500 leads per 24-hour rolling window on most Salesforce editions (Professional, Enterprise, Unlimited). Performance Edition raises it to 2,500/day. If you exceed the limit, additional leads are silently dropped — Salesforce returns success on the POST but the Lead record is never created. For higher volume, use Path B (Flow with authenticated webhook) which has no Salesforce-imposed cap.
Can I use Lead Distro AI's webhook with Salesforce Sales Engagement / Cadences?
Indirectly. The webhook creates a Lead record; cadences run on Lead records based on Salesforce's own automation rules. Configure a Salesforce Process Builder or Flow that auto-enrolls newly-created Leads (filtered by `Lead Source = Lead Distro AI`) into the appropriate cadence. The integration creates the Lead — Salesforce then handles cadence enrollment based on your existing rules.
How do I map Lead Distro AI custom fields to Salesforce Lead custom fields?
Create the custom Lead fields in Salesforce first (Setup → Object Manager → Lead → Fields & Relationships). Use lowercase snake_case API names like `case_type__c` (Salesforce auto-appends `__c` to custom field API names). In Lead Distro AI's buyer webhook config, map `custom.case_type` → `case_type__c`. Field types must match — Lead Distro AI sends strings; Salesforce checked-box and picklist fields need exact value matches.
Does Lead Distro AI support Salesforce's Web-to-Lead reCAPTCHA?
No, because Lead Distro AI's webhook posts server-to-server (no browser). If you enable reCAPTCHA on your Web-to-Lead form, Salesforce will reject the POST. Use Path B (authenticated webhook) for server-to-server delivery without reCAPTCHA, or disable reCAPTCHA on the Web-to-Lead form you dedicate to this integration (keep reCAPTCHA on your public-facing Web-to-Lead forms for spam protection).
How do I handle Salesforce field validation rules from a webhook?
Webhooks return a 4xx on validation failure — Lead Distro AI logs the response and retries 3 times before marking the lead `delivery_failed`. To avoid validation rejections: (1) configure validation rules to soft-fail or log warnings instead of blocking on the integration-source Lead Source, or (2) pre-validate fields in Lead Distro AI using inbound filters so invalid leads are rejected at ingest time, never reaching Salesforce.
Can I deduplicate leads before they reach Salesforce?
Yes — three layers. (1) Lead Distro AI's campaign-level duplicate detection (per phone/email/custom fields, configurable window) rejects duplicates before distribution. (2) Per-buyer suppression lists prevent re-sending the same lead to the same buyer. (3) Salesforce Duplicate Rules can run on Lead creation as a final check. Use all three for high-volume regulated verticals.
What happens to my Salesforce OAuth token if the integration is paused?
Nothing automatic — the token stays valid in Lead Distro AI's buyer config but no webhook calls fire while the buyer is paused. When you resume, the integration uses the same token. If the token has expired in the meantime, the next webhook call will fail with 401; refresh the token in your Salesforce Connected App and update the Lead Distro AI custom header.
Does the integration support Salesforce Person Accounts?
Yes via Path B (Flow). The Flow can create either a Lead, a Contact + Account pair, or a Person Account depending on which object type your Salesforce instance uses for individual leads. Lead is the default; switch in the Flow's Create Records action. Web-to-Lead (Path A) only supports the Lead object — for Person Accounts, use Path B.

If you have any questions, send us an email at support@leaddistro.ai