Error when using EU Advanced Signature with Templates - docusignapi

I'm getting an error when finishing a DocuSign Ceremony using EU Advanced Signature with Templates. The odd thing is that it was working before and still working for ceremonies that have an embedded PDF.
When finishing a ceremony the following error is popping up:
The envelope history shows more details:
It mentions the userEmail, so I've double-checked the JSON and everything seems to be fine, after all, I didn't get any error when creating the envelope.
Here's the JSON using a Template that is failing:
{
"status": "sent",
"eventNotification": {
"recipientEvents": [
{
"recipientEventStatusCode": "delivered"
},
{
"recipientEventStatusCode": "completed"
},
{
"recipientEventStatusCode": "sent"
},
{
"recipientEventStatusCode": "declined"
}
],
"envelopeEvents": [
{
"envelopeEventStatusCode": "delivered"
},
{
"envelopeEventStatusCode": "completed"
},
{
"envelopeEventStatusCode": "sent"
},
{
"envelopeEventStatusCode": "declined"
}
]
},
"emailSubject": "Contract",
"compositeTemplates": [
{
"serverTemplates": [
{
"templateId": "TEMPLATE_ID",
"sequence": "1"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"routingOrder": "2",
"roleName": "Signer 2",
"recipientSignatureProviders": [
{
"signatureProviderOptions": {
"sms": "+00999555585"
},
"signatureProviderName": "UniversalSignaturePen_OpenTrust_Hash_TSP"
}
],
"recipientId": "2",
"name": "Axel Foley",
"emailNotification": {
"supportedLanguage": "en",
"emailSubject": "CUSTOM_MESSAGE",
"emailBody": "CUSTOM_MESSAGE"
},
"email": " axel.foley#email.com"
},
{
"routingOrder": "2",
"roleName": "Signer 3",
"recipientSignatureProviders": [
{
"signatureProviderOptions": {
"sms": "+00123456789"
},
"signatureProviderName": "UniversalSignaturePen_OpenTrust_Hash_TSP"
}
],
"recipientId": "3",
"name": "Alex Murphy",
"emailNotification": {
"supportedLanguage": "en",
"emailSubject": "CUSTOM_MESSAGE",
"emailBody": "CUSTOM_MESSAGE"
},
"email": "alex.murphy#email.com"
}
],
"inPersonSigners": [
{
"signerName": "Leeroy Jenkins",
"signerEmail": "leeroy.jenkins#email.com",
"routingOrder": "1",
"roleName": "Signer 1",
"recipientSignatureProviders": [
{
"signatureProviderOptions": {
"sms": "+00666888777"
},
"signatureProviderName": "UniversalSignaturePen_OpenTrust_Hash_TSP"
}
],
"recipientId": "1",
"hostName": "Lightning McQueen",
"hostEmail": "lightning.mcqueen#email.com",
"emailNotification": {
"supportedLanguage": "en",
"emailSubject": "CUSTOM_MESSAGE",
"emailBody": "CUSTOM_MESSAGE"
},
"clientUserId": "SFDC_CLIENT_USER_ID"
}
]
},
"customFields": {
"textCustomFields": [
{
"value": "SFDC_ID",
"show": "false",
"required": "false",
"name": "##SFContract"
}
]
}
}
]
}
]
}
And here's the JSON with an embedded PDF that works fine:
{
"status": "sent",
"recipients": {
"inPersonSigners": [
{
"tabs": {
"signHereTabs": [
{
"anchorYOffset": "0",
"anchorXOffset": "0",
"anchorUnits": "inches",
"anchorString": "\\s1\\",
"anchorIgnoreIfNotPresent": "false"
}
]
},
"signerName": "Vincent Vega",
"signerEmail": "vicent.vega#email.com",
"routingOrder": "1",
"roleName": "Signer 1",
"recipientSignatureProviders": [
{
"signatureProviderOptions": {
"sms": "+00789456123"
},
"signatureProviderName": "UniversalSignaturePen_OpenTrust_Hash_TSP"
}
],
"recipientId": "1",
"hostName": "Lightning McQueen",
"hostEmail": "lightning.mcqueen#email.com",
"emailNotification": {
"supportedLanguage": "en",
"emailSubject": "CUSTOM_MESSAGE",
"emailBody": "CUSTOM_MESSAGE"
},
"clientUserId": "SFDC_CLIENT_USER_ID"
}
]
},
"eventNotification": {
"recipientEvents": [
{
"recipientEventStatusCode": "delivered"
},
{
"recipientEventStatusCode": "completed"
},
{
"recipientEventStatusCode": "sent"
},
{
"recipientEventStatusCode": "declined"
}
],
"envelopeEvents": [
{
"envelopeEventStatusCode": "delivered"
},
{
"envelopeEventStatusCode": "completed"
},
{
"envelopeEventStatusCode": "sent"
},
{
"envelopeEventStatusCode": "declined"
}
]
},
"documents": [
{
"name": "Form.pdf",
"fileExtension": "pdf",
"documentId": "1",
"documentBase64": "BASE64_PDF"
}
],
"customFields": {
"textCustomFields": [
{
"value": "SFDC_ID",
"show": "false",
"required": "false",
"name": "##SFAccount"
}
]
}
}
Am I missing something? Have anyone ever seen this error before?
It's worth to mention that I'm getting the error right in the first signature (InPerson).
Kind regards

It turned out that is a known issue of DocuSign.

There is a known issue during an in-person signing session when the signer clicks on Finished, he should get the following popup
If you don’t set any email, it will fail with the CONSTRAINT_VALIDATION_ERROR
The workaround is to specify an email.

Related

DocuSign REST Phone Authentication with Template

I created templates in Docusign.
I call the REST API to generate a new enveloppe using these templates.
Code works fine:
Signers get populated
Fields get populated
But I cant get the Phone Authentication to work. I checked other code on the DocuSign website and here.
The only differences I can see:
Different number of parameters: I tried with and without (recordVoicePrint=false,validateRecipProvidedNumber=false), it does'nt change the outcome
I call a template instead of sending the Base64 doc like in other examples
Here is the JSON request:
{
"templateRoles": [
{
"tabs": {
"textTabs": [
{
"value": "Some Name",
"tabLabel": "CustName"
},
{
"value": "315750.00",
"tabLabel": "TotEqptCost"
}
]
},
"roleName": "Signer",
"requireIdLookup": true,
"phoneAuthentication": {
"senderProvidedNumbers": [
"(222) 222-2222"
],
"recipMayProvideNumber": false
},
"name": "James",
"idCheckConfigurationName": "Phone Auth $",
"email": "James#gmail.com"
},
{
"tabs": {
"textTabs": [
{
"value": "Dome Name",
"tabLabel": "CustName"
},
{
"value": "315750.00",
"tabLabel": "TotEqptCost"
}
]
},
"roleName": "Signer2",
"requireIdLookup": true,
"phoneAuthentication": {
"senderProvidedNumbers": [
"+1 (111) 111-1111"
],
"recipMayProvideNumber": false
},
"name": "Joe",
"idCheckConfigurationName": "Phone Auth $",
"email": "Joe#thing.com"
}
],
"templateId": "a315793d-896f-41b4-9c61-dfc6873bc6f3",
"status": "created",
"emailSubject": "Testing"
}
It seems you are entering phone number in wrong format, try below json snippet:
{
"signers": [
{
"name": "Test Name",
"email": "testemail+name#gmail.com",
"roleName": "Signer 1",
"routingOrder": 1,
"recipientId": "1",
"requireIdLookup": true,
"idCheckConfigurationName": "Phone Auth $",
"phoneAuthentication": {
"recipMayProvideNumber": false,
"senderProvidedNumbers": [
"+18889619998"
]
}
}
]
}
I was able to resolve my issue by using the Composite Templates. See code below.
{
"compositeTemplates": [
{
"compositeTemplateId": "1",
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "James#gmail.com",
"name": "James",
"roleName": "Signer",
"recipientId": "1",
"requireIdLookup": true,
"phoneAuthentication": {
"senderProvidedNumbers": [
"(222) 222-2222"
],
"recipMayProvideNumber": false
},
"idCheckConfigurationName": "Phone Auth $",
"tabs": {
"textTabs": [
{
"value": "Some Name",
"tabLabel": "CustName"
},
{
"value": "315750.00",
"tabLabel": "TotEqptCost"
}
]
}
},
{
"email": "John#company.com",
"name": "John",
"recipientId": "2",
"requireIdLookup": true,
"phoneAuthentication": {
"senderProvidedNumbers": [
"(222) 222-2222"
],
"recipMayProvideNumber": false
},
"idCheckConfigurationName": "Phone Auth $",
"roleName": "Signer2",
"tabs": {
"textTabs": [
{
"value": "Some Name",
"tabLabel": "CustName"
},
{
"value": "315750.00",
"tabLabel": "TotEqptCost"
}
]
}
}
]
},
"sequence": "1"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "a315793d-896f-41b4-9c61-dfc6873bc6f3"
}
]
},
],
"status": "created",
"emailSubject": "Testing"
}

Composite Template: can't prefill first tabs

Using the below code, everything works except I am only able to fill the Tabs from whatever document I attach second. Tabs from the first don't even show up on the "Form Data" list. I'm sure this is something minor that I am overlooking, but I can not see a differance between what I have and what I have seen elsewhere on this forum, and I can not find another post with this problem. Any help would be appreciated.
{
"emailSubject": "DocuSign API - Composite Test",
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "TEMPLATEID"
}
],
"inlineTemplates":[
{
"sequence":"1",
"recipients": {
"inPersonSigner": [
{
"hostEmail": "HOTEMAIL",
"hostName": "HOSTNAME",
"inPersonSigningType": "inPersonSigner",
"recipientId": "1",
"roleName": "Primary",
"signerName": "John Doe",
"signerEmail": "Test#Test.com",
"clientUserId": "1001"
}
]
},
"tabs": {
"textTabs": [
{
"tabLabel": "Address",
"value": "221 Cherry St"
}
]
}
}
]
},
{
"serverTemplates":[
{
"sequence": "2",
"templateId": "TEMPLATEID"
}
],
"inlineTemplates":[
{
"sequence":"2",
"recipients": {
"inPersonSigners": [
{
"hostEmail": "HOSTEMAIL",
"hostName": "HOSTNAME",
"inPersonSigningType": "inPersonSigner",
"recipientId": "1",
"roleName": "Primary",
"signerName": "John Doe",
"signerEmail": "test#test.com",
"clientUserId": "1001"
}
]
},
"tabs": {
"textTabs": [
{
"tabLabel": "ApplicantPhone",
"value": "123-456-7890"
}
]
}
}
]
}
]
}
A couple of comments about the JSON you've posted:
the property name for the inPersonSigners should be plural (in your JSON, it's singular InPersonSigner in the first composite template object)
tabs should be a property of each inPersonSigner object (in your JSON, it's a property of the inlineTemplate object)
With this feedback in mind, here's how your inPersonSigners section should be structured:
"inPersonSigners": [
{
"hostEmail": "HOSTEMAIL",
"hostName": "HOSTNAME",
"inPersonSigningType": "inPersonSigner",
"recipientId": "1",
"roleName": "Primary",
"signerName": "John Doe",
"signerEmail": "Test#Test.com",
"clientUserId": "1001",
"tabs": {
"textTabs": [
{
"tabLabel": "...",
"value": "..."
}
]
}
}
]
And, here's your entire JSON request, modified to reflect the changes I've described above:
{
"emailSubject": "DocuSign API - Composite Test",
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "TEMPLATEID"
}
],
"inlineTemplates":[
{
"sequence":"2",
"recipients": {
"inPersonSigners": [
{
"hostEmail": "HOSTMAIL",
"hostName": "HOSTNAME",
"inPersonSigningType": "inPersonSigner",
"recipientId": "1",
"roleName": "Primary",
"signerName": "John Doe",
"signerEmail": "Test#Test.com",
"clientUserId": "1001",
"tabs": {
"textTabs": [
{
"tabLabel": "Address",
"value": "221 Cherry St"
}
]
}
}
]
}
}
]
},
{
"serverTemplates":[
{
"sequence": "1",
"templateId": "TEMPLATEID"
}
],
"inlineTemplates":[
{
"sequence":"2",
"recipients": {
"inPersonSigners": [
{
"hostEmail": "HOSTEMAIL",
"hostName": "HOSTNAME",
"inPersonSigningType": "inPersonSigner",
"recipientId": "1",
"roleName": "Primary",
"signerName": "John Doe",
"signerEmail": "test#test.com",
"clientUserId": "1001",
"tabs": {
"textTabs": [
{
"tabLabel": "ApplicantPhone",
"value": "123-456-7890"
}
]
}
}
]
}
}
]
}
]
}

Docusign emails seem to always have the same subject

This is thru the Docusign api. Here is the envelope definition:
{
"eventNotification": {
"requireAcknowledgment": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "Delivered"
},
{
"envelopeEventStatusCode": "Completed"
},
{
"envelopeEventStatusCode": "Declined"
},
{
"envelopeEventStatusCode": "Voided"
},
{
"envelopeEventStatusCode": "Sent"
}
],
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "false",
"includeEnvelopeVoidReason": "false",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "false"
},
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "c110d14a-3690-4ed1-921d-a7bef9524ed6"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "##Buyer1"
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "1",
"name": "c:\three of the test.docx",
"fileExtension": ".docx",
"documentFields": [],
"documentBase64": [bytearray]
}
}
],
"status": "sent",
"emailSubject": "This is the new subject"
}
The subject still shows as "Please DocuSign: sign this". I would have thought setting the subject would have addressed this, but I must be missing something.
You have most likely configured per recipient email subject in your server template. In such a case the emailSubject that is specified at the root level of the postEnvelope request is ignored.
You can confirm that by making a getTemplates call using your server template Id. It will look something like below. Look specifically for recipients.signers.emailNotification property. I have removed some of the properties for simplicity.
{
"envelopeTemplateDefinition": {
"templateId": "xxxxxxxx-xxxx-xxxx-xxxx-e672c4efd436",
},
"documents": [ ],
"emailSubject": "This is the subject on the server template.",
"emailBlurb": "",
"recipients": {
"signers": [
{
"tabs": {},
"roleName": "RoleOne",
"emailNotification": {
"emailSubject": "Please DocuSign: sign this",
"emailBody": "",
"supportedLanguage": "en"
},
}
]
}
}
To override the per recipient email subject specified in the server template, specify the emailNotification property in the inlineTemplate.
{
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "c110d14a-3690-4ed1-921d-a7bef9524ed6"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345"
"routingOrder": "1",
"roleName": "##Buyer1",
"emailNotification": {
"emailSubject": "This is email subject to Buyer1",
"emailBody": "",
"supportedLanguage": "en"
},
}
],
}
}
],
"document": { }
}
],
"status": "sent",
}

Using webhook with Docusign - will I be able to get custom fields?

I created an envelope with one signer, 1 template, 3 different docs. I added a custom field to the envelope. I send off the envelope and get the response back on the url I specified. I look at the response and I don't see the custom envelope field in there. Should it be sent along with the response? Here is what I sent:
{
"customFields": {
"textCustomFields": [
{
"name": "file id",
"value": "1823456"
}
]
},
"eventNotification": {
"url": "http://requestb.in/16avl8c1",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "Delivered"
},
{
"envelopeEventStatusCode": "Completed"
},
{
"envelopeEventStatusCode": "Declined"
},
{
"envelopeEventStatusCode": "Voided"
},
{
"envelopeEventStatusCode": "Sent"
}
],
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "false",
"includeEnvelopeVoidReason": "false",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "false"
},
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"routingOrder": "1",
"roleName": "##Buyer1"
}
]
}
}
],
"document": {
"documentId": "1",
"name": "Here is document one of the test.docx",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
},
{
"compositeTemplateId": "2",
"serverTemplates": [
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"routingOrder": "1",
"roleName": "##Buyer1"
}
]
}
}
],
"document": {
"documentId": "2",
"name": "Here is document two of the test",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
},
{
"compositeTemplateId": "3",
"serverTemplates":
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"routingOrder": "1",
"roleName": "##Buyer1"
}
]
}
}
],
"document": {
"documentId": "3",
"name": "Here is document three of the test",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
}
],
"status": "sent",
"emailSubject": "Please sign the following document at 3:20 PM"
}
Connect webhook response will contain the Envelope Custom Fields if they were added to the envelope successfully.
For CompositeTemplates the CustomFields specified at the root level are ignored. You should specify the Custom Fields within the inline template.
Troubleshooting Tip:You can do an additional Check to see if the Custom Fields are created by using listCustomFields api.
Here is an example.
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "a0d319ef-ad34-4a2e-a375-069ce2df630c"
}
],
"inlineTemplates": [
{
"sequence": "2",
"customFields": {
"textCustomFields": [
{
"name": "file id",
"value": "1823456"
}
]
},
"recipients": {
"signers": [
{
"name": "Kathy Gilbert",
"email": "KathyGilbert11#xxx.com",
"recipientId": "1",
"routingOrder": "1",
"roleName": "##Buyer1"
}
]
}
}
]
}

Custom Fields on envelope via API with Composite Templates

I am trying to create 2 custom fields when creating an Envelope from templates using composite templates below is the json.
{
"emailSubject": "This is a new",
"status": "sent",
"compositeTemplates": [
{
"inlinetemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"email": "email#email.com",
"name": "Jimmy Nobody",
"clientuserid": "1",
"recipientid": "1",
"rolename": "signer",
"dfaultrecipient": "true",
"tabs": {
"texttabs": [
{
"name": "Text",
"tabLabel": "name",
"value": "Joe Smith"
},
{
"name": "Text",
"tabLabel": "address",
"value": "987 apple lane"
}
]
}
}
]
}
}
],
"servertemplates": [
{
"sequence": "1",
"templateId": "52be0f34-d8aa-420f-8283-4e9cc2bb499f"
}
]
},
{
"inlinetemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"email": "email#email.com",
"name": "Jimmy Nobody",
"clientuserid": "1",
"recipientid": "1",
"rolename": "signer",
"dfaultrecipient": "true",
"tabs": {
"texttabs": [
{
"name": "Text",
"tabLabel": "name",
"value": "Joe Smith"
},
{
"name": "Text",
"tabLabel": "address",
"value": "987 apple lane"
}
]
}
}
]
}
}
],
"servertemplates": [
{
"sequence": "1",
"templateId": "e00b896b-4ac7-48b1-8280-bfe3830a61f1"
}
]
}
],
"customFields": {
"textCustomFields": [
{
"name": "callingsystem",
"required": "true",
"show": "false",
"value": "3e56cabd-6211-4203-a462-a7ff960a6b9c"
},
{
"name": "callingsystemid",
"required": "true",
"show": "false",
"value": "crm"
}
]
}
}
The problem is that this JSON is accepted and and envelope is created but no custom fields are on the envelope. What am i doing wrong?
You want to put it inside the inline templates tag. Also your formatting was a bit off and you had a typo in defaultRecipient
Try this:
{
"emailSubject": "This is a new",
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "52be0f34-d8aa-420f-8283-4e9cc2bb499f"
}
]
},
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "e00b896b-4ac7-48b1-8280-bfe3830a61f1"
}
]
},
{
"inlineTemplates": [
{
"sequence": "2",
"customFields": {
"textCustomFields": [
{
"name": "callingsystem",
"required": "true",
"show": "false",
"value": "3e56cabd-6211-4203-a462-a7ff960a6b9c"
},
{
"name": "callingsystemid",
"required": "true",
"show": "false",
"value": "crm"
}
]
},
"recipients": {
"signers": [
{
"email": "email#email.com",
"name": "Jimmy Nobody",
"clientuserid": "1",
"recipientid": "1",
"rolename": "signer",
"defaultrecipient": "true",
"tabs": {
"texttabs": [
{
"name": "Text",
"tabLabel": "name",
"value": "Joe Smith"
},
{
"name": "Text",
"tabLabel": "address",
"value": "987 apple lane"
}
]
}
}
]
}
}
]
}
]
}

Resources