Recipient specific email subject - docusignapi

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):

Related

Docuisgn Embedded signing plus email

We have a requirement that we want to send DocuSign email to recipient who is marked as Captive /embedded. By default DocuSign will not send email to embedded signers. In case the recipient doesn't want to sign at our web site, they can open envelope later from their email. Is there some setting like that or some setting in Rest API call?
Found Answer at Here.
If sender sets embeddedRecipientStartURL to SIGN_AT_DOCUSIGN for particular recipient, the recipient is directed to an embedded signing or viewing process directly hosted at DocuSign.
In effect, this causes the recipient to be both embedded and receive an official "please sign" email from DocuSign.
Sample Json
{
"compositeTemplates": [{
"inlineTemplates": [{
"recipients": {
"signers": [{
"tabs": {
"fullNameTabs": [{
"fontColor": "white",
"pageNumber": 1,
"documentId": "1",
"xPosition": 400,
"yPosition": 15
}]
},
"name": "Full Name",
"email": "signersemail#email.com",
"recipientId": "1",
"clientUserId": "1000",
"embeddedRecipientStartURL": "SIGN_AT_DOCUSIGN"
}]
},
"sequence": "1"
}],
"document": {
"documentBase64": "<Base64Bytes>",
"documentId": "1",
"fileExtension": "pdf",
"name": "Doc.pdf"
}
}],
"status": "sent",
"emailBlurb": "Test Body",
"emailSubject": "Test Subject"
}
There are multiple ways to do that, depending on the exact use-case.
It seems that you want to first do embedded signing (which I assume you know how to do) and then if the user select something in your app - you want to send an email for the same exact recipient to sign the same exact envelope. So you have to make an additional API call at that point to update the recipient to remote and re-send the envelope.
That can be done using a PUT call to update the envelope. You have to add ?resend_envelope=true to that call

DocuSign Resend Envelope to User with Subject correction

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"
},

Is there a way to send an envelope using the eWitness feature?

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"
}
]
}
}
]
}

POSTMan sample - creating envelope from a template is not populating the user tags

I created a DocuSign template that contains two roles: Provider and Recipient. I did this via the DocuSign Sandbox UI.
In my template, I have one document, with four tabs on it:
1. ProviderName
2. ProviderAddress1
3. RecipientName
4. RecipientAddress
Should I be using CustomFields vs. Tabs?
What's the API call(s) that I should be making to do the following, given a template with a document in it:
create an envelope for specific users
update the text within the document in the template for the specific users
send it out?
In the POSTMan sample, I tried using this URL, doing a POST:
{{baseUrl}}/envelopes
passing in a templateId, and the following JSON below in the POST body:
JSON:
{
"templateRoles": [{
"email": "{{signer1Email}}",
"name": "The Provider",
"roleName": "Provider",
"tabs": {
"textTabs": [{
"tabLabel": "ProviderName",
"value": "This is the provider!"
},
{
"tabLabel": "ProviderAddress1",
"value": "10 Provider Street, Baltimore, MD 21212"
}]
}
},
{
"email": "{{otherEmail}}",
"name": "Test Recipient",
"roleName": "Recipient",
"tabs": {
"textTabs": [{
"tabLabel": "RecipientName",
"value": "This is the recipient!"
},
{
"tabLabel": "RecipientAddress",
"value": "10 Main Street, Baltimore, MD 21212"
}]
}
}],
"emailSubject": "DocuSign API - Signature Request on Document Call",
"templateId": "<<template ID>>",
"status": "sent"
}
This does return an Envelope Id in the response, and I do receive the email with the DocuSign document to sign.
However, the tabs are NOT populated, they're blank.
Are the roles in the Template empty placeholders? If a name/email is defined on the template, the API call won't populate them as you might expect.
Try to add the documentId and pageNumber properties to your tabs. Also, ensure the label matches what is in the original template.
Lastly, you may need to add recipientId as well to each of the recipients to match what is in the template (this one may not be required since you have the roleName but just in case)

Docusign: creating envelopes through templates with the REST API and prefilling tags

I'm integrating Docusign so that recipients can see their envelopes embedded on my site. I first create the envelope with the api, and I'm attempting to prefill Data Fields using dynamic data.
As far as I can tell, there's nothing wrong with my json that I'm using to create the envelopes. None of the other solutions on StackOverflow to this issue have helped. My json looks like this (which I send to https://demo.docusign.net/restapi/v2/accounts/360734/envelopes):
{
"status": "sent",
"emailBlurb": "Please sign the document.",
"emailSubject": "Please sign your agreement",
"templateId": "TEMPLATE_ID",
"templateRoles": [
{
"clientUserId": "EMAIL",
"name": "NAME",
"email": "EMAIL",
"roleName": "Signer1",
"tabs": {
"textTabs": [
{
"tabLabel": "address",
"value": "ADDRESS "
},
{
"tabLabel": "multi_address",
"value": "ADDRESSES"
}
]
}
},
{
"name": "ANOTHER NAME",
"email": "ANOTHER EMAIL",
"roleName": "Random1"
}
]
}
And I get the following response:
{
"envelopeId": "ENVELOPE_ID",
"uri": "/envelopes/ENVELOPE_ID",
"statusDateTime": "2013-10-25T01:20:55.6750772Z",
"status": "sent"
}
I then get the link to show the client by posting to https://demo.docusign.net/restapi/v2/accounts/360734/envelopes/ENVELOPE_ID/views/recipient
{
"authenticationMethod": "email",
"clientUserId": "EMAIL",
"email": "EMAIL",
"returnUrl": "MYURL",
"userName": "NAME"
}
And I get this response:
{
"url": "https://demo.docusign.net/Member/StartInSession.aspx?t=REDACTED"
}
This follows the example seen here: https://github.com/Ergin008/DocuSign-REST-API-Webinar-April2013/blob/master/example2.json
After creating the envelope this way, it appears that the tags do not prefill. When I view the envelope embedded on my site, nothing is filled. I'm certain the tabLabels are correct. Everything otherwise seems to be working okay. Is there some kind of setting I'm missing?
UPDATE
Looks like it could be a bug! All I change is the role name and it works!
{
"status": "sent",
"emailBlurb": "Please sign the document.",
"emailSubject": "Please sign your agreement",
"templateId": "TEMPLATE_ID",
"templateRoles": [
{
"clientUserId": "EMAIL",
"name": "NAME",
"email": "EMAIL",
"roleName": "Signer1",
"tabs": {
"textTabs": [
{
"tabLabel": "address",
"value": "ADDRESS "
},
{
"tabLabel": "multi_address",
"value": "ADDRESSES"
}
]
}
},
{
"name": "ANOTHER NAME",
"email": "ANOTHER EMAIL",
"roleName": "Signer2"
}
]
}
And it populated! It seems if I start the role name with anything other than Signer it doesn't work. Weird!
And yes, I'm changing the role name on Docusign from Random1 to Signer2, in this case. For example, Signer3 also worked.
Your question says your submitting that JSON to the "Get Recipient View" resource:
https://demo.docusign.net/restapi/v2/accounts/ACCOUNT_ID/envelopes/ENVELOPE_ID/views/recipient)
...but that JSON looks like what you use in the "Create Envelope" request, not the "Get Recipient View" request. So, let me start by clarifying the process of facilitating Embedded/captive signing (i.e., presenting the recipient's envelope within your site). Doing so is a two-step process:
STEP 1: Create the envelope (request includes data to pre-populate fields for each recipient, if needed).
POST https://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes
See "Creating an Envelope From a Template" section that starts on p27 of the REST API guide (http://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf) for detailed info about request and response.
STEP 2: Retrieve the URL that can be used to launch the recipient's envelope (signing session).
POST https://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes/{envelopeId}/views/recipient
{
"authenticationMethod":"Email",
"clientUserId":"CLIENT_USERID_SPECIFIED_IN_REQUEST",
"email":"RECIPIENT_EMAIL",
"returnUrl":"URL_TO_REDIRECT_TO_WHEN_SIGNING_COMPLETE",
"userName":"RECIPIENT_NAME"
}
The response will contain the URL that can be used to launch the Recipient's Envelope:
{
"url":"URL_THAT_WILL_LAUNCH_ENVELOPE"
}
See the "Post Recipient View" section that starts on p160 of the REST API guide (http://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf) for more detailed info about request and response.
Now, assuming you're doing all this correctly (step 1 and step 2) -- let's get back to the issue you're reporting: difficulty pre-populating fields for the recipient. A few comments about the "Create Envelope from Template" JSON that you included in your question:
You don't need accountId in request.
You don't need to include documentId and pageNumber in the request for the tab.
You DO need to include clientUserId for the recipient in the request, if you want the recipient to sign embedded/captive within your site.
So, here's a "Create/Send Envelope From Template" example request (step 1 above) that pre-populates the tab named "FIELD_1" with the value "VALUE_A" anywhere that it appears in the envelope:
POST https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes
{
"status" : "sent",
"emailBlurb" : "please sign",
"emailSubject" : "Please sign your document",
"templateId" : "TEMPLATE_ID",
"templateRoles" : [{
"name" : "John Doe",
"email" : "JohnsEmail#outlook.com",
"roleName" : "Signer1Role",
"clientUserId" : "123",
"tabs" :
{"textTabs":[{
"tabLabel":"\\*FIELD_1",
"value":"VALUE_A"}
]}
}]
}
Then, you'd take the Envelope Id that's returned in the response and call the "Get Recipient View" resource (step 2 above) to get the URL to launch the signing session:
POST https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/ENVELOPE_ID/views/recipient
{
"authenticationMethod": "Email",
"clientUserId": "123",
"userName": "John Doe",
"email": "JohnsEmail#outlook.com",
"returnUrl": "http://www.google.com"
}
Finally, one last comment (but an important one): if you're just wanting to inject the recipient's "full name" in the document -- use the "Full Name" tab when creating the Template and DocuSign will automatically inject the recipient's name in place of that tag, anywhere that it appears (instead of you using a Text Tab and having to populate it via the API request). Here's the Full Name tag in the DocuSign UI tagger view:
Another Create Envelope Example (with screenshot of data field properties):
If I submit this request:
POST https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes
{
"emailSubject": "Please sign this",
"emailBlurb": "Please sign...thanks!",
"templateId": "TEMPLATE_ID",
"envelopeIdStamping": "false",
"templateRoles": [
{
"roleName": "Signer1",
"name": "John Doe",
"email": "JohnsEmail#outlook.com",
"recipientId": "1",
"tabs":{
"textTabs":[
{
"tabLabel":"\\*address",
"value":"123 Main Street"
},
],
}
}
],
"status": "sent"
}
And the Data Field properties (when Editing the Template via the DocuSign UI) look like this:
Then the result is that field(s) with Label = address that are assigned to Recipient Role Signer1 will be prepopulated with the value "123 Main Street" when the signer views their envelope. If this isn't working for you, I suggest that you:
Verify that the value of roleName in the API request exactly matches the Recipient value I've highlighted in the prior screenshot (in my example, "Signer1").
Verify that the value of tabLabel in the API request exactly matches the Label value I've highlighted in the prior screenshot (in my example, "address).
Note: Values are case-sensitive, so be sure values in your request are an exact match (including upper-case/lower-case) with the values in the Data Field Tag Properties.

Resources