Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Sales Engineering Quick Guide on how to configure the Docusign connectors for e-signature POCs.

...

URL.- https://appdemo.docusign.com/home

Admin Configuration

...

A. Create and configure an OAth application from inside DocuSign developers console.

  1. Login to your Docusign developer account.  
    1. Get the account ID from the top-right menu
    Get an Integrator Key for that Docusign account.From the top right menu, click on Go to Admin and navigate (https://account-d.docusign.com/)
  2. On the top menu go to Settings, then in the sub menu go to Integration → API and Keys.
  3. Click on  Add APP / Integrator Key. (Note: If a key already exists, you may be able to use it). Name it ProcessMaker, all other fields can remain blank.
  4. Note the UUID key that is generated. 

Template Configuration

  1. Create a New Template. Note the Template ID which you can review in the URL when opening the template, as shown hereCopy the Integration Key for later
  2. Choose Authorization  Code Grant
  3. Add a Secret Key, copy the Secret Key for later
  4. Add a redirect URI likehttps://appdemoyour.docusignprocessmaker.comserver/templates/details/xxx-yyy-this-is-the-id
  5. Upload a Word or PDF file by clicking on Add Documents to the Envelope. 
  6. Configure the Recipients List by clicking on Add Recipients to the Envelope.
    1. Only the Role is needed -other fields (name, email) will be provided by PM.
  7. In the next screen, drag fields from Docusign's field menu (left) onto the document. These will match against form and signature data.
    1. Note that there are distinct field selections for each Recipient Role.
    2. Note to include at least one Signature field.

On ProcessMaker

Connector Configuration

  1. Find and Edit the PM Connector 'CreateAndSendEnvelope'. This connector will send Docusign the necessary information and request the creation of an Envelope (a signature process).
    1. If there is none, simply create a new one using the config options listed here.
  2. The URL for this call is https://demo.docusign.net/restapi/v2/accounts/XXXXXXX/envelopes called with method POST.
    1. Note to replace the account id in the URL with the one from your test account, retrieved as detailed above.
  3. The request takes two Headers, ensure they exist or add them:
    1. Header: Content-type Value: application/json
    2. Header: X-DocuSign-Authentication Value: {"Username":"xx@yy.com","Password":"XXXYYY", "IntegratorKey":"UUID-Key"}
      1. Replace values for those from your account. Be sure to include the Integrator Key, retrieved as detailed above.

Connector Use

  1. Design a Process with a form task that captures necessary Recipient information (name, email).  
  2. The request will be expecting a Body with the following JSON structure:{
    "status" :"sent",
    "emailSubject" :@@Subject,
    "templateId" :@@Template,
    "templateRoles":@=SignersList
    }You'll need thus to create these variables prior to calling the connector. 
  3. emailSubject can be either hard-coded or read from a variable. It is a plain text field.
  4. templateId is the ID for the template you will request signing. It can be hard-coded or read from a variable.
  5. templateRoles is a JSON array with details for each Recipient. Each element in the array will follow this structure:
  6.  "roleName"=> "rolename",
    "name"=> "name"
    "email"=> "email",
    "recipientId"=> "id",
    "tabs"=> { {"textTabs" => $textTabs }
  7. Here you will replace these values with form data. See the following sample script that builds this payloaddocusign/authorization
  8. Save the application

View file
nameDocuSignApp.mp4
height250

B. Configure DocuSign in ProcessMaker

  1. Go to Admin menu
  2. Click on Image Added DocuSign Configuration sub menu
  3. Paste the previously copied Integration Key
  4. Paste the previously copied Secret Key
  5. Save the configuration

View file
nameDocuSignConfigInt.mp4
height250

C. Grant Access Code from Admin menu (Optional)

  1. From DocuSign Configuration click on GRAN DOCUSIGN ACCESS
  2. Click on Authorize access
  3. Login with you docusign accound (the owner of your docusign documents and templates)
  4. Done

View file
nameDocuSignGrantAccess.mp4
height250

Template Configuration

You could use any template you have in DocuSign or create a new one. To create a new template follow the following steps:

  1. From your DocuSign account go to Templates
  2. Create a New Template
  3. Set the name an a brief description
  4. Upload a document to be signed
  5. Setup the recipients
  6. Save and exit

View file
nameDocuSignCreateTemplate.mp4
height250
 


Connectors Use

A. Send Envelope

Image Added

PropertyAccept mustache?Description
name
Name of the task.
Email subject{M}The subject of the email used to send the envelope.
Content type
  • HTML Define the body content of the document in html format
  • Screen Define the body content of the document using an screen
Content{M}
  • HTML with mustache syntax
  • Screen You could select a display screen
Recipients variable

Request variable that will contain the list of recipients. You could view the complete structure definition if the DocuSign documentation (recipients)

It could be for example a variable recipients,  this variable could be loaded with an Script task with a value like (see script example below):

Code Block
languagejs
recipients = {
    "signers": [
        {
            "recipientId": "1",
            "roleName": "signer",
            "routingOrder": "1",
            "email": "tester@processmaker.com",
            "name": "James Tremblay"
        }
    ]
}


Wait sign completed

If enabled the connector will wait until the envelope status changes to "completed"

Image Added

If not enabled, the connector will continue with the process after the envelope is sent

Output variable
Request variable that will receive the response from the connector

PHP Script Example to prepare the variable recipients:

Code Block
languagephp
titleDS Script
linenumberstrue
collapsetrue

...

<?php 
return [
    'recipients' => [
        'signers' => [
  

...

          [
 

...

 

...

 

...

            

...

 "recipientId" 

...

=> "1",
                "roleName" => "

...

signer",
      

...

          "routingOrder" => 

...

"1",
        

...

 

...

       "

...

email" => 

...

"

...

tester@processmaker.com"

...

,

...

  

...

     

...

  

...

       "

...

name" => "

...

James Tremblay",
        

...

    ],
       

...

 

...

],
    ],
];

...

Once you have these variables set, you can use the Service Task with the createSendEnvelope connector:

...

info


A. Send Template

Image Added


PropertyAccept mustache?Description
name
Name of the task.
Template ID

ID of a DocuSign template  (see the section Template Configuration)

You could paste here the ID of the template to use.

Or use the Image Added dropdown button to select an template (To use this button you previously  must be Grant Access Code from Admin menu)

Template roles variable

Request variable that should contain the roles of the template. You could find an example in DocuSign documentation (Signature by email using a template)

It could be for example a variable template_roles,  this variable could be loaded with an Script task (see script example below):

Wait sign completed

If enabled the connector will wait until the envelope status changes to "completed"

Image Added

If not enabled, the connector will continue with the process after the envelope is sent

Output variable
Request variable that will receive the response from the connector

PHP Script Example to prepare the variable recipients:

Code Block
languagephp
titleDS Script
linenumberstrue
collapsetrue
<?php 
return [
    'template_roles' => [
        [
            "email": "tester@processmaker.com",
            "name": "James Tremblay",
            "roleName": "signer"
        ]
    ],
];



C. Authorize connector

Image Added

If you need to use and individual DocuSign Connection by user requestor, instead of configure a global connection, you could use this Authorize connector

Ex.

Image Added

View file
nameDocuSignAuthConnector.mp4
height250


...

Info
You could find a complete documentation about the DocuSign Signature Concepts here

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@a52
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "docusign" , "connectors" ) and type = "page" and space = "SE"
labelsDocusign Connectors

...

Page Properties
hiddentrue


Related issues