Salesforce supportTomasz Stępnik · Salesforce developer

Integrations · WordPress · 5 min read

A WordPress form straight into Salesforce: three ways and when to use which

The integration small companies ask for most often, and the one most often done badly: enquiries from the website land in an inbox, someone retypes them into the CRM, half get lost. There are three ways to fix it.

Way 1: Web-to-Lead, built into Salesforce

Salesforce generates HTML form code that you paste into the page. Submitting it creates a lead. No cost, a quarter of an hour’s work.

When it is enough: a simple form (name, company, email, phone, message), one page, no need for it to look beautiful and no complicated rules.

Where it hurts: the form looks like it is from 2010 unless someone styles it. No confirmation for the visitor without extra work. A daily lead limit. Spam, unless you add protection (reCAPTCHA is supported). Custom fields have to be mapped by hand in the code.

Way 2: A WordPress-to-Salesforce plugin

Plugins (for Gravity Forms, WPForms, Contact Form 7 and others) connect an existing form to Salesforce through the API. Field mapping is done by clicking in the WordPress admin panel.

When it is enough: you already have forms in one of the popular plugins, you want to keep the look and the validation, you need to map custom fields or create objects other than a lead (a case, for example).

Where it hurts: an annual fee for the plugin. The plugin needs a Connected App in Salesforce, which means an account with permissions, and here the topic from another piece comes back: a separate integration user, minimal scope. WordPress updates can break the plugin, and nobody finds out until the leads stop coming. That is why with a plugin I always add an alert: if no lead has arrived from the site for three days, someone gets an email.

Way 3: A custom integration through the API

The form sends its data to a small script (on the site’s hosting or in the cloud) that creates the record in Salesforce through the REST API, writes a log, retries on error and confirms to the visitor.

When it is worth it: several forms with different logic (an enquiry about product A goes to team A), deduplication (the same email address does not create a second lead but updates the first), additional sources (a shop, a booking calendar), personal data requirements (consents stored on the record).

Where it hurts: it has to be written and someone has to look after it. A few hours of work to start, then care like any other integration.

Whichever way you choose

  • Lead source. Every form records where it came from: site, page, campaign. In six months you will know which page brings in customers.
  • Assignment. A rule for who gets the lead, and a notification in Outlook or on the phone. A lead nobody has looked at for a week is lost.
  • Consent and the GDPR. A consent-to-contact field stored on the lead, with a date. The wording of the consent agreed with a lawyer.
  • A test once a month. Someone submits a test form and checks that it arrived. Two minutes that save you from discovering after a quarter that nothing has come through since an update.

What to choose

SituationWay
One simple form, zero budgetWeb-to-Lead
Forms already in Gravity Forms or WPFormsPlugin plus a no-leads alert
Several forms, deduplication, a shopCustom integration

One of my regular clients is exactly this: a company with Salesforce and a WordPress site, where I built this connection. If a person is still retyping your enquiries, write to me; which of the three ways fits can be settled in a quarter of an hour.