As a Salesforce Admin, you can customize your Box for Salesforce environment using Salesforce Flows and call methods from the Box Developer Toolkit. As you set up this process, the Box for Salesforce Managed Package has two pre-built Salesforce Flows that you can use and or customize. The first flow allows you to create a default folder structure for new Box folders (labeled the Opportunity Folder Under Account) and the second allows you to populate new record folders with a pre-selected template (labeled the Account Folder Template).
Creating Default Folder Structures
If you have a record-based flow that is triggered when a user creates a new Salesforce Opportunity record folder, you can apply a common default folder structure from pre-templated Salesforce flows.
To create a default folder structure:
- Query for the account’s folder ID createFolderForRecordId method and pass the account ID as an argument. This will retrieve the existing account folder ID or create it if not already existing.
- Create a folder for the Salesforce newly created opportunity using createFolderForRecordId method, passing the opportunity ID.
- Move the Opportunity Box folder under the parent Account box folder using the moveFolder toolkit method.
The result is a folder created in Box for the opportunity (and account if it did not exist). The new opportunity folder should be under the parent account folder in Box.
Enabling Pre-User-Selected Templates
If you have a record-based flow that is triggered when a user creates a new Salesforce Account record folder, you can select which template generates for the new folder.
To Enable Pre-User-Selected Templates:
- Retrieve or hardcode the user-selected templated folder ID.
- Automate creation of a folder using createFolderForRecordIdFromTemplate (instead of createFolderForRecordId) using the call method/flow action.
- As a Salesforce admin, you must supply the cloning toolkit method a specific folder ID for the source folder to clone.
The result is a folder created in Box for the account with a new Box folder containing all the contents of the source folder.