Reputation: 33
If I create an envelope the status will be "created" aka draft.
I find 2 holes right now:
It seems that webhook gets called only if the voided envelope is "Sent".
Is there any way to circumvent these issues?
Upvotes: 0
Views: 128
Reputation: 49114
You're correct, envelopes in Draft state don't trigger Connect events if they're discarded or voided. There is a feature enhancement request to add the capability. You can ask your DocuSign contacts to add your information to the internal CONNECT-811 issue.
In the meantime, two ways to manage the issue:
After your app creates the envelope in draft status, save the envelopeId in your database along with the create time. Also create a Connect event for Recipient Create. That way you'll be notified as soon as the envelope is sent.
When you receive a connect notification about any envelope, first delete the envelopeId from your database (if it is still there).
Then have a batch job that periodically checks the database and the envelopes' create time vs the current time. If there's enough of a time difference then you know that the envelope send process was abandoned or the envelope was specifically abandoned. (You could also check the envelope's status at this point.)
Some apps create the envelope in draft state and then ask the sender to complete the sending process via the sender's view.
But this is not the best experience for the sender and also has the notification issues that you've experienced.
A better UX for the sender is for your application to complete/send the envelope.
If your senders are using the Sender View to add recipients, enable them to add the recipients via your app instead. If the senders are using the Sender View to tag the documents, then a better UX is for your application to tag the documents for them. Etc.
Upvotes: 1