To add to our family of Salesforce (SFDC) code examples, we just released a Bulk Send code example that shows you how to use the DocuSign Bulk Send feature from within the Lightning and Classic environments. Bulk Send enables you to send the same document(s) for eSignature to multiple recipients at the same time.
The only prerequisites you need to begin using the DocuSign SFDC Bulk Send code example are:
- Developer sandbox accounts. If you already have these accounts, there’s no need to signup again, just reuse those accounts:
- DocuSign API Account ID and Integrator Key values. To obtain these key values, follow these steps:
- Login to DocuSign developer sandbox (sometimes referred to as a demo account) at https://demo.docusign.net/
- Click your picture in the top right corner of the screen.
- Click Go to Admin.
- Under Integrations on the left rail, click API and Keys.
- Note the values for API Account ID and Integrator Key. You’ll need these later when you configure the Bulk Send code example. Note that you can have more than one integrator keys, but you only use one of those values. If you see no integrator keys listed, simply click the Add Integrator Key button to create one.
Installing the DocuSign Bulk Send Demo Package
Installing the Bulk Send code example package is very easy. Simply follow these few steps:
- Login to your Salesforce developer account and install the Bulk Send unmanaged package by clicking here.
Note: We’ve made the code being demoed in this package available to you to customize for free on GitHub here.
- When the Install Package screen appears, click the Install for All Users option, then click Install.
- The next dialog prompts you to approve the fact that the package you are installing will access the DocuSign demo (sandbox) environment at demo.docusign.net. Click the Yes, grant access to these third-party web sites option, then click Continue. The package will install and grant access to all users.
- After successful installation, click Done. You’ll see the DocuSign Bulk Send Demo package installed:
Configuring the DocuSign Bulk Send Demo Package
After you successfully configure the DocuSign Bulk Send Demo package, you need to perform three one-time configurations before you can actually try it out. All configurations are performed in the Setup app, so make sure that’s the screen that is displayed before you continue.
- In the left rail, click Named Credentials (under Settings–>Security):
- Click the Edit link for your desired scenario for either of the two named credentials as follows:
- DS_Demo_Integration_User – Used to configure an organization-wide service account that will be used to send all DocuSign envelopes. In this configuration, recipients will see the envelopes being sent from a single account. The values configured for this field will be the service account credentials.
- DS_Demo_User – Used to configure a user account that will be used to selectively send DocuSign envelopes. In this configuration, each user will be prompted to login to their DocuSign account and the recipients will see the envelopes being sent from that user. The values configured for this field will be an administrator’s account.
- Enter values for Username (email address) and Password for the named credentials shown in the prior step, then click Save.
- In the left rail, click Users (under Administration–>Users):
- For each user that will send documents using Salesforce, ensure the user is granted permission to access external systems by following these steps:
- Click Edit next to each desired user.
- Click Authentication Settings for External Systems to jump to that section on the page.
- Click the New button to enter new credentials for the external system (DocuSign).
- Select the same user in the search box that you selected for configuration.
- Enter the Username and Password values for the user’s DocuSign account, then click Save.
- In the left rail, click Custom Metadata Types (under Platform Tools–>Custom Code).
- Click the Manage Records link.
- When the screen opens, notice there are no DocuSign Signing Recipe Integration values. Click the New button.
- Enter API integration values in these fields, then click the Save button:
- Label – Default
- DocuSign Signing Recipe Integration Name – Default
- Account Id – API Account ID value for your DocuSign account (see Prerequisites section above)
- Integration Key –Integrator Key value for your DocuSign account (see Prerequisites section above)
- Named Credential API Name – DS_Demo_User
After you configure the package settings with the desired DocuSign account and configuration information, you’re ready to start testing.
To test the DocuSign Bulk Send Demo Package, follow these steps:
- Invoke the Salesforce App Launcher
- Click the DocuSign Bulk Send Demo link. The app will launch and show Lightning Bulk Send Demo in the menu bar.
- Click Lightning Bulk Send Demo to start the demo.
- Click the radio button next to DocuSign Bulk Send Demo Report and click Submit.
- Click Upload documents to begin the bulk send process to all recipients shown. If you want to receive a copy of the document(s) to eSign, make sure your user name is in the list. If not, go back and modify the report to ensure you are listed before you continue. Notice in the screenshot above that there are 16 recipients selected. These came from the report shown in the prior step.
- Click Upload to select a document file that will be sent to all recipients. You can repeat the process for multiple documents.
- Click Next to open the DocuSign tagger to tag your document with fields and tags (tabs), including the Signature tag to indicate where the recipients needs to eSign.
- Click Send to send the documents to all Bulk Send recipients for eSignature.