WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WordPress-to-lead for Salesforce CRM

WordPress-to-Lead for Salesforce CRM creates a solid integration between your WordPress install(s) and your Salesforce.com account!

I'm not seeing any errors, but the entry didn't get added to Salesforce!

To turn on in browser debugging, add a hidden field (enabled) named debug and set the value to 1.

To turn on debugging via email, add a hidden field (enabled) named debugEmail and set the value to you@yourdomain.com (your email address).

What are the built in field names? Not all the fields are working when I use the Field Label in the lead edit screen?

SalesForce is inconsistent in naming built in fields, and even misreports the names of some fields (like MobilePhone, which is actually mobile). Generating a Web to Lead form gets you the real names, but the list below should help as well.

Built in fields

First Name   first_name
Last Name   last_name

Title       title
Website     URL

Phone       phone
Mobile      mobile
Fax         fax
Email       email

Address     street
City        city
State/Prov. state
Zip     zip
Country     country

Description     description
Industry    industry
Rating      rating
Annual Rev.     revenue
Employees   employees

Other Fields

Lead Source     lead_source
Email Opt Out   emailOptOut
Fax Opt Out faxOptOut
Do Not Call doNotCall

Lead Record Type recordType

Campaign    Campaign_ID
Campaign Member Status      member_status

Name may vary (these are lookup fields), generate a Web-to-Lead form with these fields included for the actual value

SIC Code
Product Interest
Primary
Current Generator(s)
Number of Locations

How do I setup Web to Lead/Case for my SalesForce Account?

Setting Up Web-to-Lead

Setting Up Web-to-Case

How do I setup a Web to Case form?

Choose Web to Case in the Form Settings (bottom of the form editor page).

Where do I find my Salesforce organization ID?

To find your Organization ID, do the following steps:

  1. Log in to your SalesForce.com account
  2. Go to Setup » Company Profile » Company Information
  3. You'll find the Organization ID in the lower right hand corner of your screen

How do I use a SalesForce custom field?

  1. Go to Setup » Customize » Leads » Fields
  2. If your custom field does not exist yet, create it now.
  3. Find the API Name for your field (e.g. Custom_Field_Example__c). If it doesn't end in "__c" it's not the API name and will not work.
  4. Add a new field to your form using the form editor on the plugin admin screen
  5. Enter the API Name as the field name (left most box), then fill out the other fields normally (make sure to enable the field!).
  6. Save your changes -- new submissions will now post that custom field to SalesForce.

How do I use the checkbox field?

Like any other field. Note that it is a single checkbox, not a checkbox list.

Checkbox lists and radio buttons will be in a future update.

How do I use the select (picklist) field?

Use it like any other field -- however you'll need to specify the options (and optional values) for each field using the options box (far right). You'll also need to use the "internal name" from Salesforce as your field name (see next FAQ).

The value box for a select list is the default value (the one selected on a fresh form).

//Use same data for display and value passed to SF
one|two|three

//Use different data for display and value passed to SF, require user to select something (assuming field is required)
Select One: | name1:value1 | name2:value2

//Use different data for display and value passed to SF
name1:value1 | name2:value2

Note: Leading & trailing whitespace is trimmed when names and values are displayed, so feel free to use spaces to make things more readable.

How do I find the "internal name" of my picklist field?

Picklists in SalesForce (Web to Lead at least) are a strange beast -- you'd think you could pass the field name and SF would map it on their end... but they don't make it that easy. Instead you need to use the internal SF ID of the picklist... which looks more like: 00Nd0000007p1Ej (this is just en example, this is not the id of your field).

Where do you find this cryptic value? You can find it in two places (that I know of):

  1. Edit the field and it'll be in the URL: e.g. https://na14.salesforce.com/00Nd0000007p1Ej/...

  2. Generate a Web to Lead form with your field included and it'll be in the HTML e.g. TestPicklist: <select id="00Nd0000007p1Ej" name="00Nd0000007p1Ej" title="TestPicklist">

How do I use the HTML field?

  1. Optionally enter a label (field will display full width if a label is not entered.
  2. Enter HTML code in the options box.

Note: You cannot use the HTML box to enter a custom field, as only "known" fields are submitted to salesforce and HTML fields are not submitted (just displayed). Be careful to avoid the <form> or </form> tags in an HTML field as they will likely break your form.

How do I use a lookup field with a picklist field in the plugin?

Since it's a lookup field the value of the options has to be SalesForce's internal id, not the value you'd think it would be. Otherwise when Jane Doe gets married and becomes Jane Smith you'd break all the links to her user.

Basically, you need to generate a Web to Lead form in Salesforce and grab the option values from the HTML it generates.

e.g.

Find the lookup field. This is the bit you're looking for:

<option value="00Nd0000007p1Ej">Joe Schmoe</option>
<option value="00Nd0000007p1aB">Jane Doe</option>

...

00Nd0000007p1Ej (just an example) is the SF internal ID for that choive. Enter that as the value in your pick list field options like this:

00Nd0000007p1Ej:Joe Schmoe|00Nd0000007p1aB:Jane Doe

How do I change the order of input fields?

Right now, the only way of ordering input fields is by changing the position numbers on the right hand side of the input fields table in the admin settings. Drag and drop re-ordering is on the roadmap.

How do I apply my own styling to the form?

Instructions for disabling or overriding the CSS are included on the plugin settings screen (see Style Settings).

What does "Use WPCF7 CSS integration" do?

This option adds the WPCF7 classes to the form fields so you get the WPCF7 CSS styles applied (if that plugin is also activated).

Is it possible to make multiple forms with this plugin?

Yes, version 2.0 introduces this feature. Version 2.1 allows you to duplicate forms to reduce re-entering data.

How do I change the Lead Source that shows up in Salesforce?

You can easily change this by going into the WordPress-to-Lead admin panel and, under form settings, changing the Lead Source for that form. Daddy Analytics uers can set this to blank to have it automatically filled.

I want to include the full URL the form is embedded on, but SF limits the lead source to 40 characters -- how would I do that?

The lead source supports using %URL% as the lead source (which will be replaced with the form embed url), but SF inexplicably limits the lead source to 40 characters.

Here's how to route around that:

/*
How to use:
1. Create a custom URL field at SalesForce (or Text field that holds more than 255 characters if you desire). A URL field makes it clickable in the lead detail view(s).
2. Replace URL_CUSTOM_FIELD_NAME below with the name of the custom field you setup in SalesForce,
   it will be something like EmbedUrl__c
3. Add a hidden field to each form with the same field name (e.g. "EmbedUrl__c")
4. Profit
*/

add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_embedurl', 10, 3 );
function salesforce_w2l_field_embedurl( $val, $field, $form ){

    // Target a specific field on all forms
    if( $field == 'URL_CUSTOM_FIELD_NAME' )
         $val = esc_url("http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);

    return $val;

}

https://gist.github.com/nciske/10047552

Can I change the submit button?

Of course you can! Go into the WordPress-to-Lead admin panel and, under Form Settings, change the text from the default "Submit" to whatever you'd like it to be!

Will I lose data if I upgrade to 2.0? Do I need to change anything?

Nope! The plugin will migrate your existing data to the new format. Your existing form will become Form 1 and be output by the [salesforce] shortcode).

How do I show my other forms?

Just use [salesforce form="X"] (X is the form number). Or select a form number in the widget.

I put my campaign name in the Campaign_ID field but it's not working

The Campaign_ID field requires the Campaign ID -- the name will not work. To find the Campaign_ID, go your the campaign page and look in the URL bar for the ID:

e.g. https://salesforce.com/621U000000IJat

In this example, 621U000000IJat is the Campaign_ID -- make sure you use the ID from the campaign you want the lead attached to and not the example ID shown here.

Does the return/thanks URL have to be on my site?

No, as long as it's a valid URL it will work. However it should be an absolute URL regardless of where it is located. e.g. http://yoursite.com/thanks/ not just /thanks/

Is there a limit to how many leads can be captured?

While the plugin has no limits, SalesForce does limit API calls per day:

The daily limit for Web-to-Lead requests is 500. If your organization exceeds its daily Web-to-Lead limit, the Default Lead Creator (specified in the Web-to-Lead setup page) receives an email containing the additional lead information.

See also: How many leads can we capture from our website?

Requires: 3.5.2 or higher
Compatible up to: 3.9.2
Last Updated: 2014-8-21
Downloads: 34,368

Ratings

3 stars
3.8 out of 5 stars

Support

26 of 39 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 67,3,2 100,2,2 100,1,1
0,1,0
100,1,1
100,1,1 100,1,1
100,1,1
100,1,1
0,1,0
100,1,1 50,8,4
33,3,1
0,1,0
100,1,1 100,1,1
100,1,1
100,1,1
100,1,1
100,1,1 100,1,1
100,1,1 100,1,1
100,1,1 0,1,0
0,1,0