Conditional Notifications - docusignapi

I have a checkbox list of locations on my powerform and I'd like to implement logic that sends a copy of the signed powerform to the location based on the users selection. Is such conditional logic possible? Would this be something that could be done using the API perhaps?

It's not possible to have DocuSign automatically send the completed/signed document(s) to specific locations. However, you could achieve the same end result by doing the following:
Configure DocuSign Connect to subscribe to the "Envelope Complete" notification and specify that you want the notification to contain the document(s) as well (in addition to the form data, recipient data, etc. that it contains by default).
Design your listener application (where DocuSign Connect will send HTTP notifications each time an Envelope is Completed) to parse the payload of each request received and use the form data to determine where the Completed document(s) need to be sent. Then, programmatically extract the documents from the payload of that request and send them to the correct location(s).
In other words, you create a simple (listener) application and configure DocuSign Connect to send an HTTP notification to that application's endpoint each time an Envelope is completed. The body of each notification that your listener application receives from DocuSign Connect will contain info about Envelope Status, Recipients, Form Data, and also the document bytes (provided that you've configured DocuSign Connect to include the documents in the notifications it sends). Your listener app then has all the info it requires in order to send the completed document to the location that the user/signer specified on the form.

Related

DocuSign Envelope Fields - status_changed_date_time and last_modified_date_time - Webhooks Response

We are using the DocuSign SDK (version 3.3.0) and utilizing webhooks to receive the various envelope and recipient events.
In the envelope, I need to retrieve the fields (status_changed_date_time and last_modified_date_time) in the XML message from the DocuSign Connect. But I identified that those fields are not being sent in the XML message.
Is there any way to include those above mentioned fields in the XML message from DocuSign connect?
The XML notification body is what it is. If it doesn't include the data your application needs, then make additional API calls to DocuSign to obtain the data you want. Doing so is a common pattern.
Note: It is important that you respond to DocuSign with a 200 status right away--all your processing should be done asynchronously on a different thread. Don't delay your 200 response.

How can I implement an intermediary step in between two signers?

I have the following workflow:
Send envelope request
First user signs.
First user must do some action on local system.
Once user has done that action, THEN the next signer in the routing order is notified to sign.
Is there a way to use the API to put an intermediary task in between the two signers so the second signer isn't emailed until the middle task is done? Could I create an intermediary or approver where I could use the API to tell docusign that the task is done?
Yes, there are two techniques that can be used to pause the routing of an envelope.
Fake Embedded Signer (Envelope created via the API)
If the envelope is being created via the API, then a "fake" embedded signer can be added with a routing order to stop the processing when it is the fake embedded signer's turn to sign. For example, use routing order:
Real signer 1
Fake embedded signer
Real signer 2
Real cc recipient
Then use Connect or eventNotification so your app is notified after Real Signer 1 has completed (signed) the envelope. Now your app can do the external work.
When you're ready for the envelope's routing to proceed, delete the fake recipient via the EnvelopeRecipients::delete method.
Fake Certified Delivery Recipient (Envelope created via web tool or template)
If the envelope will be created via template or from the DocuSign web tool, then you can't easily include an embedded signer. Instead, use a fake Certified Delivery recipient.
To avoid any email bounce back issues, you must specify an email address that exists but which is actually a blackhole -- no one should have access to the emails.
When the routing order reaches the fake certified delivery recipient, routing will stop since no one will respond to the email from DocuSign confirming the delivery of the envelope.
Same as above, your application can be notified about the envelope by Connect or eventNotification. Your application can perform its processing and then restart routing, same as above, by deleting the fake recipient from the envelope.
Also, note that you can include Envelope Custom Fields to provide additional processing configuration options--the Envelope Custom Fields can be set by the sender via the DocuSign web tool and then read by your application program.

Is it possible get one by one document once signed from bulk send?

We have bulk send feature on Docusign by which we can send the document to mulitple envelopes which would be signed by many from the list. So each of them would be getting their own copy of the document to sign. So, is it possible to download the document as the receipent(s) signed it. We can download the document with mulitple users and single sign document once it is completed by registering the webhook. Is it possible to get this in same way for bulk send also? Can we get the document one by one as the receipents from the list signs that ?
Thanks in advance!
Bulk Send generates multiple envelopes, each envelope for a CSV row, so DocuSign Connect will help you getting notified for each envelope.
Using DocuSign Connect, you can subscribe to Recipient Level Trigger events - For instace Recipient Signed/Completed, once any recipient signs the envelope then you will receive the notification from the DocuSign, on receiving the notification you can call DS API to download the document or you can include documents in the DocuSign Connect message itself if the document is not very big.

ListStatusChanges to get status based on the individual recipients

We have multiple recipients per envelope and the signing order is set. Can we get the envelope based on the status of individual recipients?. I don't see anything that we can do to achieve this through ListStatusChangesOptions. I know that we can achieve this by listRecipients but this did not give us an option to set parameters to limit the data, like ListStatusChangesOptions.
I want to reduce the API call limit, if there is an option to directly limit the data sent from DocuSign based on the status of the individual recipients.
Eg: Get all the Envelopes whose recipient1 status is completed.
Instead of getting more than required envelopes through listStatusChanges and limiting them by using listRecipients
No, there is no API call to fetch envelope details based on recipient status. Instead I would propose to use DocuSign Connect. It has trigger event of Recipient Signed, so once recipient has signed you will get a message from DocuSign with envelope details like envelopeId, which recipient Signed it etc, and this will save a lot of your API calls and DocuSign Connect is the recommended way from DocuSign instead of doing polling. You can learn more about DS Connect here,
https://www.docusign.com/supportdocs/ndse-admin-guide/Content/custom-connect-configuration.htm
https://www.docusign.com/supportdocs/pdf/connect-guide.pdf

Envelope Signed Notification

I create a pdf on our system and then pass that to docusign for the user to sign. I want to automatically download and save the signed envelopes in our system. Is there a way for docusign to send a post request after the document is signed?
Right now, I randomly (every other hour) connect to docusign and check if the envelope is signed using the docusign api, but this is really not optimal. There are a lot of users who view the pdf in docusign and decide they don't want to sign the document.
The "DocuSign Connect" feature is designed to do exactly that -- send a POST to an endpoint you specify, in real-time, as specified Envelope events occur. Basically it works like this: you build a "listener" app (i.e., a web page that will receive POSTs from Connect), you configure Connect (within your DocuSign account (Preferences >> Connect) to specify the endpoint of your "listener" and select which Envelope events you want your listener to receive notifications for, etc., and once that Connect configuration is enabled, DocuSign will send a POST to your listener endpoint whenever the specified Envelope event(s) occur.
The DocuSign Connect Service Guide (https://10226ec94e53f4ca538f-0035e62ac0d194a46695a3b225d72cc8.ssl.cf2.rackcdn.com/connect-guide.pdf) describes Connect and how to configure/use it -- I'd suggest that you start by reviewing the guide, and post any additional questions here on SO if you run into any issues implementing Connect.

Resources