Connecting Contact Form 7 to Salesforce
Contact Form 7 is free, everywhere, and stores nothing by default — which is the whole problem. Sending conversions into Salesforce rather than out of it is how marketing data reaches the place sales actually works. The join between them succeeds or fails on one thing: whether the Lead or Contact identity reaches the Contact Form 7 submission before the conversion happens, because Salesforce can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Contact Form 7 to Salesforce: Leads that keep their gclid
To send Contact Form 7 leads to Salesforce, use Web-to-Lead or a server-side plugin, with custom Lead fields for gclid, fbclid, UTMs and landing URL filled from hidden fields. Map those fields through Lead conversion onto Contact and Opportunity so closed deals can go back to Google Ads, decide duplicate handling, and keep a copy outside Salesforce.
This is the most useful destination a Contact Form 7 site can have, because it gives the submission somewhere to live and a later outcome to be judged by. The quick route is Salesforce Web-to-Lead, posting the form fields to Salesforce, and several WordPress add-ons do this; check whether the one you pick posts server-side and maps hidden fields. Web-to-Lead has no error reporting worth relying on, and a validation rule or required field silently drops the Lead while the visitor sees a success message.
Whichever route, create custom Lead fields for gclid, fbclid, the UTM set and the landing URL, populate them from hidden fields, and map those fields through Lead conversion onto Contact and Opportunity. Without the conversion mapping the click identifiers stay on a converted Lead nobody reads again, and the closed-won deal three months later cannot be sent back to Google Ads as an offline conversion.
Duplicates are the standing hazard: Contact Form 7 has no notion of an existing person, so the same prospect submitting twice creates two Leads unless your org's duplicate rules catch it. Decide whether a repeat submission updates the existing record or creates a new one before launch, and keep a copy of every submission outside Salesforce so a rejected write can be found.
Contact Form 7 → Salesforce · what breaks
Why this join usually fails — Contact Form 7 → Salesforce
- 01
The Lead or Contact identity never reaches Contact Form 7
There is no entries table to write to, so the identifier has to be captured into a hidden field and persisted by whatever you add for storage. Contact Form 7 submits over AJAX, so the page does not reload and anything expecting a navigation event never fires.
- 02
AJAX submission means no page load to hook
Setups that fire a conversion on thank-you-page load simply never fire. Setups that listen for the DOM event miss anyone whose script execution was blocked or deferred.
- 03
Writes that succeed and change nothing
Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.
- 04
Nothing reconciles afterwards
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
Contact Form 7 → Salesforce · the fix
What working looks like — Contact Form 7 → Salesforce
The Lead or Contact identity on every submission
Conversions arriving in Salesforce
The marketing context appears on the record and flows into the opportunity, where sales and reporting can both use it.
Reconciled against the source
Contact Form 7 → Salesforce · architecture
How Contact Form 7 and Salesforce actually connect
- 1
Contact Form 7 holds the truth
Out of the box Contact Form 7 emails the submission and keeps no record. Before any attribution work is meaningful, submissions have to be stored somewhere queryable. That is step one and it is not optional.
- 2
Salesforce needs a click to match
Salesforce needs a resolvable record and a custom field to write to. Field-level security and validation rules can silently reject writes, which is a Salesforce-specific failure that returns success at the API level and changes nothing.
- 3
The identifier is the bridge
The Lead or Contact identity, captured at the visit and carried into the Contact Form 7 submission.
- 4
The event source decides reliability
Fire server-side from PHP. The browser-side wpcf7mailsent DOM event exists and is commonly used, but it depends on the visitor's browser executing correctly and on the AJAX response arriving — the server hook does not.
- 5
Deduplication at the destination
Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.
Contact Form 7 → Salesforce · normal or broken
Working vs. broken, side by side — Contact Form 7 → Salesforce
Normal, not a fault
The Lead or Contact identity present on the submission
Sent from the wpcf7_mail_sent hook
Deduplicated correctly
Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.
Reconciles with the source
Actually broken
The Lead or Contact identity missing on most records
There is no entries table to write to, so the identifier has to be captured into a hidden field and persisted by whatever you add for storage. Contact Form 7 submits over AJAX, so the page does not reload and anything expecting a navigation event never fires.
Sent from the browser
Setups that fire a conversion on thank-you-page load simply never fire. Setups that listen for the DOM event miss anyone whose script execution was blocked or deferred.
Counted twice, or not at all
Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.
Nobody has reconciled it
Contact Form 7 → Salesforce · diagnose
Diagnostic order — Contact Form 7 → Salesforce
- 01
Count submissions carrying the Lead or Contact identity
- 02
Follow one real conversion end to end
- 03
Confirm submissions are being stored at all
If the only record is an email inbox, there is nothing to reconcile and no way to prove any number. Fix storage before touching attribution.
- 04
Write a test value and open the record in the UI
The API saying it worked and the field actually holding the value are different things in Salesforce more than anywhere else.
- 05
Read the match rate, not the success message
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
Contact Form 7 → Salesforce · prove
How it gets proven — Contact Form 7 → Salesforce
Source of truth
Whatever you configure to persist submissions — an entries plugin, or your own database table. By default there is nothing to reconcile against.
- The Lead or Contact identity confirmed present on a live submission.
- A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
- Stored submissions confirmed to match the email record for the same period, before any attribution claim is made.
Contact Form 7 → Salesforce · free audit
What we check in the free audit
- Count submissions carrying the Lead or Contact identity
- Follow one real conversion end to end
- Confirm submissions are being stored at all
- Write a test value and open the record in the UI
- Read the match rate, not the success message
Checked against
Whatever you configure to persist submissions — an entries plugin, or your own database table. By default there is nothing to reconcile against.
Free30 minutesNo obligation
Contact Form 7 → Salesforce · when not to buy
When you don't need this — Contact Form 7 → Salesforce
- Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the Lead or Contact identity.
- If you are on Contact Form 7 and serious about attribution, moving to a form plugin that stores entries is often cheaper than working around the one that does not. We will say so rather than bill for the workaround.
- If your Salesforce org is administered by a team you cannot get time with, scope their availability before starting — this build is usually blocked on admin access rather than on the work.
Contact Form 7 → Salesforce · what we deliver
What gets built — Contact Form 7 → Salesforce
Identifier capture into Contact Form 7
Hidden field populated from a first-party cookie, plus a storage layer so the submission and its identifier survive past the email. The wpcf7_before_send_mail hook is where both happen.
Event source: the wpcf7_mail_sent hook
Fire server-side from PHP. The browser-side wpcf7mailsent DOM event exists and is commonly used, but it depends on the visitor's browser executing correctly and on the AJAX response arriving — the server hook does not.
Dispatch to Salesforce
API writes to the Lead or Contact record, or a platform event, carrying the marketing context as custom field values.
Reversals where they exist
Nothing to reverse. Spam filtering before the send is the equivalent concern.
Written guarantee
95%+ tracking accuracy
Measured against Whatever you configure to persist submissions — an entries plugin, or your own database table. By default there is nothing to reconcile against.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Contact Form 7 → Salesforce questions, answered
Either post the form to Salesforce Web-to-Lead through a WordPress add-on, or create Leads through the Salesforce API from a Contact Form 7 hook. The API route is safer because it can see and log rejected writes.
Capture gclid from the landing URL into a first-party cookie, copy it into a hidden form field, and map it to a custom Lead field. Map that field through Lead conversion so the Opportunity carries it for offline conversion imports.
Almost always because the Lead or Contact identity never reached the Contact Form 7 submission. There is no entries table to write to, so the identifier has to be captured into a hidden field and persisted by whatever you add for storage. Contact Form 7 submits over AJAX, so the page does not reload and anything expecting a navigation event never fires. Measure coverage before debugging the dispatch.
Salesforce resolves on its own record identity — a Lead, a Contact, or an Account — rather than on a click identifier. What you are doing here is attaching marketing context to a record so the pipeline carries it, which means the click identifier arrives as a custom field value rather than as a matching key. The hazard is duplicates: two Leads for one person means two records with half the history each.
The wpcf7_mail_sent hook. Fire server-side from PHP. The browser-side wpcf7mailsent DOM event exists and is commonly used, but it depends on the visitor's browser executing correctly and on the AJAX response arriving — the server hook does not.
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
More on Contact Form 7 → Salesforce
- Contact Form 7 → Marketing CloudConnecting Contact Form 7 to Salesforce Marketing Cloud
- Contact Form 7 → GA4Connecting Contact Form 7 to GA4
- Contact Form 7 → Google AdsConnecting Contact Form 7 to Google Ads
RELATED GUIDES
Where Contact Form 7 → Salesforce fits in the rest of your tracking
- Typeform → SalesforceConnecting Typeform to Salesforce
- Formstack → SalesforceConnecting Formstack to Salesforce
- Jotform → SalesforceConnecting Jotform to Salesforce
- Contact Form 7 → 6senseConnecting Contact Form 7 to 6sense
- Contact Form 7 → MarketoConnecting Contact Form 7 to Marketo
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Fluent Forms → SalesforceConnecting Fluent Forms to Salesforce
- Formidable Forms → SalesforceConnecting Formidable Forms to Salesforce
Free · 30 min
Get Contact Form 7 and Salesforce joined properly
Free30 minutesNo obligation
