Envelope
global class Envelope
Description
Representation of a Docusign envelope.
Properties
customFields@AuraEnabled global List<CustomField> customFields
A list of envelope custom fields. These are not persisted via the dfsle__Envelope__c object.
documents@AuraEnabled global List<Document> documents
A list of documents contained by the envelope.
docuSignId@AuraEnabled global UUID docuSignId
The Docusign ID of the envelope, assigned when the envelope is sent or a draft envelope is created.
emailMessage@AuraEnabled global String emailMessage
The message of the email recipients receive. This is contained within the standard Docusign email body.
emailSubject@AuraEnabled global String emailSubject
The subject of the email recipients receive.
envelopeConfigurationId@AuraEnabled global Id envelopeConfigurationId
The ID of the configuration used to create the envelope.
error@AuraEnabled global APIError error
The error returned by the API in multi-send scenarios.
id@AuraEnabled global Id id
The ID of the associated dfsle__Envelope__c record.
name@AuraEnabled global String name
The name of the envelope.
notifications@AuraEnabled global Notifications notifications
The reminder and expiration settings for the envelope.
options@AuraEnabled global Envelope.Options options
The envelope options controlling default auto-place text and data and document write-back.
recipients@AuraEnabled global List<Recipient> recipients
A list of recipients who receive the envelope.
sent@AuraEnabled global Datetime sent
The date and time when the envelope was sent.
source@AuraEnabled global Entity source
The Salesforce source object for the envelope (e.g. Opportunity or Lead).
transactionId@AuraEnabled global UUID transactionId
Sender-generated identifier of the envelope used to prevent envelopes from being sent multiple times in cases where the status is indeterminate. For example, when the network connection drops while waiting for a response. This value is valid in the Docusign system for 7 days.
STATUS_CREATEDSTATUS_SENTSTATUS_DELIVEREDSTATUS_DECLINEDSTATUS_VOIDEDSTATUS_COMPLETEDMethods
Envelope
global Envelope( final Id id, final String name, final UUID docuSignId, final Id envelopeConfigurationId, final List<Document> documents, final List<Recipient> recipients, final List<CustomField> customFields, final Notifications notifications, final String emailSubject, final String emailMessage, final Entity source, final Datetime sent )
Description
Constructs a Docusign envelope.
Parameters
id final Id id
The ID of the associated dfsle__Envelope__c record.
name final String name
The name of the envelope.
docuSignId final UUID docuSignId
The Docusign ID of the envelope.
envelopeConfigurationId final Id envelopeConfigurationId
The ID of the configuration used to create the envelope.
documents final List<Document> documents
A list of documents contained by the envelope.
recipients final List<Recipient> recipients
A list of recipients who receive the envelope.
customFields final List<CustomField> customFields
A list of envelope custom fields.
notifications final Notifications notifications
The reminder and expiration settings for the envelope.
emailSubject final String emailSubject
The subject of the email recipients receive.
emailMessage final String emailMessage
The message of the email recipients receive.
source final Entity source
The Salesforce source object for the envelope.
sent final Datetime sent
The date and time when the envelope was sent.
withCustomFields
global Envelope withCustomFields(final List<CustomField> customFields)
Description
Sets the envelope's
customFields property.Returns
This envelope with the updated
customFields property.Parameters
customFieldsfinal List<CustomField> customFields
The new list of custom fields.
withNotifications
global Envelope withNotifications(final Notifications notifications)
Description
Sets the envelope's
notifications property.Returns
This envelope with the updated
notifications property.Parameters
notificationsfinal Notifications notifications
The new notification settings.
Envelope.Options
global class Options
Description
Representation of Docusign envelope options.
Properties
documentWriteBack@AuraEnabled global Document.WriteBack documentWriteBack
Document write-back options for completed envelopes.
envelopeEventUpdates@AuraEnabled global Map<String, Map<String, Object>> envelopeEventUpdates
Map of envelope status to map of field updates. Refer to the
dfsle.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'
}
};
includeDefaultAutoPlaceTags@AuraEnabled global Boolean includeDefaultAutoPlaceTags
Whether to include default anchor tabs that map to recipient roles.
recipientEventUpdates@AuraEnabled global Map<String, Map<String, Object>> recipientEventUpdates
Map of recipient status to map of field updates. Refer to the
dfsle.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
global Options( final Boolean includeDefaultAutoPlaceTags, final Document.WriteBack documentWriteBack, final Map<String, Map<String, Object>> envelopeEventUpdates, final Map<String, Map<String, Object>> recipientEventUpdates )
Description
Constructs Docusign envelope options.
Parameters
includeDefaultAutoPlaceTags final Boolean includeDefaultAutoPlaceTags
Whether to include default anchor tabs that map to recipient roles.
documentWriteBack final Document.WriteBack documentWriteBack
Document write-back options for completed envelopes.
envelopeEventUpdates final Map<String
Map of envelope status to map of field updates.
recipientEventUpdates Map<String
Map of recipient status to map of field updates.
Envelope.Status
global class Status implements Comparable
Description
Docusign envelope status.
Properties
completed@AuraEnabled global Datetime completed
Date and time when the envelope was completed.
docuSignId@AuraEnabled global UUID docuSignId
The Docusign envelope ID.
emailSubject@AuraEnabled global String emailSubject
The subject of the email message sent.
expires@AuraEnabled global Datetime expires
Date and time when the envelope expires.
id@AuraEnabled global Id id
The ID of the underlying dfsle__EnvelopeStatus__c record.
lastStatusUpdate@AuraEnabled global Datetime lastStatusUpdate
Date and time when the status was last updated.
reason@AuraEnabled global String reason
The reason the envelope was declined or voided.
recipients@AuraEnabled global List<Recipient.Status> recipients
Associated recipient statuses.
senderEmail@AuraEnabled global String senderEmail
The sender email address.
senderName@AuraEnabled global String senderName
The sender name.
sent@AuraEnabled global Datetime sent
Date and time when the envelope was sent.
source@AuraEnabled global Entity source
The Salesforce source entity.
status@AuraEnabled global String status
The current status.
Methods
Status
global Status( final Id id, final Entity source, final UUID docuSignId, final String status, final String senderName, final String senderEmail, final List<Recipient.Status> recipients, final Datetime sent, final Datetime expires, final Datetime completed, final String emailSubject, final String reason, final Datetime lastStatusUpdate )
Description
Constructs a Docusign envelope status.
Parameters
id final Id id
The ID of the underlying dfsle__EnvelopeStatus__c record.
source final Entity source
The Salesforce source entity.
docuSignId final UUID docuSignId
The Docusign envelope ID.
status final String status
The current status.
senderName final String senderName
The sender name.
senderEmail final String senderEmail
The sender email address.
recipients final List<Recipient.Status> recipients
Associated recipient statuses.
sent final Datetime sent
Date and time when the envelope was sent.
expires final Datetime expires
Date and time when the envelope expires.
completed final Datetime completed
Date and time when the envelope was completed.
emailSubject final String emailSubject
The subject of the email message sent.
reason final String reason
The reason the envelope was declined or voided.
lastStatusUpdate final Datetime lastStatusUpdate
Date and time when the status was last updated.