1

I am in process of integrating DocuSign APIs in our application. I am stuck at one place where I have to send a public URI as 'EventNotification' along with the envelope. My public URI is nothing but a asp.net web API. I am confuse where how DocuSign will send me the following information: - EnvelopeId - DocumentId (which is signed or declined) - Completed or Declined - Singee info (name and email id)

Let say my API looks like this:

[ActionName("DocuSignDocumentStatus")]

[HttpPost]

public void DocuSignDocumentStatus()
{

}

My action would be get or post here? my action signature will contain what parameters?

public void DocuSignDocumentStatus(string envelopeId? and/or string documentId and/or string Completed/Declined and/or....)

Please help.

Savaratkar
  • 1,974
  • 1
  • 24
  • 44

1 Answers1

4

The DocuSign eventNotification feature on envelopes acts just like the DocuSign Connect module does, except that it's on a per-envelope basis instead of at the account level that Connect works at.

Both the eventNotification and DocuSign Connect send real time XML formatted messages to a publicly accessible http listener that you setup to accept such requests. It's always an http POST that is sent, and you need to write the logic on your end to parse the messages that come in.

For instance, this is what the XML might look like and what you would need to parse:

<?xml version="1.0" encoding="UTF-8"?>
<DocuSignEnvelopeInformation xmlns="http://www.docusign.net/API/3.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <EnvelopeStatus>
      <RecipientStatuses>
         <RecipientStatus>
            <Type>Signer</Type>
            <Email>user.email@address.com</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-b530-ff1833d5d0d2</RecipientId>
         </RecipientStatus>
      </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>user.email@address.com</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>ACHolder.email@address.com</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>
   </DocumentPDFs>
</DocuSignEnvelopeInformation>
Ergin
  • 9,254
  • 1
  • 19
  • 28
  • There is a flag in EventNotification Object called useSoapInterface if I set it to false, will I get a json request, or is is intended for some other purpose. – Vijender Kumar Dec 07 '18 at 06:39
  • 1
    Some other purpose, only SOAP requests are currently supported through DocuSign Connect module. – Ergin Dec 10 '18 at 20:16