GetDocuSignRecipientStatus

The GetDocuSignRecipientStatus activity retrieves the signature status of DocuSign recipients. The activity passes an Envelope ID and receives the Envelope IDs as well as the signature status of each recipient. This activity allows for conditional processing in the workflow so that if the document has not been successfully signed, the flow of the workflow can be routed back to the state immediately prior to the DocuSign page ensuring that a document has been electronically signed before proceeding with any additional processing in the workflow.

The activity will mainly be used for the primary signer (i.e., the first recipient in an array - Recipients(0)) who signs the document within the rendered form. The activity is not applicable for additional signers who will sign via email.

Information about the DocuSign signature status is useful to handle all multi route workflows and to recover from error conditions including connection loss. For example, when the connection to the DocuSign server is interrupted and the signature status indicates that the document was not signed successfully, the user may be prompted to retry the sequence.

The GetDocuSignRecipientStatus activity supports the following statuses:

DocuSign Recipient Statuses
Status Description
Completed Success path
Created This status would likely not be relevant in a workflow. The process would not proceed from DocuSign.
Declined This status occurs if a signer declines to sign a document. This is a specific case that can be handled at the workflow designer's discretion (e.g., trigger an email or some other action)
Delivered This status is applicable as a status for additional signers.
Other Network/timeout case

The error message displayed when a DocuSign process fails due to network or timeout error can be configured in the Forms Builder Settings workspace under the setting item "DocuSign Error Message Text".

Sent This status occurs if the user selects “Finish Later”. This status should probably be handled at the workflow designer's discretion.
Signed This status occurs briefly before the Completed status. The Signed status would likely not be relevant in a workflow.

Multi Route Workflow Example

You could use the GetDocuSignRecipientStatus activity in a multi route workflow to select a path based on the status returned by the activity.

For example, if the status is:

  1. Declined, go to the end of the workflow, display a validation error, and do not update document status. The document should remain in the student's Portal page because the document status would not have changed.

  2. Completed/Signed, go to the end of the workflow, and update the document status. (Next path highlighted below.)

  3. Anything else, retry the workflow and go to the form prior to the DocuSign sequence. (Retry path highlighted below).

Note that the order of the multi route conditions is important:

  • The first check is for a specific Declined status.
  • The 2nd check is for a specific Completed status.
  • The 3rd check ("Retry") is a catch-all for any status condition.

check status

  1. Declined path

    The transition from the Default-Frame state to the End state contains a GetDocuSignRecipientStatus activity and the following condition:

    Recipients(0).Status.Equals(DocuSignRecipientStatus.Declined)

    This is followed by a CreateValidationItem activity that generates the following error message: "User selected Decline to Sign, document status has not been updated."

    Declined path

    • If the additional signer declines to sign the document, the additional signer receives a second email canceling their access to sign the document.

    • If the connection is interrupted and the additional signer does not sign the document upon receiving the first email (interrupted), the additional signer will receive a second email and will be allowed to sign (good retry).

  2. Completed/Signed path

    The transition from the Default-Frame state to the End state contains a GetDocuSignRecipientStatus activity and the following condition:

    Recipients(0).Status.Equals(DocuSignRecipientStatus.Completed)

    This is followed by GetSignedDocument and CreateDocument activities.

    Completed path

  3. Retry path

    The transition from the Default-Frame state to the CMC_Student_PersonalInfo state (this is the form prior to the DocuSign sequence) contains a GetDocuSignRecipientStatus activity and the following condition:

    Not Recipients(0).Status.Equals(DocuSignRecipientStatus.Completed)

    Reuse the originally generated Envelope Id since DocuSign charges for each unique Envelope Id.

    This is followed by a CreateValidationItem activity that generates the following information message: "Connection to DocuSign was interrupted, please retry."

    Retry path

Properties

GetDocuSignRecipientStatus - Properties

GetDocuSignRecipientStatus Properties
Property Value Required Notes
DisplayName String No Specify a name for the activity or accept the default.
DocuSignConfig InArgument<DocuSignConfig> Yes Specify the DocuSignConfig property using a VB expression or variable. This is the out argument returned by the GetDocuSignConfig activity.

To identify the variable type, in the Variable type field of the Variables pane, select Browse for Types.... In the "Browse and Select a .NET Type" window, navigate to Cmc.Nexus.FormsBuilder.Contracts.Cmc.Nexus.FormsBuilder.Entities, select DocuSignConfig, and click OK.

DocuSignConfig argument

DocuSignRecipients OutArgument<DocuSignRecipient[]> No Specify the DocuSignRecipients array property using a VB expression or variable.

To identify the variable type, in the Variable type field of the Variables pane, select Browse for Types.... In the "Browse and Select a .NET Type" window, select Array of [T], navigate to Cmc.Nexus.FormsBuilder.Contracts.Cmc.Nexus.FormsBuilder.Entities, select DocuSignRecipient, and click OK.

DocuSign Recipient argument

EnvelopeId InArgument<String> Yes Specify the EnvelopeId as DocuSignRequest.EnvelopeId. 
ValidationMessages InOutArgument <ValidationMessageCollection> No Specify a variable that can be used to capture validation messages.