Different Salesforce editions include anywhere between 1GB to 20MB of file storage, and while extra storage can be purchased, many organisations find themselves using a separate Document Management System (DMS) to store and manage documents related to their Salesforce records. In these instances, manoeuvring between software applications can be time-consuming and cumbersome, but in our experience, organisations still wish to continue using their external DMS alongside Salesforce. Consequently, to improve productivity while maintaining separate systems, we are helping more and more organisations with integrating their external DMS directly into Salesforce.
Here we will look at four DMSs that are popular among our clients - SharePoint, Dropbox, Box, and Google Drive. When finding any solution, we first look at the out-of-the-box options, before then considering when further development may be necessary. We have found that often the quickest and easiest way to integrate an external DMS with Salesforce is by using one of the many available packages on the AppExchange. For each of the DMSs here, we found these current solutions have a lot to offer: sFiles for SharePoint, Dropbox for Salesforce for Dropbox, Box for Salesforce for Box, and Drive Connect for Google Drive.
In this blog post, we will cover the following:
- File Management
- Linking to existing external files
- Uploading and linking new files
- How links appear in the component UI
- Viewing and editing an external file
- Unlinking or deleting content
- Automated file creation
- Folder Management
- Default automatic folder creation
- Automation using Flow Builder and formula fields
- Dynamically linking Salesforce records to existing folders
- Managing folder structure
- Folder reassignment
- Viewing folder structure in the component
- Managing Salesforce records that have links to the DMS
- Reparenting records with links
- Deleting or undeleting a record with links
- Converting Leads with links
- Permissions / Access Control
- Are users restricted by DMS permissions?
- Are users restricted by Salesforce permissions?
- Are there different types of accounts for different users?
- Using external files elsewhere in Salesforce
- Transferral of files from Notes & Attachments
- Using the solution with Communities
- Sharing files over Chatter
- Sending files via email
- Sharing links of files with external users
- Custom functionality
Let’s start with the basic use cases from a Salesforce user’s perspective: What they typically want to do is link files to Salesforce records and interact with those files on some level.
Linking to existing external files
SFiles, Dropbox for Salesforce, Box for Salesforce, and Drive Connect all include a component that can be added to the Lightning Page for a given Salesforce record. Once set up, links can be created from that record to the content available in the DMS. Each file on the DMS can only ever be linked to a single record - this was the case in all solutions except in Drive Connect, where the same external file can be linked to multiple different records.
Uploading and linking new files
All solutions allow for the manual upload of one or more files by either browsing the local machine or with drag and drop. All uploads done through the component are saved to the associated DMS (and not on Salesforce), though all uploaded files could also be linked during the upload process.
How links appear in the component UI
All linked content, files and folders, for a particular record are listed in the component on the record page: All solutions successfully filtered the list view to only display the external content linked to the specific record, and Box for Salesforce also offered the same results in a grid view.
Viewing and editing an external file
All solutions provided some way for users to view and edit the external files. However, while sFiles, Dropbox for Salesforce, and Box for Salesforce open a new browser tab to where the document is located in its DMS, only Drive Connect will open a popup window where the user can read, edit, and save changes without ever having to leave Salesforce.
Unlinking or deleting content
Unlinking is something unique to Drive Connect, which allows a user to unlink a file or folder from a record without necessarily deleting it. For example, if the record was linked to the wrong file by mistake then performing this action will disassociate the file or folder but leave it available on Google Drive.
Unlinking content through Drive Connect included the option to also delete the file, which means also moving it to the Trash Folder in Google Drive until it is permanently deleted on the DMS.
All other solutions simply only had a delete option available in the component, which would perform a similar action: For example, sFiles moved the deleted folder to the “Recycle Folder” on SharePoint until permanently deleted.
Out of all the solutions, Dropbox for Salesforce is the only solution to provide a method to undelete files and folders that are still in the recycling bin without having to leave Salesforce. To undelete a folder on the other solutions the user has to access the file or folder through the solution website rather than through the component in Salesforce.
Automated file creation
Each of the solutions differs in what automatic file creation they provide. Drive Connect offers a feature called Templates, that allows files to be quickly generated by the user or automatically through flows based on a Template. Templates are pre-made documents that may include merge fields, which allows for record-specific information to be included when the file is generated.
Dropbox for Salesforce also has a template feature, but it works slightly differently from Drive Connect. The template feature in Dropbox for Salesforce can enable the automated creation of a folder structure for each Salesforce record folder. With the use of a template folder stored in the sObject root folder, the folder for each new Salesforce record created will automatically contain the same folders as the template folder.
We have seen the basic functions these components offer. Now we will consider questions an administrator or manager might have surrounding folder structure, organisation and hierarchy.
Default automatic folder creation
All solutions are first connected to a root folder on the DMS, in which all other related folders reside. From here, folders can be added manually or will be created automatically, depending on the solution: Dropbox for Salesforce, sFiles, and Box for Salesforce automatically create a default folder for each object automatically, whereas folders can only be created manually in Drive Connect unless using the Flow Builder.
By default, solutions with automatic folder creation follow an object-by-object Salesforce structure, meaning every Account gets its own folder and every Contact, Opportunity and Lead gets its own folder.
Automation using Flow Builder and formula fields
Drive Connect includes a special Flow Builder Action that can be triggered when a change has been made to a record to automatically create files and folders. These files can even be made from Templates, meaning automatically-created documents can even contain information on the record that was created or updated.
While other solutions can’t easily be included in Flow Builder, they do allow for automated actions through formula fields, which can be used to automatically name or rename folders or to create complex folder structures.
Dynamically linking Salesforce records to existing folders
When integrating a DMS to your Salesforce org, it is very likely you are not starting from scratch, and already have many documents on the DMS. So the question becomes, do any of these solutions provide an automatic way to link records with existing folders on the DMS?
Sadly the answer essentially is no, not without utilising APIs to build a custom solution for this problem. Having said that, sFiles may allow for some content to be dynamically linked, but it depends heavily on your current SharePoint folder: provided the structure is simple enough and named appropriately, it may lend itself to being mapped to the object structure in Salesforce.
Of the other solutions, only Drive Connect has any kind of built-in method for performing automated mapping with folders by using the Flow Builder. However, any automated linking that may be achievable using the Flow Builder, will only affect updated or newly created records, and may therefore require some kind of custom code to trigger an update on all the records in the system.
Managing folder structure
In all other solutions, it is possible to add subfolders to a default folder of an object if the user has permission to do so. However, this does not mean that all solutions allow for the modification of their folder structure: Box for Salesforce does not allow for the modification of its folder structure.
Drive Connect allows users to define a default folder specifically for a record, that will override the default folder of what the administrator chose for the object. However, this really only adds ease when saving files, as it is the default folder that it is surfaced as the first location choice when saving. In fact, the user can still navigate between folders from there to save a file in a different location if need be, and because users can also create new subfolders, it is quite easy to develop a structure for different records as required.
sFiles and Dropbox for Salesforce do not easily allow for folder reassignment. Only Drive Connect allows for multiple links on the same folders and therefore folders can be easily reassigned manually by adding a new link and removing the older one. This may also be performed automatically in Drive Connect using the Flow Builder.
Viewing folder structure in the component
All solutions include folders and subfolders that are associated with a record: They are listed along with the files but the hierarchy is represented differently in each solution. For example, in Drive Connect only the default folder for that object or record is distinguished by a star symbol; whereas in sFiles, the list displayed is the content of a given folder, and by clicking a folder in that list will refresh the content displayed to list the new content of the subfolder.
MANAGING SALESFORCE RECORDS THAT HAVE LINKS TO THE DMS
Reparenting records with links
There may be times when records are reparented, for example, if a Contact or an Opportunity record is reparented to a different Account. In these instances, the treatment of linked files varies depending on the solution: in Drive Connect and Dropbox for Salesforce, there is no risk of deleting external files on the DMS nor losing links that Salesforce records may have to content on the DMS.
However, in sFiles, while there is no risk of content actually being deleted on the DMS, the maintenance of links depends on the folder structure in place: If the folder structure is mimicking the salesforce object structure (meaning that an Accounts Opportunities will be stored in an Opportunity subfolder of that Account) then the initial link will be lost, otherwise, the link will remain intact; To maintain links while also mimicking Salesforce object structure it is only possible using sFiles API or the SharePoint APIs in a custom-built solution.
Deleting or undeleting a record with links
In cases where a Salesforce record is being deleted either manually or automatically, no solution will automatically cause linked files or folders in the DMS to also be deleted, and at most will be simply unlinked.
Additionally, no solutions handle manual or automatic retrieval of deleted files and folders from the DMSs’ archive folder in special incidents when the Salesforce record is undeleted.
Converting Leads with links
Let’s imagine a scenario where a Lead record, that has already been linked to folders in the DMS, is now being converted to an Account - What happens to those linked folders? In fact, each solution differs slightly in this answer.
Dropbox for Salesforce automatically creates a new empty Account folder when the Lead is converted, but only if the original Lead folder contains any content. Drive Connect adds the Lead’s links to the newly created Account, as well as to the Contact, and Opportunity.
Both sFiles and Box for Salesforce include configuration rules to control what will happen, but Box for Salesforce gives the most nuanced options, allowing the Account, Contact, or Opportunity object to potentially inherit the Lead’s folder.
PERMISSIONS / ACCESS CONTROL
Access control is one of the most important considerations when integrating a DMS with a Salesforce Org, especially in organisations that deal with private or sensitive data.
Are users restricted by DMS permissions?
Dropbox for Salesforce and Box for Salesforce take permission settings from Salesforce, meaning it checks the user’s permissions within Salesforce first before it returns files and folders to the user interface. Dropbox for Salesforce uses the Salesforce permissions by default, the administrator does have the ability to configure the Dropbox sharing settings so that Salesforce Sharing rules are not followed. Box for Salesforce on the other hand needs to sync the permissions for records in settings or have a scheduled sync as permissions are not set automatically.
Drive Connect only hosts one Google Drive, and users who have given permission to access that Drive is then allowed to use it. On the contrary, sFiles uses SharePoint permissions to control user access and can prevent users from seeing or modifying files and folders to which they shouldn’t have access.
Are there different types of accounts for different users?
In some solutions, it is possible to control the type of account a user can log in with, which helps manage the amount of access that user will have. SFiles offers both “Named Principal” and “Per User” identity types. If using “per user”, the SharePoint rules of the user logged in will be applied, meaning it is possible to implement different rules on different files and folders stored in the same locations: If a certain user shouldn’t be allowed to view only a single document in a folder then this can be done.
Dropbox for Salesforce on the other hand does not create different types of accounts like sFiles. Instead, every user can use a standard Dropbox account to access Salesforce record files. Each account will have a “Salesforce Documents” folder and a “Private Salesforce Documents” folder. This is how Dropbox for Salesforce restricts access to files on Salesforce records. Documents and files stored in the “Private Salesforce Documents” folder are files and documents only the owner of those files can see. Documents in the “Salesforce Documents” folder are documents that can be accessed by all.
Box for Salesforce works quite similar to sFiles in the sense that it provides two levels of accounts for its users. One is known as the “Box service account”, which can be considered to be the administrator account and is used exclusively for integration purposes. The accounts used by users to access the files stored on Box are the standard user accounts. These accounts do not have access to configurations but can carry out basic functionalities in the Box for Salesforce component.
Drive Connect is quite different from the rest of the DMSs: It appears to only ever work with a single primary Google Drive account, which is selected during setup. Although users must be whitelisted to log in to Google Drive via Drive Connect, they then gain entry to that primary Google Drive account from the root folder and have the same permissions as the owner of the Google Drive.
Using external files elsewhere in Salesforce
So far we have discussed setup considerations and use cases where files are linked to a record from the record object page. However, there may be times when linked documentation needs to be shared with other internal or external people, and so we consider how the solution relates to other modules in the Salesforce Org.
Transferral of files from Notes & Attachments
None of the solutions allows for documents to be transferred from Salesforce Notes & Attachments to the DMS folder. Although in Drive Connect, linked files are automatically included in Notes & Attachments.
Using the solution with Communities
Only Drive Connect with the use of the Drive Connect Pro Extension package and the Enterprise Edition of sFiles includes components that can be used on a Community site page. While Dropbox for Salesforce doesn’t include a Community page component, it can be added as a VisualForce page and then selecting the Dropbox for Salesforce component by the object.
Sharing files over Chatter
Dropbox for Salesforce is the only Data Management Solution that can share files and folders through Chatter. Sharing through chatter is made easy with Dropbox to Salesforce, when the user decides to share a file or folder they’re prompted with an options menu to select the way they want to share the file or folder. When sharing files and folders through Chatter, Dropbox will create a “share” link for the file or folder which will be sent to the recipient.
Sending files via email
Dropbox for Salesforce, Box for Salesforce, and Drive connect all include the ability to send files directly from the component: For example, in Drive connect a popup window appears and up to 10 Google Drive documents are attached along with standard email fields, such as subject and message.
Sharing links of files with external users
Of the solutions, sFiles was the only to not include a way to directly share files through email, but the problem could be overcome by instead sending the URL to the content they wish to share. In fact all solutions offer some method of retrieving the URL of the document, which can then be shared with people internal or external to Salesforce.
Any URLs shared impose the sharing rules from the DMS on the external user and in the case of Box, requires that the external user has a Box account to view the document.
Typically sharing rules of the DMS are set using the DMS and not available through the solutions’ component; Only Box for Salesforce provides a way to update any permissions when sharing a file.
Of the four solutions we discussed, there are many great functionalities available that are easy to use and highly configurable without the need for further development. Of course, no solution does everything, and each has its pitfalls depending on business requirements. We now take a look now at where these solutions could be improved, and if there are any nice-to-have functionalities worth considering if developing a solution from scratch, or indeed if extending the functionality of a 3rd-party solution.
There are APIs available for each of the DMSs, and in some cases, there are even APIs for the solution, which allows for the development of the existing component. SharePoint for example is built on the Microsoft Graph API that sFiles, but also includes a ClientAPI. So while a new custom solution could be built from scratch using the Microsoft Graph APIs, customizations could instead be made to sFiles such as making a Lightning component popup to edit files instead of redirecting users to a new tab in SharePoint.
Similarly, Dropbox for Salesforce and Box for Salesforce allow developers to open up functionality through the use of APIs. These APIs can allow for the integration of more functionality so users can perform additional tasks such as creating folder locks, which is the ability to lock a folder so it cannot be moved or deleted. They could also be used to control permissions by adding domains to a collaboration list, meaning only domains on that list can collaborate on folders and documents. Box for Salesforce could also be integrated with another package called Box Sign for document signing: This extension provides an integrated method for sending a “sign request”, which involves sharing a document with a person who must then sign it.
Zapier and Workato. For example, Workato could be used to assist in the automated deletion of a contact folder in Dropbox for Salesforce when a Contact in Salesforce is deleted.
Likewise, Zapier also may also work to perform other features missing, and could for example be used to connect Google Drive to Chatter. Drive Connect is the only of these solutions that do not currently include an API, but custom solutions for integration with Google Drive could be done through the Google Drive APIs.
Other nice-to-haves that could be added include developing a grid view for the solutions that only provide a list view, and making Flow actions or Community site page components for a Salesforce administrator to use. Special connections with other Salesforce objects may also be created, for example, there may be options to add uploads Notes & Attachments automatically on the DMS or to include these files in Email or Chatter. Similarly, when unlinking or deleting a file or folder, other actions could be performed like deleting files on the DMS automatically, or if some condition is met, to then have links be created from the record to files or folders dynamically.
TO SUM IT ALL UP
There are many factors to consider when integrating an external DMS into Salesforce, and the best solution will vary depending on business requirements and automation needs. This blog discussed some of these factors while comparing sFiles for SharePoint, Dropbox for Salesforce for Dropbox, Box for Salesforce for Box, and Drive Connect for Google Drive. There is however no single answer, and while these apps may suffice in many scenarios, there are times when custom solutions are required, and new or enhanced solutions must be developed.
Regardless of what solution is chosen, we hope that this blog has helped highlight some of the essential questions that we have seen raised by organisations when seeking the right integration solution. The must-haves and the nice-to-haves may vary with regards to the management of folder hierarchies, the control of user access and permissions both internally and externally, what different automation is required, and the interaction with other Salesforce modules, such as Communities and Chatter, but there is always a solution. By assessing the nuanced use cases and determining what must be automated, you can know if an out-of-the-box solution already exists or if a custom-built solution is required.
This blog post was written collectively by the members of our current graduate programme. Fern Bartley, Jack Curtin, Stephen Creighton, Alex Sirbu, Peter mcKeever, Jordan Gardner, David Buckingham