Technical Guide

This page contains technical information for experienced Salesforce administrators who are looking for a deeper explanation of the key operations and architecture.

API usage

Salesforce imposes strict governor limits on API usage, which can impact various operations. However, it's important to note how these limits apply when syncing with Dropbox:

Types of API Calls:
Salesforce categorizes API calls as either inbound or outbound:

Inbound API Calls: These are calls made to Salesforce from an external system.

Outbound API Calls: These are calls made from Salesforce to an external system.

Impact on Governor Limits:
Outbound Calls: Crucially, outbound calls from Salesforce do not count against the governor limits. This is significant when syncing with Dropbox.
Inbound Calls: Only these calls count against your Salesforce API limits.

Syncing with Dropbox:
All file operations to and from Dropbox are performed using outbound calls. For example, uploading or downloading files, creating folders, or managing shared links will not impact your Salesforce API limits. The integration uses OAuth2 authentication to securely connect to Dropbox, with automatic token refresh handling to maintain connectivity. The only scenarios where inbound API calls might be used are during initial setup or configuration changes through the Salesforce interface.

In general, you should not need to worry about the Dropbox application using up your inbound API limits. The integration handles large files (over 150MB) using Dropbox's upload session API, ensuring efficient file transfers regardless of size.

Custom Objects

When the installation has been completed, the Salesforce objects below will be created in your Salesforce Org. These objects contain either records or settings required for our application to work.
Our product has been designed to be self-contained, not to impact standard objects.

Db_Folder_Mapping__c - Links Salesforce records to Dropbox folders. This is the primary object that creates relationships between your Salesforce records (Accounts, Contacts, Opportunities, Cases, Leads) and Dropbox folders.

Db_Auth__c - Hierarchical custom settings for OAuth token storage. Stores OAuth2 authentication tokens securely at the user or organization level.

Db_Settings__c - General configuration settings for the integration, including operational parameters and debug settings.

Db_Constant__mdt - Custom metadata type for storing private Dropbox API constants with protected visibility for sensitive configuration data.

Our object structure should not be customized, as it may stop our application from working correctly or stop automated upgrades.

Background jobs

The Dropbox integration performs various operations to maintain synchronization between Salesforce and Dropbox. The integration primarily uses real-time operations with asynchronous processing support.

Sandboxes

You can install our integration in one or more sandboxes. You can also refresh a sandbox and our application will be copied across below is some more detailed information.

How to install in a sandbox

To install in sandbox simply click this link for the guide and packaging link.  Keep in mind sandboxes are for testing so we don't recommend connecting you actual Dropbox account instead set up a free account for testing.

Sandbox refresh

When you start a sandbox refresh, a copy of your installed applications will also be copied. This will include Dropbox for Salesforce and there are some important points below to consider.

We do not recommend you connect any sandbox to your live Dropbox account.
When a sandbox refresh happens we use a standard Salesforce process to disconnect Dropbox from Salesforce.
You can also manually run a process before or after the sandbox refresh to clear out connection settings.
When performing a refresh, whether for a full or partial sandbox, data from our objects can be copied from the production environment.

We don't recommend connecting a sandbox to your live Dropbox account. Changes made in a sandbox can incorrectly update your Dropbox data. Dropbox offers free accounts you can use to test.

Sandbox conflicts

As mentioned above, when refreshing a Salesforce sandbox, there may be some settings carried across from production. It is worth noting we do have some code that runs as part of the refresh to avoid this. But in very rare scenarios, the code can be conflicted with. So to help we have two options to return settings to their default state.

Before starting the sandbox refresh
When refreshing the Salesforce sandbox, there is now an option to run a post-installation script. You can enter the value DbSandboxPostCopy - this will execute our code to clear out the settings.

After the sandbox refresh
When refreshing the Salesforce sandbox our product should auto disconnect. If that does not happen due to a conflict, you can perform a reset manually:

1. Go to Salesforce Developer Console.
2. Open an execute anonymous window.
3. Type in this code: dbx.DbAPI.resetData();
4. Click Execute.

How to test in a sandbox

When you have our product in a sandbox we recommend connecting it to a test Dropbox account.

How to Uninstall

If you have purchased our product and have an active subscription you will need to contact us first. Once your subscription is canceled or you are in trial follow these steps:

1. Go to Setup > Installed Packages.
2. Click uninstall next to our product name.
3. The uninstall process might show dependencies which need to be removed first.

You need to be a Salesforce system administrator to peform the uninstall process.

In this article