How to Install and Use the Salesforce Addon with WPForms

Would you like to connect your WordPress forms to your Salesforce account? With WPForms’ Salesforce addon, you can automatically add new leads to your contacts when forms are submitted.

In this tutorial, we’ll show you how to install and use the Salesforce addon with WPForms.

  1. Installing the Salesforce Addon
  2. Creating a New App in Salesforce
  3. Adding Salesforce Integration to Your Forms
  4. Testing Your Forms
  5. Frequently Asked Questions

Requirements: To use the Salesforce addon, you will need an Elite license.

You will also need to check that your edition of Salesforce supports API access in order to use it with WPForms.

Installing the Salesforce Addon

Before getting started, you’ll first need to make sure that WPForms is installed and activated on your WordPress site.

Once you’ve got WPForms installed and your license is verified, you’ll be able to quickly install and activate the Salesforce addon.

Creating a New App in Salesforce

In order to connect WPForms with Salesforce, you’ll first need to create an app within your Salesforce account. If you haven’t created an account already, go ahead and do that now.

Once you’ve logged into your account, you’ll need to be sure you’re using the Salesforce Classic dashboard. To switch to the Classic dashboard, click on your profile icon in the upper-right corner, and then select the Switch to Salesforce Classic option.

Switch to Salesforce Classic

Once you’ve got the Classic dashboard open, go ahead and click the Setup tab in the navigation bar.

Setup Option in Salesforce

From there, you can use the Quick Find/Search bar in the left panel to search for Apps.

Salesforce Quick Find Search

From the options that populate, you can begin to build a new app by selecting Build » Create » Apps.

Create a New App in Salesforce

This will redirect you to a list of all available apps in your Salesforce account. To add a new connected app, scroll to the Connected Apps section and select the New button.

New Connected App in Salesforce

This will open up a list of options that you’ll need to fill out. Fields highlighted with red are required, and you can see a description of each field below:

  • Connected App Name: A nickname for your app, which will been seen by your users in Salesforce. This can be anything you’d like.
  • API Name: This field will automatically default to the Connected App Name, but you can change this to whatever you’d like. If you plan on having custom coding for your integration, your developers would need this API name for customization.
  • Contact Email: The contact email of the person creating the app.

New Salesforce App Basic Info

Next, you’ll need to check off the Enable OAuth Settings option, in order to configure your app’s permissions.

Enable OAuth Settings in Salesforce

This will open up more fields you’ll need to complete in order to finish setting up your app, with required fields marked in red.

Salesforce API Settings

Callback URL

The Callback URL is the URL that you will be redirected to, after you’ve allowed authorization for your connected app (which will be covered later on). To find your Callback URL, first open up WPForms in a new tab or window. Then, navigate to Settings » Integrations and click on the Salesforce integration.

Salesforce Integration in WPForms

This will expand to show an Add New Account button.

Add New Salesforce Account

Click this button to reveal the integration settings, which include the Callback URL for your site.

Callback URL in WPForms

Go ahead and copy the Callback URL, but leave this window open as you’ll need to come back to it later on.

Once you’ve copied your Callback URL, navigate back to your Salesforce settings and paste the URL into the Callback URL field.

Callback URL in Salesforce

Selected OAuth Scopes

The Selected OAuth Scopes tells Salesforce what permissions your app should have. WPForms only needs two permissions: Access and manage your data and Perform requests on your behalf at any time.

You can add these permissions by selecting each option from the column on the left, then clicking the Add button.

Selected OAuth Scopes for Salesforce

Once you’ve added these permissions, you can scroll to the bottom of the page and click the Save button to complete the setup process.

If everything has been configured correctly, you should be redirected to a page with a notice that reads Allow 2-10 minutes for your changes to take effect on the server before using the connected app.

Notice after app is connected in Salesforce

At this point, it’s recommended that you wait the full 10 minutes before moving on to the next step. This will ensure that your app has time to take effect in Salesforce, and will help avoid any potential errors in the connection process.

After the 10-minute waiting period, click the Continue button to view your API information.

Connecting Salesforce to WPForms

Now that you’ve opened up your API information, you’ll need to copy your Consumer Key and Consumer Secret in order to connect Salesforce with WPForms.

Consumer Key

You can find your Consumer Key directly under the API information within your app’s profile.

Consumer Key in Salesforce

Go ahead and copy this information, and navigate back to your WPForms settings. Then, you’ll need to paste your Consumer Key into the Consumer Key field.

Consumer Key Field

Consumer Secret

To reveal your Consumer Secret in your Salesforce account, select the Click to reveal button.

Consumer Secret in Salesforce

You can then copy this information and paste it in your WPForms settings under the Consumer Secret field.

Consumer Secret Field

Once you’ve added both your Consumer Key and Consumer Secret, click the Connect to Salesforce button.

Connect WPForms to Salesforce

This will redirect you to your Salesforce login, where you’ll need to log in one more time.

Sign in to Salesforce

After logging in, Salesforce will ask you if you’d like to allow access to your account. Go ahead and click the Allow button to finish the setup process.

Allow Access to Account in Salesforce

Once you have allowed access, you should be redirected back to your Integrations page, where you will see a banner at the top of the screen letting you know that the connection was successful.

Successful Connection to Salesforce

Adding Salesforce Integration to a Form

Once you’ve linked your Salesforce account, you’re ready to connect it with your forms. To get started, you’ll need to create a new form or edit an existing form.

After opening the form builder, you can add a new Salesforce connection for your form under Marketing » Salesforce. From there, you’ll need to click the blue Add a New Connection button.

Add new Salesforce Connection

This will open an overlay where you can add a name to your connection. This will never be seen by any of your users, and is meant to help you keep track of multiple connections. For our example, we’ll name the connection Add New Contact.

Connection Nickname in Salesforce

Click the OK button to save, and you should see more settings have opened up on the page: Select Account and Select Salesforce Object.

New Salesforce Connection

  • Select Account: This is the Salesforce account you’d like form data to be sent to.
  • Select Salesforce Object: What type of data you are sending to Salesforce.

For our example, we’ll set the Salesforce Object to Contact, so that each submission of our form will add a new contact in Salesforce.

Salesforce Setup

Once you’ve selected a Salesforce Object, this will open up more configuration options.

Salesforce Options in Form Builder

  • Custom Field Name: These options are specific fields within Salesforce that you’d like to map your WPForms fields to. For our example, we’ll have the default Full Name field, and choose the Email option for the second dropdown in this column.
  • Form Field Value: These options are the fields that you’ve added to your form. For our example, we’ll map Full Name to our Name field within our form, and map Email to our Email field.

Salesforce Settings in WPForms

If you’d like to add additional Custom Fields to your integration, you can click the + (plus) button.

Add a New Custom Field

Once you’ve configured all of your settings, be sure to save your form.

Testing Your Forms

Once you have set up your form, it’s a good idea to test things out on the frontend of your site. To do this without publishing the form to a live page, you can use the form preview option in WPForms, or create a private page or post.

Here’s an example of some data you might use in your test:

Salesforce Test Submission

After submitting your test, head over to your Salesforce account and navigate to the + (plus) option to open up a full list of available tabs. For our example, we’ll click on the Contacts option to view the new contact we’ve created.

Contacts List in Salesforce

To view the details of our submission, we’ll click on the contact’s name to open up its profile.

Select Contact in Salesforce

This will open up the full details of the contact, where we can check that all of our submission’s details have been correctly passed through to Salesforce.

Submission Details in Salesforce

Frequently Asked Questions

How do I find out whether my edition of Salesforce can be used with WPForms?

Currently, Salesforce only provides API support for the Enterprise, Unlimited, Performance, or Developer editions, so if your edition doesn’t have API support, please reach out to Salesforce’s team for more details on how to change your edition.

When connecting WPForms to Salesforce, I get redirected to a page with the error error=invalid_client_id&error_description=client%20

This means that there has been some issue in the setup process (either not waiting the full 10 minutes after creating your app, incorrect OAuth settings, or incorrectly copied keys).

To fix this, you’ll need to double check that you’ve enabled the correct OAuth settings for your app in Salesforce, and that your API keys have been copied correctly. If you haven’t waited the full 10 minutes after creating your app before attempting a connection, you’ll need to refresh the page after the waiting period and try again.

That’s it! We just showed you how to install and use the Salesforce addon with WPForms.

Next, would you like to process Authorize.Net payments through your forms? Be sure to check out our guide on how to set up and use the Authorize.Net addon for more details.