Box + Salesforce Flow Tutorial

Alex Novotny
Box Developer Blog
Published in
5 min readMay 9, 2023

Happy Cloud Content Summit 2023! If you haven’t signed up for the event yet, its not too late to join in today. There are three developer focused sessions on using Box Platform and a wealth of other cool demos and announcements you won’t want to miss.

Since we didn’t have a session specifically dedicated to Box for Salesforce, I wanted to provide an overview on using Salesforce Flows. You might remember that towards the end of 2022, I did parts 1 and 2 of Getting Started with Box for Salesforce Development. Since that time, our Salesforce engineering team has been hard at work making several updates to the managed package — including redesigning the install and administration experience, introducing flow templates for common customizations, and adding UI Elements lightning components.

Salesforce Flow? What’s that?

If you are asking yourself this question, it is probably a good idea to start by going through the Flows 101 Trailhead mix — made by Box Consulting’s very own Nick Read.

At a high level, Salesforce released flows as the low code/no code future for admins to automate their instance. Going further, they released Flow Builder to enhance the user experience of creating and managing flows.

For customizing Box for Salesforce, that means you no longer have to manually write APEX triggers and classes — instead, you can drag and drop actions in Flow Builder to achieve similar outcomes.

Let’s walk through setting up the account folder template flow!

Before you begin

This tutorial shows how to implement a specific Box for Salesforce Flow template, but in order to follow along, there are some prerequisites that I won’t be going over in this blog.

  • You will need to have followed this guide to install and configure the latest Box for Salesforce managed package. This requires enterprise accounts for both Box and Salesforce. It is highly recommended to test and develop in sandbox environments.
  • If you already have the managed package installed, visit the installed packages page to confirm your package is on v.4.0 or higher. If not, click here to install the update.
  • If you have already made customizations to your Salesforce instance using APEX triggers and classes, you will need to deprecate that logic. Otherwise, the new flow and your old code will clash.

Tutorial

Step 1

In Box, create a template folder that you want the Salesforce Flow to use. This set of folders will get automatically created each time you make a new account in Salesforce. Make sure to collaborate the Salesforce service account into the folder that your managed package is set up with, and make note of the folder id — you will need it in a later step.

Folder created in Box

Step 2

Login to your Salesforce instance and open the setup section. Then, find the Flows menu option under process automation and click it — you can also search for Flows in the search bar at the top of the screen.

Flows menu option

Step 3

Click the account folder template flow. This will open the Flow Builder in a new browser tab.

Account folder template flow

Step 4

Click on the set template folder value element. Then, click edit element.

Edit assignment element

Step 5

In the value field, paste in the folder id you took note of in step one. Then, click done.

Paste in the folder id

Step 6

Now, click save as in the top right.

Save as your flow

Step 7

Give the flow a label, api name and description. Click Save.

Create new flow

Step 8

The new flow will load. Click activate to turn on the flow.

Activate flow

Try it out!

Create a new account in Sales. In the Box widget, you will notice that the folders from the template have been copied into this account’s folder.

Create an account

Isn’t that awesome? And — you didn’t have to code anything!

Other included flows

As of v4.0, Box also includes two other Salesforce Flow templates. The setup process is similar to the account folder template demo I showed above. We have more templates planned for the future. Stay tuned!

Opportunity Folder Under Account

This flow will create the folder structure I demoed in my previous blog posts. Instead of the object folders being created within a siloed object level folder structure, all content for a specified account will get created under that one account’s root folder.

Custom Folder Hierarchy

Box Folder Partitioning

Similar to the above flow, this template will organize and partition the specified object root folders alphabetically. For example, instead of all accounts living under the accounts root folder, you would have an A, B, C, etc. folder under the accounts root folder. In those subsequent folders, account folders would be created and placed based on the first letter of their name. This division is useful when you have a large customer base to go after. With some small edits to the flow, you could further divide the structure by year, region, or other logical divisor.

Custom built flows

In addition to using the templates included in the managed package, you can also create your own using any of the methods provided with the install. Keep a lookout for a future blog post on creating a flow using the Box API from scratch.

Resources

Latest version of the Box for Salesforce managed package

Box for Salesforce Installation Guide

Creating the Box Sign button in Salesforce guide

Box for Salesforce developer resources

We hope you enjoyed this blog on Box for Salesforce. Feel free to reach out to us on the developer forum for support. Special thanks to Nick Read from Box Consulting!

--

--

Alex Novotny
Box Developer Blog

I’m a Box Developer Advocate, helping others learn how to maximize their investment through Box Platform.