Box for Salesforce: Installation

Follow

·

Get Training

Box for Salesforce is the easiest and quickest way to integrate your enterprise content in Box and your data in Salesforce.  The Box for Salesforce integration is available at no extra charge for Box Enterprise accounts (Salesforce accounts are also required).  To get the integration, contact your Box Customer Success Manager or visit http://www.box.com/services/salesforce.

 

Installation Prerequisites

Two Box accounts are required to install the Box for Salesforce integration: 

  • Box Service Account:
    • to be used exclusively for integration purposes and does not belong to an individual end user, 
    • owns the Salesforce content on Box and makes API calls from Salesforce to Box for the entire enterprise, and
    • has Admin or Co-Admin permissions on Box.

If you don’t already have a Box Service Account, create it now (i.e., add boxforsalesforce@example.com as a managed user).

  • Box User Account: to link a user’s Salesforce account to their Box account.

Note: The Service Account and User Account must be separate. The integration will not allow you to login with the same account in both places.

 

Two types of Salesforce accounts will access the Box for Salesforce integration:

  • Salesforce Admin Account:
    • to install packages in Salesforce in order to link the installed package to the Box Service Account, and
    • can also be a regular user of Box for Salesforce integrations.
  • Salesforce User Account: to link a Box User Account and access Box content.

 

Installing Box for Salesforce

  1. Log into Salesforce as a Salesforce Admin.
  2. Navigate to the package installation link.
  3. At separate points during the installation, you will be asked 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.
  4. When you complete the installation, the screen will return to the Salesforce Box Connector App (Managed) page.



  5. Click the + tab to view the All Tabs page.
  6. Click Box Settings to view the Connect Salesforce to Box page.
  7. Click the Box API Admin Login button to view the Box API login page.
  8. Enter the Box Service Account credentials (see the Installation Prerequisites section above).



  9. Specify the name for your Root Folder, e.g. Salesforce-<Org Identifier>.
  10. At this point, you can enable (suggested) or disable Seamless Login and Auto-Collab on the same page, and click Save Settings. See the Enabling Auto-Collab for a User section below for more information.
  11. Add the Box functionality to Salesforce objects (e.g. Opportunities, Accounts, etc.) by following the steps under Embedding Box in a Salesforce Page.

The managed package setup is now complete and Salesforce users can login and link their Box and Salesforce accounts. See the Linking Box and Salesforce Accounts section for more information.

 

Granting Access after Initial Installation

If you did not grant access to the package components to all users during the installation, or have new profiles which require access to the Box for Salesforce integration, you can use permission sets to grant access to individual users or profiles. A permission set is a collection of settings and permissions that give users access to various tools and functions. You can also refer to the standard Salesforce documentation on assigning Permission Sets for more information.

When to use Box for Salesforce Permission Sets

Use permission sets under the following conditions:

  • When the Admin does not want to grant access to All Users when installing the package and would like to grant package component access to specified profiles or users.
  • When a new profile is created post installation and the Admin would like to grant access to the package components to that group of users.
  • When 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 users that will administer the integration (installation does not grant Admin access to customized System Administrator profiles)
  • Box Standard: Grant this permission to users that will be using the integration

Process to Grant Admission Sets:

When initially installing Box for Salesforce, you are given the option to grant package access to All Users. If you do not do so, you might have to grant the Admin and Standard permissions sets in order to administer and use the integration.

  1. Go to the Salesforce Setup menu.



  2. Search for Permission Sets.



  3. Navigate to Permission Sets and click Box Admin or Box Standard.



  4. Click Manage Assignments.



  5. Click Add Assignments.



  6. Select the appropriate user name and click the Assign button.



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

Note: Generally you can only assign permission sets to one person at a time. if you need to bulk add users and grant permission sets for these users, you can also use the Permissioner app (free) that allows you to bulk assign permission sets.

 

Linking Box and Salesforce Accounts

When a user visits any Account Record for the first time, they will see the Login to Grant Access to Box screen. Enter Box User Account login information here. These credentials are different from the Box Service User account created earlier.

Caution: Sometimes multiple users within an enterprise use the same Salesforce account. This setup will not work with the Box for Salesforce integration.

 

Embedding Box in Standard Object Records

Use the following procedure for all Salesforce standard objects (e.g. Account, Lead, Contact, Opportunity, etc.) requiring a Box Embed addition as part of the page layout.

  1. Access the Salesforce Menu and click Setup (top right corner).
  2. From the left menu, navigate to Build > Customize to find the appropriate object (e.g., Lead, Opportunities, Accounts, or any Custom_Object).
  3. Expand the object's menu and select Page Layouts.
  4. Edit the Page Layout where Box Embed must be added.
  5. From the Lead Layout > Field menu, drag a new Section into the Page Layout into 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
  7. 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. Set the height to 600 pixels (minimum) for best viewing.
    5. Save the page layout.

 

Enabling Salesforce1 (Mobile)

To enable Box integrations for the Salesforce1 mobile application, follow this procedure:

  • Note: Currently the our integration does not support Custom Objects on mobile
  1. Access the Salesforce Menu and click Setup (top right corner).
  2. From the App Setup > Customize menu choose the object (for example, Lead, Opportunities, Accounts, or any Custom_Object) to add the Box Embed interface.
  3. Click Edit to select the Object > Page Layouts where Salesforce1 must be added.
  4. Drag the MobileBoxSection into your Mobile Cards (Salesforce1 only) section.
  5. Set the height to 56 Pixels (minimum) for best viewing.
  6. Save the page layout.



 

Embedding Box Custom Object Records

  1. Log into Salesforce as a Salesforce Admin
  2. For an existing custom object (for example, Custom_Object), create a new custom field (see https://help.salesforce.com/HTViewHelpDoc?id=adding_fields.htm) in Custom_Object.
    1. Select Text.



    2. In the Field Label box, type FolderId. In the Length box, type 18 as the maximum length for the text box.



    3. Select the required access level for this object and click Next.

    4. Click Save.

  3. Create a new Visual Force page for Custom_Object, for example, Custom_Object_Box_Section (see https://help.salesforce.com/apex/HTViewHelpDoc?id=pages_creating.htm.
  4. Copy the following Visual Force page code and paste it in this new page.

    <apex:page standardController="Custom_Object__c" extensions="box.DisplayWidget" showheader="false" sidebar="false" action="{!GetLoginToken}">
    <apex:stylesheet value="{!URLFOR($Resource.box__BoxEmbed, 'BoxEmbed/style.css')}"/>
    <apex:iframe src="/apex/box__BOXSection?id={!Custom_Object__c.Id}&param=Custom_Object_Box_Section" rendered="{!DisplayBoxSection}"/>
    <apex:iframe src="{!folderShareLink}" rendered="{!DisplayBoxWidget}" width="100%" height="100%" frameborder="0" scrolling="NO"/>

    </apex:page>

    Note
    : 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.

  5. Add this newly created section to the Custom Object Page Layout. See the Embedding Box in Standard Object Records section 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/labeled BoxLegalRequestFiles.

<apex:page standardController="sales_request__c" extensions="box.DisplayWidget" showheader="false" sidebar="false" action="{!GetLoginToken}">
<apex:stylesheet value="{!URLFOR($Resource.box__BoxEmbed, 'BoxEmbed/style.css')}"/>
<apex:iframe src="/apex/box__BOXSection?id={!sales_request__c.Id}&param=BoxLegalRequestFiles" rendered="{!DisplayBoxSection}"/>
<apex:iframe src="{!folderShareLink}" rendered="{!DisplayBoxWidget}" width="100%" height="100%" frameborder="0" scrolling="NO"/>
</apex:page>


 

Configuring Box Settings on Salesforce

To navigate to the Box Settings tab:

  1. Log into Salesforce as a Salesforce Admin.
  2. Go to Box Settings tab (If it is not visible, click the + tab and search in the All Tabs page).

 

Admin Settings

Navigate to the Box Settings tab on Salesforce to make any of the following changes. Once done, save your changes. 

 

Enabling Seamless Login

Seamless Login offers users seamless login into Box from within Salesforce. If Seamless Login is enabled, the integration will store the users access token and refresh the web session as needed. The feature is turned on for all users by default and each user can disable Seamless Login for their own account.

If Seamless Login is disabled, users will be prompted to log into Box to access content within the record specific widget or the Box Files tab.

 

Enabling Auto-Collab for a User

When Auto-Collab is enabled, any user who visits a Salesforce record with an associated Box folder will be automatically added as a collaborator. If Auto-Collab is enabled, the feature is turned on for all users by default; individual users may disable Auto-Collab for their own account. 

If Auto-Collab is disabled, users are presented with the option of adding themselves to the folder by clicking Add to Folder

 

Updating User Access to Content in Box

To schedule an update access on Box using the Box Online Salesforce Synchronizer (BOSS):

  1. Navigate to Box Settings page as a Salesforce admin. 
  2. Schedule the process to run at the required interval:
    • Regular intervals: Use Schedule update.
    • On demand: Use Run update now

 

Changing the Box Service Account

As a best practice, create the standalone service account that is not tied to a specific user. If you need to change the Box Service Account, please follow these steps:

  • Launch the Developer Console (click on Your Name Developer Console from the top right of your window)
  • Select Debug Open Execute Anonymous Window
  • Execute the following command: box.Toolkit.deleteServiceUserAssociation();

If you need assistance, please contact Box User Services.

 

User Settings

Based on the administrator's changes, users can disable certain features or even disassociate a Salesforce account from their Box account.

 

Enabling Seamless Login

If the administrator enabled Seamless Login, the user gets the option to disable the feature for their account. For more details, see the Admin Setting section.  

 

Enabling Auto-Collab for a User

If the administrator enabled Auto-Collab, the user gets the option to disable the feature for their account. For more details, see the Admin Setting section.

 

Other References

 

Feedback

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

Was this article helpful?
3 out of 4 found this helpful