1

For reference, please see this: Check document status DocuSign

The problem in that Answer in my case is this:

If Envelope status = Completed, you can safely assume that each Recipient in the envelope workflow supplied all information that the Sender marked as Required.

And that's because, in my workflow, an Envelope is Sent to the first recipient by a REST API script. The first recipient signs. That triggers an automatic email, via the DocuSign Template settings, for a Counter Sign person to sign.

Problem is that, my script keeps running every 10 minutes, and as soon as the first recipient signs, the Envelope's Status is returned as 'complete' and I record that in our local database. But if the quoted part above is correct, the Envelope's status should NOT be 'completed' when only the first person has signed off.

What I could do, in my script (ColdFusion), is to first check an Envelope's status. If the status is 'completed' then call this:

#Application.DocuSign_APIURL#/#Application.DocuSign_AccountID#/envelopes/#url.envelopeid#/recipients

and then find the second recipient's status to check if its also 'completed' before recording into my database--it can be done, I think, but is there a better way than this? Already my script is doing a lot of things.

Thanks!

IrfanClemson
  • 1,699
  • 6
  • 33
  • 52
  • Can you share the call which you are making to get envelope status as it is not correct that envelope status is returned as "Complete" when all recipient signing ceremony is not completed – Amit K Bist Sep 22 '17 at 17:37
  • Hi, Thanks! I figured it out. Indeed, the status was not 'completed' until all the recipients had signed--it was somewhere in my code which was causing the problem. I will post my answer... Thanks again. – IrfanClemson Sep 25 '17 at 13:00

2 Answers2

1

The better way is to use DocuSign WebHooks.

Here is a good blog post on why you should use WebHooks instead of polling DocuSign api's for status updates.

Praveen Reddy
  • 7,295
  • 2
  • 21
  • 43
  • Thanks. I did look into web hooks. We need to develop and test using an internal server which doesn't allow incoming calls. Plus, Id like to keep things all in one script to simplify things. But, if I have to, the Web Hooks... Thanks again. – IrfanClemson Sep 21 '17 at 14:20
0

It turned out that the status of the Envelope was indeed NOT 'completed' but, many lines down in my code, I was trapping the recipients' status to catch any wrong emails, where the status would be 'autoresponded'. My call was:

#Application.DocuSign_APIURL#/#Application.DocuSign_AccountID#/envelopes/#url.envelopeid#/recipients

and in that I was looking at the status of the recipient #1--which would be 'completed' and that's what I was recording into the database. The Envelope itself was in 'sent' status. So mea culpa!

HTH.

IrfanClemson
  • 1,699
  • 6
  • 33
  • 52