SigningService
global with sharing class SigningService
Description
Encapsulates signing-related operations.
Methods
getEmbeddedSigningUrl
global static Url getEmbeddedSigningUrl(final UUID envelopeId, final Url returnUrl)
Description
Retrieves the signing URL for embedded recipients. These recipients do not have to click on an email link to initiate the signing process. Instead, the signing process is initiated from within a custom application.
Returns
The signing URL.
Parameters
envelopeIdfinal UUID envelopeId
The Docusign envelope ID.
returnUrl final Url returnUrl
Where to redirect after signing.
getRecipientPreviewUrl
Description
This method returns a URL for an envelope recipient preview in the Docusign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.
The caller must be the owner of the envelope.
Returns
The recipient preview URL.
Parameters
envelopeIdfinal UUID envelopeId
The Docusign envelope ID.
recipientSequence final Integer recipientSequence
The recipient sequence in the envelope. Must be a positive integer.
getSigningUrl
global static Url getSigningUrl(final Envelope envelope, final Url returnUrl, final Boolean checkFirstRecipientOnly)
Description
Retrieves the signing URL for the next 'sign now' signer, either in-person or the current user as signer.
The caller must be the owner of the envelope.
Returns
The signing URL.
Parameters
envelopefinal Envelope envelope
The Docusign envelope.
returnUrl final Url returnUrl
Where to redirect after signing.
checkFirstRecipientOnly final Boolean checkFirstRecipientOnly
Whether to check only the first recipient or all recipients.
shouldSignNow
Description
Determines whether the next Docusign envelope recipient can sign now. Either the signer or host must match the current Salesforce user.
The caller must be the owner of the envelope.
Returns
true if the next recipient can sign now, false otherwise.Parameters
envelopefinal Envelope envelope
The Docusign envelope.