Installing and Configuring Box For Salesforce

The Box for Salesforce integration is available at no extra charge for joint Box Enterprise/Salesforce customers.  To get the integration, contact your Box Customer Success Manager, or visit the Box for Salesforce integration page on the Salesforce App Exchange.

 

 

Installation and Initial Setup

 

Before you Install

You must have two Box accounts before you can install the Box for Salesforce integration:

  1. a Box service account, with a minimum of Admin or co-admin privileges and manage users or manage groups permission.  (If the Restrict Content Creation enterprise setting for this account is disabled, it does not need co-admin privileges.)  If you don’t already have a Box service account, create one -- that is, add boxforsalesforce@example.com as a managed user.  This account is exclusively for integration purposes.  It does not belong to an individual end user.  In addition, this account:
    • "owns" the Salesforce content on Box
    • makes API calls from Salesforce to Box for the entire enterprise
  1. a Box user account, to link an individual's Salesforce and Box accounts.

Note   The service account and user account must be discrete accounts, and both also must be managed users in your enterprise.  You cannot log in with the same account in both places.

You also must have two Salesforce accounts to access the Box for Salesforce integration:

  1. a Salesforce Admin Account for installing packages in Salesforce and linking the installed packages to the Box Service Account.  This account can be a regular user of Box for Salesforce integrations.
  2. a Salesforce User Account to link to a Box User Account and access Box content.

The Salesforce license must be a standard user license.

 

Installing Box for Salesforce

  1. Log into Salesforce as a Salesforce Admin.
  2. At separate points during the installation, the installer prompts you to:
    • accept and Approve Third-Party Access for remote settings.
    • Grant access to all users.
    • Click Next or Continue in other screens to complete the installation.
  3. When you complete the installation, the screen redisplays the Salesforce Box Connector App (Managed) page.

    box for salesforce setup.jpg

  4. On the top navigation, cick +.  The All Tabs page displays.
  5. Click Box Settings.  The Connect Salesforce to Box page displays.
  6. Click Box API Admin Login.  The Box API login page displays.
  7. Enter the Box Service Account credentials (see the Before you Install, above).

    box admin settings setup.jpg

  8. Specify a name for your Root Folder (such as Salesforce-<Org Identifier>.
  9. (Optional) Specify folder settings for lead conversions (optional)
  10. Specify your company's subdomain.  For example, if you log into Box at cloud.app.box.com, your subdomain is "cloud".
  11. Enable or disable Seamless Login and Auto-Collab
    • We recommend enabling these settings.
  12. Click Save Settings.  See Enabling Auto-Collab for a User below for more information.
  13. Add Box functionality to Salesforce objects (such as opportunities, accounts, and so on).  To learn how to do this, go to Embedding Box in a Salesforce Page.

The managed package setup is now complete.  You can log in to Salesforce and link Box and Salesforce accounts.

 

Granting Access After Installing

If you did not grant access to the package components to everyone during the installation, or if you have new profiles that require access to the Box for Salesforce integration, you can use permission sets to grant access to individuals or profiles. A permission set is a collection of settings and permissions that give account holders access to various tools and functions.

 

More information: Standard Salesforce documentation on assigning Permission Sets.

 

When to use Box for Salesforce Permission Sets

Use permission sets when:

  • you do not want to grant access to All Users when installing the package, instead preferring to grant package component access to specified profiles or individuals.
  • you create a new profile after the installation and want to grant access to the package components to that newly-created group.
  • you have a custom system admin profile and do not see the administrative settings in the Box Settings tab.

Types of Box for Salesforce Permission Sets

  • Box Admin: Grant this permission to people who will administer the integration; the installation does not enable you to grant admin access to customized system administrator profiles.
  • Box Standard: Grant this permission to anyone using the integration.

Granting Permission Sets

When you first install Box for Salesforce, you get the option to grant package access to All Users.  You can decline this option.  But if you do decline, then to administer and use the integration you may still need to grant the Admin and Standard permissions sets.

 

To grant permission sets

  1. In Salesforce, in the right portion of the screen, click Setup.

  2. In the lefthand navigation, click Permission Sets.

  3. On the Permission Sets page, click Box Admin or Box Standard.

  4. Click Manage Assignments.

  5. Click Add Assignments. 

  6. Click the user name you want and then click Assign.

  7. Grant the permission set for each individual and save your settings.

Note   Generally you can only assign permission sets to one person at a time.  To add users and grant permission sets in bulk, use the free Permissioner app   

 

Embedding Box in Standard Object Records Using Visual Force Pages

Use the following procedure for all Salesforce standard objects that require a Box Embed addition as part of the page layout:

  • accounts
  • cases
  • opportunities
  • contacts
  • leads
  1. From the Salesforce menu, in the top right corner click Setup.
  2. From the lefthand navigation, go to Build > Customize to find the object you want (leads, opportunities, and so on, or any Custom_Object).
  3. Expand the object's menu and click Page Layouts.
  4. Locate the page layout in which to add Box Embed, and click Edit.
  5. From the [Object] Layout > Field menu, drag a new Section into the page layout in the desired position. 
  6. Change the Section parameters:
    1. Assign a name for the section (for example, Box Files).
    2. Make the section 1-Column
    3. Click OK
    1. Add the newly-created Visual Force Page to the Page Layout:
      1. From the Lead Layout menu, click Visualforce Pages.
      2. Drag [object_name]BoxSection into your newly created Section.
      3. Click the wrench on the [object_name]BoxSection Visualforce page.
      4. For best viewing, set the height to 600 pixels (minimum).
      5. Click Save.

 

Embedding Box in Standard Object Records Using Lightning

  1. Go to the page of the Salesforce object in which you want to embed Box.  In this example we'll use the Salesforce Account.
  2. On the Account page, click the Gear icon, and from the drop-down menu that displays, click Edit Page. Gear icon - edit page.png

 

  1. In the lefthand navigation, click Visualforce.  This opens a pane on the right that displays several options for configuring your Visualforce page.
  2. In the pane on the right, preserve the default Visualforce Page Name (AccountBoxSection, LeadBoxSection, and so on).

Visualforce page options.png

 

  1. In the Label box, type in Box.  This labels the section when it displays in the object's Salesforce page.
  2. In the Height (in pixels) box, set the desired height for the Box section.  
  3. Drag and drop the Box section wherever you want on the page, or create a tab for it
  4. Click Save.
  5. When prompted, click Activate.
  6. Follow the next several prompts.
  7. Redisplay the Account page.  The Box section now displays inside the page.

Note   Box permissions mirror Salesforce permissions.  That means your access to Box content depends on your access to the Salesforce record.

 

Embedding Box Custom Object Records Using Visual Force Pages

 

  1. Log into Salesforce as a Salesforce Admin.
  2. For an existing custom object, create a new custom field in Custom_Object.  See Salesforce help for more details on custom objects.

Note   As of Box for Salesforce version 3.40, creating the FolderID field is no longer required. If you are on an older version of Box for Salesforce, please update or contact us.

  1. Create a new Visual Force page for Custom_Object -- for example, Custom_Object_Box_Section   (see Salesforce help for more details on creating Visual Force pages).
  2. Copy the following Visual Force page code and paste it in this new page.  
    <apex:page standardController=“Custom_Object__c" extensions="box.DisplayWidget" action="{!getLoginToken}" showHeader="false" sidebar="false" standardStylesheets="false">

    <apex:stylesheet value="{!URLFOR($Resource.box__BoxEmbed, 'BoxEmbed/style.css')}"/>

    <apex:variable var="isClassic" value="{!AND($User.UIThemeDisplayed != 'Theme4d', $User.UIThemeDisplayed != 'Theme4t')}" />

    <!-- LOGIN or CREATE FOLDER or JOIN FOLDER -->
    <apex:iframe id="classicBoxSection" src="/apex/box__BOXSection?id={!Custom_Object__c.Id}&param=Custom_Object_Box_Section" rendered="{!AND(displayBoxSection, isClassic)}" html-allowfullscreen="true" html-webkitallowfullscreen="true" html-msallowfullscreen="true" />
    <apex:iframe id="lightningBoxSection" src="/apex/box__BOXSection?id={!Custom_Object__c.Id}&param=Custom_Object_Box_Section" rendered="{!AND(displayBoxSection, NOT(isClassic))}" html-allowfullscreen="true" html-webkitallowfullscreen="true" html-msallowfullscreen="true" />
    <!-- /LOGIN or CREATE FOLDER or JOIN FOLDER -->

    <!-- BOX EMBED WIDGET -->
    <apex:iframe id="classicBoxWidget" src="{!folderShareLink}" rendered="{!AND(displayBoxWidget, isClassic)}" html-allowfullscreen="true" html-webkitallowfullscreen="true" html-msallowfullscreen="true" />
    <apex:iframe id="lightningBoxWidget" src="{!folderShareLink}" rendered="{!AND(displayBoxWidget, NOT(isClassic))}" html-allowfullscreen="true" html-webkitallowfullscreen="true" html-msallowfullscreen="true" />
    <!-- /BOX EMBED WIDGET -->

    </apex:page>

Note that parameters marked in bold are variables. Change these parameters to match your enterprise setup. For example:

  • Custom_Object__c: Change this variable to the API name of your custom object.
  • Custom_Object__c.Id: Change this variable to the API name of your custom object ID field.
  • Custom_Object_Box_Section: Change this variable to the API name of your Visual Force page.
  1. Add this newly-created section to the Custom Object Page Layout. See the Embedding Box in Standard Object Records section above for more details.

Sample Code Snippet

This code snippet example is for a custom object with the API name "sales_request__c" with a Visualforce page named and labelled "BoxLegalRequestFiles."

<apex:page standardController=“Sales_Request__c" extensions="box.DisplayWidget" action="{!getLoginToken}" showHeader="false" sidebar="false" standardStylesheets="false"> 
<apex:stylesheet value="{!URLFOR($Resource.box__BoxEmbed, 'BoxEmbed/style.css')}"/>
<apex:variable var="isClassic" value="{!AND($User.UIThemeDisplayed != 'Theme4d', $User.UIThemeDisplayed != 'Theme4t')}" />

<!-- LOGIN or CREATE FOLDER or JOIN FOLDER -->

<apex:iframe id="classicBoxSection" src="/apex/box__BOXSection?id={!Sales_Request__c.Id}&param=BoxLegalRequestFiles" rendered="{!AND(displayBoxSection, isClassic)}" html-allowfullscreen="true" html-webkitallowfullscreen="true" html-msallowfullscreen="true" />
<apex:iframe id="lightningBoxSection" src="/apex/box__BOXSection?id={!Sales_Request__c.Id}&param=BoxLegalRequestFiles" rendered="{!AND(displayBoxSection, NOT(isClassic))}" html-allowfullscreen="true" html-webkitallowfullscreen="true" html-msallowfullscreen="true" />

<!-- /LOGIN or CREATE FOLDER or JOIN FOLDER -->

<!-- BOX EMBED WIDGET -->

<apex:iframe id="classicBoxWidget" src="{!folderShareLink}" rendered="{!AND(displayBoxWidget, isClassic)}" html-allowfullscreen="true" html-webkitallowfullscreen="true" html-msallowfullscreen="true" />
<apex:iframe id="lightningBoxWidget" src="{!folderShareLink}" rendered="{!AND(displayBoxWidget, NOT(isClassic))}" html-allowfullscreen="true" html-webkitallowfullscreen="true" html-msallowfullscreen="true" />

<!-- /BOX EMBED WIDGET --> </apex:page>


 

Creating Record-Specific Folders 

Now that you can embed Box within standard and custom objects, your team can create record-specific folders in Box.
 
Creating record-specific folders 
 
 
If a Box folder already exists for this record, you are added to this folder as a collaborator and its contents displayed.  Any record-specific folders you join are also accessible directly from your Box account.

 

Embedding Box in Custom Tabs

You can also embed specific Box folders into Salesforce as custom Web tabs. 

 

To add a custom Box Embed Web tab

  1. Locate the Box folder you want to embed in Salesforce.  Then follow these instructions to generate an embed code.  Keep this window or tab open in your browser; later on you will need to copy and paste it.
  2. Create a Web tab in Salesforce.  To do this, go to Setup > App Setup > Create > Tabs.  In the section labeled Web Tabs, click New

  3. Click a Full page width Web tab, and then click Next

  4. For Tab Type, click URL

  5. Create a name for the tab that relates well to the content you are embedding. 

  6. Click a Tab Style, and then click Next.

Box salesforce userguide1

  1. Copy the embed code you generated in step 1, and paste it under the Button or Link URL field. Modify the link to follow this structure (remove the iframe portions): https://app.box.com/embed_widget/s/SHARED_LINK_VALUE?CUSTOMIZATION_PARAMETERS width="WIDTH" height="HEIGHT" frameborder="0"
  1. (Optional) Include customization parameters for your Box embed tab.  For example, you can hide the breadcrumb to All Files for visual simplicity, or remove comments and tasks. Additionally, you can promote OpenBox actions such as Post to Chatter.  For a full list of customization parameters and step-by-step instructions, see developers.box.com/box-embed.
  2. On the New Web Tab setup page, click the user profiles and custom apps to which you want to add the tab.  Then click Save.

 

Enabling Salesforce (Mobile)

 

To enable Box integrations for the Salesforce mobile application:

    1. From the Salesforce menu, in the top right corner, click Setup.
    2. Navigate to App Setup > Customize, and click the object you want to add the Box Embed interface.  Supported objects include:
      • accounts
      • cases
      • opportunities
      • contacts
      • leads

Note   The Box/Salesforce mobile interface does not support custom objects.

      1. Click Edit.
      2. Go to Object > Page Layouts to display the page layout to which you want to add Salesforce .
      3. Drag the [ObjectName]BoxSection into your Mobile Cards (Salesforce only) section.
      4. For best viewing, set the height to 56 pixels (minimum).
      5. Click Save

 

 

Settings and Configuration

You adjust settings and configure the integration from the Box Settings page.  Log into Salesforce as a Salesforce admin, and then go into Box and click the Box Settings tab.  If this tab does not display, click and search in the All Tabs page. 

Note   Both the system administrator and Salesforce license holders have access to the Box Settings tab.  However, only the system administrator can view the Box Admin Settings section within this tab.  If you do not see an admin section on the Box Settings page, you are not the admin.

 

Admin Settings

 

Convert Lead Folder

You can initiate the Box for Salesforce integration on any record type, including leads. The convert lead folder customization enables you to specify whether to move the record-specific folder when a lead converts. The default options include account, contact, and opportunity, but you can also map a lead to a custom object. 

 

When you select an object to convert lead folders, the record-specific folder automatically moves and inherits the new object naming convention.  For example, a lead converts to a contact.

 

If you click Do not move folders, the existing lead folder remains as a private folder within the Salesforce root-level folder.  (In this context, "private folder" means the record folder linked to the original lead record is no longer referenced or viewable within Salesforce.) 

 

Enabling the Box Enterprise sub-domain

If you use a sub-domain for your Box enterprise (for example, cloud.app.box.com instead of app.box.com), you must enter your sub-domain on the Box Settings tab.  This prevents issues that could occur when you use various Send with options on files within Box.  In Box, navigate to Admin Console > Enterprise Settings > Custom Setup, enter your sub-domain, and save your changes.

 

If you need assistance, please contact Box User Services.

 

Sync Salesforce and Box Permissions

This setting enables you to use Salesforce access as a model whenever you update access to record-specific folders. This removes collaborators who gain access to record content through the integration via Box despite losing access to a given record in Salesforce. 

 

As the administrator, you can run the process by clicking Sync Now. This removes collaborators who could use their Box folder access to gain access to the record in Salesforce (either by visiting the record or by using an invitation to collaborate).      

Note   Clicking Sync Now does not affect any collaborations you may have added manually in Box.

To schedule a regular cleanup, click Schedule Updates and complete the required fields to set the update cadence. Set the Apex Class to BoxBatchScheduler, which is a component of the managed package.

 

 

 

Do you observe many records being retained in the BOSS Exception custom object (API name: BOSS_Exception__c)?  Then from the setup menu (as shown below) you can run the BatchErrorScheduler scheduled process. You do not need to run the process often; it runs as part of your scheduled BOSS process every time.  Instead, you can use this as a one-time cleanup.

 

 

Example: The Sales team has a closed Salesforce instance in which only the account owner can access the Account record. If the sales territories change, you can update access to Box company-wide.

Note  If you neither run the cleanup job nor manually schedule it, any user permissions deleted via Salesforce remain in Box.

Enabling Seamless Login Organization-Wide

This feature provides seamless login to Box from within Salesforce.  When you enable this feature, your people see the Seamless Login setting in the Box Settings tab.  They can then enable/disable seamless login for their own accounts.  If individuals enable seamless login for their own accounts, they're prompted to log into their Box accounts once (during setup).


Seamless Login (Org-Wide) is enabled by default.  If you disable it, your people are prompted to log into Box any time they access Box content within Salesforce in a new browsing session.

 

Changing the Box Service Account

As a best practice, create the standalone service account that is not tied to a specific individual. To change the Box Service Account:

  • From the top right of your window, go to Your Name Developer Console to launch the Developer Console
  • Go to Debug Open Execute Anonymous Window
  • Run the following command: box.Toolkit.deleteServiceUserAssociation(); 

Note   Only change the service account during initial setup (if the wrong Box user was configured as the service account) or if the service account was deleted.  Transfer folder ownership of the Salesforce root folder to the new service account.

 

User Settings

 

Enabling Seamless Login

If the system administrator enables Seamless Login (Org-Wide), account holders can enable/disable seamless login for their accounts. For more details, see the Admin Settings section.  

 

Enabling Auto-Collab for a User

When you enable auto-collab, the system automatically adds people as collaborators to a record's Box folder when they view the record page. If you disable auto-collab, the system gives people the option of adding themselves to the folder by clicking Collaborate on Folder. For more details, see the Admin Settings section.  

 

Deleting User Association

Account holders must contact their Salesforce Administrator to delete their association with Salesforce. 

 

Related Links

Box for Salesforce: FAQ and Troubleshooting

 

Feedback

We look forward to receiving feedback about the installation process and the integration through Salesforce AppExchange.