Salesforce is one of the most popular customer management software on the market. Connecting it to your WordPress forms allows you to automatically add leads, customers, and other contacts to your CRM.
Setting Up WPForms to Connect With Salesforce
You’ll need WPForms. It is the best WordPress contact form plugin used by over 3 million website owners.
You can use it to easily create any type of form using a simple drag and drop form builder.
WPForms is a premium WordPress plugin, and you’ll need their Elite plan to use the Salesforce addon.
First, you need to install and activate the WPForms plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, you need to visit the WPForms » Settings page to enter your license key. You can find this key under your account on the WPForms website.
Setting Up the Connection Between WPForms and Salesforce
Now, you need to set up a connection between WPForms and Salesforce. WPForms comes with the Salesforce addon which lets you easily connect the two apps together.
Simply go to the WPForms » Addons page and locate the Salesforce addon. Click on the Install button and it will be installed and activated automatically.
After that, go to the WPForms » Settings » Integrations page. Here, you need to click on the Salesforce integration to open it up.
Under Salesforce settings, click on the Add New Account button. WPForms will show you Salesforce settings with a Callback URL.
Simply keep the tab open in your browser or copy the Callback URL to a safe place. You’ll need it in a later step.
Now, you need to create an app in your Salesforce account.
You can check what edition you have by switching to the Classic view of Salesforce (see below). Then, go to Administer » Company Profile » Company Information. You will see your edition listed next to ‘Organization Edition’ on the left-hand side of the screen.
If you don’t already have an account, go to Salesforce’s Developers website. Simply click on the Sign up button at the top and then fill in your details.
After completing the signup, you’ll reach your Salesforce account dashboard. From here, you need to switch to the Salesforce Classic dashboard by clicking on your profile icon on the top, and then click the ‘Switch to Salesforce Classic’ option.
Next, you need to click on the Setup link at the top to access the Salesforce dashboard settings.
On the next screen, Navigate to the click Build » Create » Apps menu from the column on your left hand.
This will bring you to the Apps section. From here, click on the New button under the Connected Apps section:
You now need to fill in the details for your app.
For the Connected App Name, enter a name you want to use. Other users for your Salesforce account will see this.
The API name will default to the Connected App Name. You don’t need to enter or change it.
For the contact email, enter your email address.
You don’t need to enter the logo image, icon, info URL, or description. These fields are for Salesforce users who will be publishing their app.
Below this, you need to check the ‘Enable OAuth Settings’ box:
Once you check the box, you will see the OAuth settings:
First, you need to enter the Callback URL that you found earlier in your WPForms account.
The Selected OAuth Scopes let Salesforce know what permissions your app should have. You need to enable 2 permissions here. They are ‘Access and manage your data’ and ‘Perform requests on your behalf at any time’.
Simply select these and then click the ‘Add’ arrow to add those permissions:
There’s nothing else you need to change on this page. After adding the permissions, simply click the Save button at the bottom of the page.
You should then see a message telling you to allow 2 – 10 minutes for your changes to take effect:
Click on the Continue button and you’ll see your API information:
We recommend that you wait 10 minutes before using your app. That way, you can be sure that your app will be ready.
After the 10 minutes is up, you need to copy your Consumer Key and Consumer Secret to WPForms.
Your Consumer Key is shown just below the API (Enable OAuth Settings) section:
Your Consumer Secret is next to it. You need to click the ‘Click to Reveal’ link to see your Consumer Secret:
Now, simply switch back to the tab with your WPForms Salesforce settings. If you closed this, it’s easy to find it again in your WordPress admin. Just go to the WPForms » Settings » Integrations page.
Simply copy and paste the Consumer Key and Consumer Secret into the Salesforce settings for WPForms:
Then, go ahead and click the ‘Connect to Salesforce’ button:
You will then be prompted to log in to your Salesforce. Simply log in to your account using your username and password.
Next, you need to click the ‘Allow’ button to give WPForms access to your Salesforce account:
After this, you will see your Integrations page again. There should be a message at the top of the screen to let you know that the connection was successful:
Now that you have connected WPForms to your Salesforce account. You can start creating forms and send entries directly to your Salesforce account.
Creating a WordPress Form with Salesforce Integration
The next step is to create your form.
Simply go to the WPForms » Add New page. This will launch the WPForms drag and drop form builder. Enter a name for your form and then click on a template.
You can connect any type of form to Salesforce. We’re going to use the basic contact form:
It’s easy to add, edit, or remove any of the fields you want from the default form. For instance, you could add a phone number field.
Once you are satisfied with the form, go to the Marketing » Salesforce tab to connect it with your Salesforce account.
You will then see a popup where you need to name your connection. Your site’s visitors will not see this. It’s just for your own use.
Just enter the name you want to use. Then, click the ‘OK’ button.
Now, you need to select your Salesforce account and Salesforce Object. This is the type of data you are sending to Salesforce, such as a contact or a lead.
Once you’ve chosen your Salesforce Object, you will see some new dropdowns:
Here, the ‘Custom Field Name’ column is the name of the field in your Salesforce account. The ‘Form Field Value’ is the name of the field on your form.
You need to select a Form Field Value for each custom field you want to use. This means your form data will be entered into the correct field in Salesforce.
The only required field is the Full Name field in Salesforce. For this, select ‘Name’ as the Form Field value.
Next, go ahead and select a different field from the dropdown below this. Simply choose which WPForms field you want to map it to. To add more fields, click the blue + button.
We have included the email and phone fields from our form here:
Don’t forget to click the Save button at the top of the screen after adding your Salesforce connection.
Adding Your Form to a WordPress Page or Post
WPForms makes it super easy to add forms anywhere on your WordPress website.
Simply edit the post or page where you want to add the form or create a new one. On the content editor screen, click on the (+) add new block button and then add a WPForms block to your page:
Next, you need to choose your contact form from the dropdown list within the block. Finally, go ahead and publish your page to see your form live on your site.
For more detailed instructions, check out our step by step guide to creating a contact form in WPForms.
It’s best practice to test your form to make sure that you’ve correctly connected Salesforce.
Simply fill in some test data and click Submit.
After that, switch to your Salesforce account dashboard and you should see a new item listed on your homepage.
Just click on the name, and you will see the information for that contact. The email address, phone number, and any other details you mapped from your form will be included:
You’ve successfully connected Salesforce to WPForms. Now, all your new contacts will be automatically added to Salesforce for you.