BulkSendService
SIGNER recipient per envelope copy is currently supported. To use automatic anchor tags for the bulk envelope recipient, set the placeholder recipient role to dfsle.RecipientService.getDefaultRoles()[0], assuming it exists.
A typical flow is as follows:
// Construct bulk list from a group
dfsle.BulkList myList = new dfsle.BulkList(
null, // Salesforce list ID. Assigned upon creation.
null, // Docusign list ID. Assigned upon creation.
new List<dfsle.Envelope> { ... }, // Envelope copies.
new dfsle.Entity(mySalesforceGroupId));
// Create the bulk send list.
myList = dfsle.BulkSendService.createLists(new List<BulkList> { myBulkList })[0];
// Create a draft envelope with at least one dummy recipient.
dfsle.Envelope myEnvelope = dfsle.BulkSendService.getDraftEnvelope(
new List<dfsle.Document> { ... }, // Documents
new dfsle.Entity(mySalesforceSourceId)); // Salesforce source entity
// Send the envelope to your bulk send list.
dfsle.BulkList.Result myResult = dfsle.BulkSendService.sendEnvelope(myList.id, myEnvelope);
// Check for and resolve any errors in the result.
if (myResult.success) {
// Get batch job status (will only call Docusign API at most once per minute)
dfsle.BulkList.Status myStatus = dfsle.BulkSendService.getStatus(new Set<Id> { myResult.bulkStatusId });
}
Methods
createLists
Callers must be assigned the DocuSign User permission set.
bulkListsdeleteLists
Callers must be assigned the DocuSign User permission set.
true if the lists were deleted, and false otherwise.bulkListIdsgetDraftEnvelope
dfsle.Envelope.withEmail or dfsle.Envelope.withNotifications methods. Callers must be assigned the DocuSign User permission set.
documentssourcegetStatus
Callers must be assigned the DocuSign User permission set.
bulkStatusIdssearchLists
Callers must be assigned the DocuSign User permission set.
namemaximumRecordssendEnvelope
If previously created, the caller must be the owner of the envelope. Otherwise the caller must be assigned the DocuSign User permission set.
bulkListIdenvelopeupdateLists
This method should be called any time the source Salesforce group membership changes to ensure the lists are synchronized.
Callers must be assigned the DocuSign User permission set.
bulkLists