New DocuSign Experience Administrator Guide 151
Custom Connect Technical Information
This topic provides additional information about DocuSign custom Connect configurations. The information in this topic includes: l
Custom Connect
Best Practices
l
Recommendations for receiving documents
l
Custom
Connect and SOAP API publishing
l
XML message structure
Once you activate a custom Connect configuration, DocuSign sends an XML object to the secure
URL entered on the configuration page for every event selected and from every user selected.
If your application is not configured to accept these post messages, the DocuSign system will not return an error.
It is important that you do not turn on DocuSign Connect if you have not configured a listener or
Retrieving Service endpoint at the URL entered in the configuration page. Once you have the listener set up, you may test the publisher by sending transactions and observing the behavior of your application.
Note: You must include the protocol (HTTP: or HTTPS:) in the web address for Demo account.
You must include HTTPS:// in the web address for Production accounts because SSL is required in Production. Connect sends to the default ports of 443 for HTTPS: and 80 for HTTP. If you cannot use port 443 for Production contact DocuSign to review possible options.
Best Practices
In order to take advantage of DocuSign Connect, a clear understanding of the use of the information needs to be understood. Be sure to ask questions such as:
1. What data do you want to capture?
2. Who will be accessing this information?
3. What decisions or reporting will be generated?
4. Should the document be pushed?
These questions must be thought out and agreed in order to deploy a solution that will meet your business needs. Additionally, developing the secure listener application to have some flexibility can enable modifications to the data that is collected without requiring coding for minor adjustments. This field mapping approach enables future modifications and changes that can be made by analysts.
221 Main Street, Suite 1000, San Francisco, CA 94105 Ι Tel. 866.219.4318 Ι www.docusign.com Ι © DocuSign, Inc.
New DocuSign Experience Administrator Guide 152
Recommendations for Receiving Documents
There are several factors to consider when determining how to receive envelope PDF documents from DocuSign in your document management system. While it is perfectly acceptable to just select the Include Document PDFs option in your Connect configuration to have Connect include the PDF documents when an event is triggered; you might consider using the DocuSign API to retrieve the documents when a triggering event (such as envelope status
Complete) is received if the following are considerations for your architecture: l
Throttling of document retrieval: If for some reason your service is not available to
Connect or you are expecting a very high volume, your processing routines might be overwhelmed by the Connect messages. If you are not appropriately scaled to handle the volume or catch-up spikes from connection outages, you might be at risk of an out of memory error.
l
File size and storage: Connect sends PDF documents in base 64 encoding format, which is on average 1/3 larger than a binary file format. This might or might not be a storage consideration for you.
In these cases, DocuSign often recommends that corporate and enterprise customers get the completed envelope message through Connect without including the PDF documents, then makes an API call to get those PDF documents at a time that make sense to your workflow and allow you to throttle the processing of those files.
Connect SOAP Publishing
The following configurations are available in Connect: l
Retrieving Service endpoint (URL).
l
Retrieving Service method name. DocuSignConnectUpdate.
l
Retrieving Service method’s argument name. DocuSignEnvelopeInformation.
l
Retrieving Service Namespace. The default is DocuSignConnectListener.
l
X.509 security in the SOAP Header. DocuSign uses the standard WSE3
BinarySecurityToken in the Soap Header to pass the certificate.
When planning the SOAP Publishing Retrieval Service, you need to do the following:
1. Create a web service that has the DocuSign API as a web reference.
2. Create a method in your web service that matches the Retrieving Service method name.
3. Have a single argument on the method that matches
221 Main Street, Suite 1000, San Francisco, CA 94105 Ι Tel. 866.219.4318 Ι www.docusign.com Ι © DocuSign, Inc.
New DocuSign Experience Administrator Guide 153
The argument must be of the type DocuSignAPI.DocuSignEnvelopeInformation, where
DocuSignAPI is configurable based on the namespace used when importing the DocuSign
API web service.
4. Return the EnvelopeID passed to it, if received. Otherwise, it should return a SOAP Fault.
XML Message Structure
The DocuSign Connect publisher sends the status update in the body of an HTTP or SOAP XML post. The receiving web server needs to take the entire structure and parse the XML in order to make use of the various elements available in the XML.
Key Transaction Elements
The key transaction elements available are listed below. The full XML structure contains more, but these are the most commonly used data elements:
Status Information l
Sent Date/Time l
Envelope Status (in process, completed) l
Envelope ID
Document (Envelope) Information l
Document(s) l
Recipients l
Tabs l
Subject l
Email l
Custom Fields
Recipient activity and information l
Recipient ID(s) l
Recipient Email(s) l
Recipient Username(s)
221 Main Street, Suite 1000, San Francisco, CA 94105 Ι Tel. 866.219.4318 Ι www.docusign.com Ι © DocuSign, Inc.
New DocuSign Experience Administrator Guide 154
l
Recipient Note(s) l
Recipient Type (Signer, CC, CD) l
Recipient Sent Date/time l
Recipient Delivered Date/time l
Recipient Signed Date/time l
Recipient Routing Order l
Recipient Status Code (created, sent, delivered, signed, declined) l
Recipient Event (viewed, declined, signed)
Document Information l
Document Name(s) l
Document ID(s)
Document Content l
Custom Tab Name l
Custom Tab Value l
Custom Tab Label l
Custom Tab Required/Not Required l
Custom Tab Type (text, checkbox, radio, list) l
TabTypeCode (signature, initial, name, company, title, date) l
Document PDF Bytes (base 64)
To make use of this information your application must parse the inbound XML looking for the data associated with each node you are evaluating. Then the application must extract the data and place it into the external application.
Form Field Data
DocuSign Connect is able to publish not only the status of the transaction, but also the values contained in any form fields or envelope fields in the transaction. This is useful to help interpret what transaction data can be updated into the external system. DocuSign supports many
221 Main Street, Suite 1000, San Francisco, CA 94105 Ι Tel. 866.219.4318 Ι www.docusign.com Ι © DocuSign, Inc.
New DocuSign Experience Administrator Guide 155
different field types including checkbox, radio button, form field, and drop down list. These all have a common name structure and the value from the signer can be extracted from the XML structure.
Sample Connect Message
The information below is a sample DocuSign Connect message in XML format. Note that the personal information (names and email addresses), document names, and PDFBytes information has been removed from this sample.
<?xml version="1.0" encoding="utf-8"?>
<DocuSignEnvelopeInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.docusign.net/API/3.0">
<EnvelopeStatus>
<RecipientStatuses>
<RecipientStatus>
<Type>Signer</Type>
<Email>[email protected]</Email>
<UserName>User Name</UserName>
<RoutingOrder>1</RoutingOrder>
<Sent>2010-06-26T09:19:18.883</Sent>
<Delivered>2010-06-26T09:19:40.723</Delivered>
<DeclineReason xsi:nil="true" />
<Status>Delivered</Status>
<RecipientIPAddress>::1</RecipientIPAddress>
<CustomFields />
<TabStatuses>
<TabStatus>
<TabType>Custom</TabType>
<Status>Active</Status>
<XPosition>364</XPosition>
<YPosition>52</YPosition>
<TabLabel>Radio</TabLabel>
<TabName>Two</TabName>
<TabValue />
<DocumentID>1</DocumentID>
<PageNumber>2</PageNumber>
<OriginalValue />
<ValidationPattern />
<RoleName>TestRole</RoleName>
</TabStatus>
</TabStatuses>
<AccountStatus>Active</AccountStatus>
<RecipientId>fb89d2ee-2876-4290-b530ff1833d5d0d2</RecipientId>
</RecipientStatus>
221 Main Street, Suite 1000, San Francisco, CA 94105 Ι Tel. 866.219.4318 Ι www.docusign.com Ι © DocuSign, Inc.
New DocuSign Experience Administrator Guide 156
</RecipientStatuses>
<TimeGenerated>2010-06-26T09:19:45.771206-07:00</TimeGenerated>
<EnvelopeID>0aa561b8-b4d9-47e0-a615-2367971f876b</EnvelopeID>
<Subject>CreateEnvelopeFromTemplates Test</Subject>
<UserName>User Name</UserName>
<Email> [email protected] </Email>
<Status>Delivered</Status>
<Created>2010-06-26T09:16:21.27</Created>
<Sent>2010-06-26T09:19:19.01</Sent>
<Delivered>2010-06-26T09:19:40.747</Delivered>
<ACStatus>Original</ACStatus>
<ACStatusDate>2010-06-26T09:16:21.27</ACStatusDate>
<ACHolder>ACHolder Name</ACHolder>
<ACHolderEmail> [email protected] </ACHolderEmail>
<ACHolderLocation>ACHolder Location</ACHolderLocation>
<SigningLocation>Online</SigningLocation>
<SenderIPAddress>::1 </SenderIPAddress>
<EnvelopePDFHash />
<CustomFields>
<CustomField>
<Name>Envelope Field 1</Name>
<Show>False</Show>
<Required>False</Required>
<Value />
</CustomField>
<CustomField>
<Name>Envelope Field 2</Name>
<Show>False</Show>
<Required>False</Required>
<Value />
</CustomField>
</CustomFields>
<AutoNavigation>true</AutoNavigation>
<EnvelopeIdStamping>true</EnvelopeIdStamping>
<AuthoritativeCopy>false</AuthoritativeCopy>
<DocumentStatuses>
<DocumentStatus>
<ID>1</ID>
<Name>Document_Name</Name>
<TemplateName>radio parents</TemplateName>
<Sequence>1</Sequence>
</DocumentStatus>
</DocumentStatuses>
</EnvelopeStatus>
<DocumentPDFs>
<DocumentPDF>
<Name>DocumentPDF_Name</Name>
<PDFBytes>PDFBytes_Information</PDFBytes>
</DocumentPDF>
221 Main Street, Suite 1000, San Francisco, CA 94105 Ι Tel. 866.219.4318 Ι www.docusign.com Ι © DocuSign, Inc.
New DocuSign Experience Administrator Guide
</DocumentPDFs>
</DocuSignEnvelopeInformation>
157
221 Main Street, Suite 1000, San Francisco, CA 94105 Ι Tel. 866.219.4318 Ι www.docusign.com Ι © DocuSign, Inc.