We moved a global medical device manufacturer’s Salesforce files into Azure Blob Storage, freed up 6 TB of Salesforce file storage, and kept every file one click away on the record, just as before.

The challenge

The client had used 96% of their 14 TB of Salesforce file storage and was close to the limit. Buying more storage from Salesforce is expensive and wasn’t an option. They needed the files out of Salesforce, without disrupting the people who open them every day and without weakening the quality and retention controls a medical device company has to meet.

The files couldn’t be moved from inside Salesforce either. Apex heap and callout limits top out at about 12 MB, and many of the files were larger than that.

6 TBof Salesforce file storage freed up
53%of file storage in use after the move, down from 96%
0changes to how users find, preview and download files

At commonly quoted Salesforce rates, buying 6 TB of extra file storage would cost an estimated six figures a year. In Azure Blob Storage, the same files cost a small fraction of that.

What We Built

A destination they already trusted

The client already ran other business processes on Azure, and their security team had already approved it. Azure Blob Storage holds the files cheaply, and choosing it meant no new vendor review and no delay.

A migration that runs outside Salesforce

A Python process exports each file from Salesforce, uploads it to Azure Blob Storage, verifies the copy, and only then deletes the original to reclaim the space. Running outside the org means no file is too large to move.

Scheduled, resumable runs

The migration runs on a schedule in Azure DevOps Pipelines, working through the backlog in controlled batches and picking up where it left off after every run. New files are archived the same way, and scheduled backups protect what’s in Azure.

A file manager on the record

Salesforce keeps a lightweight pointer to each file. A Lightning Web Component on the record reads those pointers and lets users preview PDFs, images and Office documents right on the page, or download them.

Security

Nothing is public, and every link expires in minutes

When a user opens a file, the component requests a short-lived SAS token: a signed URL that grants temporary access to that one file in Azure and expires within minutes. Files are never exposed publicly, and access still runs through Salesforce, so users only see the files on records they can already open.

How We Delivered It

Users kept working the whole time. From their side, the only change was a new component on the record.

  1. Choose the destination

    Azure Blob Storage, on a platform the client already used and their security team had already approved.

  2. Build the viewer

    A Lightning Web Component that previews and downloads files from Azure through short-lived SAS links.

  3. Build the migration

    An export, upload, verify and delete process in Python that handles files of any size.

  4. Run on a schedule

    Azure DevOps Pipelines drain the backlog in controlled batches and resume after every run.

Built With

  • Salesforce
  • Lightning Web Components
  • Microsoft Azure
  • Azure Blob Storage
  • SAS tokens
  • Azure DevOps Pipelines
  • Python

Running Out of Salesforce Storage?

If your org is near its file storage limit, we can move your files to Azure, cut the storage bill, and keep them right where your users expect to find them.