DocuSign Integration

From TempusServa wiki
Revision as of 15:36, 5 July 2021 by old>Tvi (Retskrivning)
Jump to navigation Jump to search

Prereq

To set up DocuSign integration an account that meets one of the following criteria is needed.

  • A DocuSign-partner or
  • Advanced developer" license

To use the integration, the uploading user only needs a regular eSignature subscription.

The integration will initially be created in demo mode and has to be approved, before it can be moved to production.
Approval requires 20 consecutive successful uploads performed within the last 30 days.
After that, an account with the proper access permissions has to sign in and the integration will be transferred to their account.

Setup in DocuSign

First: Sign in with an admin account and create a new "Integration" under "Settings" -> "Integrations" -> "Apps and Keys". Give it a descriptive name. This name will be shown to all who upload documents via the integration.

Second: Add a "Secret Key", save it. This is needed for docuSignSecretKey.

Third: Under "Redirect URIs" provide a URL using the following syntax:
https://[domain]/[TS-app-name]/[docuSignAuthCallbackUrl]

URL Example: https://omega.tempusserva.dk/TempusServa/main?command=dk.tempusserva.signing.docusign.PageLoginCallback

Setup in TS

There are 11 parameters available. Seven of these (marked with an asterisk below) must be set for the integration to work:

  • docuSignActive*
  • docuSignLog
  • docuSignApiHost*
  • docuSignAuthHost*
  • docuSignHost*
  • docuSignAccountId*
  • docuSignIntegrationKey*
  • docuSignSecretKey*
  • docuSignAuthCallbackUrl
  • docuSignEventCallbackUrl
  • docuSignBrandId

The Field Type Component for which DocuSign upload should be available must be changed from "Files: Documents" to "Files: Documents with signing".

docuSignActive

To enable the DocuSign functionality, this has to be set to "true".

docuSignLog

This is used for debugging and should not be enabled in production.
It enables debuggin-logs on all uploads, both in TS and in DocuSign, thus breaking confidentiality, because all parameters will be saved to a log somewhere.

docuSignApiHost

This parameter is account-dependant.
It can be found on the "Apps and Keys" page in DocuSign, labeled "Account Base URI".

docuSignAuthHost

This parameter should always be "https://account-d.docusign.com/oauth/" when testing the integration and "https://account.docusign.com/oauth/", when the integration is in production.

docuSignHost

This parameter is account-dependant. It is used to redirect the user, after a successful upload.
It's value should be "https://appdemo.docusign.com" during testing.
The production value is found by signing in with an account, that will be using the integration, and then copying the URL from the browser. Remember to only copy from beginning to end of docusign.com, don't include the trailing /.

docuSignAccountId

This attribute is account-dependant.
It can be found on the "Apps and Keys" page in DocuSign, labeled "API Account ID".
It's a GUID, formatted like this: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

docuSignIntegrationKey

This parameter is integration-dependant.
It can be found on the "Apps and Keys" page in DocuSign, or when viewing the details about the integration.
It's a GUID, formatted like this: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

docuSignSecretKey

This parameter is integration-dependant.
It can be found when viewing the details about the integration, in DocuSign.
You will only have access to the entire key when creating it, but you can just add a new one if the key is lost. Remember to delete the old one.
It's a GUID, formatted like this: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

docuSignAuthCallbackUrl

This parameter I static and should always be
"main?command=dk.tempusserva.signing.docusign.PageLoginCallback".

docuSignEventCallbackUrl

This parameter is static and should always be
"docusign-event-callback".

docuSignBrandId

This parameter is optional.
In DocuSign it is possible to create "Brands" ("Settings" -> "Account" -> "Brands").
All brands have a unique ID, it doesn't have to be the owner of the integration that creates the brand.
To enable custom branding in email, the signing formula, etc., input the brandID here.
If this parameter is left is empty, the default DocuSign branding will be used.
It's a GUID, formatted like this: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Moving to production

When moving the integration to production, the following should be taken into account.

Make sure to complete 20 successful uploads in a row within 30 days.
Uploads don't have to be full featured documents, empty ones will do, and they don't have to be different documents, you can upload the same document 20 times.

If the production account is different from the test account, the following parameters should be updated:

  • docuSignAccountId
  • docuSignApiHost

Make sure to change the following parameters:

  • docuSignHost
  • docuSignAuthHost

If the TS Application for test and production are different (different base URL), remember to add the "Redirect URIs" in DocuSign. And make sure that docuSignLog is set to false.