DocuSign redirect url event documentation - docusignapi

I have searched StackOverflow and DocuSign documentation for a list of all redirect events, with only missing results.
(e.g https://developers.docusign.com/search/?q=signing_complete and https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createrecipient/ do not have the list of events)
Does a list of these event exist anywhere? (signing_complete, decline, cancel, session_timeout...)

The list of values for the event query parameter is included with the EnvelopeViews:createRecipient documentation, but it is not easy to find.
The list is included with the documentation for the returnUrl parameter.
The event query parameter return values as of July, 2022
access_code_failed: Recipient used incorrect access code.
cancel: Recipient canceled the signing operation, possibly by using the Finish Later option.
decline: Recipient declined to sign.
exception: A system error occurred during the signing process.
fax_pending: Recipient has a fax pending.
id_check_failed: Recipient failed an ID check.
session_timeout: The session timed out. An account can control this timeout by using the Signer Session Timeout option.
signing_complete: The recipient completed the signing ceremony.
ttl_expired: The Time To Live token for the envelope has expired. After being successfully invoked, these tokens expire after 5 minutes or if the envelope is voided.
viewing_complete: The recipient completed viewing an envelope that is in a read-only/terminal state, such as completed, declined, or voided.

You can find the list in the LoanCo Sample App

Related

Docusign eSignature REST API doesn't give error when the email provided does not exist

I am using the sample code provided by docusign, but there is no indication in response if the envelope is actually sent or not.
If the email does not exists, it still generates the envelope id and there is no error.
here's the response:
Please enter the signer's name: saf
Please enter the cc email address: scisaif1#gmail.com
Please enter the cc name: saif
{'bulk_envelope_status': None,
'envelope_id': 'bd7781a5-ea9e-472d-b087-90baa12b573f',
'error_details': None,
'recipient_signing_uri': None,
'recipient_signing_uri_error': None,
'status': 'sent',
'status_date_time': '2022-08-14T10:02:02.9400000Z',
'uri': '/envelopes/bd7781a5-ea9e-472d-b087-90baa12b573f'}
Your envelope has been sent.```
this is the response when email does not exist, i get an email that says
Documents you sent for electronic signature could not be delivered to this email address: adfasasdfasdgasddf#gmail.com
The internet email system is a weak creature. If DocuSign receives a negative delivery report, then the envelope status will be updated. (Try a bad email on the DocuSign web app.)
But there are bad email addresses that don't result in a negative report to DocuSign.
For these cases, the envelope's expiration tells you that there was no response.
I suggest that you ask the signers for both their email and sms mobile number. DocuSign can then deliver the signing invite to both.
Suggest you use DocuSign Connect and set a webhook. This will give you an event if email bounced, or opened. You can use these events to decide what to do in your system.

docusignapi - How can I get the filed "sentDateTime" from the signers?

I am using REST API (docusign). I need to get the field "sentDateTime" from the signers.
I use this Request:
/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients
The REST API never returns the field "sentDateTime" from the signers.
How can I get this field from the signers?
Thanks
You can't get this field from the signers/recipients. Instead, you will get the field from the envelope they are included in. See below:
Currently API does not return "sentDateTime" for each signer, once Signer completes the signing ceremony then you can see two fields, "signedDateTime" and "deliveredDateTime" in the API response. I would propose to use DocuSign Connect for getting these values as it saves you from polling, In DS Connect, DocuSign sends below data for each recipient
<RecipientStatus>
<Type>Signer</Type>
<Email>signerEmail#gmail.com</Email>
<UserName>Signer1</UserName>
<RoutingOrder>1</RoutingOrder>
<Sent>2017-11-22T11:22:36.833</Sent>
<Delivered>2017-11-22T11:26:10.607</Delivered>
<Signed>2017-11-22T11:26:20.483</Signed>

Embedded Docusign Signing URL - using document visibility to only show 1 document in the envelope

I am creating an envelope via the Docusign Rest API. this envelope has 2 inline templates each have their own roles and do not share any tabs. I have a custom workflow that requires the user to fill in each document separately so i use the (/views/reciepients) endpoint to get a signing url.
The first signer sees the first (and only the first) document correctly, it is filled in and completed. Then i want to show the second document from the envelope in an iframe to a user. When i get the signing URL for the second recipient (signer) it also includes the first document all filled out.
I have document visibility set up on the account.
I have read the documentation a few times and there is one confusing, under "Post Recipient View" there is a field "userName" which is not mentioned when creating the recipient or in the response from the recipient end point. I assume this is the "name" field.
to make it a bit easier to read i have put all the API requests into paste bin.
Generate Envelope with 2 templates and 2 signers.
Request = http://pastebin.com/e98Dwaj8
Get First signing URL using /envelope/xxxx/views/recipient
Request =
{
"returnUrl": "http:\/\/local.example.com\/return.html",
"authenticationMethod": "none",
"email": "role1#example.com",
"userName": "TestFirstName TestSurname",
"clientUserId": "1"
}
Get recipients for envelope after first signer has completed
Response = http://pastebin.com/9VmGsE3p
Get second signing url (this shows both documents when visited)
Request =
{
"returnUrl": "http:\/\/local.example.com\/return.html",
"authenticationMethod": "none",
"email": "test#example.com",
"userName": "TestFirstName TestSurname1",
"clientUserId": "2"
}
Is there a way i can show the second signer only the second document?
Is it possible or will the completed document always show? does the /views/recipient url only hide documents in "draft" or "sent" and always shows "completed"?
note: this is a follow up to Docusign signing url - Showing document 1 of a composite template but that question was answered and solved the original issue so i thought it best to open a new more specific question.
In order for certain signers to only see certain documents, you will want to investigate the Document Visibility feature and settings. There is some starting documentation available at: https://support.docusign.com/guides/cdse-user-guide-advanced-sending-using-document-visibility-in-a-template
In short, signers can only see documents in an envelope for which they have at least 1 tab assigned. This is honored during the signing ceremony as well as any view of the completed document.
Regarding your last question, you should only be able to start a POST /recipient/view (signing ceremony) for an envelope which has been SENT. If you perform this action against an envelope which is completed it will start the signing session in a read only viewing mode (since the transaction is complete).
Is the 2nd signer a member on the sending account? If so, they would be able to see all documents in the envelope based on "Must sign to view unless Sender Account". This setting essentially means internal signers that have memberships on the same account as the Sender can see everything.

Docusign Envelope ID -> email address

In Docusign, given an envelope Id, how can I get at some identifying info (e.g. email address) as to who originated/created/sent the document using the API only?
Thanks.
It depends on your use-case. One way is to make the Get Envelope Recipient Status API call which will return status - and other metadata such as email, name, recipientId, etc. - for the envelope recipients:
Get Envelope Recipient Status
You can also make the Get Envelope Audit Events API call, which will return some identifying info such as email and name and also what actions were taken:
Get Envelope Audit Events
Lastly, I believe the Get Envelope Certificate API call will probably return the most complete audit trail since it's returns the CoC (Certificate of Completion) which lists anything and everything any recipient has ever done to the envelope. However the result of this call is a PDF (doc) so you'd have to parse that doc for specific information you're looking for.
Get Envelope Certificate

Docusign Powerforms Embed Success Status

I'm working on a PHP application that has multiple products which require signing from a customer before going for the product.
I'm using powerforms link to embed them on my application (using iFrame).
They work fine. But the problem is I need to store the document signed status in my database.
The we can set a return URL in the Docusign Preferences Page. But that will be static and I won't have a clue of what product the user has selected.
References:
Powerform Docs
You can use DocuSign Connect to receive real-time notifications of envelope events (for example, Envelope Completed). At a high-level, it works like this:
You login to DocuSign web console (as Admin) and create a Custom Connect Configuration. As part of creating this configuration, you'll specify the endpoint (http address) that you want Connect to send notifications to, and which events you want to be notified of.
You build a "listener" -- i.e., the web page that will receive the HTTP POST messages from DocuSign Connect, and process those messages.
When an Envelope or Recipient event occurs (for which you've enabled notifications in your DocuSign Connect Configuration), Connect will almost immediately send an HTTP POST to your listener. This message contains XML with info about the Envelope, Recipients, Documents, Fields, etc. You'll develop your listener such that it parses the XML message to determine Envelope status, data field values, etc. and then can respond appropriately within the context of your application (i.e., in your scenario, your listener would use the XML message from Connect to determine envelope status and which product(s) the user selected).
See this guide (http://www.docusign.com/sites/default/files/DocuSign_Connect_Service_Guide.pdf) and this page in the DocuSign Dev Center (http://www.docusign.com/developer-center/explore/connect) for more detailed information on configuring/using DocuSign Connect.
UPDATE - Using Custom Fields to populate unique Identifier for Envelope
Depending on the nature of your use case, you might need to use an "envelope custom field" to populate a unique identifier for each Envelope in the "create/send envelope" request, so that your listener application has a way of identifying the envelope when it receives a Connect message. (An 'envelope custom field' is simply a custom piece of metadata on an envelope.) Simply set the customFields property in your Create Envelope request, and populate a single textCustomFields item with the unique identifier. For example:
{
"emailSubject": "Please sign this",
"emailBlurb": "Please sign...thanks!",
"customFields": {
"textCustomFields": [
{
"value": "1234567",
"required": "false",
"show": "true",
"name": "ProductId"
}
]
},
"status": "sent"
...
}
See the REST API Guide (http://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf) for more detailed info about using Custom Envelope Fields.

Resources