A common question we get regarding our Salesforce integration is if it’s possible to send file uploads (attachments) to Salesforce. This is possible by integrating with Salesforce’s “Attachment” object. Attachments can be linked to many other Salesforce objects: Account, Leads, Opportunities, and Contracts to name a few.
Here is how to set it up:
- Add a file upload field to your form. This goes without saying, if you want to send an attachment to Salesforce you need to have a file upload field on your form. For this example, I’ve added a File upload field on a form labeled “Attachment”:
- Add an “Attachment” object in your Salesforce integration.
- Link the Attachment to the appropriate Salesforce object. To do this, set the Parent ID to Link. A select list will populate of all the objects the Attachment can be linked to.
- Link the Attachment to the File Upload field on your form. To do this, set the File Name and Body to Field; then select the file upload field from the list of fields. At this point my integration settings look like this:
- Save Settings
That’s it! When your form is filled out and a file is uploaded. We will send the file to Salesforce. It will appear as an attachment to it’s linked object (set by Parent ID). Here is a Screenshot of the attachment in Salesforce after I submitted my test form:.