Salesforce Integration Setup

With Formstack, you can replace your Salesforce web-to-lead, web-to-case, or web-to-anything forms with a Formstack form.  This allows for more control over the form, prevents spam, and uses client-side validation.  You can also use Formstack functionality such as Routing Logic, customized messages, multiple redirect URLs, and more. 


Note: To use the Salesforce API, your organization must use the Performance, Unlimited, Professional**, Developer or Enterprise*** Editions.  Also, it is recommended that you create an API-only user at Salesforce and that you create a security token to use with the API.

** You must have API access on your professional account in order to use our integration.

***The Enterprise Edition of Salesforce must utilize the Salesforce Partner API.  To verify the version of API in your Salesforce Edition, please check the API settings in your Salesforce account.


Adding the Salesforce Integration 

To add the integration, click on Settings > Integration > CRM > the "Add" button next to Salesforce. Additionally, you can use the Search Bar to find it.  This will create a "Salesforce" tab under the "3rd Party Integration" tab.  Click on this and fill in your username, password, and security token.




Once your credentials have been added, a list of "Objects" from your Salesforce account will populate.  When you choose an "Object" from the list, the fields for that "Object" will appear, and you can map the fields on your form to the fields in Salesforce.  You may add multiple "Objects" to your integration setting and remove them at any time.


Note: If you are sending file attachments to Salesforce, you must store your data in the Formstack database or those files won't be transferred.  To see more on adding attachments to your Salesforce integration, please click here.



Using the Upsert Feature

If you integrate your form with Salesforce, you can update records via certain objects if that object data already exists rather than create a new record every time. One field you can upsert is the Email Address Field. If you include an Email Address Field on your form and check the "Upsert" option in the Salesforce integration settings, records will be updated via the email address if a record already exists with that email address attached. If you don't check upsert, a new record will be created upon each submission.


Note: Fields that Formstack recognizes as "upsertable" are determined by Salesforce, and we currently do not have a way to edit or force a field to upsert.


Re-Running the Integration

If an integration fails upon submission, check your integration settings for errors in API or login credentials or in the mapping of form fields. Then, click on a submission in your database. You will see ‘Integration Status’ on the left side of the submission. Click "Run Again". The integration will begin running. If it is successful, a green "Success" message will appear. If it is not, a red "Failed” message will be shown. If this happens, go back to your integration settings and check for other errors in setup.




Error Troubleshooting

Here are 2 common errors you may experience when using this integration:

1. We are getting the following error: There was an error submitting the form. Salesforce error: REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.

 Salesforce will set limits on the number of API calls that can be placed within a 24 hour period. This particular error is generating from Salesforce and indicates a limit has been reached. To get a precise number of how many requests Salesforce is able to make, you may need to get in touch with Salesforce support, as it is dependent on your edition level of Salesforce as well as how many and what kind of licenses you have on your Salesforce account.


2. We're getting an "HTTP 500 Internal Server Error - this page cannot be displayed" message when we try to submit the form with attachments totaling over 5MB.

This error is caused by the Salesforce attachment size limitation. Currently, Salesforce caps files at 5MB when sent through the API, which is what is used in the Formstack integration. The Salesforce restriction is documented here. 

Unfortunately, this is a setting/restriction within Salesforce. Therefore, we are limited on what we can do to allow the attachments to process through.  The form and Formstack database should not have any issues handling uploaded files. Rather, the type of issue occurs when the data hits the Salesforce API.

Further error messages and suggested troubleshooting steps for our Salesforce integration can be found here.


Was this article helpful?
9 out of 35 found this helpful