REGISTER NOW: Supercharge Your Cloud Integrations and Watch Our Webinar Recording

Kloudless Blog

Tutorials, case studies and how-tos from our experts

A Glance at Files in Salesforce

Salesforce is one of the leading CRM platforms today, and as such is one of the many services supported by Kloudless. Given Salesforce’s position as a market leader in multiple product categories, Kloudless API supports its file storage features in addition to its CRM capabilities.

File Storage in a CRM system

Unlike other file storage services, where data is organized in a tree-like hierarchy with folders and files, Salesforce primarily tracks users’ file data in the form of individual Salesforce objects. These objects represent a small subset of the large collection of data types inside Salesforce. A simple way to think of it is that Salesforce associates the bulk of users’ file storage data with records in a database rather than as files in a filesystem.

Users upload files via the Salesforce UI into a few different areas for collaboration. In the Classic Salesforce UI, the object types present are Documents, Libraries, and Chatter – their collaboration platform. The newer Lightening Experience UI streamlines this somewhat, but for better or worse, it obfuscates how things are stored under the hood.

Perhaps due to legacy reasons, and depending on where files are located on the platform, Salesforce creates files related to collaboration as Attachments, Documents, or ContentDocuments. Each object type has a different set of attributes.

And due to some quirks, Salesforce implementation does not always observe conventional filesystem paradigms. For example, some folders populated with files may not be removable without being emptied first. Due to limitations of the Connect/Chatter API, it is also not possible to delete multiple files or folders at the same time.

Therefore, a common task such as retrieving a list of files in an account may actually prove relatively complex, requiring several separate requests for different items.

Salesforce Files in the Kloudless API

Kloudless simplifies accessing files in Salesforce by implementing a virtual filesystem-type view into file data within Salesforce. This lets us expose file-type data in Salesforce via the unified Kloudless Storage API (docs), and layer on additional features such as a file browser and activity monitoring.

For each API request to the Kloudless Storage API, Kloudless performs the appropriate requests to retrieve Salesforce objects and associated metadata, and returns a uniform representation of the data in Salesforce.

Here’s an example request to retrieve the contents of a Salesforce account’s root folder:

The response provides a virtual representation of different object types as “folders” in the user’s Salesforce account:

Users can dive further to access any files in their account. The Kloudless API also supports more advanced functionality such as Search, Links, and Activity Monitoring.

Sign up for free to check out our unified Storage and CRM APIs and quickly integrate over 30 popular cloud storage apps, or several popular CRM apps, with a single implementation.

Published By

Kevin Huang