Setting API Linkage between Electronic Signature System DocuSign and Cloud-based Workflow Questetra

Hi, there.

By consultation from a customer, I verified if I can cooperate with DocuSign, an electronic signature service, via API, and confirmed that it can be realized.
Below, I will summarize how to set up the collaboration.

TOC
1: Background to consideration of collaboration between DocuSign and Questetra
2: Settings for collaborating DocuSign and Questetra
2.1: OAuth setting on the DocuSign side
2.2: OAuth setting on the Questetra side
2.3: Setting for invoking DocuSign APIs from Questetra
3: Closing

1: Background to consideration of collaboration between DocuSign and Questetra

One of our customers who already has implemented DocuSign is considering business improvement using Questetra, so I verified if API linkage is possible or not.

2: Settings for collaborating DocuSign and Questetra

I proceeded the verification referring to guidance that is “REST API: Getting Started with OAuth” of DocuSign’.

First, I created Docusign’s Developer sandbox (development environment). It was prepared immediately after applying via the following webform.
https://go.docusign.com/o/sandbox/

Please refer to the following article for details of setting OAuth 2. In this article, I will describe things specific to the cooperation with DocuSign.
* Related Article: Settings when Calling REST API of Another Service from Questetra (Questetra to be OAuth2 client)

2.1: OAuth setting on the DocuSign side

I logged in to the sandbox according to the aforementioned guidance and displayed the administration screen from “Go To Admin”. Then I opened “API and Keys” on the left side menu, and added “Integrator Key”.

  • Set the redirect URI of Questetra, generate Secret Key (make a note) and SAVE
  • Make a note of the generated Integrator Key
  • Make a note of API Account ID which is indicated at “My Account Information” on Admin screen.

2.2: OAuth setting on the Questetra side

Obtain a token by settings based on the information described on “Authorization Code Grant”, the reference by DocuSign.

  • “Authorization Endpoint URL”: https://account-d.docusign.com/oauth/auth
  • “Token Endpoint URL”: https://account-d.docusign.com/oauth/token
  • “Client ID”, “Consumer Secret”: Respectively enter the “Integrator Key” and “Secret Key” which you have obtained at 2.1 above

2.3: Setting for invoking DocuSign APIs from Questetra

By using “Throwing Message Intermediate Event (HTTP)”, API invoking was accomplished.
* Related Manual: M225: Auto Sending of HTTP Request with Business data Inserted

  • “Network Settings”
    • “Access URL”, “HTTP Method”: Set up to fit the API to invoke
    • “String type data item that will contain error details when an error occurred”: Although it is not mandatory, it is better to specify so that you can check the error details. It is even better to configure processing upon an error after this event, that refers to this Data Item to determine the presence or absence of an error.
  • “Security / Custom Header”: Select “Connect with the OAuth 2.0” and enter the name which you have set at 2.2 above to “Setting name”
  • “Request Body”: When sending JSON, specify the String type Data Item that stores JSON to be sent to “Data item to send as request body”
  • “Response Settings”: Although it is not mandatory, if you check “Save Response” and specify a String type Data Item, you can confirm the result.

Even though it is not described in the aforementioned guide, I tried the retrieval API first. The following is what I did.
Create a Template on Docusign screen, and make a note of its Template ID from the display URL of the Template Summary screen.
Excute “Tempate: get“. (HTTP Method is “GET”.)

https://demo.docusign.net/restapi/v2/accounts/{API ACCOUNT ID} /templates/{TEMPLATE ID}

Below is the received JSON data, and it seems working well.

{
"envelopeTemplateDefinition": {
"templateId": "●Template ID●",
"name": "●Template Name●",
"shared": "true",
・・・ (omitted below...quite long codes...)
}

Next, execute “Envelopes: create“. (Set “HTTP Method” as “POST (Specify Request Body)”,
“Data item to send as request body” as to send JSON.)

https://demo.docusign.net/restapi/v2/accounts/{API ACCOUNT ID}/envelopes

Below is JSON data to send.(Regarding roleName, it seems to be prepared in advance in the case below, I set that value temporarily.)

{
  "status": "sent",
  "emailSubject": "Docusign API test Questetra20190130",
  "templateId": "●Template ID●",
  "templateRoles": [{
    "name": "●USERNAME of who created this sandbox●",
    "email": "●EMAIL ADDRESS of who created this sandbox●",
    "roleName": "account_manager"
  }]
}

Below is the received JSON data. When I check on the DocuSign screen, a new request arrived at the Inbox.

{
"envelopeId": "●Emvelope ID●",
"uri": "/envelopes/●Emvelope ID●",
"statusDateTime": "2019-01-30T07:20:55.7970000Z",
"status": "sent"
}

3. Closing

This was a verification until the creation of Envelope using Template, and I suppose that you now understand that processing can be executed through DocuSign API with instructions from Questetra just by setting.

By using this, it can be realized such as DocuSign’s request for electronic signature is automatically sent after internal approval.

If you have any question, please feel free to contact us.

1 thought on “Setting API Linkage between Electronic Signature System DocuSign and Cloud-based Workflow Questetra”

  1. Pingback: Examples of Collaborations with Other Systems and BPM Workflow (June, 2019) - Questetra

Comments are closed.

%d bloggers like this: