The instructions below are current as of January 2, 2025, but may vary depending on changes made to the Salesforce interface which is outside of Box’s control.
Pre-requisites:
- You have completed Installing and Configuring Box For Salesforce for your organization with the Beta Version of Box for Salesforce. This means:
- The Box Service Account is signed in
- The Box User is signed in, and is a different user than the Box Service Account
- The Box for Salesforce Root Folder exists
- Applicable permissions are assigned to Users
- Your organization is eligible to use Box Doc Gen (please reach out to your Account Manager for more information.)
- Box Doc Gen is enabled in the Box Admin console (Enterprise Settings > Content & Sharing > Box Doc Gen > Edit Configuration)
- After Box Doc Gen is enabled, the Salesforce Admin needs to re-connect the Box Service Account and Box User, to approve the new Doc Gen application scopes.
Note:
- The document generation is performed by the Service account.
- The document generated is stored in the applicable Box for Salesforce folders.
- Viewing documents and UI elements are run as the specific/standard users.
Assign Box Doc Gen Permission Sets
Box Doc Gen for Salesforce enables you to assign specific users in Salesforce to:
- Create and manage the templates used in Salesforce and/or
- Use the templates to generate documents.
To do this, you will need to assign applicable users custom Box permission sets.
As the Salesforce Admin:
- In the Salesforce App Launcher, search for and navigate to Box Settings.
- In the Assign Permissions section, click Assign.
- For Box Doc Gen Template Manager, click Manage Assignments and manage the permission set for users who will create, edit, or set up Box Doc Gen templates.
Note: This permission set allows these users to see Box Doc Gen and Box Doc Gen Templates from the App Launcher.
- For Box Doc Gen Users, click Manage Assignments to manage the permission set for users who will generate documents in Salesforce.
- For Box Doc Gen Template Manager, click Manage Assignments and manage the permission set for users who will create, edit, or set up Box Doc Gen templates.
Adding Box Doc Gen Templates to Salesforce
In the Box Doc Gen Templates tab, Box enables users with Box Doc Gen Template Manager permissions to create and manage templates for generating documents. The Box Doc Gen Templates tab displays a list of all available templates, including sObject, status, and folder ID.
As a user with the Box DocGen Template Manager permission set:
- From the App Launcher, search and navigate to Box Doc Gen Templates.
- In the top right corner, click New to launch the template manager.
- While in the Create Template step:
- In Template Name, choose a name for the template in Salesforce
- In Generated File Name, choose the name you want the generated file to be named
- In Object, choose the Salesforce Object associated with the template.
- Click Next.
- In the Download JSON step:
- Click Download JSON File to download a file named {ObjectName}DocGen.json. This is used to pull the tags into the Microsoft Word Add In .
- Click Next.
- Create and edit your template in the Box Doc Gen Template Creator, Microsoft Word Add-in. (See next step)
- In the Upload Template step:
- Attach your template as a docx or pdf file.
- Click Upload.
- Once the upload is complete, click Next.
- (Optional) In the Preview step, test your template on a sample record.
- In Sample Record, search and select the record you would like to test your template on.
- Click Preview.
- Click Next.
- In the Settings step, you can finalize the template settings:
- Check the Available for Box Sign checkbox to make it available for approval and signature.
- In Output type, choose the desired file type to be generated.
- Click Save and Finish.
On completion, the Box Doc Gen Template tab displays the details, tabs for previewing the document, previous jobs ran, and tags within the document
Creating a Template with the Box Doc Gen Template Creator in Microsoft Word
To create and edit Box Doc Gen templates, Box recommends using the Box Doc Gen Template Creator Word Add-in. For more information on how to create a Box Doc Gen template, see here <link to be added>.
To begin using Salesforce tags in the Box Doc Gen Template Creator, you will first need to import the tags. To import tags:
- Open the file that will be your template in Microsoft Word, and open the Box Doc Gen Template.
- Click Start with your data.
- Upload the json file you previously downloaded.
- Click Generate tags.
- Search and select the appropriate fields to build your own template. The tags are displayed next to your cursor.
Adding and Displaying the Box Doc Gen button in Objects
Before your users can generate documents, you need to create a button and add it to your applicable Object page(s).
- Navigate to Setup by clicking on the gear icon in the top-right hand corner of your Salesforce instance.
- From the left-hand navigation, navigate to Object Manager nested under Objects.
- Select the Object(s) where you want to add the button for your users to generate documents.
- Go to Buttons, Links, and Actions in the left-hand side-bar.
-
Click New Action from the upper right corner.
- In the Action Type dropdown, select Lightning Component.
- In the Lightning Component dropdown, select “box:dgRecordPage”.
- In the Label field, type in the name you want to call your Button (example: “Generate Doc”)
- Optionally, edit the pre-populated field (without spaces.)
- Optionally, change the Icon to a different logo.
- Once complete, click Save.
Once you’ve added the Box Doc Gen button to the applicable Object(s), you can begin editing the pages where you want to add the Box Doc Gen button.
- From Salesforce Object Manager, in the applicable Object(s), navigate to Page Layouts.
- Select the applicable Page Layout.
- Select Mobile and Lightning Actions.
- From the palette, find the Box Doc Gen button you have created, and drag it down to the desired position in Salesforce Mobile and Lightning Experience Actions. (Box recommends you hover your cursor over the Generate Document button to confirm it is the created Box button. There is also a standard button named Generate Document.)
- Click Save.
Setting up Batch Doc Gen
You can also enable users to generate documents for multiple records for a given object at once, from a Salesforce List View. First create a button and add it to your applicable List View(s).
First, create the Batch DocGen button:
- Navigate to Setup..
- Navigate to Object Manager, nested under Objects.
- Select the Object(s) where you want to add the button for your users to generate documents.
- In the left-hand side-bar, go to Buttons, Links, and Actions.
-
In the upper right corner, click New Button or Link.
- In Label, select a label to call your Button
- In Name, select a Name (or edit the pre-populated Name field - without spaces)
- For Display Type, select List Button
- Populate the formula with “/flow/box/Generate_Box_Documents?retURL=001/o”
- Click Save.
- retURL will be specific to the object type.
- "Enable Lightning runtime for flows" in Process Automation Settings is required.
After you create the Batch DocGen button, make an Object's List View to be viewable to your users.
To edit an Object's List View:
- In the Object manager, select the Object where you want to add the List View button.
- In the left-hand sidebar, navigate to List View Button Layout.
- In the List View row, click the dropdown then Edit.
- Scroll to the Custom Buttons section, select the newly created button and click the Add arrow to add the button.
- Click Save.
Now the button is available in your users’ List views.