DocuSign connector

The DocuSign connector is used to send documents via email to be digitally signed. The process flow waits for a document to be signed before continuing with the process. The signed document is saved to the Content Services repository.

Important: The DocuSign connector requires a DocuSign account to handle document signing. This account is separate to the Alfresco hosted environment and should be created and managed by customers.

The DocuSign connector is displayed on the process diagram as a pen.

Sign document

The SIGNDOCUMENT action is used by the DocuSign connector to request a digital signature on a document.

The input parameters to request a DocuSign signature are:

ParameterTypeDescription
fileFileRequired. A variable of type file containing the document to be signed.
documentIdIntegerOptional. Correlation ID to send to the DocuSign API, for example 250.
nodeFormatStringOptional. The format of the document to be signed. Values are pdf or docx.
outputFileNameStringOptional. The name of the file that will be created, for example invoice.pdf.
recipientEmailStringRequired. The email address of the person signing the document.
recipientNameStringOptional. The name of the person signing the document, for example John Doe.
emailSubjectStringOptional. The subject line of the email sent with the document to sign.
signHerePageStringOptional. The page number in the document the Sign Here box will appear on, for example 3.
signHereXStringOptional. The X position of the Sign Here box in the document, for example 100.
signHereYStringOptional. The Y position of the Sign Here box in the document, for example 50.
targetFileMetadataContent-MetadataOptional. Metadata to store the file with. This is a JSON object of key value pairs. See below for an example.
underscoreMetadataBooleanOptional. If set to true, the input targetFileMetadata can have its namespace prefixes written with _ instead of :, for example cm_title instead of cm:title. This allows the JSON to be used in an expression, for example ${metadata.cm_title}, whereas ${metadata.cm:title} is not valid.
targetFileTypeContent-TypeOptional. The type to set for the signed file, for example fin:invoice.
targetFileFileRequires one. A variable of type file that should be updated with the signed version of the document.
targetFolderFolderRequires one. A variable of type folder to store the signed document in.
targetFolderIdStringRequires one. The nodeId of the folder to store the signed document in. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
targetFolderPathStringRequires one. The location path or relative path of the folder to store the signed document in. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
timeoutIntegerOptional. The timeout period to wait for the document to be signed in milliseconds, for example 910000.

Note: underscoreMetadata can be set to true and the targetFileMetadata input can still use : with the connector successfully executing the action. If underscoreMetadata is set to false and targetFileMetadata uses _ then the connector will fail to execute the action.

An example of the targetFileMetadata that can be stored with the document is:

{
"ahr:contract-type": "Full Time",
"ahr:full-name": "John Doe",
"ahr:role": "Developer"
}

The output parameters from signing a document are:

ParameterTypeDescription
fileFileOptional. The signed document available to be mapped to a variable.

Configuration

The DocuSign connector uses the DocuSign REST API. An application needs to be set up and authorized to utilize this functionality in the connector. The following steps outline this process:

  1. Sign into your DocuSign account.
  2. Configure an application for JWT authentication including the prerequisites required to setup an RSA key.
  3. Grant consent to the application.

Configuration parameters

The configuration parameters for the DocuSign connector are:

ParameterDescription
DOCUSIGN_APILOCATIONRequired. The URL of the DocuSign REST API.
DOCUSIGN_ACCOUNT_IDRequired. The DocuSign account ID the application is registered to.
DOCUSIGN_CLIENT_IDRequired. The application integration key from DocuSign. Found under Admin > API & Keys.
DOCUSIGN_IMPERSONATED_USERRequired. The GUID of the DocuSign user the application should impersonate. Found under Admin > Users.
DOCUSIGN_AUTH_SERVERRequired. The DocuSign OAuth server location.
DOCUSIGN_JWT_LIFETIMERequired. The lifetime of the DocuSign JWT token.
DOCUSIGN_RSA_KEYRequired. The private RSA key of the DocuSign application used for JWT authentication.
DOCUSIGN_DEFAULT_EMAIL_SUBJECTRequired. The default email subject line of the email containing the document to sign.
DOCUSIGN_DEFAULT_SIGNHERE_LABELRequired. The default label for the DocuSign Sign Here box on the document to sign.
DOCUSIGN_DEFAULT_SIGNHERE_PAGERequired. The default page number for the DocuSign Sign Here box to appear on in the document to sign.
DOCUSIGN_DEFAULT_SIGNHERE_POSXRequired. The default X position of the Sign Here box on the document to sign.
DOCUSIGN_DEFAULT_SIGNHERE_POSYRequired. The default Y position of the Sign Here box on the document to sign.
DOCUSIGN_DEFAULT_TIMEOUTRequired. The default timeout period to wait for the document to be signed in millseconds.
DOCUSIGN_POLL_SLEEPRequired. The time between polling in milliseconds.

Errors

The possible errors that can be handled by the DocuSign connector are:

ErrorDescription
MISSING_INPUTA mandatory input variable was not provided.
INVALID_INPUTThe input variable has an invalid type.
UNKNOWN_ERRORUnexpected runtime error.
MISSING_SOURCE_FILEInput file not found.
MISSING_TARGET_FILETarget file and folder not found.
SIGNING_TIMEOUTSigning document timeout.
STATUS_NOT_FOUNDError polling DocuSign for status.
MISSING_TOKENCould not update or obtain token.
ERROR_READING_FILEError reading input file.
ENVELOPE_NOT_CREATEDCould not create envelope in DocuSign.
ERROR_WRITING_FILECould not create or write result node.
ERROR_RETRIEVING_FILECould not retrieve document from DocuSign.

© 2023 Alfresco Software, Inc. All Rights Reserved.