Salesforce is currently transitioning to the use of Salesforce Files for their file management system. If you would like to send a form respondent's upload to Salesforce Files, please follow the steps below. This will allow you to send a file to the new "Files" tab in Salesforce Lightning.
This can be useful for having centrally managed files on your Salesforce Instance, that can also be shared out with others in your organization. You can read our recent blog post for more information and additional guidance.
You can also use the Quick Reference Mapping section below for an overview of the fields you will need to map in your connector.
Configuring your Salesforce Connector
1. In your Salesforce Connector, begin by creating a new "ContentVersion" record.
2. You should map the Version Data field and the Path on Client field to the upload field in your form.
3. Next, for the First Publish Location ID, you will want to map that to the ID of the object you want to associate this file with.
For example, if you were going to associate this file with a contact, the contact creation step would need to come before the ContentVersion connector step, so that its ID could be referenced here.
4. You will also need to map the Content Origin field. Mapping a formula with a value of "C" will mean that the Content is from a library (or an external source). Mapping an "H" will mean the file is to be stored in a chatter post (chatter must be enabled). For this setup, we recommend using an "H".
5. Finally, for the Content Location, you can map an "S" for the file being within Salesforce, and an "E" for the file being external to Salesforce. For this setup, we recommend mapping an "S".
Please see the image below for an example of these mappings:
Quick Reference Mappings
- Create a new ContentVersion step in your connector.
- "Version Data" field is mapped to the FormAssembly file upload field.
- "Path on Client" field is mapped to the FormAssembly file upload field.
- "First Publish Location ID" is mapped to the ID of the record you want the file associated with.
- "Content Origin" is set to a formula with the value "H" (Chatter must be enabled).
- "Content Location" is set to a formula with the value "S".
Additional Notes and Troubleshooting
- The maximum file size you can upload via the SOAP API must be less than 50 MB.
- When a document is uploaded or downloaded via the API, it is converted to base64 and stored in VersionData.
- This conversion increases the document size by approximately 37%. You must account for the base64 conversion increase so that the file you plan to upload is less than 50 MB.
Technically, the “Title” and “ContentDocumentID” fields are required mappings in the connector. However, you do not need to map these two fields. If you do map the “ContentDocumentID” it will likely result in an error.
You can choose to map the Title field if you would like to rename the file.
Linking a File to Multiple Objects
You can also use the Content Document Link record to connect the uploaded file to multiple objects.
The Content Document Link object has a field called "Linked Entity ID" which can be mapped to a number of different objects.
For example, if you want to connect the uploaded file to both an account and a contact, you can use two Content Document Link steps in your connector, each with the "Linked Entity ID" being mapping to a different object.