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.
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
| Criteria | Web-to-Lead | Flow (HTTP Callout) |
|---|---|---|
| Setup time | ~10 minutes | ~30-45 minutes |
| Daily volume cap | 500 leads/day | Unlimited |
| Custom fields | Standard form fields only | Any field, with validation |
| Authentication | Public form (org ID + reCAPTCHA) | OAuth Bearer token via Connected App. For an expiring token use Path C (OAuth 2.0), which fetches a fresh one per lead. |
| Salesforce edition required | Any (Essentials+) | Enterprise+ for Flow HTTP Callouts |
| Best for | Low volume, standard intake | High 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
oidvalue (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 AIso 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
oidvalue. - 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 after 2 hours, and Salesforce also kills them after a period of inactivity. Do NOT paste a static token here for a production destination: it will start returning 401 the same day. Use Path C below instead, which gets a fresh token for you before every lead.
Path C — OAuth 2.0 (recommended for the Salesforce API)
Use this when Salesforce hands you a two-step setup: first call a token endpoint for an access token, then send the lead with that token. Lead Distro AI does both steps for you. We request a fresh token immediately before each lead, so an access token that expires on its own, or after a period of inactivity, can never break your delivery. There is no refresh job for you to run and nothing to re-paste.
- In Salesforce, create a Connected App and note the Consumer Key and Consumer Secret. Enable the client credentials flow and pick the user it runs as.
- In Lead Distro AI, edit the destination and set Delivery Method to Webhook.
- Set the Endpoint URL to the address that receives the lead (your Apex REST endpoint, or the Pardot / Account Engagement object URL).
- Set Content-Type (the dropdown above the body you are sending) to the type their API expects. The Pardot / Account Engagement v5 API accepts
application/jsononly, and answers a form-encoded body with a 415 error. - Set Authorization to OAuth 2.0.
- Token URL: the token endpoint Salesforce gave you, usually
https://..my.salesforce.com/services/oauth2/token - Token request sign-in: leave as None unless their notes ask for a username and password, in which case pick Basic Auth and enter them.
- Parameters: we prefill
grant_type=client_credentials. Paste the Consumer Key intoclient_idand the Consumer Secret intoclient_secret. - Click Test Delivery. A pass proves the token request AND the lead post both work.
Most destinations need nothing beyond the Token URL and those three parameters. Advanced covers the rest: the token request format (Form Data by default, which is what Salesforce expects for the sign-in call), which field in their response holds the token (access_token by default), which header we send it in (Authorization by default), and the prefix (Bearer by default). Change these only if their setup notes tell you to.
An OAuth setup is two separate calls, each with its own headers and its own format, configured in two different places. Do not copy the headers from the sign-in call into the destination's own Headers list. A Content-Type: application/x-www-form-urlencoded header borrowed from the token step is the most common cause of a 415 error on a setup that is otherwise correct, because the lead post itself has to be JSON. You never need a Host header on either call. The URL already decides the host, and we ignore the header if you add one.
Frequently Asked Questions
What's the Web-to-Lead daily limit in Salesforce?
Can I use Lead Distro AI's webhook with Salesforce Sales Engagement / Cadences?
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?
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?
How do I handle Salesforce field validation rules from a webhook?
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?
What happens to my Salesforce OAuth token if the integration is paused?
Does the integration support Salesforce Person Accounts?
Related Articles
If you have any questions, send us an email at support@leaddistro.ai