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 users submit your forms.
In this tutorial, we’ll show you how to install and use the Salesforce addon with WPForms.
- Installing the Salesforce Addon
- Creating a New App in Salesforce
- Connecting Salesforce to WPForms
- Adding Salesforce Integration to Your Forms
- Testing Your Forms
- Frequently Asked Questions
Requirements: To use the Salesforce addon, you will need an Elite license.
Your site must load over SSL (HTTPS) to connect it to Salesforce. For more information on how to set up an SSL certificate, check out WPBeginner’s guide to using HTTPS.
You will also need to check that your edition of Salesforce supports API access in order to use it with WPForms.
1. Installing the Salesforce Addon
Before getting started, you’ll first need to make sure that WPForms is installed and activated on your WordPress site.
2. Creating a New App in Salesforce
If you haven’t created a Salesforce account already, go ahead and do so now.
In order to connect WPForms with Salesforce, you’ll first need to create an app within your Salesforce account.
Once you’ve logged in, make sure you’re using the Salesforce Classic dashboard. To switch to the Classic dashboard, click on your profile icon in the upper-right corner, then select the Switch to Salesforce Classic option.
Once you’ve opened the Classic dashboard, click the Setup tab in the navigation bar.
From there, you can use the Quick Find/Search bar in the left panel to search for “Apps.”
From the options that populate, select Build » Create » Apps.
This will redirect you to a list of all the available apps in your Salesforce account. To add a new connected app, scroll to the Connected Apps section and select the New button.
This will open a list of options that you’ll need to fill out. Fields highlighted with red are required. You can see a description of each field below:
- Connected App Name: A nickname for your app, which your users in Salesforce will see. This can be anything you’d like.
- API Name: This field will automatically default to the Connected App Name, but you can change it to whatever you’d like. If you plan on using custom code for your integration, your developers will need this API name for customization.
- Contact Email: The contact email of the person creating the app.
Next, you’ll need to check the Enable OAuth Settings option to configure your app’s permissions.
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.
The Callback URL is the URL that you will be redirected to after you’ve allowed authorization for your connected app (which we’ll cover later on). To find your Callback URL, open up your WordPress dashboard in a new tab or window.
Then, navigate to WPForms » Settings » Integrations and click on the Salesforce integration.
This will expand to show an Add New Account button.
Click this button to reveal the integration settings, which include the Callback URL for your site.
Go ahead and copy the Callback URL, but leave this window open, as you’ll need to return to it later on.
Once you’ve copied your Callback URL, navigate back to your Salesforce settings and paste it into the Callback URL field.
Selected OAuth Scopes
The Selected OAuth Scopes tell Salesforce what permissions your app should have. WPForms only needs two permissions: Access and manage your data (api) and Perform requests on your behalf at any time (refresh_token, offline_access).
You can add these permissions by selecting each of them from the column on the left, then clicking the Add button.
Once you’ve added these permissions, scroll to the bottom of the page and click the Save button to complete the setup process.
If you’ve configured your app correctly, Salesforce should redirect you to a page with a notice that reads, Allow from 2-10 minutes for your changes to take effect on the server before using the connected app.
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 you avoid potential errors in the connection process.
After the 10-minute waiting period, click the Continue button to view your API information.
3. Connecting Salesforce to WPForms
Once 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.
You can find your Consumer Key directly under the API information in your app’s profile.
Go ahead and copy this information, then navigate back to your WPForms settings. Here, you’ll need to paste your Consumer Key into the Consumer Key field.
To reveal your Consumer Secret in your Salesforce account, select the Click to reveal button.
You can then copy this information and paste it into your WPForms settings in the Consumer Secret field.
Once you’ve added both your Consumer Key and Consumer Secret, click the Connect to Salesforce button.
This will redirect you to the Salesforce login page, where you’ll need to enter your username and password.
Then, 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.
Once you have allowed WPForms to access your Salesforce account, you should be redirected back to your Integrations settings, where you will see a banner at the top of the screen letting you know that the connection was successful.
4. Adding Salesforce Integration to a Form
After you’ve linked your Salesforce account to WPForms, you’re ready to connect it with your forms. To get started, you’ll need to create a new form or edit an existing one.
After opening the form builder, you can add a new Salesforce connection under Marketing » Salesforce. From here, you’ll need to click the blue Add New Connection button.
This will open an overlay where you can add a name to your connection. The name won’t ever be seen by any of your users. It’s simply meant to help you keep track of multiple connections.
For our example, we’ll name the connection Add New Contact.
Click the OK button to save your connection, and the Select Account and Select Salesforce Object settings should become visible.
- Select Account: The Salesforce account you’d like to send form data to.
- Select Salesforce Object: What type of data you’re 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.
Once you’ve selected a Salesforce Object, more configuration options will appear.
- Custom Field Name: These are specific fields within Salesforce that you’d like to map your WPForms fields to. For our example, we’ll use the default Full Name field and add the Email field as well.
- Form Field Value: These are the fields in your form that you want to pull data from into Salesforce. For our example, we’ll map Full Name to the Name field in our form, and map Email to our Email field.
If you’d like to add more Custom Fields to your integration, you can click the plus (+) button.
After you’ve configured all of your settings, be sure to save your form.
5. Testing Your Forms
Once you’ve set up your form, it’s a good idea to test it 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:
After submitting your test, head over to your Salesforce account and navigate to the plus (+) button at the top of the screen 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.
To see the details of our submission, we’ll click on the contact’s name to open up their profile.
This will show the full details of the contact, where we can check that all of our submission’s mapped fields have correctly passed through to Salesforce.
Frequently Asked Questions
Below, we’ve discussed some of the most common questions we receive about the Salesforce addon.
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, and Developer editions. If your edition doesn’t have API support, please reach out to Salesforce’s team for more details on how to change your edition.
Note: API support is available to Salesforce Professional customers at an additional cost. For more information, go to the Salesforce pricing page and click on Connect Sales info to any app.
When connecting WPForms to Salesforce, I get redirected to a page with the error
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).
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! Now you can 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.