Upload Documents and Files

Uploading Files

It is possible to upload binary files and documents using the connector to Salesforce using the ContentVersion import type.

The current functionality permits the ability to upload new documents; new versions to existing documents are not supported.

The underlying Salesforce API for handling objects is complex, consisting of multiple records. The Salesforce connector simplifies the complexity by providing a single endpoint where the relationships between the records are generated through the connector.

Import Type

Set the import type to Content Version.

Key Fields

  • FilePath (**Client Path to the File)
    • This field is the local server/client file path pointing to the file to be uploaded. The field can either be a string or binary type as it the file path is valid.
  • PathOnClient
    • This field is required by Salesforce and is used to display the preview of the file.
    • If this field is not mapped the value will be taken from the File name part of the FilePath field. We recommend specifying this value when the FilePath field is binary type since the Binary type field may have a temporary name and extension not representative of actual file being uploaded.
  • FirstPublishLocationId
    • This field is id the record which the file/dodument will be related. For example, if the file/document will be related to an Opportunity, this field will contain the Id of the Opportunity.
    • Use the Salesforce Lookups function to query Salesforce if the Id for record is not known.
  • Other Fields
    • The purpose of the other fields can be found from the ContentVersion Salesforce reference.

Upload Logic & Action on Transform Error

This details the handling of the Action on Transform Error setting:

  • Abort
    • When set to Abort the connector will upload one file/record at a time synchronously. Due to the slow pace Abort is recommended only for small volumes or during design/testing.
  • Reject Record or Continue
    • The connector will upload files/records in multiple batches of 200, where the number of synchronous batches is determined by four times the CPU count.