Skip to main content

Hello, I am new to developing for the Box platform and having a hard time understanding the first steps. I went through Getting started with Box for Salesforce development: Part 1 and Part 2, but they are using the box Toolkit which doesn’t offer the full API functionality. I’ve installed the Box SDK in my Salesforce Sandbox but there’s so many classes and seemingly no guide for how to get started. Can I use the box.Toolkit along with the SDK? My initial tasks will be to maintain a folder structure separate from the default to hold archived files, and to push files into this separate folder structure. 

Hello, I am new to developing for the Box platform and having a hard time understanding the first steps. I went through Getting started with Box for Salesforce development: Part 1 and Part 2, but they are using the box Toolkit which doesn’t offer the full API functionality. I’ve installed the Box SDK in my Salesforce Sandbox but there’s so many classes and seemingly no guide for how to get started. Can I use the box.Toolkit along with the SDK? My initial tasks will be to maintain a folder structure separate from the default to hold archived files, and to push files into this separate folder structure. 

Yes, you can use Box Toolkit alongside the Box SDK - they serve different purposes and can coexist. The Toolkit handles basic integrations and UI components, while the SDK gives you full programmatic API access for custom functionality.

Getting Started with Box SDK in Salesforce:

Key classes to focus on:

  • box.Toolkit - For basic operations (already familiar)
  • box.Client - Main class for API calls
  • box.Folder - For folder operations
  • box.File - For file operations

For your specific use case (custom folder structure + archiving):

  1. Authenticate: Use box.Toolkit.getDefaultClient() to get an authenticated client instance
  2. Create folder structure: Use box.Folder.createFolder() with parent folder IDs
  3. Move files: Use box.File.moveFile() or copy operations
  4. Search/navigate: Use box.Folder.getItems() to traverse folders

Quick starter pattern:

box.Client client = box.Toolkit.getDefaultClient();
box.Folder parentFolder = new box.Folder(client, 'parentFolderId');
// Create archive folder
// Move/copy files

Best resource: Check the Box Platform Developer Documentation (developer.box.com) and look for the Salesforce SDK examples on GitHub. The official Box Salesforce SDK repo has sample code that's more comprehensive than the Getting Started guides.


Best Regards,
Henry Cowan​​​​​​​