Send leads to Salesforce
Creates a lead through a Make scenario.
Add a channel field to leads
In Salesforce, go to SetupObject ManagerLeadFields & Relationships and select New. Choose Text and name it VisitorLayer Channel.
Create a webhook in Make
In Make, create a scenario. Add the Webhooks app's Custom webhook trigger, add a new webhook, and copy its address. Leave the module waiting for data.
Add the webhook in VisitorLayer
Open your project's Webhooks and select New webhook. Use the Make address as the Endpoint URL, choose your lead form, and paste this payload. No headers are needed.
Payload{ "email": "{{form.email}}", "name": "{{form.name}}", "phone": "{{form.phone}}", "channel": "{{attribution.channel}}", "source": "{{attribution.utm_source}}", "campaign": "{{attribution.utm_campaign}}", "landing_page": "{{page.landing_path}}" }Rename each
form.token to match your form's fields, or pick them from Insert field. A field your form does not capture sendsnull.Save, then select Test webhook. Make reads the fields from that request.
Create the lead in Salesforce
In Make, add the Salesforce app's Create a record module, connect your Salesforce account, and choose the Lead object. Map:
Last Name name Company Type a fixed value, such as Website lead. Salesforce requires it. Email email Phone phone VisitorLayer Channel channel Save the scenario and turn it on, so it runs as each lead arrives.
Send a test lead
Submit your form on the live site. The lead appears in Salesforce with VisitorLayer Channel filled in.
Make accepts each request before it runs the scenario, so the webhook shows Healthy even when Salesforce rejects a lead. Check the scenario's history in Make for Salesforce errors.