Adding DocuSign commands in the logic flow
In the Advanced UI, Dynamo offers commands that can be used in your template’s logic flow (Main Flow) to carry out a range of functions: handing the generated document to DocuSign, getting signing status, and fetching the signed document and storing it under your Salesforce record.
Full sample template
Below is an example template that has all the full features of the DocuSign integration implemented. In the example template, the outcome document is sent to DocuSign to process via the end user clicking the ‘Send to DocuSign’ button on the screen where the final composed PDF is displayed. After the end user clicks on this button, Dynamo will move to the step ‘Send to DocuSign’, where the main commands to hand over the document to DocuSign are executed.
However, as Dynamo’s logic flow is highly customizable, depending on your document generation process, you can add the step to send the document to DocuSign anywhere in the logic flow after it has been composed.
Example template: SimpleQuotationWithESign.dap
DocuSign integration logic commands
How to add logic commands in a step:
Type the command name in the search box in the left pane.
Drag the chosen command to the workspace in the middle.
Configure the command on the right pane
![](../__attachments/154894681/integration-logic-commands.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)
Screenshot above: How to add a logic command
The logic related to the DocuSign integration that has been added to the example template’s Main Flow are:
Adding demo/live account credentials in the Initialize step of the Main Flow:
After successfully going live, you can use your live DocuSign account credentials and developer sandbox credentials to input in the 'Initialize' step of Dynamo's logic flow.
In the command 'choose...when...' (screenshot below), when the environment is a demo, input your developer sandbox account's username and password. Otherwise, input your live account's credentials.
![](../__attachments/154894681/adding-account-credentials.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)
Add a button in the ‘Preview PDF – User Selection’ screen, pointing to the step ‘Send to DocuSign’, which should be created.
![](../__attachments/154894681/add-button-preview-pdf.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)
Create a step in the logic flow for the 'Send to DocuSign' function.
![](../__attachments/154894681/create-a-step-for-logic.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)
Add e-signature commands to the Send to DocuSign step (each command below is linked to its detail page)
sendToDocuSign – this command sends the outcome document through DocuSign to a set of recipients for signing. Each signer is specified in the child command signer (a child command is positioned underneath a main command). Emails will be sent in order of signers listed under the “sendToDocuSign” tag. Once all the signers have completed the signing, the signed document (final version) will be sent to the sender who initiated the e-signature process.
storeESignature, getDocuSignDocument, and getDocuSignStatus – These commands are used with the ‘DocuSign webhook’ integration (Salesforce and DocuSign implementing guide here) to get the status of the signing process and the final signed document stored under the Salesforce record (screenshot below).
![](../__attachments/154894681/add-e-signature-commands.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)