The envelope has been completed by the recipient.
The envelope has been declined for signing by the recipient.
The envelope has been voided by the sender.
Note: The envelope status codes used in this task represent a subset of the envelope status codes provided by DocuSign. For more information about DocuSign envelope status codes, see the DocuSign web site.
If the workflow receives one of the expected envelope status codes, the state machine then performs a set of workflow actions for that status code. In this case, the workflow received the Completed status code, indicating that the attendee has signed the document and can attend the event.
The workflow uses the DocuSign download document workflow action to download the signed document and attach it to the current item in the sample list, exits the state machine, and ends the workflow.
To configure the workflow to download the signed document
Add a new State Machine workflow action to the design canvas, and configure it so that it has three possible states, named Completed, Declined, and Voided, and that the state in which the state machine starts is chosen from the value of the Status workflow variable.
Add a new Set Workflow Status workflow action, under the Completed branch of the State Machine workflow action added in the previous step, and configure it so that the value of Status is set to "Downloading".
Add and configure a new DocuSign download document workflow action.
The DocuSign download document workflow action downloads a document from a DocuSign envelope as either an attachment for the current item in a list or library, or as a server relative URL to a document library within the current site. In this case, the workflow action downloads the signed document as an attachment for the attendee in the sample list.
Add the workflow action to the design canvas, immediately after the workflow action added in the previous step.
Click the dropdown arrow for the workflow action, and then click Configure.
In the DocuSign Download Document dialog box, perform the following actions:
Set the value of Authorizing user to the AuthorizingUser workflow variable.
Set the value of Envelope ID to the EnvelopeId workflow variable.
In Save PDF document as, select Current item attachment, and then specify a file name for the attachment.
Note: DocuSign returns documents, regardless of their original format, as Portable Document Format (.pdf) files. Ensure that the file extension of the specified file name is set to ".pdf".
Add a new Set Workflow Status workflow action, immediately after the workflow action added in the previous step, and configure it so that the value of Status is set to "Downloaded".
Add a new Log to History List workflow action, and configure it so the value of Message is set to "Downloaded to current item's attachment".
Add a new Set Next State workflow action, and configure it so that the value of Set next state is set to Exit state machine.