_all Apex Toolkit
_all Apex Toolkit
Recipient
Properties
authenticationemailemailSettingshostEmailhostNameidisSigningGroupnamenotephonereadOnlyrequiredroleroutingOrdersequence and need not be unique across an envelope's recipients.sequencesignatureProviderssigningGroupsignNowsourcetypeTYPE_SIGNERTYPE_IN_PERSON_SIGNERTYPE_EMBEDDED_SIGNERTYPE_CARBON_COPYTYPE_CERTIFIED_DELIVERYTYPE_AGENTTYPE_EDITORTYPE_INTERMEDIARYSTATUS_CREATEDSTATUS_SENTSTATUS_DELIVEREDSTATUS_DECLINEDSTATUS_COMPLETEDSTATUS_SIGNEDSTATUS_CANCELEDMethods
fromSource
nameemailphonerolesourcenewBulkRecipient
nameemailsourcenewEmbeddedSigner
newEmbeddedSigner
nameemailsourceIdRecipient
idtypesequenceroutingOrderrolenameemailsigningGroupphoneauthenticationnoteemailSettingshostNamehostEmailsignNowsourcereadOnlyrequiredwithAuthentication
authentication property.authentication.authenticationwithEmailSettings
emailSettings property.emailSettings.emailSettingswithEmbeddedRecipientStartURL
embeddedRecipientStartURL property.embeddedRecipientStartURL.embeddedRecipientStartURLwithRole
role property.role.rolewithSignatureProviders
signatureProviders property.signatureProviders property.signatureProviderswithSmsDelivery
Recipient.Role
Methods
Recipient.Authentication
Properties
accessCodeidCheckRequiredsmsPhoneNumbersMethods
Authentication
accessCodeidCheckRequiredsmsPhoneNumbersRecipient.EmailSettings
Properties
languagelanguageLabelmessagesubjectMethods
EmailSettings
languagelanguageLabelsubjectmessageRecipient.Status
Properties
completedemailidlastStatusUpdatenamereasonroutingOrdersentsequencesourcestatustypeMethods
Status
idsourcetypesequencestatusnameemailroutingOrdersentcompletedreasonlastStatusUpdateRecipient.ResendResult
Properties
BulkList
Exactly one bulk signer recipient per envelope is supported.
Properties
copiesdocuSignIdidnamesourceSTATUS_QUEUEDSTATUS_PROCESSINGSTATUS_SENTSTATUS_FAILEDMethods
newList
namecopiessourceBulkList.Result
BulkList.Status
Properties
batchSizedocuSignIdfailedEnvelopesidisFinallastStatusUpdatequeuedEnvelopessentEnvelopessourcesubmittedExpressSignatureProvider
Methods
ExpressSignatureProvider
IDNowProvider
Methods
IDNowProvider
IcpBrasilProvider
Methods
SigningService
Methods
getEmbeddedSigningUrl
envelopeIdreturnUrlgetRecipientPreviewUrl
The caller must be the owner of the envelope.
envelopeIdrecipientSequencegetSigningUrl
The caller must be the owner of the envelope.
envelopereturnUrlcheckFirstRecipientOnlyshouldSignNow
The caller must be the owner of the envelope.
true if the next recipient can sign now, false otherwise.envelopeEmailAddressTab
Methods
EmailAddressTab
ESignatureAPIMock
Service methods also require a user with the DocuSign Administrator or DocuSign User permission set as well as a Docusign test account configuration. The dfsle.UserMock.createDocuSignAdministrator and dfsle.UserMock.createDocuSignUser test helper methods are typically used in conjunction with the web service API mock to accomplish this. Example:
static testMethod void myTest() {
dfsle.ESignatureAPIMock().success();
System.runAs(dfsle.UserMock.createDocuSignUser()) {
// Call Docusign service methods
}
}
Methods
ESignatureAPIMock
ESignatureAPIMock
successfailure
dfsle.Test.setMock.success
dfsle.Test.setMock.APIErrorCode
SUCCESSFAILURENOT_FOUNDACCOUNT_LACKS_PERMISSIONSUSER_ALREADY_EXISTS_IN_ACCOUNTUNKNOWN_RECIPIENTUSER_PENDINGUNKNOWN_USERINVALID_RECIPIENT_SEQUENCETRIAL_ACCOUNT_EXPIREDUSER_NOT_ACTIVATEDHOURLY_API_LIMIT_EXCEEDEDINVALID_DOCUMENTINVALID_RECIPIENTCONSENT_REQUIREDINVALID_SIGNING_GROUPSignatureTab
Properties
requiredtrue, the signer is required to fill out this tab. Corresponds to the optional API property.
scale Corresponds to the scaleValue API property.
Methods
withRequired
required property.required value.requiredtrue, the signer is required to fill out this tab. withScale
scale property.scale value.scaleNoteTab
Methods
NoteTab
LoggerService
This class is intended for Docusign internal use only.
Methods
writeLogs
ButtonTab
Properties
buttonTextMethods
Document
Properties
extensionidlastModifiednamepdfOptionsreplacementsequencesizesourceIdsupplementalOptionstypeTYPE_TEMPLATETYPE_FILETYPE_DOCUMENTWRITE_BACK_NAMEWRITE_BACK_NAME_ENVELOPE_STATUSWRITE_BACK_NAME_PDFWRITE_BACK_NAME_PDF_REPLACE_EXTENSIONWRITE_BACK_NAME_ENVELOPE_STATUS_PDFWRITE_BACK_NAME_ENVELOPE_STATUS_PDF_REPLACE_EXTENSIONWRITE_BACK_ENVELOPE_PDFWRITE_BACK_ENVELOPE_STATUS_PDFSIGNER_ACKNOWLEDGEMENT_NONESIGNER_ACKNOWLEDGEMENT_VIEWSIGNER_ACKNOWLEDGEMENT_ACCEPTSIGNER_ACKNOWLEDGEMENT_VIEW_ACCEPTSIGNER_ACKNOWLEDGEMENT_READ_ACCEPTMethods
Document
idtypesequencenameextensionsizelastModifiedsourceIdfromFile
filewithPdfOptions
pdfOptions property. This method will throw a DocuSignException if this document is not a PDF.
pdfOptions.pdfOptionswithReplacement
If the parent document type is not a template or if the replacement document type is a template, a DocuSignException is thrown.
If the Docusign template has multiple documents, they will all be replaced by this document. Depending on how tabs are assigned, the API may return an TAB_REFERS_TO_MISSING_DOCUMENT error. For this reason, this method should be used only with templates containing only a single document to replace.
replacementnull, no template document will be replaced. withSupplementalOptions
supplementalOptions property. This method will throw a DocuSignException if this document is a Docusign envelope template.
supplementalOptions.supplementalOptionsDocument.Folder
Methods
Document.Folders
Properties
documentsfoldersMethods
Folders
foldersdocumentsDocument.PdfOptions
Properties
recipientSequencetransformFields is false.transformFieldstrue, PDF form field data is transformed into document tab values when the PDF form field name matches the Docusign custom tab dataLabel. The resulting PDF form data is also returned in the PDF meta data when requesting the document PDF.Methods
PdfOptions
transformFieldstrue, PDF form field data is transformed into document tab values when the PDF form field name matches the Docusign custom tab dataLabel. The resulting PDF form data is also returned in the PDF meta data when requesting the document PDF. recipientSequencetransformFields is false. Document.WriteBack
Properties
combineDocumentsincludeCertificateOfCompletionlinkedEntityIdnameFormatMethods
WriteBack
linkedEntityIdnameFormatdfsle.Document.WRITE_BACK_* constants for supported options. combineDocumentsincludeCertificateOfCompletionDocument.SupplementalOptions
Properties
includeInDownloadtrue, the document is included in the combined document download. The default value is true.signerAcknowledgementdfsle.Document.SIGNER_ACKNOWLEDGEMENT_NONE: Signer has no mandated interaction with a supplemental document.dfsle.Document.SIGNER_ACKNOWLEDGEMENT_VIEW: Signer must view the supplemental document.dfsle.Document.SIGNER_ACKNOWLEDGEMENT_ACCEPT: Signer must accept the supplemental document.dfsle.Document.SIGNER_ACKNOWLEDGEMENT_VIEW_ACCEPT: Signer must view and accept the supplemental document.dfsle.Document.SIGNER_ACKNOWLEDGEMENT_VIEW_READ_ACCEPT: Signer must view, read, and accept the supplemental document.
dfsle.Document.SIGNER_ACKNOWLEDGEMENT_NONE.Methods
SupplementalOptions
signerAcknowledgementdfsle.Document.SIGNER_ACKNOWLEDGEMENT_NONE: Signer has no mandated interaction with a supplemental document.dfsle.Document.SIGNER_ACKNOWLEDGEMENT_VIEW: Signer must view the supplemental document.dfsle.Document.SIGNER_ACKNOWLEDGEMENT_ACCEPT: Signer must accept the supplemental document.dfsle.Document.SIGNER_ACKNOWLEDGEMENT_VIEW_ACCEPT: Signer must view and accept the supplemental document.dfsle.Document.SIGNER_ACKNOWLEDGEMENT_VIEW_READ_ACCEPT: Signer must view, read, and accept the supplemental document.
dfsle.Document.SIGNER_ACKNOWLEDGEMENT_NONE. includeInDownloadtrue, the document is included in the combined document download. The default value is true. PaymentTab
To learn more about payments, see Requesting Payments Along with Signatures.
Properties
paymentSee Requesting Payments Along with Signatures in the Docusign Support Center to learn more about payments.
Corresponds to the paymentDetails API property.
Methods
PaymentTab
withPayment
payment property.payment value.paymentPaymentTab.LineItem
Properties
amountReferencedataLabel that specifies the amount paid for the line items.descriptionitemCodenameMethods
LineItem
namedescriptionitemCodeamountReferencedataLabel that specifies the amount paid for the line items. PaymentTab.Payment
Properties
authorizetrue, the payment details will be used to collect payment. Corresponds to the paymentOption API property.
currencyCodecustomerIdcustomMetadatacustomMetadataRequiredtrue, custom metadata is required. This property only applies if you are using an Authorize.net payment gateway account.docuSignGatewayIdThere is no public API for connecting payment gateway accounts You must connect and manage payment gateway accounts through the Docusign Admin console and through your chosen payment gateway. You can get the gateway account ID in the Payments section of the Docusign Admin console.
Corresponds to the gatewayAccountId API property.
lineItemsmethodsCreditCardApplePayAndroidPayBankAccount
For example, if you only accept credit cards and ACH transfers, you would set this property to: '["BankAccount", "CreditCard"]'.
Do not specify BankAccount (ACH) if you are also using in-person signing.
Corresponds to the allowedPaymentMethods API property.
savetrue, the signer's payment method (credit card or bank account) will be saved to the sender's payment gateway. Corresponds to the paymentOption API property.
sourceId Corresponds to the paymentSourceId API property.
Methods
Payment
docuSignGatewayIdcustomerIdsourceIdmethodscurrencyCodelineItemsauthorizetrue, the payment details will be used to collect payment. savetrue, the signer's payment method (credit card or bank account) will be saved to the sender's payment gateway. customMetadatacustomMetadataRequiredtrue, custom metadata is required. ValidationResult
Properties
messagesEUAdvancedAccessCodeProvider
Properties
accessCodeMethods
EUAdvancedAccessCodeProvider
accessCodeTestUtils
Methods
setMock
Test.setMock directly.mockHttpCalloutMock interface. setMock
Test.setMock directly.mockWebServiceMock interface. UserMock
Methods
createDocuSignAdministrator
This method also creates a test Docusign account configuration. As such, may only be called once per test method, and it may not be combined with any other dfsle.UserMock.create* method. Example:
static testMethod void myTest() {
dfsle.TestUtils.setMock(dfsle.DocuSignAPIMock.success());
System.runAs(dfsle.UserMock.createDocuSignAdministrator()) {
// Call service method requiring the DocuSign Administrator permission set.
}
}
createDocuSignSender
DocuSign Sender permission set for unit tests. This may be used for Docusign eSignature methods that create, send, or sign envelopes. This method also creates a test Docusign account configuration. As such, may only be called once per test method, and it may not be combined with any other dfsle.UserMock.create* method. Example:
static testMethod void myTest() {
dfsle.TestUtils.setMock(dfsle.DocuSignAPIMock.success());
System.runAs(dfsle.UserMock.createDocuSignSender()) {
// Call service method requiring the DocuSign Sender permission set.
}
}
createDocuSignUser
DocuSign User permission set for unit tests. This may be used for most Docusign eSignature methods. This method also creates a test Docusign account configuration. As such, may only be called once per test method, and it may not be combined with any other dfsle.UserMock.create* method. Example:
static testMethod void myTest() {
dfsle.TestUtils.setMock(dfsle.DocuSignAPIMock.success());
System.runAs(dfsle.UserMock.createDocuSignUser()) {
// Call service method requiring the DocuSign User permission set.
}
}
AccountService
Methods
getDocuSignUrl
The caller must be assigned the DocuSign User permission set, and must be an active member of the Docusign account.
PivProvider
Properties
isProductiontrue when using a production PIV signature provider or false when testing.Methods
PivProvider
isProductiontrue when using a production PIV signature provider or false when testing. EmailTab
Methods
EmailTab
Envelope
Properties
customFieldsdocumentsdocuSignIdemailMessageemailSubjectenvelopeConfigurationIderroridnamenotificationsoptionsrecipientssentsourcetransactionIdSTATUS_CREATEDSTATUS_SENTSTATUS_DELIVEREDSTATUS_DECLINEDSTATUS_VOIDEDSTATUS_COMPLETEDMethods
Envelope
idnamedocuSignIdenvelopeConfigurationIddocumentsrecipientscustomFieldsnotificationsemailSubjectemailMessagesourcesentwithCustomFields
customFields property.customFields property.customFieldswithNotifications
notifications property.notifications property.notificationsEnvelope.Options
Properties
documentWriteBackenvelopeEventUpdatesdfsle.Envelope.STATUS_* constants for possible keys. For data write-back to function properly:
- The envelope must be persisted to the database.
- The updates must be related to the envelope source object.
- The sending user must have update permissions on the target objects and fields.
Opportunity.StageName to Closed Won when an envelope is complete: envelopeEventUpdates = new Map<String, Map<String, Object>> {
dfsle.Envelope.STATUS_COMPLETED => new Map<String, Object> {
'StageName' => 'Closed Won'
}
};
includeDefaultAutoPlaceTagsrecipientEventUpdatesdfsle.Recipient.STATUS_* constants for possible keys. For data write-back to function properly:
- The envelope must be persisted to the database.
- The updates must be related to the recipient source object.
- The sending user must have update permissions on the target objects and fields.
Contact.ContractDelivered__c to true when a recipient has received the envelope: recipientEventUpdates = new Map<String, Map<String, Object>> {
dfsle.Recipient.STATUS_DELIVERED => new Map<String, Object> {
'ContractDelivered__c' => true
}
};
Methods
Options
includeDefaultAutoPlaceTagsdocumentWriteBackenvelopeEventUpdatesrecipientEventUpdatesEnvelope.Status
Properties
completeddocuSignIdemailSubjectexpiresidlastStatusUpdatereasonrecipientssenderEmailsenderNamesentsourcestatusMethods
Status
idsourcedocuSignIdstatussenderNamesenderEmailrecipientssentexpirescompletedemailSubjectreasonlastStatusUpdateAuthService
Methods
getLoginUrl
redirectTo. The redirectTo parameter must be a path to a page in the current Salesforce org. The org domain base URL will be prepended to this. Upon redirect, two additional parameters are appended:
dfsle__status: eitherSuccessorFailure.dfsle__message: additional details in the case of failures.
The resulting URL is valid for only a single use by the current user.
Callers must be assigned the DocuSign Login permission set or better.
Example:
Url loginUrl = dfsle.AuthService.getLoginUrl('/apex/MyReturnPage');
// Redirect the user to loginUrl. There they can authenticate with Docusign and grant consent to the application.
// After successful authorization, the user is redirected to
// https://your-domain.my.salesforce.com/apex/MyReturnPage?dfsle__status=Success.
redirectToFirstNameTab
Methods
FirstNameTab
SigningGroup
Methods
EventService
This class is intended for Docusign internal use only.
Methods
publishEvents
This class is intended for Docusign internal use only.
UUID
Methods
parse
StringException if the input string is blank or does not match the UUID pattern.s[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}. randomUUID
tryParse
null if the input string is invalid.s[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}. CompanyTab
Methods
CompanyTab
TabGroup
To assign a tab to a group, you assign the group's dataLabel to the tab's tabDataLabels array.
Properties
maximumTabs Corresponds to the maximumAllowed API property.
minimumTabs Corresponds to the minimumRequired API property.
ruleminimumTabs and maximumTabs are interpreted when selecting tabs in a group. Possible values are: SelectAtLeastSelectAtMostSelectExactlySelectARange
Corresponds to the groupRule API property.
scopedocumentenvelope(default)
Corresponds to the tabScope API property.
Methods
TabGroup
withMaximumTabs
maximumTabs property.maximumTabs value.maximumTabswithMinimumTabs
minimumTabs property.minimumTabs value.minimumTabsSignatureProvider
Refer to Standards-based signatures on the Docusign Developer Center for more details.
Properties
providerTypeTypeReadOnlyTab
Properties
formattingvalueMethods
withFormatting
formatting property.formatting value.formattingwithValue
value property.value value.valueEnvelopeConfiguration
StatusService
Methods
createStatus
The caller must be the owner of the envelopes.
envelopesdocuSignId. getCorrectUrl
The caller must be the owner of the envelope.
docuSignIdreturnUrlgetStatus
sourceIdsmaximumRecordsgetViewUrl
docuSignIdreturnUrlresendEnvelope
The caller must be the owner of the envelope.
true if the envelope was resent, false otherwise.docuSignIdresendRecipients
The caller must be the owner of the envelope.
docuSignIdrecipientsvoidEnvelope
The caller must be the owner of the envelope.
true if the void operation was successful, false otherwise.docuSignIdreasonFullNameTab
Methods
FullNameTab
Tab
All of the property values are passed through as-is to the eSignature REST API. For more information regarding how to construct and use envelope recipient tabs, refer to Envelope Recipient Tabs on the Docusign Developer Center.
Properties
anchorComponentTypeconditioncustomTabIddataLabel Corresponds with the tabLabel API property.
groupDataLabelsdataLabel to this array. Corresponds to the tabGroupLabels API property.
guidedFormid Corresponds with the tabId API property.
nameorder Tabs on a page are navigated to in ascending order, starting with the lowest number and moving to the highest. If two or more tabs have the same order value, the normal auto-navigation setting behavior for the envelope is used.
Corresponds to the tabOrder API property.
positionsmartContracttabTypetooltipTypeMethods
withAnchor
anchor property.anchor value.anchorwithCondition
condition property.condition value.conditionwithGroupDataLabels
withGuidedForm
guidedForm property.guidedForm value.guidedFormwithPosition
position property.position value.positionwithSmartContract
smartContract property.smartContract value.smartContractTab.Position
Properties
documentSequence Corresponds to the documentId API property.
heightpageNumberwidthxTo improve the tab's position on the document, Docusign recommends adjusting the X and Y position coordinates by (-3, -2).
Corresponds to the xPosition API property.
yTo improve the tab's position on the document, Docusign recommends adjusting the X and Y position coordinates by (-3, -2).
Methods
Position
documentSequencepageNumberxywidthheightTab.Anchor
Properties
allowWhiteSpace Corresponds to the anchorAllowWhiteSpaceInCharacters API property.
caseSensitivetrue, the text string in a document must match the case of the text property for an anchor tab to be created. The default value is false. Corresponds to to the anchorCaseSensitive API property.
horizontalAlignmentleft: Aligns the left side of the tab with the beginning of the first character of the matching anchor word. This is the default value.right: Aligns the tabs left side with the last character of the matching anchor word.
Corresponds to to the anchorHorizontalAlignment API property.
ignoreIfNotPresenttrue, this tab is ignored if the text is not found in the document. Corresponds to to the anchorIgnoreIfNotPresent API property.
matchWholeWordtrue, the text string in a document must match the value of the text property in its entirety for an anchor tab to be created. The default value is false. Corresponds to the anchorMatchWholeWord API property.
text Corresponds to the anchorString API property.
unitsxOffset and yOffset properties. Valid units are: pixelsinchesmmscms
Corresponds to the anchorUnits API property.
xOffsetunits relative to the text.yOffsetunits relative to the text.Methods
Anchor
textallowWhiteSpacecaseSensitivetrue, the text string in a document must match the case of the text property for an anchor tab to be created. horizontalAlignmentignoreIfNotPresenttrue, this tab is ignored if the text is not found in the document. matchWholeWordtrue, the text string in a document must match the value of the text property in its entirety for an anchor tab to be created. unitsxOffset and yOffset properties xOffsetunits relative to the text. yOffsetunits relative to the text. Tab.GuidedForm
Properties
orderpageLabel, the group by which to place the guided form HTML block. Corresponds to the formOrder API parameter.
pageLabelglobal String pageLabelThe group in which to place the guided form HTML. Each group displays as a separate guided forms page in the signing experience. Corresponds to the formPageLabel API parameter.
pageNumberglobal Integer pageNumberThe order in which to present the guided form pages. Corresponds to the formPageNumber API parameter.
Methods
MethodsGuidedForm
DescriptionConstructs tab guided form settings.Parametersorderfinal Integer orderThe order in which the guided form HTML should render. The order is relative to the pageLabel, the group by which to place the guided form HTML block. pageLabel final String pageLabelThe group in which to place the guided form HTML. Each group displays as a separate guided forms page in the signing experience. pageNumber final Integer pageNumberThe order in which to present the guided form pages. Tab.Condition
Tab.Conditionglobal class ConditionDescriptionConditional tab settings.Properties
parentDataLabelglobal String parentDataLabel For conditional fields this is the dataLabel of the parent tab that controls this tab's visibility. Corresponds to the conditionalParentLabel API parameter.
parentValueglobal String parentValueFor conditional fields, this is the value of the parent tab that controls the tab's visibility. If the parent tab is a checkbox, radio button, optional sign here, or optional initial here use "on" as the value to show that the parent tab is active.
Corresponds to the conditionalParentValue API parameter.
Methods
MethodsCondition
DescriptionConstructs conditional tab settings.ParametersparentDataLabelfinal String parentDataLabelFor conditional fields this is the dataLabel of the parent tab that controls this tab's visibility. parentValue final String parentValueFor conditional fields, this is the value of the parent tab that controls the tab's visibility. Tab.Formatting
Tab.Formattingglobal class FormattingDescriptionTab formatting settings.Properties
bold@AuraEnabled global Boolean bold When set to true, the information in the tab is bold.color@AuraEnabled global String colorThe font color to use for the information in the tab. Possible values are: - Black
- BrightBlue
- BrightRed
- DarkGreen
- DarkRed
- Gold
- Green
- NavyBlue
- Purple
- White
Corresponds to the fontColor API parameter.
concealValue@AuraEnabled global Boolean concealValue When set to true, the field appears normally while the recipient is adding or modifying the information in the field, but the data is not visible (the characters are hidden by asterisks) to any other signer or the sender. When an envelope is completed the information is only available to the sender through the Form Data link in the Docusign Console. The information on the downloaded document remains masked by asterisks.
This setting applies only to text boxes and does not affect list boxes, radio buttons, or check boxes.
Corresponds to the concealValueOnDocument API parameter.
fixedWidth@AuraEnabled global Boolean fixedWidth When set to true, disables the auto sizing of single line text boxes in the signing screen when the signer enters data. If disabled users will only be able enter as much data as the text box can hold. By default this is false. This property only affects single line text boxes. Corresponds to the fixedWidth API parameter.
font@AuraEnabled global String fontThe font to be used for the tab value. Supported fonts include: - Default
- Arial
- ArialNarrow
- Calibri
- CourierNew
- Garamond
- Georgia
- Helvetica
- LucidaConsole
- MSGothic
- MSMincho
- OCR-A
- Tahoma
- TimesNewRoman
- Trebuchet
- Verdana
italic@AuraEnabled global Boolean italic When set to true, the information in the tab is italicized.size@AuraEnabled global Integer size The font size in points used for the information in the tab. Possible values are: 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48 and 72.. Corresponds to the fontSize API parameter.
underline@AuraEnabled global Boolean underline When set to true, the information in the tab is underlined.Methods
MethodsFormatting
global Formatting( final String font, final String color, final Integer size, final Boolean bold, final Boolean italic, final Boolean underline, final Boolean concealValue, final Boolean fixedWidth )DescriptionConstructs tab formatting settings.Parametersfont final String fontThe font to be used for the tab value. color final String colorThe font color to use for the information in the tab. size final Integer sizeThe font size in points used for the information in the tab. bold final Boolean boldWhen set to true, the information in the tab is bold. italic final Boolean italicWhen set to true, the information in the tab is italicized. underline final Boolean underlineWhen set to true, the information in the tab is underlined. concealValue final Boolean concealValueWhen set to true, the field appears normally while the recipient is adding or modifying the information in the field, but the data is not visible (the characters are hidden by asterisks) to any other signer or the sender. fixedWidth final Boolean fixedWidth When set to true, disables the auto sizing of single line text boxes in the signing screen when the signer enters data. If disabled users will only be able enter as much data as the text box can hold. By default this is false. This property only affects single line text boxes. Tab.Validation
Tab.Validationglobal class ValidationDescriptionTab validation settings.Properties
errorMessage@AuraEnabled global String errorMessageThe message displayed if the custom tab fails input validation. Corresponds to the validationMessage API property.
maximumLength@AuraEnabled global Integer maximumLengthAn optional value that describes the maximum length of the property when the property is a string. Corresponds to the maxLength API property.
pattern@AuraEnabled global String patternA regular expression used to validate input for the tab. Corresponds to the validationPattern API property.
Methods
MethodsValidation
DescriptionConstructs tab validation settings.ParametersmaximumLengthfinal Integer maximumLengthAn optional value that describes the maximum length of the property when the property is a string. pattern final String patternA regular expression used to validate input for the tab. errorMessage final String errorMessageThe message displayed if the custom tab fails input validation. Tab.PathComponent
Tab.PathComponentglobal class PathComponentDescriptionTab merge field path component.Methods
MethodsTab.MergeField
Tab.MergeFieldglobal class MergeFieldDescriptionContains the information necessary to map the tab to a field in SalesForce.Properties
path@AuraEnabled global String pathThe path to the Salesforce merge field. Used when Docusign Connect for Salesforce is configured on the account.pathExtended@AuraEnabled global List<PathComponent> pathExtendedThe extended path to the Salesforce merge field. Used when Docusign Connect for Salesforce is not configured on the account.rowglobal Integer rowSpecifies the row number in a Salesforce table that the merge field value corresponds to.senderReadOnly@AuraEnabled global Boolean senderReadOnly When true, the sender cannot modify the value of the mergeField tab during the sending process. Corresponds to the allowSenderToEdit API property.
writeBack@AuraEnabled global Boolean writeBack When true, data entered into the merge field during Signing will update the mapped Salesforce field.Methods
MethodsMergeField
global MergeField( final String path, final List<PathComponent> pathExtended, final Integer row, final Boolean writeBack, final Boolean senderReadOnly )DescriptionConstructs a Salesforce merge field.Parameterspath final String pathThe path to the Salesforce merge field. pathExtended final List<PathComponent> pathExtendedThe extended path to the Salesforce merge field. row final Integer rowSpecifies the row number in a Salesforce table that the merge field value corresponds to. writeBack final Boolean writeBackWhen true, data entered into the merge field during Signing will update the mapped Salesforce field. senderReadOnly final Boolean senderReadOnly When true, the sender cannot modify the value of the mergeField tab during the sending process. Tab.Collaboration
Tab.Collaborationglobal class CollaborationDescriptionTab collaboration settings.Properties
canCollaborate@AuraEnabled global Boolean canCollaborate When set to true, this custom tab is collaborative. Corresponds to the shared API property.
required@AuraEnabled global Boolean required When set to true and canCollaborate is true, information must be entered in this field to complete the envelope. Corresponds to the requireAll API property.
requireInitialOnChangeglobal Boolean requireInitialOnChange Optional element for field markup. When set to true, the signer is required to initial when they modify a collaborative field. Corresponds to the requireInitialOnSharedChange API property.
Methods
MethodsCollaboration
global Collaboration(final Boolean canCollaborate, final Boolean required, final Boolean requireInitialOnChange)DescriptionConstructs tab collaboration settings.ParameterscanCollaboratefinal Boolean canCollaborateWhen set to true, this custom tab is collaborative. required final Boolean requiredWhen set to true and canCollaborate is true, information must be entered in this field to complete the envelope. requireInitialOnChange final Boolean requireInitialOnChangeOptional element for field markup. When set to true, the signer is required to initial when they modify a collaborative field. Tab.SmartContract
Tab.SmartContractglobal class SmartContractDescriptionTab smart contract settings.Methods
MethodsPolyLineOverlayTab
PolyLineOverlayTabglobal class PolyLineOverlayTab extends TabDescriptionThis type of tab enables the recipient to strike through document text. This value can't be set.Properties
overlayTypeglobal String overlayType The type of overlay to use. The API currently supports only the outline overlay type.polyLinesglobal List<PolyLine> polyLinesAn array of poly-line objects that contain x- and y-coordinates representing the locations of the lines.Methods
MethodsPolyLineOverlayTab
global PolyLineOverlayTab()DescriptionConstructs a poly-line overlay tab.withOverlayType
global PolyLineOverlayTab withOverlayType(final String overlayType)Description Updates the tab overlayType property.ReturnsThe tab with an updated overlayType value.ParametersoverlayTypefinal String overlayTypeThe type of overlay to use. withPolyLines
global PolyLineOverlayTab withPolyLines(final List<PolyLine> polyLines)Description Updates the tab polyLines property.ReturnsThe tab with an updated polyLines value.ParameterspolyLinesfinal List<PolyLine> polyLinesAn array of poly-line objects that contain x- and y-coordinates representing the locations of the lines. PolyLineOverlayTab.PolyLine
PolyLineOverlayTab.PolyLineglobal class PolyLineDescriptionX- and y-coordinates representing the locations of the lines.Methods
MethodsDocumentService
DocumentServiceglobal with sharing class DocumentServiceDescriptionThis class is the entry point for Docusign eSignature envelope document management. It provides methods to retrieve Salesforce source documents.Methods
MethodsgetDocumentFolders
global static Document.Folders getDocumentFolders(final SObjectType type)DescriptionRetrieves a list of Salesforce source documents folders by object type. The current user's personal folder, and the documents contained within, is always returned as the first element in the list. The returned folder IDs may be used in subsequent calls to dfsle.DocumentService.getFolderDocuments. By default, the Salesforce Document and ContentVersion types are supported. More types may be supported via plugins.
ReturnsA list of document folders.Parameterstypefinal SObjectType typeThe Salesforce object type. Seedfsle.DocumentService.getFolderDocumentsgetDocuments
global static List<Document> getDocuments(final SObjectType type, final Set<Id> sObjectIds)DescriptionRetrieves a list of Salesforce source documents by IDs. By default, the Salesforce Document and ContentVersion types are supported. More types may be supported via plugins.
ReturnsA list of envelope documents.Parameterstypefinal SObjectType typeThe Salesforce object type. sObjectIds final Set<Id> sObjectIdsThe Salesforce object IDs. getEnvelopeDocuments
getFolderDocuments
global static List<Document> getFolderDocuments(final SObjectType type, final Set<Id> folderIds)DescriptionRetrieves a list of Salesforce source documents by folder IDs. The folder IDs may be retrieved by calling dfsle.DocumentService.getDocumentFolders first. By default, the Salesforce Document and ContentVersion types are supported. More types may be supported via plugins.
ReturnsA list of documents contained within the target folders.Parameterstypefinal SObjectType typeThe Salesforce object type. folderIds final Set<Id> folderIdsThe folder IDs. Seedfsle.DocumentService.getDocumentFoldersgetLinkedDocuments
global static List<Document> getLinkedDocuments(final SObjectType type, final Set<Id> linkedEntityIds, final Boolean getLastUpdatedOnly)DescriptionRetrieves a list of Salesforce source documents by linked entity IDs. For example, to pull in all of an Opportunity's Notes and Attachments related list:
List<dfsle.Document> docs = dfsle.DocumentService.getLinkedDocuments(
ContentVersion.getSObjectType(),
new Set<Id> { myOpportunity.Id },
false);
By default, only ContentVersion types are supported. More types may be supported via plugins.
ReturnsA list of Docusign envelope documents.Parameterstypefinal SObjectType typeThe Salesforce object type. linkedEntityIds final Set<Id> linkedEntityIdsThe Salesforce parent IDs. getLastUpdatedOnly final Boolean getLastUpdatedOnlyWhether to retrieve only the last updated linked document. OrganizationService
OrganizationServiceglobal with sharing class OrganizationServiceMethods
MethodsgetOrganizationInfo
@HttpGet global static void getOrganizationInfo()SmartSectionTab
SmartSectionTabglobal class SmartSectionTab extends TabDescriptionSmart Section tabs enhance responsive signing on mobile devices by enabling collapsible sections, page breaks, custom formatting options, and other advanced functionality. Note: Smart Sections are a premium feature. Responsive signing must also be enabled for your account.
Properties
displayglobal Display display How the HTML section inside the smartAnchor displays. Corresponds to the displaySettings API parameter.
smartAnchorsglobal Anchors smartAnchorsSpecifies the area in the HTML where the display settings will be applied.Methods
MethodsSmartSectionTab
global SmartSectionTab()DescriptionConstructs a Smart Section tab.withDisplay
global SmartSectionTab withDisplay(final Display display)Description Updates the tab display property.ReturnsThe tab with an updated display value.Parametersdisplayfinal Display displayHow the HTML section inside the smartAnchor displays. withSmartAnchors
global SmartSectionTab withSmartAnchors(final Anchors smartAnchors)Description Updates the tab smartAnchors property.ReturnsThe tab with an updated smartAnchors value.ParameterssmartAnchorsfinal Anchors smartAnchorsSpecifies the area in the HTML where the display settings will be applied. SmartSectionTab.Position
SmartSectionTab.Positionglobal class PositionDescriptionWhere to render the Smart Section on the document.Properties
pageNumberglobal Integer pageNumberSpecifies the page number on which the tab is located. Must be 1 for supplemental documents.xglobal Integer xThis property indicates the horizontal offset of the object on the page. Docusign uses 72 DPI when determining position. Required. May be zero. Corresponds to the xPosition API parameter.
yglobal Integer yThis property indicates the vertical offset of the object on the page. Docusign uses 72 DPI when determining position. Required. May be zero. Corresponds to the yPosition API parameter.
Methods
MethodsPosition
DescriptionConstructs a Smart Section position.ParameterspageNumberfinal Integer pageNumberSpecifies the page number on which the tab is located. x final Integer xThis property indicates the horizontal offset of the object on the page. y final Integer yThis property indicates the vertical offset of the object on the page. SmartSectionTab.Anchor
SmartSectionTab.Anchorglobal class AnchorDescriptionSmart Section tab auto-place settings.Properties
positionglobal Position positionWhere to render the Smart Section on the document.removeglobal Boolean remove When true, removes the start anchor string for the Smart Section from the HTML, preventing it from displaying. Corresponds to the removeStartAnchor or removeEndAnchor API property.
textglobal String textSpecifies the area in the HTML where the display settings will be applied. Corresponds to the startAnchor or endAnchor API property.
Methods
MethodsAnchor
DescriptionConstructs a Smart Section anchor.Parameterspositionfinal Position positionWhere to render the Smart Section on the document. text final String textSpecifies the area in the HTML where the display settings will be applied. remove final Boolean removeWhen true, removes the start anchor string for the Smart Section from the HTML, preventing it from displaying. SmartSectionTab.Anchors
SmartSectionTab.Anchorsglobal class AnchorsDescriptionSmart Section tab anchors.Properties
caseSensitiveglobal Boolean caseSensitive When true, the startAnchor and endAnchor for the Smart Section must match both the case and the content of the strings in the HTML.endAnchorglobal Anchor endAnchorSpecifies the end of the area in the HTML where the display settings will be applied. If you do not specify an end anchor, the end of the document will be used by default. Note: A start anchor, an end anchor, or both are required.
startAnchorglobal Anchor startAnchorSpecifies the beginning of the area in the HTML where the display settings will be applied. If you do not specify a start anchor, the beginning of the document will be used by default. Note: A start anchor, an end anchor, or both are required.
Methods
MethodsAnchors
global Anchors(final Anchor startAnchor, final Anchor endAnchor, final Boolean caseSensitive)DescriptionConstructs Smart Section anchors.ParametersstartAnchorfinal Anchor startAnchorSpecifies the beginning of the area in the HTML where the display settings will be applied. endAnchor final Anchor endAnchorSpecifies the end of the area in the HTML where the display settings will be applied. caseSensitive final Boolean caseSensitiveWhen true, the startAnchor and endAnchor for the Smart Section must match both the case and the content of the strings in the HTML. SmartSectionTab.Collapsible
SmartSectionTab.Collapsibleglobal class CollapsibleDescriptionDefines the appearance and function of a collapsible section or item.Properties
arrowClosedglobal String arrowClosedClosed arrow.arrowColorglobal String arrowColorArrow color.arrowLocationglobal String arrowLocationArrow location.arrowOpenglobal String arrowOpenOpen arrow.arrowSizeglobal String arrowSizeArrow size.arrowStyleglobal String arrowStyleArrow style.containerStyleglobal String containerStyleContainer style.labelStyleglobal String labelStyleLabel style.onlyArrowIsClickableglobal Boolean onlyArrowIsClickable When true, only the arrow is clickable.outerLabelAndArrowStyleglobal String outerLabelAndArrowStyleOuter label and arrow style.Methods
MethodsCollapsible
global Collapsible( final String containerStyle, final String labelStyle, final String outerLabelAndArrowStyle, final String arrowStyle, final String arrowClosed, final String arrowOpen, final String arrowLocation, final String arrowColor, final String arrowSize, final Boolean onlyArrowIsClickable )DescriptionConstructs collapsible display settings.ParameterscontainerStyle final String containerStyleContainer style. labelStyle final String labelStyleLabel style. outerLabelAndArrowStyle final String outerLabelAndArrowStyleOuter label and arrow style. arrowStyle final String arrowStyleArrow style. arrowClosed final String arrowClosedClosed arrow. arrowOpen final String arrowOpenOpen arrow. arrowLocation final String arrowLocationArrow location. arrowColor final String arrowColorArrow color. arrowSize final String arrowSizeArrow size. onlyArrowIsClickable final Boolean onlyArrowIsClickable When true, only the arrow is clickable. SmartSectionTab.Display
SmartSectionTab.Displayglobal class DisplayDescription Defines how the HTML section inside the startAnchor and endAnchor displays.Properties
cellStyleglobal String cellStyleSpecifies the valid CSS-formatted styles to use on responsive table cells. Only valid in display sections of responsive_table or responsive_table_single_column types.collapsibleglobal Collapsible collapsibleThe appearance and function of a collapsible section or item.displayglobal String displayIndicates the display type. Must be one of the following enum values: inline: Leaves the HTML where it is in the document. This allows for adding a label or presenting on a separate page. collapsible: The HTML in the section may be expanded or collapsed. By default, the section is expanded. collapsed: The HTML in the section may be expanded or collapsed. By default, the section is collapsed. responsive_table: Converts the section into a responsive table. Note that this style is applied only on HTML tables that fall within the startAnchor and endAnchor positions. responsive_table_single_column: Converts the section into a responsive, single-column table. Note that this style is applied only on HTML tables that fall within the startAnchor and endAnchor positions. The table is converted to a single column in which each column becomes a row and is stacked. print_only: Prevents this portion of the HTML from displaying in the responsive signing view.
hideLabelWhenOpenedglobal Boolean hideLabelWhenOpened When true, the label is hidden when the display section is expanded and the display section is no longer collapsible. This property is valid only when the value of the display property is collapsed.inlineOuterStyleglobal String inlineOuterStyleSpecifies the valid CSS-formatted styles to use on inline display sections. This property is valid only when the value of the display property is inline.labelglobal String labelThe label for the display section. Corresponds to the displayLabel API property.
labelWhenOpenedglobal String labelWhenOpenedThe label for the display section when it is expanded from a collapsed state. This label displays only on the first opening and is only valid with the value of the display property is collapsed.orderglobal Integer orderThe position on the page where the display section appears. Corresponds to the displayOrder API property.
pageNumberglobal Integer pageNumberThe number of the page on which the display section appears. Corresponds to the displayPageNumber API property.
preLabelglobal String preLabelDescriptive text that appears before a collapsed section or continue button.scrollToTopWhenOpenedglobal Boolean scrollToTopWhenOpened When true and the section is expanded, the position of the section close is scrolled to the top of the screen. This property is only valid when the value of the display property is collapsed.tableStyleglobal String tableStyleSpecifies the valid CSS-formatted styles to use on responsive tables. This property is valid only when the value of the display property is responsive_table or responsive_table_single_column.Methods
MethodsDisplay
global Display( final String label, final String display, final Integer pageNumber, final Integer order, final String tableStyle, final String cellStyle, final String inlineOuterStyle, final Boolean hideLabelWhenOpened, final Boolean scrollToTopWhenOpened, final String labelWhenOpened, final String preLabel, final Collapsible collapsible )DescriptionConstructs Smart Section display settings.Parameterslabel final String labelThe label for the display section. display final String displayIndicates the display type. pageNumber final Integer pageNumberThe number of the page on which the display section appears. order final Integer orderThe position on the page where the display section appears. tableStyle final String tableStyleSpecifies the valid CSS-formatted styles to use on responsive tables. cellStyle final String cellStyleSpecifies the valid CSS-formatted styles to use on responsive table cells. inlineOuterStyle final String inlineOuterStyleSpecifies the valid CSS-formatted styles to use on inline display sections. hideLabelWhenOpened final Boolean hideLabelWhenOpenedWhen true, the label is hidden when the display section is expanded and the display section is no longer collapsible. scrollToTopWhenOpened final Boolean scrollToTopWhenOpenedWhen true and the section is expanded, the position of the section close is scrolled to the top of the screen. labelWhenOpened final String labelWhenOpenedThe label for the display section when it is expanded from a collapsed state. preLabel final String preLabelDescriptive text that appears before a collapsed section or continue button. collapsible final Collapsible collapsible The appearance and function of a collapsible section or item. EUAdvancedSmsProvider
EUAdvancedSmsProviderglobal class EUAdvancedSmsProvider extends SignatureProviderDescriptionDocusign-generated, eIDAS AES compliant signatures with SMS authentication.Properties
phoneglobal String phoneThe mobile phone number used to send the recipient an access code for the signing ceremony. Ensure the country code is prefixed to the number.Methods
MethodsEUAdvancedSmsProvider
global EUAdvancedSmsProvider(final String phone)DescriptionConstructs an EU Advanced signature provider with SMS authentication.Parametersphonefinal String phoneThe mobile phone number used to send the recipient an access code for the signing ceremony. Ensure the country code is prefixed to the number. BulkSendService
BulkSendServiceglobal with sharing class BulkSendServiceDescriptionOperations related to sending Docusign envelopes in bulk. Bulk send lists may be created, updated, and deleted. These may be reused with multiple draft envelopes. Only one 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
MethodscreateLists
DescriptionCreates one or more bulk send lists in Salesforce and Docusign. The lists must have at least one member. Each list may be reused to send multiple envelopes. Currently bulk envelope copies are restricted to exactly one recipient each. Callers must be assigned the DocuSign User permission set.
ReturnsThe newly-created bulk send lists.ParametersbulkListsfinal List<BulkList> bulkListsThe bulk send lists to create. deleteLists
DescriptionDeletes one or more bulk send lists in Salesforce and Docusign. Callers must be assigned the DocuSign User permission set.
ReturnsThe result of the delete operation: true if the lists were deleted, and false otherwise.ParametersbulkListIdsfinal Set<Id> bulkListIdsThe IDs of the lists to delete. getDraftEnvelope
DescriptionGets a new bulk draft envelope instance with a single bulk recipient placeholder and default email and notification settings. This may be further customized via the dfsle.Envelope.withEmail or dfsle.Envelope.withNotifications methods. Callers must be assigned the DocuSign User permission set.
ReturnsA new bulk envelope instance.Parametersdocumentsfinal List<Document> documentsList of envelope documents. At least one document is required. source final Entity sourceOptional Salesforce source object for the envelope. getStatus
global static List<BulkList.Status> getStatus(final Set<Id> bulkStatusIds)DescriptionRetrieves status for one or more bulk send jobs. Callers must be assigned the DocuSign User permission set.
ReturnsA list of bulk send job statuses.ParametersbulkStatusIdsfinal Set<Id> bulkStatusIdsThe list of status IDs. searchLists
DescriptionSearches for bulk send lists partially matching a name. Callers must be assigned the DocuSign User permission set.
ReturnsBulk send lists matching the search criteria.Parametersnamefinal String nameThe beginning part of the name to match. maximumRecords final Integer maximumRecordsThe maximum number of records to retrieve. sendEnvelope
global static BulkList.Result sendEnvelope(final Id bulkListId, final Envelope envelope)DescriptionSends an envelope to a bulk send list. The envelope will be created in Docusign and Salesforce. If previously created, the caller must be the owner of the envelope. Otherwise the caller must be assigned the DocuSign User permission set.
ReturnsThe result of the bulk send operation.ParametersbulkListIdfinal Id bulkListIdThe bulk send list Salesforce ID. envelope final Envelope envelopeThe draft envelope. updateLists
DescriptionUpdates one or more bulk send lists in Salesforce and Docusign. Currently bulk envelope copies are restricted to exactly one recipient each. 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.
ReturnsThe updated bulk send lists.ParametersbulkListsfinal List<BulkList> bulkListsThe bulk send lists to update. APIException
APIExceptionglobal class APIException extends ExceptionDescriptionExceptions raised by the Docusign API.Properties
errorglobal APIError errorThe underlying API error that triggered the exception.TextTab
TextTabglobal class TextTab extends ReadWriteTabDescriptionA text tab enables the recipient to enter free text. This value can be set.Methods
MethodsTextTab
global TextTab()DescriptionConstructs a text tab.ListTab
ListTabglobal class ListTab extends ReadWriteTabDescription A list tab enables the recipient to choose from a list of options. You specify the options in the items property. This value can't be set.Properties
itemsglobal List<Item> itemsThe list of items that can be selected by senders. Corresponds to the listItems API property.
Methods
MethodsListTab
global ListTab()DescriptionConstructs a list tab.withItems
global ListTab withItems(final List<Item> items)Description Updates the tab items property.ReturnsThe tab with an updated items value.Parametersitemsfinal List<Item> itemsThe list of items that can be selected by senders. ListTab.Item
ListTab.Itemglobal class ItemDescriptionA selectable list tab item.Properties
labelglobal String labelSpecifies the text that is shown in the dropdown list. Corresponds to the text API parameter.
selectedglobal Boolean selected When set to true, indicates that this item is the default selection shown to a signer. Only one selection can be set as the default.
valueglobal Object valueSpecifies the value that is used when the list item is selected.Methods
MethodsLastNameTab
LastNameTabglobal class LastNameTab extends ReadOnlyTabDescriptionA last name tab displays the recipient's last name. The system automatically populates this field by splitting the name in the recipient information on spaces. This value can't be set.Methods
MethodsLastNameTab
global LastNameTab()DescriptionConstructs a last name tab.SignHereTab
SignHereTabglobal class SignHereTab extends SignatureTabDescriptionA sign here tab enables the recipient to sign a document. May be optional. This value can't be set.Properties
isSealglobal Boolean isSeal When set to true, the tab contains a visual representation for an electronic seal in a document. Corresponds to the isSealSignTab API property.
stampglobal Stamp stampThe user's stamp.Methods
MethodsSignHereTab
global SignHereTab()DescriptionConstructs a sign here tab.withIsSeal
global SignHereTab withIsSeal(final Boolean isSeal)Description Updates the tab isSeal property.ReturnsThe tab with an updated isSeal value.ParametersisSealfinal Boolean isSealWhen set to true, the tab contains a visual representation for an electronic seal in a document. withStamp
global SignHereTab withStamp(final Stamp stamp)Description Updates the tab stamp property.ReturnsThe tab with an updated stamp value.Parametersstampfinal Stamp stampThe user's stamp. SignHereTab.DateStamp
SignHereTab.DateStampglobal class DateStampDescriptionSpecifies the area in which a date stamp is placed. This parameter uses pixel positioning to draw a rectangle at the center of the stamp area. The stamp is superimposed on top of this central area.Properties
heightglobal Integer heightThe height of the rectangle. Corresponds to the dateAreaHeight API property.
widthglobal Integer widthThe width of the rectangle. Corresponds to the dateAreaWidth API property.
xglobal Integer xThe X axis position of the top-left corner. Corresponds to the dateAreaX API property.
yglobal Integer yThe Y axis position of the top-left corner. Corresponds to the dateAreaY API property.
Methods
MethodsSignHereTab.StampImage
SignHereTab.StampImageglobal class StampImageDescriptionRepresentation of the signature stamp image.Properties
base64global String base64Base64 representation of the image. Corresponds to the imageBase64 API parameter.
isResizableglobal Boolean isResizable When set to true, users may resize the stamp. Corresponds to the disallowUserResizeStamp API parameter.
sizeglobal Integer sizeThe physical height of the stamp image (in millimeters) that the stamp vendor recommends for displaying the image in PDF documents. Corresponds to the stampSizeMM API parameter.
typeglobal String typeSpecifies the type of image. Valid values are: signature_image initials_image
Corresponds to the imageType API parameter.
uriglobal String uriThe URI for retrieving the image of the user's stamp. Corresponds to the stampImageUri API parameter.
Methods
MethodsStampImage
global StampImage(final String type, final String uri, final String base64, final Integer size, final Boolean isResizable)DescriptionConstructs a stamp image.Parameterstypefinal String typeSpecifies the type of image. uri final String uriThe URI for retrieving the image of the user's stamp. base64 final String base64Base64 representation of the image. size final Integer sizeThe physical height of the stamp image (in millimeters) that the stamp vendor recommends for displaying the image in PDF documents. isResizable final Boolean isResizableWhen set to true, users may resize the stamp. SignHereTab.Stamp
SignHereTab.Stampglobal class StampDescriptionRepresentation of a user's stamp.Properties
customFieldglobal String customFieldOptional custom field for the stamp.dateStampglobal DateStamp dateStampThe date stamp.externalIdglobal String externalIdOptional external identifier for the user's signature.formatglobal String formatThe format of the stamp. Valid values are: NameHanko: The stamp represents only the signer's name. NameDateHanko: The stamp represents the signer's name and the date.
Corresponds to the stampFormat API parameter.
imageglobal StampImage imageThe stamp image.phoneticNameglobal String phoneticName The phonetic spelling of the signatureName.signatureNameglobal String signatureNameSpecifies the user's signature name.typeglobal String typeThe type of stamp. Valid values are: signature: A signature image. This is the default value. stamp: A stamp image.
Corresponds to the stampType API parameter.
Methods
MethodsStamp
global Stamp( final String type, final String externalId, final String format, final String signatureName, final String phoneticName, final StampImage image, final DateStamp dateStamp, final String customField )DescriptionConstructs a stamp.Parameterstype final String typeThe type of stamp. externalId final String externalIdOptional external identifier for the user's signature. format final String formatThe format of the stamp. signatureName final String signatureNameSpecifies the user's signature name. phoneticName final String phoneticNameThe phonetic spelling of the signatureName. image final StampImage imageThe stamp image. dateStamp final DateStamp dateStampThe date stamp. customField final String customField Optional custom field for the stamp. ValidationException
ValidationExceptionglobal class ValidationException extends ExceptionDescription Exceptions raised when an object fails to validate. For example, when an invalid dfsle.Envelope is passed to the dfsle.EnvelopeService.sendEnvelope method.Properties
detailsglobal Object details Details of the failed validation. In most cases, this will be an instance of dfsle.ValidationResult.DateTab
DateTabglobal class DateTab extends ReadWriteTabDescriptionA date tab enables the recipient to enter a date. This value can't be set. The tooltip for this tab recommends the date format MM/DD/YYYY, but this format is not enforced. The system retains the format that the recipient enters. Note: If you need to enforce a specific date format, we recommend that you use a text tab with a validation pattern and validation message.
Methods
MethodsDateTab
global DateTab()DescriptionConstructs a date tab.FormulaTab
FormulaTabglobal virtual class FormulaTab extends ReadWriteTabDescriptionA Docusign envelope recipient formula tab. The value of a formula tab is calculated from the values of other number or date tabs in the document. When the recipient completes the underlying fields, the formula tab calculates and displays the result. This value can be set.
The formula property of the tab contains the references to the underlying tabs. To learn more about formulas, see Calculated Fields.
Properties
formulaglobal String formula Contains the formula for calculating the value of this tab. Use a tab's dataLabel, enclosed in brackets, to refer to it. For example, you want to present the total cost of two items, tax included. The cost of each item is stored in number tabs labeled Item1 and Item2. The tax rate is in a number tab labeled TaxRate. The formula string for this property would be: ([Item1] + [Item2]) * (1 + [TaxRate])
See Calculated Fields in the Docusign Support Center to learn more about formulas.
hiddenglobal Boolean hidden When set to true, the field appears normally while the recipient is adding or modifying the information in the field, but the data is not visible (the characters are hidden by asterisks) to any other signer or the sender. When an envelope is completed the information is only available to the sender through the Form Data link in the Docusign Console. The information on the downloaded document remains masked by asterisks.
This setting applies only to text boxes and does not affect list boxes, radio buttons, or checkboxes.
roundDecimalPlacesglobal Integer roundDecimalPlacesThe number of decimal places to round to.Methods
MethodsFormulaTab
global FormulaTab()DescriptionConstructs a Formula TabwithFormula
global FormulaTab withFormula(final String formula)Description Updates the tab formula property.ReturnsThe tab with an updated formula value.Parametersformulafinal String formulaContains the formula for calculating the value of this tab. withRoundDecimalPlaces
global FormulaTab withRoundDecimalPlaces(final Integer roundDecimalPlaces)Description Updates the tab roundDecimalPlaces property.ReturnsThe tab with an updated roundDecimalPlaces value.ParametersroundDecimalPlacesfinal Integer roundDecimalPlacesThe number of decimal places to round to. SsnTab
SsnTabglobal class SsnTab extends ReadWriteTabDescriptionAn SSN tab contains a one-line field that enables the recipient to enter a Social Security Number (SSN) with or without dashes. It uses the same parameters as a text tab, with the validation message and pattern set for SSN information. This value can be set.Methods
MethodsSsnTab
global SsnTab()DescriptionConstructs an SSN tab.ElectronicSignatureProvider
ElectronicSignatureProviderglobal class ElectronicSignatureProvider extends SignatureProviderDescriptionElectronic signatures do not use digital certificates. These are the default type of signatures from Docusign.Methods
MethodsElectronicSignatureProvider
global ElectronicSignatureProvider()DescriptionConstructs an electronic signature provider.ApproveTab
ApproveTabglobal class ApproveTab extends ButtonTabDescriptionAn approve tab enables the recipient to approve documents without placing a signature or initials on the document. If the recipient clicks the tab during the signing process, the recipient is considered to have signed the document. No information is shown on the document of the approval, but it is recorded as a signature in the envelope history. The value of an approve tab can't be set.Methods
MethodsApproveTab
global ApproveTab()DescriptionConstructs an approve tab.CommentThreadTab
CommentThreadTabglobal class CommentThreadTab extends TabDescriptionRepresents a collection of comments in a comment thread. For example, if a recipient has questions about the content of a document, they can add a comment to the document and control who else can see the comment. This value can't be set.Properties
formattingglobal Tab.Formatting formattingTab formatting settings.threadIdglobal String threadIdThe unique identifier for the comment thread.Methods
MethodsCommentThreadTab
global CommentThreadTab()DescriptionConstructs a comment thread tab.withFormatting
global CommentThreadTab withFormatting(final Tab.Formatting formatting)Description Updates the tab formatting property.ReturnsThe tab with an updated formatting value.Parametersformattingfinal Tab.Formatting formattingTab formatting settings. withThreadId
global CommentThreadTab withThreadId(final String threadId)Description Updates the tab threadId property.ReturnsThe tab with an updated threadId value.ParametersthreadIdfinal String threadIdThe unique identifier for the comment thread. UnauthorizedException
UnauthorizedExceptionglobal class UnauthorizedException extends ExceptionDescriptionThe exception thrown when unauthorized access is detected.Properties
AccessRequirementglobal enum AccessRequirementAccess requirements: Unspecified: Not specified. DocuSignLogin: Must be assigned the DocuSign Login permission set. DocuSignSender: Must be assigned the DocuSign Sender permission set. DocuSignUser: Must be assigned the DocuSign User permission set. DocuSignAdministrator: Must be assigned the DocuSign Administrator permission set. DocuSignGenerator: Must be assigned the DocuSign Generator permission set. DocuSignNegotiator: Must be assigned the DocuSign Negotiator permission set. ClmAdministrator: Must be assigned the CLM Administrator permission set. ClmUser: Must be assigned the CLM User permission set. ClmCommunityUser: Must be assigned the CLM Community User permission set. ClmViewer: Must be assigned the CLM Viewer permission set. SalesforceAdministrator: Must be a Salesforce administrator. EnvelopeOwner: Must be the envelope owner. ConfigureAccount: Docusign account is not configured in Salesforce. OriginalUser: Cannot impersonate user. IntegrationUser: Must be the integration user. AccountMember: Not a member of the Docusign account. CurrentSalesforceUser: Must be the current Salesforce user.
requirementglobal AccessRequirement requirementThe access requirement.userIdglobal Id userIdThe ID of the unauthorized user.SignatureApplianceProvider
SignatureApplianceProviderglobal class SignatureApplianceProvider extends SignatureProviderDescriptionDocusign can configure a Signature Appliance at your site. The appliance is integrated with the Docusign cloud platform. The appliance can act as a TSP, enabling signers to use certificates generated from your organization's root certificate. It can also use certificates from third-party TSPs.Properties
nameglobal String nameThe Docusign-assigned name of the signature appliance provider.Methods
MethodsSignatureApplianceProvider
global SignatureApplianceProvider(final String name)DescriptionConstructs a signature appliance provider.Parametersnamefinal String nameThe Docusign-assigned name of the signature appliance provider. EnvelopeIdTab
EnvelopeIdTabglobal class EnvelopeIdTab extends ReadOnlyTabDescriptionAn envelope ID tab displays the envelope ID. Recipients cannot enter or change the information in this tab. This value can't be set.Methods
MethodsEnvelopeIdTab
global EnvelopeIdTab()DescriptionConstructs an envelope ID tab.NotarizeTab
NotarizeTabglobal class NotarizeTab extends TabDescriptionA notarize tab alerts notary recipients that they must take action on the page. Note: Only one notarize tab can appear on a page.
Methods
MethodsNotarizeTab
global NotarizeTab()DescriptionConstructs a notarize tab.withReadOnly
global NotarizeTab withReadOnly(final Boolean readOnly)Description Updates the tab readOnly property.ReturnsThe tab with an updated readOnly value.ParametersreadOnlyfinal Boolean readOnlyWhen set to true, the signer cannot change the data of the custom tab. withRequired
global NotarizeTab withRequired(final Boolean required)Description Updates the tab required property.ReturnsThe tab with an updated required value.Parametersrequiredfinal Boolean requiredWhen set to true, the signer is required to fill out this tab. Notifications
Notificationsglobal class NotificationsDescriptionA Docusign envelope's reminder and expiration settings.Properties
expireAfterDays@AuraEnabled global Integer expireAfterDaysHow many days before the envelope expires.expires@AuraEnabled global Boolean expiresWhether or not the envelope automatically expires (is voided).expireWarnDays@AuraEnabled global Integer expireWarnDaysHow many days prior to expiration to send a warning to recipients.remind@AuraEnabled global Boolean remindWhether or not to remind recipients to sign.remindAfterDays@AuraEnabled global Integer remindAfterDaysHow many days to wait before sending a reminder.remindFrequencyDays@AuraEnabled global Integer remindFrequencyDaysHow many days between sending reminders.updateChatter@AuraEnabled global Boolean updateChatterDEPRECATED - ignored.Methods
MethodsNotifications
global Notifications( final Boolean remind, final Integer remindAfterDays, final Integer remindFrequencyDays, final Boolean expires, final Integer expireAfterDays, final Integer expireWarnDays, final Boolean updateChatter )DescriptionConstructs an envelope notification settings.Parametersremind final Boolean remindWhether or not to remind recipients to sign. remindAfterDays final Integer remindAfterDaysHow many days to wait before sending a reminder. remindFrequencyDays final Integer remindFrequencyDaysHow many days between sending reminders. expires final Boolean expiresWhether or not the envelope automatically expires (is voided). expireAfterDays final Integer expireAfterDaysHow many days before the envelope expires. expireWarnDays final Integer expireWarnDaysHow many days prior to expiration to send a warning to recipients. updateChatter final Boolean updateChatter DEPRECATED - ignored. InitialHereTab
InitialHereTabglobal class InitialHereTab extends SignatureTabDescriptionAn initial here tab enables the recipient to initial the document. May be optional. This value can't be set.Methods
MethodsInitialHereTab
global InitialHereTab()DescriptionConstructs an initial here tab.DrawTab
DrawTabDescriptionA tab allowing a recipient to draw in the space provided and optionally allow background image uploads.Properties
allowBackgroundImageUploadglobal Boolean allowBackgroundImageUpload When true, signers may upload background images. Corresponds to the allowSignerUpload API property.
collaborationglobal Tab.Collaboration collaborationTab collaboration settings.readOnlyglobal Boolean readOnly When set to true, the signer cannot change the data of the custom tab. Corresponds to the locked API property.
requiredglobal Boolean required When set to true, the signer is required to fill out this tab.Methods
MethodsDrawTab
global DrawTab()DescriptionConstructs a draw tab.withAllowBackgroundImageUpload
Description Updates the tab allowBackgroundImageUpload property.ReturnsThe tab with an updated allowBackgroundImageUpload value.ParametersallowBackgroundImageUploadfinal Boolean allowBackgroundImageUploadWhen true, signers may upload background images. withCollaboration
global DrawTab withCollaboration(final Tab.Collaboration collaboration)Description Updates the tab collaboration property.ReturnsThe tab with an updated collaboration value.Parameterscollaborationfinal Tab.Collaboration collaborationTab collaboration settings. DeclineTab
DeclineTabglobal class DeclineTab extends ButtonTabDescriptionA decline tab enables the recipient to decline the envelope. If the recipient clicks the tab during the signing process, the envelope is voided. The value of this tab can't be set.Methods
MethodsDeclineTab
global DeclineTab()DescriptionConstructs a decline tab.DateSignedTab
DateSignedTabglobal class DateSignedTab extends ReadOnlyTabDescriptionA date signed tab displays the date that the recipient signed the document. This value can't be set.Methods
MethodsDateSignedTab
global DateSignedTab()DescriptionConstructs a date signed tab.RadioGroupTab
RadioGroupTabglobal class RadioGroupTab extends TabDescription A radio group tab places a group of radio buttons on a document. The radios property is used to add and place the radio buttons associated with the group. Only one radio button can be selected in a group. This value can be set.Properties
collaborationglobal Tab.Collaboration collaborationTab collaboration settings.radiosglobal List<Radio> radiosSpecifies the locations and status for radio buttons that are grouped together.Methods
MethodsRadioGroupTab
global RadioGroupTab()DescriptionConstructs a radio group tab.withCollaboration
global RadioGroupTab withCollaboration(final Tab.Collaboration collaboration)Description Updates the tab collaboration property.ReturnsThe tab with an updated collaboration value.Parameterscollaborationfinal Tab.Collaboration collaborationTab collaboration settings. withRadios
global RadioGroupTab withRadios(final List<Radio> radios)Description Updates the tab radios property.ReturnsThe tab with an updated radios value.Parametersradiosfinal List<Radio> radiosSpecifies the locations and status for radio buttons that are grouped together. RadioGroupTab.Position
RadioGroupTab.Positionglobal class PositionDescriptionWhere to render the radio button on the document.Properties
pageNumberglobal Integer pageNumberSpecifies the page number on which the tab is located. Must be 1 for supplemental documents.xglobal Integer xThis property indicates the horizontal offset of the object on the page. Docusign uses 72 DPI when determining position. Required. May be zero. Corresponds to the xPosition API parameter.
yglobal Integer yThis property indicates the vertical offset of the object on the page. Docusign uses 72 DPI when determining position. Required. May be zero. Corresponds to the yPosition API parameter.
Methods
MethodsPosition
DescriptionConstructs a radio button position.ParameterspageNumberfinal Integer pageNumberSpecifies the page number on which the tab is located. Must be 1 for supplemental documents. x final Integer xThis property indicates the horizontal offset of the object on the page. y final Integer yThis property indicates the vertical offset of the object on the page. RadioGroupTab.Radio
RadioGroupTab.Radioglobal class RadioDescriptionA radio button.Properties
anchorglobal Tab.Anchor anchorTab auto-place settings.formattingglobal Tab.Formatting formattingTab formatting settings.orderglobal Integer orderA positive integer that sets the order the tab is navigated to during signing. Tabs on a page are navigated to in ascending order, starting with the lowest number and moving to the highest. If two or more tabs have the same tabOrder value, the normal auto-navigation setting behavior for the envelope is used.
Corresponds to the tabOrder property.
positionglobal Position positionTab position on the document.readOnlyglobal Boolean readOnly When set to true, the signer cannot change the data of the custom tab. Corresponds to the locked API parameter.
requiredglobal Boolean required When set to true, the signer is required to fill out this tab.selectedglobal Boolean selected When set to true, the radio button is selected.valueglobal Object valueSpecifies the value of the tab.Methods
MethodsRadio
global Radio( final Integer order, final Position position, final Tab.Formatting formatting, final Tab.Anchor anchor, final Object value, final Boolean selected, final Boolean readOnly, final Boolean required )DescriptionConstructs a radio button.Parametersorder final Integer orderA positive integer that sets the order the tab is navigated to during signing. position final Position positionTab position on the document. formatting final Tab.Formatting formattingTab formatting settings. anchor final Tab.Anchor anchorTab auto-place settings. value final Object valueSpecifies the value of the tab. selected final Boolean selectedWhen set to true, the radio button is selected. readOnly final Boolean readOnlyWhen set to true, the signer cannot change the data of the custom tab. required final Boolean required When set to true, the signer is required to fill out this tab. EnvelopeService
EnvelopeServiceglobal with sharing class EnvelopeServiceDescriptionPrimary interface point for Docusign eSignature envelope management. A basic flow would be:
// Get an empty envelope definition to begin.
Envelope e = dfsle.EnvelopeService.getEmptyEnvelope(new Entity(sourceId));
// Send envelope and add source documents and recipients
e = dfsle.EnvelopeService.sendEnvelope(e, false);
// Get tagger URL (this must be in a future method or separate transaction to avoid a CalloutException)
Url u = dfsle.EnvelopeService.getSenderViewUrl(e.docuSignId, new Url('https://my.return.url'));
// Host the tagging session with the returned URL
Methods
MethodscreateEnvelope
@Deprecated global static Envelope createEnvelope( final Envelope envelope, final EnvelopeConfiguration envelopeConfiguration, final Boolean addFromSource )DescriptionCreates a draft Docusign envelope record in Salesforce. This method does not send the envelope; to do so call dfsle.EnvelopeService.sendEnvelope. This method does not make any API callouts. It involves a DML operation.
The caller must be assigned the DocuSign User permission set.
ReturnsThe newly-created envelope.Parametersenvelope final Envelope envelopeThe envelope to create. envelopeConfiguration final EnvelopeConfiguration envelopeConfigurationDeprecated - ignored. addFromSource final Boolean addFromSource Load source documents and recipients. Seedfsle.EnvelopeService.sendEnvelope for details on how to send the created envelope.deleteEnvelope
DescriptionDeletes a draft Docusign envelope record from Salesforce. It does not delete draft or sent envelopes from Docusign. Those may be voided, but not deleted, via dfsle.StatusService.voidEnvelope. This method does not make any API callouts. It involves a DML operation.
The caller must be the owner of the envelope.
ReturnsThe Salesforce source ID of the envelope. This can be used to redirect the user upon deletion.ParametersenvelopeIdfinal Id envelopeIdThe ID of the envelope to delete. Seedfsle.StatusService.voidEnvelope for details on how to void a draft or sent envelope.getEmptyEnvelope
DescriptionGets an empty envelope definition that can be subsequently completed, created, and sent. This envelope will be populated with appropriate defaults based on the current account settings and localizations. This method does not make any API callouts or DML operations.
The caller must be assigned the DocuSign Sender permission set.
ReturnsThe empty envelope.Parameterssourcefinal Entity sourceThe originating Salesforce entity for the envelope. getEnvelope
DescriptionRetrieves a Docusign envelope by record ID. This method does not make any API callouts or DML operations.
The caller must be the owner of the envelope.
ReturnsThe envelope matching the ID.ParametersenvelopeIdfinal Id envelopeIdThe ID of the envelope. getSenderViewUrl
global static Url getSenderViewUrl(final UUID docuSignId, final Url returnUrl)DescriptionRetrieves a sender view URL. This will return a one-time use Docusign tagger URL if called right after an envelope is created in the draft state. When redirected back to the supplied returnUrl, Docusign appends an event parameter to the query string. Possible values include:
sent: The envelope was sent from the tagger. It may be appropriate to initiate signing at this point assuming the first signer or host is the current user. save: The envelope was saved as a draft in Docusign. cancel: The draft was canceled. Delete the envelope via the dfsle.EnvelopeService.deleteEnvelope method. error: An error was encountered.
This method involves an API callout with no DML operations.
The caller must be the owner of the envelope.
ReturnsThe sender view URL.ParametersdocuSignIdfinal UUID docuSignIdThe Docusign envelope ID. returnUrl final Url returnUrlThe URL to redirect to once the sender action is complete. retryEnvelope
DescriptionRetries sending a Docusign envelope by transaction ID. The envelope will not be resent if it was already sent successfully. This can be called when the status of the envelope is indeterminate, for example when the send operation times-out. If the envelope cannot be located by transaction ID, an dfsle.APIException will be thrown with error code dfsle.APIErrorCode.NOT_FOUND
This method should be isolated on its own transaction as it involves an API callout followed by a DML operation.
If previously created, the caller must be the owner of the envelope. Otherwise the caller must be assigned the DocuSign Sender permission set.
ReturnsThe sent envelope.ParameterstransactionIdfinal UUID transactionIdThe transaction ID associated with the envelope. Must be non-empty. sendNow final Boolean sendNowWhether to send immediately or save as a draft in Docusign. saveSentEnvelopes
Description Completes a transaction initiated by dfsle.EnvelopeService.sendEnvelopes. This will create envelope and status records for each sent envelope. Each envelope must have valid docuSignId and sent properties and an empty error property, otherwise an exception will be thrown and no envelopes will be saved. Any invalid envelopes should be filtered out prior to calling this method.
This method involves DML operations. It does not make any API callouts.
The caller must be assigned the DocuSign Administrator, DocuSign User, or DocuSign Sender permission set.
ReturnsThe sent envelopes with updated record IDs.Parametersenvelopesfinal List<Envelope> envelopesThe sent envelopes. Seedfsle.EnvelopeService.sendEnvelopes to initiate the transaction.sendEnvelope
DescriptionSends an envelope to Docusign. This will also create the envelope record in Salesforce if necessary. This method should be isolated on its own transaction as it involves an API callout followed by a DML operation.
If previously created, the caller must be the owner of the envelope. Otherwise the caller must be assigned the DocuSign Sender permission set.
ReturnsThe sent envelope.Parametersenvelopefinal Envelope envelopeThe envelope to send. sendNow final Boolean sendNowWhether to send immediately or save as a draft in Docusign. sendEnvelopes
DescriptionImmediately sends one or more Docusign envelopes. This method involves web service callouts to Docusign, but no subsequent DML. It is intended for scenarios where multiple envelopes are sent in a single transaction or whenever else DML should be deferred. At the end of the transaction, dfsle.EnvelopeService.saveSentEnvelopes should be called. Otherwise the associated envelope and status records will not be created.
This call is limited to 99 envelopes at a time, and subject to hourly API and Salesforce Governor limits.
Every envelope must be valid or else a ValidationException will be thrown and no envelopes will be sent. If all envelopes pass validation, any API error for an envelope will be logged on the error property. Only successfully sent ones may be saved with dfsle.EnvelopeService.saveSentEnvelopes.
The caller must be assigned the DocuSign Administrator, DocuSign User, or DocuSign Sender permission set.
ReturnsThe sent envelope.Parametersenvelopesfinal List<Envelope> envelopesThe envelopes to send. Seedfsle.EnvelopeService.saveSentEnvelopes to complete the transaction.updateEnvelope
DescriptionUpdates a draft envelope record in Salesforce, including documents and recipients. This is a more expensive call than dfsle.EnvelopeService.updateEnvelopeNotifications as it updates and recalculates child entries. This method does not make any API callouts. It involves a DML operation.
The caller must be the owner of the envelope.
ReturnsThe updated envelope.Parametersenvelopefinal Envelope envelopeThe envelope to update. Template
Templateglobal class TemplateDescriptionRepresentation of a Docusign template.Properties
customFields@AuraEnabled global List<CustomField> customFieldsThe Docusign template custom fields.emailMessage@AuraEnabled global String emailMessageThe message of the email recipients receive. This is contained within the standard Docusign email body.emailSubject@AuraEnabled global String emailSubjectThe subject of the email recipients receive.id@AuraEnabled global UUID idThe Docusign template ID.lastModified@AuraEnabled global Datetime lastModifiedThe date and time when the Docusign template was last modified.name@AuraEnabled global String nameThe Docusign template name.notifications@AuraEnabled global Notifications notificationsThe reminder and expiration settings for the template.recipients@AuraEnabled global List<Recipient> recipientsThe Docusign template recipients.Methods
MethodsTemplate
global Template( final UUID id, final String name, final List<CustomField> customFields, final Notifications notifications, final String emailSubject, final String emailMessage, final List<Recipient> recipients, final Datetime lastModified )DescriptionConstructs a Docusign template.Parametersid final UUID idThe Docusign template ID. name final String nameThe Docusign template name. customFields final List<CustomField> customFieldsThe Docusign template custom fields. notifications final Notifications notificationsThe reminder and expiration settings for the template. emailSubject final String emailSubjectThe subject of the email recipients receive. emailMessage final String emailMessageThe message of the email recipients receive. This is contained within the standard Docusign email body. recipients final List<Recipient> recipientsThe Docusign template recipients. lastModified final Datetime lastModified The date and time when the Docusign template was last modified. ITAgileProvider
ITAgileProviderglobal class ITAgileProvider extends SignatureProviderDescriptionQualified electronic signatures using itAgile EU Qualified Certificates.Methods
MethodsITAgileProvider
global ITAgileProvider()DescriptionConstructs an itAgile signature provider.SignerAttachmentTab
SignerAttachmentTabglobal class SignerAttachmentTab extends SignatureTabDescriptionA signer attachment tab enables the recipient to attach supporting documents to an envelope. This value can't be set.Methods
MethodsSignerAttachmentTab
global SignerAttachmentTab()DescriptionConstructs a signer attachment tab.NumberTab
NumberTabglobal class NumberTab extends ReadWriteTabDescriptionA number tab enables the recipient to enter numbers and decimal points (.). This value can be set.Methods
MethodsNumberTab
global NumberTab()DescriptionConstructs a number tab.CustomField
CustomFieldglobal class CustomFieldDescriptionRepresents an envelope, template, or account custom field.Properties
isList@AuraEnabled global Boolean isListRead-only property indicating whether this is a list custom field.isText@AuraEnabled global Boolean isTextRead-only property indicating whether this is a text custom field.items@AuraEnabled global List<String> itemsList items for the custom field. Ignored if this is a text custom field.name@AuraEnabled global String nameThe name of the custom field.required@AuraEnabled global Boolean requiredWhether a value is required for the custom field.show@AuraEnabled global Boolean showWhether to display the custom field to recipients.type@AuraEnabled global String typeThe type of the custom field, list or text.value@AuraEnabled global String valueThe value of the custom field.Methods
MethodsCustomField
global CustomField( final String type, final String name, final String value, final List<String> items, final Boolean required, final Boolean show )DescriptionConstructs a custom field.Parameterstype final String typeThe type of the custom field, either list or text. name final String nameThe name of the custom field. value final String valueThe value of the custom field. items final List<String> itemsThe list items for list custom fields. Ignored for text custom fields. required final Boolean requiredWhether a value is required for the custom field. show final Boolean show Whether to display the custom field to recipients. TemplateService
TemplateServiceglobal with sharing class TemplateServiceDescriptionPrimary interface point for Docusign eSignature template management.Methods
MethodsgetTemplates
global static List<Template> getTemplates()DescriptionRetrieves all Docusign templates.ReturnsA list of Docusign templates.ReadWriteTab
ReadWriteTabglobal abstract class ReadWriteTab extends TabDescriptionBase class for read/write tabs. This class may not be directly instantiated.Properties
collaborationglobal Tab.Collaboration collaborationTab collaboration settings.formattingglobal Tab.Formatting formattingTab formatting settings.mergeFieldglobal Tab.MergeField mergeFieldContains the information necessary to map the tab to a field in SalesForce.readOnlyglobal Boolean readOnly When set to true, the signer cannot change the data of the custom tab. Corresponds to the locked API property.
requiredglobal Boolean required When set to true, the signer is required to fill out this tab.validationglobal Tab.Validation validationTab validation settings.valueglobal Object valueSpecifies the value of the tab.Methods
MethodswithCollaboration
global ReadWriteTab withCollaboration(final Tab.Collaboration collaboration)Description Updates the tab collaboration property.ReturnsThe tab with an updated collaboration value.Parameterscollaborationfinal Tab.Collaboration collaborationTab collaboration settings. withFormatting
global ReadWriteTab withFormatting(final Tab.Formatting formatting)Description Updates the tab formatting property.ReturnsThe tab with an updated formatting value.Parametersformattingfinal Tab.Formatting formattingTab formatting settings. withMergeField
global ReadWriteTab withMergeField(final Tab.MergeField mergeField)Description Updates the tab mergeField property.ReturnsThe tab with an updated mergeField value.ParametersmergeFieldfinal Tab.MergeField mergeFieldContains the information necessary to map the tab to a field in SalesForce. withReadOnly
global ReadWriteTab withReadOnly(final Boolean readOnly)Description Updates the tab readOnly property.ReturnsThe tab with an updated readOnly value.ParametersreadOnlyfinal Boolean readOnlyWhen set to true, the signer cannot change the data of the custom tab. withRequired
global ReadWriteTab withRequired(final Boolean required)Description Updates the tab required property.ReturnsThe tab with an updated required value.Parametersrequiredfinal Boolean requiredWhen set to true, the signer is required to fill out this tab. withValidation
global ReadWriteTab withValidation(final Tab.Validation validation)Description Updates the tab validation property.ReturnsThe tab with an updated validation value.Parametersvalidationfinal Tab.Validation validationTab validation settings. withValue
global ReadWriteTab withValue(final Object value)Description Updates the tab value property.ReturnsThe tab with an updated value value.Parametersvaluefinal Object valueSpecifies the value of the tab. ZipTab
ZipTabglobal class ZipTab extends ReadWriteTabDescriptionA ZIP tab enables the recipient to enter a ZIP code. The ZIP code can be five digits or nine digits (in ZIP+4 format), and can be entered with or without dashes. It uses the same parameters as a text tab, with the validation message and pattern set for ZIP code information. This value can be set.Methods
MethodsZipTab
global ZipTab()DescriptionConstructs a ZIP tab.CheckboxTab
CheckboxTabglobal class CheckboxTab extends ReadWriteTabDescriptionA checkbox tab enables the recipient to select a yes/no (on/off) option. This value can be set.Methods
MethodsCheckboxTab
global CheckboxTab()DescriptionConstructs a checkbox tab.TitleTab
TitleTabglobal class TitleTab extends ReadWriteTabDescriptionA title tab displays the recipient's title. This value can't be set.Methods
MethodsTitleTab
global TitleTab()DescriptionConstructs a title tab.RecipientService
RecipientServiceglobal with sharing class RecipientServiceDescriptionThis class is the entry point for Docusign eSignature envelope recipient management. It provides methods to retrieve Salesforce source recipients.Methods
MethodsgetDefaultRoles
global static List<Recipient.Role> getDefaultRoles()DescriptionRetrieves a list of default recipient roles. These map to automatic anchor tags. For example, role 1 will map to \s1\, \d1\, etc.ReturnsA list of default recipient roles.getRecipients
global static List<Recipient> getRecipients(final SObjectType type, final Set<Id> ids)DescriptionRetrieves a list of Docusign envelope recipients from Salesforce source objects. By default, the Salesforce Account, Case, Contact, Lead, and Opportunity types are supported. More types may be supported via plugins.
ReturnsA list of envelope recipients.Parameterstypefinal SObjectType typeThe Salesforce object type. ids final Set<Id> idsThe Salesforce object IDs. searchRecipients
global static List<Recipient> searchRecipients(final SObjectType type, final String firstName, final String lastName)DescriptionSearches for Docusign envelope recipients from Salesforce source objects. By default, the Salesforce Contact, Lead, and User types are supported. More types may be supported via plugins.
Search behavior is defined and stored in account settings. See dfsle.Recipient.SearchBehavior and dfsle.AccountService.Settings for more details.
ReturnsA list of envelope recipients.Parameterstypefinal SObjectType typeThe Salesforce object type. firstName final String firstNameThe first name to match. lastName final String lastNameThe last name to match. Ignored for compound search behaviors. SeeRecipient.SearchBehavior for more details on search options.GenInvoiceTriggerHandler
GenInvoiceTriggerHandlerglobal with sharing class GenInvoiceTriggerHandler extends GenBillingAPIMethods
MethodsEntity
Entityglobal with sharing class EntityDescriptionRepresents a Salesforce object.Properties
id@AuraEnabled global Id idThe Salesforce object ID.isValid@AuraEnabled global Boolean isValidWhether the entity is valid or not. It is considered valid if the ID is defined.label@AuraEnabled global String labelThe localized Salesforce object label.name@AuraEnabled global String nameThe Salesforce object name.parent@AuraEnabled global Entity parentThe Salesforce object parent (e.g. Account for Opportunity).typeName@AuraEnabled global String typeNameThe name of the Salesforce object type.Methods
MethodsDocuSignException
DocuSignExceptionglobal class DocuSignException extends ExceptionDescriptionGeneral exceptions that may be raised by Docusign.ViewTab
ViewTabDescriptionA view tab is used with an approve tab to handle supplemental documents.Methods
MethodsViewTab
global ViewTab()DescriptionConstructs a view tab.withRequired
Description Updates the tab required property.ReturnsThe tab with an updated required value.Parametersrequiredfinal Boolean requiredWhen set to true, the recipient must click the View button for the supporting document prior to completing the signing process.