I am using C# for DocuSign.
I want to send the signed documents to a list of recipients after the documents are signed. Is there a possible way to do this?
Thanks
Amulya Dutta
You can add those recipients (last in routing order) as CC recipients in the workflow, once all signers have completed the signing then DocuSign will send the completed envelope email to the CC recipients. Other way of doing is using API by forwarding the completed envelope ("765295a6-4b0c-4df9-b4a3-00e5c311bc8e") to a any one, in doing this way it will consume one more envelope for you.
POST /restapi/v2/accounts/<accountId>/envelopes?completed_documents_only=true
{
"status":"sent",
"emailSubject": "Forwarded Envelope",
"envelopeId":"765295a6-4b0c-4df9-b4a3-00e5c311bc8e",
"recipients": {
"carbonCopies": [{
"name": "1",
"email": "signerEmail#gmail.com",
"routingOrder": 1,
"recipientId": "1"
}]
}
}
Related
I made custom reminders for my integration that resends the envelope to user. This is work for me:
PUT https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envelopeId}}/recipients?resend_envelope=true
{
"signers": [
{
"recipientId": "3",
"name": "Jane Doe",
"email": "janesemail#outlook.com"
}
]
}
But I want to send different subject to include "Reminder:"+old subject, how can I modify the emailSubject for specific recipient (which I'm passing to Body), I tried:
{
"signers": [
{
"recipientId": "1",
"name": "Igor",
"email": "mail#example.com",
"emailNotification":
{
"emailSubject": "ReMiNdEr"
}
}
]
}
But this did not work. Any suggestions?
You will need to do a POST to the recipients endpoint to update the recipientEmailNotification for the specific recipient with the emailSubject and emailBody you wish.
See reference information
See blog post with code examples in six languages (using the various DocuSign SDKs)
So, to resend for recipient envelope with new Subject I need first to determine this property in my POST request, and then I can use PUT with following to update subject, body. If I will not determine this in my 1st POST request, this PUT will not work!
"emailNotification": {
"emailBody": "NEWSUBJ 44 5",
"emailSubject": "NEWNEWNEW 44 5"
},
I'm currently working on a document signing and management app that uses the Docusign API to handle the signing of the documents. The documents need to allow for a witness to sign, but we don't necessarily know who will be acting as the witness at the time of sending the envelope. The app would need to ask the signer(s) who will be witnessing at the time of signing.
After some digging, I found Docusign's eWitness feature which does exactly what we need our app to do. However, I couldn't find anything in the API documentation that describes how to use this feature.
Ideally, I'd like to use the API to create and send an envelope from a template using the eWitness feature.
Any help is greatly appreciated!
Yes!
The EnvelopeRecipients object has a new attribute of witnesses Docs for both. witnesses is an array of witness objects.
When sending the envelope via the API:
Create the signer recipient object. Remember the recipientId you're using.
Create a witness recipient object with two attributes: recipientId (a new value), and witnessFor, set to the recipientId of the signer.
Create a SignHere tab for the signer recipient and the witness recipient.
Send the envelope.
When the signer signs, they will be asked to provide the name and email of the witness to their signature.
After the signer signs, the witness receives an email that enables them to sign the document as the witness.
The signer recipient can be an embedded signer or a "remote" signer and receive their invitation to sign via email.
You may be able to set the witness' name/email when you create the envelope, but I have not tested that. You may also be able to set the witness' clientUserId so you can give them an embedded signing experience but I haven't tested that either. (Please let us know if you test either of these flows.)
Using a template with recipient who has a witness
To use a template with a recipient who has a witness, just create the template with a role that has a witness enabled. Then when sending the envelope use the template and include a role definition for the signer recipient (their name/email).
JSON example
Here is the working JSON for an embedded signing recipient with a witness. The signer enters the witness' name/email into the embedded signing ceremony.
"envelopeDefinition": {
"emailSubject": "Please sign the attached document",
"status": "sent",
"documents": [
{
"name": "Example document",
"fileExtension": "pdf",
"documentId": "1"
}
],
"recipients": {
"signers": [
{
"email": "signer_email#example.com",
"name": "Signer's name",
"recipientId": "1",
"clientUserId": "1000",
"tabs": {
"signHereTabs": [
{
"anchorString": "/sig1/",
"anchorXOffset": "20",
"anchorUnits": "pixels"
}
]
}
}
],
"witnesses": [
{
"recipientId": "2",
"witnessFor": "1",
"tabs": {
"signHereTabs": [
{
"anchorString": "/sig1/",
"anchorXOffset": "200",
"anchorUnits": "pixels"
}
]
}
}
]
}
I am wondering whether it is possible to use a returnUrl which the user is redirected to after signing the document, but using the path where you email the sign request out to the recipients.
The embedded flow does not work for us, unless I am missing something, because the 5 minute timeout does not work.
I would like to email the sign requests out to the recipients and then after they complete their signing redirect them to a custom "thank you" page.
The issue is that you can have one sign immediately, but the other recipients take days, and by the time they get to the request it is timed out. I have also tried to recreate the RecipientViewRequest, but the new URL simply shows me the document to sign without the option to sign it, even though the watermark says "In Progress".
I am using the C# SDK, and any help would be appreciated.
For sending emails to embedded recipients, specify clientUserId and embeddedRecipientStartURL when creating the Recipient.
embeddedRecipientStartURL : This is a sender provided valid URL string for redirecting an embedded recipient. When using this option, the embedded recipient still receives an email from DocuSign, just as a remote recipient would, but when the document link in the email is clicked the recipient is redirected, through DocuSign, to this URL to complete their actions. When routing to the URL, it is up to the sender’s system (the server responding to the URL) to then request a recipient token to launch a signing session.
Here is a sample createEnvelope request
{
"emailSubject": "Please sign the agreement",
"status": "sent",
"recipients": {
"signers": [
{
"email": "janedoe#acme.com",
"name": "jane doe",
"recipientId": 1,
"clientUserId":"1234",
"embeddedRecipientStartURL":"<Add Url to your App here>",
"tabs": {"signHereTabs": [{ "documentId": "1", "pageNumber": "1", "xPosition": "80", "yPosition": "80"}]}
}
]
},
"documents": [{ "documentId": "1", "name": "Contract", "fileExtension": "txt", "documentBase64": "RG9jIFRXTyBUV08gVFdP" }]
}
When the recipient clicks the link in their email, he is redirected to the url that you specify in embeddedRecipientStartURL. After your app authenticates and identifies the recipient, You will then have to request a recipient token using the CreateRecipientView api and specify the url for the custom thank you page in the returnUrl parameter. Make sure you include https://
{
"email": "janedoe#acme.com",
"userName": "jane doe",
"recipientId": 1,
"clientUserId":"1234",
"returnUrl":"https://www.google.com", //Include your custom thank you page here
"AuthenticationMethod" :"email"
}
Also see this answer
I have a situation where I want to be able to differentiate between envelopes based on a 'type'. For example, I'll have quotes and invoices, both of these can be sent to the same person so I'd like to know if there's a way of checking some sort of field that could differentiate the two. Currently I'm rather crudely post processing the API results and checking for 'quote' in the document type and I'd like a rather more reliable solution
thanks,
Oliver
You can use Envelope Custom Fields aka Document labels to specify additional metadata for an envelope.
Envelope Custom fields aka Document labels can be used in the envelopes for your account to record information about the envelope, help search for envelopes and track information. The envelope custom fields are not seen by the envelope recipients.
The DocuSign Web sending tool refers to the Envelope Custom fields as Document Labels. You can configure Document Labels as an Administrator on the Account. See instructions here
Once the Document labels are configured at the account level, you can provide label values for each envelope you send through the web sending tool. See instructions here
The other option is to specify Envelope Custom fields using the API. Here is a sample createEnvelope api request that specifies custom Fields associated with the envelope
{
"emailSubject": "Envelope with custom fields",
"status": "sent",
"customFields": {
"listCustomFields": [
{
"listItems": [
"sample string 1"
],
"name": "myListField",
"required": "true",
"show": "true",
"value": "MyListValue"
}
],
"textCustomFields": [
{
"name": "MyOwnTextField",
"required": "true",
"show": "true",
"value": "MyValue"
}
]
},
"recipients": {
"signers": [
{
"recipientId": 1,
"email": "kaysmith#acme.com",
"name": "kay smith",
"routingOrder": "1"
}
]
},
"documents": [
{
"documentId": "1",
"name": "Agreement",
"fileExtension": "txt",
"documentBase64": "RG9jIFRXTyBUV08gVFdP"
}
]
}
More good news: the DocuSign Sending web tool automatically enables the sender, from the web tool, to set the Envelope Custom Fields.
So if you are sending envelopes programmatically or your users are sending them, it is easy to set custom field values.
Based on a signer we are trying to create signer/recipient specific email subject dynamically. Please see partial Json specific request. With this, in an email, we are able to view the subject correctly. However when we open the document for signing or view the envelope in docusign(Sent Items), we see the emailSubject json value which in this case is "Email Subject". This is because this parameter is not a list but and we have to set this value in the outer request object since it is mandatory.
Is there any way to get around this ?
"emailSubject": "Email Subject",
"status": "sent",
"recipients": {
"signers": [{
"emailNotification": {
"emailSubject": "Recipient specific subject",
"emailBody": "Recipient specific body"
}
I'm able to repro the behavior you describe and unfortunately, I don't believe there's any way around this.
It makes sense that the top-level Email Subject would appear for the Envelope in the "Sent Items" folder -- because if there were multiple recipients for an Envelope each with a distinct custom email subject, then there'd be no way to display all of them -- hence, it just always displays the top-level Subject in the Sent Items folder.
What doesn't make sense is for the recipient-specific Subject that you specified in the Create Envelope request to be shown in the email that the recipient receives, but NOT shown in the Envelope itself during the recipient's DocuSign signing session. This inconsistency seems like a bug to me.
i.e., with the example request that follows, the Subject in the Email and the Subject shown during the recipient's Signing session should both be the same (i.e., should both be the recipient-specific value that's specified by the request). Perhaps someone with DocuSign can chime in and either explain this behavior, or confirm the existence of this bug.
"Create Envelope" Request Body:
{
"emailBlurb":"Test Email Body",
"emailSubject": "Test Email Subject",
"status" : "sent",
"compositeTemplates": [
{
"inlineTemplates": [
{
"sequence" : 1,
"recipients": {
"signers" : [{
"email": "sallysemail#outlook.com",
"name": "Sally Adamson",
"recipientId": "1",
"defaultRecipient": "true",
"emailNotification": {
"emailSubject": "Recipient specific subject",
"emailBody": "Recipient specific body"
}
}]
}
}],
"document": {
"documentId": 1,
"name": "NDA",
"transformPdfFields": "true"
}
}
]
}
Recipient Email (shows recipient-specific subject):
Recipient Signing Session (shows top-level Subject instead of Recipient-specific subject):