Skip to navigation

SigningService

View as Markdown
global with sharing class SigningService
Description
Encapsulates signing-related operations.

Methods

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
envelopeId
final UUID envelopeId
The Docusign envelope ID.
returnUrl
final Url returnUrl
Where to redirect after signing.
global static Url getRecipientPreviewUrl(final UUID envelopeId, final Integer recipientSequence)
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
envelopeId
final UUID envelopeId
The Docusign envelope ID.
recipientSequence
final Integer recipientSequence
The recipient sequence in the envelope. Must be a positive integer.
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
envelope
final 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.
global static Boolean shouldSignNow(final Envelope envelope)
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
envelope
final Envelope envelope
The Docusign envelope.