DocuSign
This Engine Extension (EngineExtension.Docusign.dll) allows users to send PDF documents that need to be signed electronically to customers, using the DocuSign platform.
Important: To use this engine extension the customer must have an authorised and activated DocuSign account. |
The PDF document(s) to be signed must be configured as letter templates in the project. The location of the signature field is managed using a series of letter settings.

Setting | Description |
---|---|
SIGNPAGE | The page number the signature box will be shown |
SIGNXPOS | This indicates how far across the page the signature box should be shown |
SIGNYPOS | This indicates how far down the page the signature box should be shown |
SIGNSCALE | This allows you to adjust the size of the signature box. Values supported are 0.5 to 1.0 - where 0.5 = 50% of normal size |
PDFTEXTFIELD |
Allows you to insert an editable text field into the document. ![]() NAME=name |WIDTH=w |HEIGHT=h |XPOS=x |YPOS=y |PAGE=p |REQUIRED=Y/N |VALUE=value |MAXLENGTH=n |FONT=Arial/ ArialNarrow/ Calibri/ CourierNew/ Garamond/ Georgia/ Helvetica/ LucidaConsole/ Tahoma/ TimesNewRoman/ Trebuchet/ Verdana/ MSGothic/ MSMincho |FONTSIZE=Size7/ Size8/ Size9/ Size10/ Size11/ Size12/ Size14/ Size16/ Size18/ Size20/ Size22/ Size24/ Size26/ Size28/ Size36/ Size48/ Size72 |FONTCOLOUR=Black/ BrightBlue/ BrightRed/ DarkGreen/ DarkRed/ Gold/ Green/ NavyBlue/ Purple/ White |VALIDATION=regex |
PDFCHECKBOXFIELD |
Allows you to insert an editable checkbox field into the document. ![]() NAME=name |WIDTH=w |HEIGHT=h |XPOS=x |YPOS=y |PAGE=p |SELECTED=Y/N |
ADDITIONALSIGNATUREBOX |
Allows you to specifiy a number of additional signature boxes are required. ![]() PAGE=p |XPOS=x |YPOS=y |OPTIONAL=Y/N |
Commands
The following commands are exposed by the extension:
- Set DocuSign URL to [ ]: Instructs the DocuSign API the rest URL for the DocuSign service
- Set DocuSign Security using [ ]: Instructs the DocuSign API which user account to use
- Send document using [ ]: Sends a document to a customer
- Send document with tabs using [ ]: Sends a document to a customer with additional settings on the document template
- Check status of Envelope ID [ ]: Gets the latest status for a document that has been sent to DocuSign
- Download Envelope ID [ ]: Downloads a copy of the document that has been sent to DocuSign
- Delete Temporary File [ ]: Deletes a file
Variables
The following variables are exposed and used by this extension:
- DOCUSIGN_ENVELOPEID: This will hold the Docusign ID for the document
- DOCUSIGN_ENVELOPESTATUS: This will hold the status for the document
- DOCUSIGN_ENVELOPESTATUSDATE: This will hold the date the status was change for the document
- DOCUSIGN_ENVELOPEURI: This will hold the URI for the document
- DOCUSIGN_ENVELOPECOMPLETEDDATE: This will hold the date the document was signed, or rejected
Usage Examples

The following DocuSign tracking table is used:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[pDocuSign](
[doc_ID] [int] IDENTITY(1,1) NOT NULL,
[doc_ContactID] [int] NOT NULL,
[doc_FulfilmentID] [int] NOT NULL,
[doc_EnvelopeID] [nvarchar](50) NOT NULL,
[doc_CreatedDate] [datetime] NOT NULL,
[doc_Status] [nvarchar](50) NOT NULL,
[doc_CompletedDate] [datetime] NOT NULL,
[doc_DownloadDocumentID] [int] NOT NULL,
[doc_LastCheckedDate] [datetime] NOT NULL,
CONSTRAINT [PK_pDocuSign] PRIMARY KEY CLUSTERED
(
[doc_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[pDocuSign] ADD CONSTRAINT [DF_pDocuSign_doc_ContactID] DEFAULT ((0)) FOR [doc_ContactID]
GO
ALTER TABLE [dbo].[pDocuSign] ADD CONSTRAINT [DF_pDocuSign_doc_FulfilmentID] DEFAULT ((0)) FOR [doc_FulfilmentID]
GO
ALTER TABLE [dbo].[pDocuSign] ADD CONSTRAINT [DF_pDocuSign_doc_EnvelopeID] DEFAULT ('') FOR [doc_EnvelopeID]
GO
ALTER TABLE [dbo].[pDocuSign] ADD CONSTRAINT [DF_pDocuSign_doc_CreatedDate] DEFAULT (getdate()) FOR [doc_CreatedDate]
GO
ALTER TABLE [dbo].[pDocuSign] ADD CONSTRAINT [DF_pDocuSign_doc_Status] DEFAULT ('') FOR [doc_Status]
GO
ALTER TABLE [dbo].[pDocuSign] ADD CONSTRAINT [DF_pDocuSign_doc_CompletedDate] DEFAULT ('1900-01-01') FOR [doc_CompletedDate]
GO
ALTER TABLE [dbo].[pDocuSign] ADD CONSTRAINT [DF_pDocuSign_doc_LastCheckedDate] DEFAULT (getdate()) FOR [doc_LastCheckedDate]
GO
The snippet below shows an example of sending a document and adding a new entry to the pDocuSign table so that the document can later be tracked and downloaded once it has been signed. It is assumed that the document being sent has static text and just requires a signature. Where a document requires data to be merged you will need to perform this before using these steps.

The process of checking, and retrieving signed documents can be done using the Workflow process.
In this example we are periodically looping through the pDocuSign table for all records which are in a ‘SENT’ state, we then check the status and if completed download the document and store against the contact record. To date testing has shown there can be two documents returned: 1st is the signed document and the 2nd is a track of where it was signed fro,m i.e. IP address and other information.