Docusign envelope creation without signer name - docusignapi

Is it possible to create a Docusign envelope without giving a name for the signer?
Here is the sample envelope definition from the REST docs
{
"status":"sent",
"emailSubject":"Example of one recipient, type signer",
"documents":[
{
"documentId":"1",
"name":"contract.pdf",
"documentBase64":"base64 document bytes..."
}
],
"recipients":{
"signers":[
{
"name":"Lisa Simpson",
"email":"lisa#email.com",
"recipientId":"1",
"routingOrder":"1",
"tabs":{
"signHereTabs":[
{
"xPosition":"150",
"yPosition":"200",
"documentId":"1",
"pageNumber":"1"
}]
}
}]
}
}
`
Instead of "Lisa Simpson" I want to have a blank string "" to withhold the persons name. Is this allowed? When I try I get back this error INVALID_USERNAME_FOR_RECIPIENT but am wondering if there is a workaround.
Thanks

No. Signers need to have names defined.
An exception to this is if you are using a 'specify recipients' role prior to the signer. In this case, you can have a blank placeholder signer, but the Specify user will be required to enter both a name and email for the signer.
What is your use case for a signer without a name?

Related

Embedded Signing - Signing from My App

I'm working on get the signing process on an iFrame to Embedded docusign on my app.
I have trying to work on this based on this tutorials:
Docusign Embedded Signing using template
https://developers.docusign.com/esign-rest-api/guides/features/embedding
Based on what I understood, if you want to embedded you have to create the "create the envelope on the fly". So you don't specify the templateId correct?
So what I don't fully get is, how I get the documentBase64 string value? I have to get it manually? Or docusing api has an endpoint that will return that?
Also I want to know, what happen to the custom fields I added to the template? I can't use them?
Right now this is the json I'm sending:
{{baseUrl}}/envelopes
{
"emailSubject":"This is a custom email subjet, look at the doc.",
"status":"sent",
"templateId":"a0847413-35ac-48ed-9ed6-9b7f96019eda",
"templateRoles":[
{
"email":"mauriciotaranto#email.com",
"name":"Mauricio T",
"clientUserId": "1234",
"roleName":"Test",
"routingOrder":"1",
"tabs": {
"textTabs": [
{
"tabLabel": "Custom",
"value": "This is a custom value"
},
{
"tabLabel": "NewCustom",
"value": "Another custom value added using API"
},
{
"tabLabel": "NewCustom1",
"value": "Last custom value added using API"
}
]
}
}
],
}
And then I go to the recipient view to get the URL:
{{baseUrl}}/envelopes/{{envelopeId}}/views/recipient
{
"returnUrl": "https://www.google.com.uy",
"authenticationMethod": "None",
"email": "mauriciotaranto#email.com",
"userName": "Mauricio T",
"clientUserId": "1234"
}
As far as I understood this way will not allow the user to sing the document.
Need to do it with the document instead.
Can you explain to me how this should work?
Thanks!
UPDATE:
Im manually parsing the bytes of the document to base64. and send this json:
"status":"sent",
"emailSubject":"Envelope with Embedded Signer",
"documents":[
{
"documentId":"1",
"name":"contract.pdf",
"documentBase64":bytes
}
],
"recipients":{
"signers":[
{
"email":"mauriciotaranto#hotmail.com",
"name":"Mauricio T",
"recipientId":"1",
"clientUserId":"1234"
}
]
}
}
I change the headers, add the accept: application/json and content-type: multipart/from-data
And this is the response I get:
{
"errorCode": "ENVELOPE_IS_INCOMPLETE",
"message": "The Envelope is not Complete. A Complete Envelope Requires Documents, Recipients, Tabs, and a Subject Line. Content-Type does not contain boundary parameter."
}
You can create envelopes in any way, either by using Templates or by passing base64 of document or both as well using Composite Template. When you send templates, then you already have added signers tabs on the document in the templates so you just need to populate the signer details like name and email in creating an envelope and/or pre-populate the DS Tabs value. But when you send document as base64, then you need to tell DocuSign how to add DS Tabs on the document, either by using
X and Y position of the tabs
AnchorString
PDF Field Transformation
Embedded Signing is a type of signing, to implement that you need to just add clientUserId in the signers details. This can be done in both ways either by using template or by passing document as base64 or both as well using Composite Template. Once you have an embedded signer by adding clientUserId then you need to generate signing URL as explained in your qs, by using Recipient View URL, as soon as URL is generated then you will open this URL in IFrame or on new tab.
In the link which you shared is having very small code snippet and it does not have complete example, check Complete Example, and you will see that they are adding DS Tabs on the document using X/Y position.

Disable In-Person Signer email notification to the host

I'd like to know if it's possible to disable the email notification to a host when using In-Person signing. ( sent you a document to host for an in-person signing session.)
Repro:
1 - Envelope is created using API containing 3 recipients: One In-Person captive Signer and two remote signers.
2 - Host receives an email notification.
In-Person Sign Email Notification
JSON:
`{
"status":"sent",
"emailSubject":"Contract",
"compositeTemplates":[
{
"serverTemplates":[
{
"sequence":"1",
"templateId":"<templateId>"
}
],
"inlineTemplates":[
{
"sequence":"1",
"recipients":{
"inPersonSigners":[
{
"hostEmail":"johndoe#email.com",
"hostName":"John Doe",
"signerName":"Ringo Starr",
"signerEmail":"ringostarr#email.com",
"roleName":"Signer 1",
"recipientId":"1",
"clientUserId":"1000",
"routingOrder":"1",
"embeddedRecipientStartURL":"SIGN_AT_DOCUSIGN",
"recipientSignatureProviders":[
{
"signatureProviderName":"UniversalSignaturePen_OpenTrust_Hash_TSP",
"signatureProviderOptions":{
"sms":"<phoneNumber>"
}
}
]
],
"signers":[
{
"name":"John Doe",
"email":"johndoe#email.com",
"emailNotification":{
"emailSubject":"Contract for live in person signature attached.",
"emailBody":"Contract for live in person signature attached.",
"supportedLanguage":"en"
},
"roleName":"Signer 2",
"routingOrder":"2",
"recipientId":"2",
"recipientSignatureProviders":[
{
"signatureProviderName":"UniversalSignaturePen_OpenTrust_Hash_TSP",
"signatureProviderOptions":{
"sms":"<phoneNumber>"
}
}
]
},
{
"name":"Paul McCartney",
"email":"paulmccartney#email.com",
"emailNotification":{
"emailSubject":"Contract for live in person signature attached.",
"emailBody":"Contract for live in person signature attached.",
"supportedLanguage":"en"
},
"roleName":"Signer 3",
"routingOrder":"2",
"recipientId":"3",
"recipientSignatureProviders":[
{
"signatureProviderName":"UniversalSignaturePen_OpenTrust_Hash_TSP",
"signatureProviderOptions":{
"sms":"<phoneNumber>"
}
}
]
}
]
},
"customFields":{
"textCustomFields":[
{
"value":"<salesforcecontractId>",
"required":"false",
"show":"false",
"name":"##SFContract"
}
]
}
}
]
}
],
"eventNotification":{
"RecipientEvents":[
{
"recipientEventStatusCode":"Completed"
},
{
"recipientEventStatusCode":"sent"
},
{
"recipientEventStatusCode":"delivered"
},
{
"recipientEventStatusCode":"declined"
}
],
"EnvelopeEvents":[
{
"envelopeEventStatusCode":"Delivered"
},
{
"envelopeEventStatusCode":"completed"
},
{
"envelopeEventStatusCode":"sent"
},
{
"envelopeEventStatusCode":"Declined"
}
]
}
}`
As I'm using an URL that can be accessed from my application the email notification to the host is unnecessary.
Considerations to keep in mind:
None of the recipients neither the host is a DocuSign user;
The option "Suppress emails to embedded signers" under Signing Settings is already checked;
The host will not always be a recipient.
Regards.
Remove "embeddedRecipientStartURL":"SIGN_AT_DOCUSIGN" from the inPerson recipient definition.
Specifying an embeddedRecipientStartURL causes the recipient to also receive an official DocuSign email inviting them to sign the documents. See this answer for more information.
From Official Documentation
embeddedRecipientStartURL 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.

Recipients Not Provided error from DocuSign API using composite template

I am embedding the signing of a set of documents in a web application. Ultimately, the documents will be filled in with answers provided during an online interview. Three or four documents are needed in the envelope. The documents are server-based templates. In the template definitions I have left the name and email fields blank for the Applicant role (signer), as they are generic templates that will be used by many applicants.
In a test scenario, I can load a single template in an envelope and carry it through the process, but when I convert to a composite template, I get the error "errorCode": "RECIPIENTS_NOT_PROVIDED", "message": "No recipients were found in the request." from the envelope request. I have compared the code to many examples and haven't been able to see anything different. There has to be something basic that I'm missing--not surprising, as this is my first attempt with the DocuSign API. Can someone please enlighten me?
The failing code:
{
"accountId":"xxxxxxx",
"emailSubject":"WOTC Certification Documents - Test Dummy",
"emailBlurb":"Documentation to be submitted by Consultant",
"status":"sent",
"compositTemplates":{
"serverTemplates":[{
"sequence":"1",
"templateId":"ca18aba4-49bd-4c28-9dce-fbd2dd3fbb7b",
"recipients":{
"signers":{
"name":"Test Dummy",
"roleName":"Applicant",
"recipientId":"1",
"clientUserId":"Dummy1234",
"email":"dummy#mydomain.com"
}
}
},{
"sequence":"2",
"templateId":"5ed3d600-5a57-4fee-931f-53233858dc65",
"recipients":{
"signers":{
"name":"Test Dummy",
"roleName":"Applicant",
"clientUserId":"Dummy1234",
"email":"dummy#mydomain.com"
}
}
}]
}
}
Thank you.
You're on the right track, but I'd suggest you make the following changes to the JSON that you've posted:
"compositTemplates" is missing an "e" -- should be compositeTemplates
compositeTemplates needs to be an Array of objects
each object within the compositeTemplates Array needs to contain a serverTemplates property (an Array that specifies the template info) and an inlineTemplates property (an Array that specifies the recipient info)
within each recipients object, signers needs to be an Array of objects
each signer object needs a recipientId property
Here's your JSON again, modified to implement the changes I've listed above:
{
"accountId":"xxxxxxx",
"emailSubject":"WOTC Certification Documents - Test Dummy",
"emailBlurb":"Documentation to be submitted by Consultant",
"status":"sent",
"compositeTemplates":[
{
"serverTemplates":[
{
"sequence":"1",
"templateId":"ca18aba4-49bd-4c28-9dce-fbd2dd3fbb7b"
}],
"inlineTemplates":[
{
"sequence" : 2,
"recipients":{
"signers":[{
"name":"Test Dummy",
"roleName":"Applicant",
"recipientId":"1",
"clientUserId":"Dummy1234",
"email":"dummy#mydomain.com"
}]
}
}],
},
{
"serverTemplates":[
{
"sequence" : 3,
"templateId":"5ed3d600-5a57-4fee-931f-53233858dc65"
}],
"inlineTemplates":[
{
"sequence" : 4,
"recipients": {
"signers" : [{
"name":"Test Dummy",
"roleName":"Applicant",
"recipientId": "1",
"clientUserId":"Dummy1234",
"email":"dummy#mydomain.com"
}]
}
}]
}]
}

Document Visibility works, but Sender can't see one of the documents

I'm using a composite template with Document Visibility enabled.
Signers are correctly excluded from documents they don't have tabs on, or can be explicitly excluded from those that no signer has tabs on with the excludedDocuments parameter.
My problem is this: the sender (me) cannot view one of the documents in the envelope that the sender is not a recipient of. According to docs:
Recipients that have an administrative role (recipients with an Action
of Manage envelopes, Address recipients, Manage recipients, Receive a
copy or Acknowledge receipt) can always see all the documents in an
envelope, unless they are excluded when an envelope is sent. Documents
that do not have tags are always visible to all recipients, unless
they are excluded when an envelope is sent.
I tried adding the sender as a recipient of the document but received the error:
Free form signing not allowed with document visibility
Which suggests I need to add a SignHereTab for the sender -- but there is nothing to sign, it should be for view only.
Partial request, includes the document in question. you can see how the sender is not a recipient on this document.
{
"status":"sent",
"compositeTemplates":[
{
"inlineTemplates":[
{
"sequence":"0",
"recipients":{
"signers":[
{
"name":"Harvey k",
"email":"somewhere",
"recipientId":1,
"accessCode":null,
"roleName":"Recipient",
"tabs":{
"signHereTabs":[
{
"tabLabel":"borrowerSignHere\\*",
"documentId":2,
"recipientId":1,
"templateLocked":true,
"templateRequired":true,
"optional":false,
}
]
}
},
{
"name":"first1 last1",
"email":"somewhere",
"recipientId":2,
"accessCode":null,
"roleName":"Signer",
"tabs":{
"signHereTabs":[
{
"tabLabel":"agentSignHere\\*",
"documentId":2,
"recipientId":2,
"templateLocked":true,
"templateRequired":true,
"optional":false,
}
]
},
"excludedDocuments":[2,3,4,5,6]
}
]
}
}
],
"document":{
"name":"Agent Agreement",
"documentId":2,
"documentBase64":"...",
"transformPdfFields":true
}
} // ... more templates documentId 2+
]
}
Try making the sender a Carbon Copies Recipient with a routing order after the other recipients.

Docusign: Dynamically Populate Fields In Document

I am using docusign to send off vendor agreements. The agreements are all the same wording, except for vendor name and address. Is there a way I can pass information to the envelope creation script (PHP) to dynamically populate name and address fields on a template document?
Yes you can definitely populate tabs in an embedded signing view. This is all controlled through the
tabLabel
property of each tab in your request body. For instance, if you login to the DocuSign Console and add two data fields (textTabs) to your envelope where one has the label "email" and the other has a label of "address" then the following JSON body prefills those tabs based on the value passed.
"tabs": {
"textTabs": [
{
"tabLabel": "address",
"value": "123 Main St. SF, CA"
},
{
"tabLabel": "email",
"value": "sample#email.com"
}
]
}
}
],
"status": "sent"
}

Resources