You are here:
getRecipients Method
This method delegates the task, by default, to the Vlocity Open Interface
(VOI) class DefaultDocuSignRecipientSelector that queries from the
Contact object and returns a list of recipients.
However, if you have already defined a custom class implementation setting
for DocuSignRecipientSelector, the task is delegated to that class
instead.
Parameters
Required parameters depend on the implementing class.
Parameter |
Description |
|---|---|
|
This is an optional parameter that specifies which VOI class
will be executed. Use this when you want to define a class other than
the default class or the one already defined for
If the value
refers to a class that does not exist,
|
Request Body
Using the default or custom class implementation (if a custom class is
defined and no recipientSelector is submitted)
// initialize the parameters
String methodName = 'getRecipients';
Map<String, Object> inputMap = new Map<String, Object>();
Map<String, Object> outputMap = new Map<String, Object>();
Map<String, Object> optionsMap = new Map<String, Object>();
// no required parameter
// will not use, optional parameter
// instantiate the generic api
VlocityOpenInterface2 voi = new GenericDocuSignIntegrationService();
// invoke the method
voi.invokeMethod(methodName, inputMap, outputMap, optionsMap);
// log result
System.debug('outputMap: ' + JSON.serialize(outputMap));Using a specific implementation1
Using a specific implementation. Any getRecipients implementing class can
define its own input and optional parameters. In the example below, the
implementing class CustomDocuSignDocumentSelector expects two
input parameters param1 and param2, and an optional
parameter option1.
// initialize the parameters
String methodName = 'getRecipients';
Map<String, Object> inputMap = new Map<String, Object>();
Map<String, Object> outputMap = new Map<String, Object>();
Map<String, Object> optionsMap = new Map<String, Object>();
// specify the input parameters expected by "CustomDocuSignRecipientSelector"
inputMap.put('param1', [param1 value]);
inputMap.put('param2', [param2 value]);
// specify custom class to use
optionsMap.put('recipientSelector', 'CustomDocuSignRecipientSelector');
// specify the optional parameters expected by "CustomDocuSignDocumentSelector"
optionsMap.put('option1', [option1 value]);
// instantiate the generic api
VlocityOpenInterface2 voi = new GenericDocuSignIntegrationService();
// invoke the method
voi.invokeMethod(methodName, inputMap, outputMap, optionsMap);
// log result
System.debug('outputMap: ' + JSON.serialize(outputMap));
