Integrate Formidable Forms with your Salesforce account with the WordPress Salesforce integration plugin. Add the data submitted from your WordPress forms as Contacts or Leads in your Salesforce account.
You can send data to any custom object in Salesforce. Custom objects allow you to save extra data to Salesforce that is collected in your form, but isn't standard on the Salesforce side. These serve as custom database tables that allow you to store information unique to your organization. This includes accounts, announcement, assets, campaigns, cases, groups, contacts, contracts, email messages, events, ideas, leads, notes, orders, products, tasks, goals, and more.
Note: The Salesforce add-on doesn't send data back to Formidable if the entry is updated within Salesforce. This is a current limitation of the Salesforce add-on.
Download and Install
- If you haven't already done so, install and activate Formidable Forms Pro.
- In your WordPress admin, go to Formidable → Add-Ons and click the Install button for the WordPress Salesforce integration plugin.
Setup Formidable for Salesforce Forms
The Client ID and Client Secret key must be saved in your WordPress dashboard under Formidable → Global Settings → Salesforce. This allows Formidable to communicate with Salesforce. To get these values, follow the steps below.
Get Client ID and Client Secret key
Create a connected app
To get client ID and Client Secret you will need to create a connected app in your Salesforce account.
Go to Setup → Apps → App Manager → Manage Connected Apps in your Salesforce dashboard and click the New Connected App button.
- Add Connected App Name, API Name, and Contact Email.
- Check the 'Enable OAuth Settings' box and add https://login.salesforce.com/services/oauth2/success in the Callback Url box.
If you are using the Salesforce sandbox, use https://test.salesforce.com/services/oauth2/success instead.
- In the 'Selected OAuth Scopes' section, select 'Full Access' and 'Perform requests on your behalf at any time (refresh_token, offline_access)'.
- Click the Save button.
Save keys in global settings
After you save your new connected app, you'll be taken to the page with details about it. This page includes the 'Consumer key' and a link to Click to reveal the Consumer Secret key.
- Go to the WordPress dashboard on the Formidable → Global Settings → Salesforce tab.
- Paste your Consumer Key and Consumer Secret key on this page and click the Update Options button.
- Click the Authorize button.
- When you click the 'Authorize' button a pop will open. Login with your Salesforce credentials and give access to app. The url will now include ?code= in the url. Copy this code from the url and close the popup.
- Go back to the Formidable → Global Settings → Salesforce tab, paste this code into the 'Auth code' box. Replace the %3D%3D at the end of the code with == and click 'Update options'.
- You're all set to create your Salesforce forms. The Deauthorize button should now show on the page to indicate authorization was successful.
If you would like to run tests in Sandbox mode, you'll need a Salesforce sandbox account. Sandbox testing can be done at https://test.salesforce.com/.
Setup Salesforce form settings
Now that your WordPress site is connected to your Salesforce account, it's time to create your Salesforce forms.
- If you haven't already created a form to collect your customers and leads, create a form now.
- Go to edit the form which you will be linking to Salesforce. Go to the Settings → Actions & Notifications tab for this form and click on the Salesforce icon.
- This will give you the mapping settings for your Salesforce form. First, choose the type of object you would like to create. This includes contacts, leads, events, and many more.
- The Salesforce forms plugin will automatically fetch all the fields depending on your Object selection (Contact/ Leads). Your current form fields will be seen on the left which you can match up with Salesforce form fields. Be sure to map a form field to each required Salesforce field.
- Save the changes and submit an entry in your form. The object you selected should now have a new item showing in Salesforce.
No options in the form action
When a Salesforce form action is added, it should include a dropdown filled with all the possible Salesforce objects. If this dropdown is empty, there is a connection error between your site and Salesforce.
- Make sure your Salesforce account type includes access to the API. The required account types are either Enterprise or Unlimited.
- Go to the Formidable -> Global settings page and click save. Do you see an error message about your Salesforce API key? If so, start with correcting the error. 'expired authorization code' is a common error message. In this case, the authorization code needs to be updated.
- If the API keys are all correct, and no error messages appear, return to the form action and click the "clear cache" button.
- After the cache is cleared, open the form action again. If an error message appears, take action to resolve it. For example, if you see an error message like 'The REST API is not enabled for this Organization', your Salesforce account will need adjustment.
- Turn on debug mode and check for any error messages. For example, if you see an error message like 'cURL error 35: SSL connect error', this usually means that the CURL version on your site needs to be updated. You would need to reach out to your webhost to let them know what the error message says.
The Formidable → Global Settings → Salesforce page includes an option to turn on debug mode. When enabled, any error messages will show on-screen after the form is submitted.
When debug mode is either on or off, log messages can be saved. To see messages after any API calls, install the Logs plugin and follow the instructions on that page.
Owner ID: id value of incorrect type
If you map an incorrect Owner ID in the form action settings, you will get a MALFORMED_ID error. The owner ID does not have to be mapped to a field, and can be left out. If you choose to include the owner ID, it must be the ID of a user on the account. Please refer to the Salesforce docs for information on how to find the user ID.