How to Connect Salesforce to Your WordPress Forms: The Complete Guide

Integrating Salesforce with WordPress is a powerful way to capture more leads and synchronize data between your website and CRM.

This comprehensive guide will show you how to set up this integration in a few easy steps.

After 15 years as a web developer and working on hundreds of client websites, I‘ve found connecting WordPress and Salesforce can significantly improve sales and marketing workflows for business when done right.

In this post, I‘ll share step-by-step how to:

  • Install and configure the required WordPress and Salesforce apps
  • Create web forms that sync to Salesforce objects
  • Embed forms on your WordPress site
  • Troubleshoot common integration issues

I‘ll also provide tips and best practices based on my experience to help you get the most out of this integration.

Let‘s get started!

Why Connect WordPress with Salesforce?

Here are some of the top reasons to integrate your WordPress website with Salesforce:

  • Generate more leads – Forms on your website seamlessly save lead data directly into Salesforce for immediate follow up.

  • Update CRM Automatically – Contact information from WordPress forms update corresponding records in Salesforce in real-time.

  • No duplicate records – Integration helps avoid duplicate leads or contacts in CRM.

  • Track lead sources – Salesforce reports help analyze which pages, campaigns, ads generate more leads.

  • Improve data quality – Customer information stays up to date across both platforms.

  • Enhance customer service – Sales and support teams have full customer context from website interactions.

According to Salesforce‘s Q2 2022 report, their platform now has over 150,000 customers. WordPress powers over 40% of all websites on the internet.

Integrating the two platforms is becoming increasingly popular to streamline sales and marketing data.

Next, let‘s go over how to connect WordPress with Salesforce step-by-step.

Step 1 – Install and Activate WPForms Plugin

The easiest way to integrate WordPress with Salesforce is by using a dedicated integration plugin.

For this guide, we‘ll use WPForms – the most popular WordPress contact form plugin trusted by over 5 million websites.

WPForms offers a Salesforce addon that handles all the complex steps behind the scenes to sync your WordPress forms with Salesforce.

Because WPForms is a paid plugin, first purchase a copy from their website or authorized resellers.

After purchase, you‘ll get a license key via email. Now install and activate WPForms:

  1. Download the WPForms plugin file from your purchase receipt.

  2. In your WordPress admin, go to Plugins » Add New.

  3. Click on Upload Plugin button.

  4. Select the WPForms plugin .zip file and click Install Now.

  5. After installation completes, click Activate Plugin.

This will install and activate the WPForms plugin on your WordPress site.

Step 2 – Get WPForms Salesforce Addon

To sync forms with Salesforce, you need the WPForms Salesforce Addon.

This is included with the WPForms Elite license plan.

Follow these steps to install the Salesforce Addon:

  1. Go to WPForms » Addons in your WordPress dashboard.

  2. Find the Salesforce Integration addon and click Install.

  3. The addon will be automatically downloaded and activated.

That‘s it! WPForms Salesforce addon is now ready to use.

Step 3 – Create a Connected App in Salesforce

For WPForms to securely connect with your Salesforce account, you need to create a connected app inside Salesforce.

Here is how to create one quickly:

  1. Log in to your Salesforce account and go to Setup » Build > Create > Apps

  2. Click New under Connected Apps section.

  3. Give your app a name and contact email.

  4. Check the Enable OAuth Settings box.

  5. Enter the Callback URL from your WPForms Salesforce integration settings page.

  6. For OAuth scopes, select:

    • Access and manage your data (api)
    • Perform requests on your behalf at any time (refresh_token, offline_access)
  7. Click Save to create your connected app.

This will register the WPForms WordPress app in your Salesforce account.

Make note of the Consumer Key and Consumer Secret values on the resulting page. We‘ll need those in the next step.

Step 4 – Enter Salesforce Credentials in WPForms

Now you need to connect WPForms with your Salesforce account using the API credentials from the connected app.

Here‘s how to do it:

  1. Go to WPForms » Settings » Integrations

  2. Under Salesforce section, click Add New Account.

  3. Enter the Consumer Key and Consumer Secret from your Salesforce connected app.

  4. Click Connect to Salesforce and log in to your Salesforce account.

  5. Allow WPForms to access your Salesforce data.

This will authorize the integration and complete the handshake between both platforms.

Step 5 – Create a Form in WPForms

WPForms drag and drop form builder makes it easy to create any type of form.

Let‘s build a simple contact form for this guide:

  1. Go to WPForms » Add New to launch form builder.

  2. Select the Contact Form template.

  3. Customize fields as needed. For this demo, we‘ll add Name, Email, and Message fields.

  4. Once done, click Save to create the new form.

Now your contact form is ready. Later we‘ll connect it to Salesforce.

Step 6 – Connect Form to Salesforce

To automatically sync form entries with Salesforce, you need to connect your form.

Here are the steps:

  1. Open your form settings and go to the Salesforce tab.

  2. Click on Add New Connection button.

  3. Give your connection a name and select Salesforce object (Lead, Contact, etc).

  4. Map form fields to corresponding Salesforce fields.

  5. Click Save. Your form is now connected.

The connection settings allow you to choose which Salesforce object records are created from submitted form data.

Step 7 – Embed Form on a WordPress Page

To display your form on the front-end, you need to embed it in a post, page, or widget.

Here is how to easily add it to a page:

  1. Create or edit the page where you want to display the form.

  2. Click on the Add Block button and search for ‘WPForms‘.

  3. Select the WPForms Forms block.

  4. Choose your form from the dropdown inside the block.

  5. Publish the page and view it on the front-end.

That‘s it! Your form is now live and collecting leads on your website.

Step 8 – Test the Form and Salesforce Integration

It‘s important to test that your form is working and data is saving to Salesforce as expected.

Follow these steps to validate the integration:

  1. Submit a test entry through your form.

  2. Navigate to the corresponding Salesforce object.

  3. Verify the lead or contact submitted via the form is now visible.

  4. Check all fields have been mapped properly without data loss.

  5. Try submitting a few test entries and ensure they save correctly.

If everything checks out, your WordPress and Salesforce integration is working perfectly!

Troubleshooting Common Salesforce Integration Issues

When setting up a Salesforce integration, you may encounter problems like:

  • Form not displaying on page
  • Errors on submitting form
  • Entries not saving to Salesforce
  • Form data mapping incorrectly

Here are some tips to troubleshoot issues:

  • Make sure you have WPForms Elite license before using Salesforce integration.

  • Confirm the API credentials and permissions are correct in both WPForms and Salesforce.

  • Try reauthorizing the connection and check for error messages.

  • Verify your Salesforce edition supports API access.

  • Check form and field mapping settings to match up with Salesforce fields.

  • Review server logs for any errors related to connection or data saving.

  • Use wpforms or salesforce API logs to inspect requests and responses.

  • Temporarily disable plugins that modify form behavior to isolate the issue.

In most cases, the problem is incorrect configuration or app permission settings. Retracing the setup steps should help resolve it.

Tips for Integrating Salesforce and WordPress

Here are some pro tips for a smooth Salesforce and WordPress integration based on my experience:

Use field mapping carefully – Map form fields to the corresponding Salesforce fields of the same data type. Mismatched fields can cause data errors.

Prevent duplicate records – Use conditional logic to check for existing contacts or leads before creating new ones.

Embed on high value pages – Add forms on pages like Contact Us or pricing pages to capture more leads.

Customize form emails – Use Merge Tags to reference Salesforce lead details in WPForms notification emails.

Utilize Salesforce features – Create lead scores, assignment rules, and campaigns in Salesforce to segment incoming leads.

Install support plugins – Add plugins like WP ERP and PieSync to extend CRM functionality.

Monitor integration – Check Salesforce reports weekly to confirm lead data is flowing properly.

Secure both systems – Follow WordPress and Salesforce security best practices to protect customer data.

Optimizing these areas will ensure you get the most value out of connecting your WordPress site with Salesforce.

Conclusion

Integrating WordPress with Salesforce creates a powerful lead generation pipeline combining the best CMS and CRM platforms.

In this guide, you learned how to:

  • Set up WPForms and the Salesforce addon

  • Create a connected app to link Salesforce with your WordPress site

  • Build forms that automatically sync submissions to Salesforce

  • Embed forms on your pages using WordPress blocks

  • Troubleshoot issues with the integration

  • Use tips and best practices to improve the Salesforce-WordPress connection

Connecting your website and CRM is a great way to streamline lead management and boost sales.

I hope this detailed guide helps you successfully integrate WordPress forms with Salesforce for your business. Let me know if you have any other questions!

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.