I'm trying to create an envelope with an EventNotification, so that I don't have to poll for the status once every 15 minutes.
Making a request to create an envelope without notifications works fine, so it's definitely something to do with the eventNotification part of the request.
Here is the full request:
{
"emailSubject": "Test Sending Envelope 2",
"eventNotification": {
"envelopeEvents": [
{ "envelopeEventStatusCode": "sent" },
{ "envelopeEventStatusCode": "delivered" },
{ "envelopeEventStatusCode": "completed" },
{ "envelopeEventStatusCode": "declined" },
{ "envelopeEventStatusCode": "voided" }
],
"includeCertificateOfCompletion": "true",
"includeCertificateWithSoap": "false",
"includeDocumentFields": "true",
"includeDocuments": true,
"includeEnvelopeVoidReason": "true",
"includeSenderAccountAsCustomField": "true",
"includeTimeZone": "true",
"loggingEnabled": "true",
"recipientEvents": [
{ "includeDocuments": "Sent" },
{ "includeDocuments": "Delivered" },
{ "includeDocuments": "Completed" },
{ "includeDocuments": "Declined" },
{ "includeDocuments": "AuthenticationFailed" },
{ "includeDocuments": "AutoResponded" }
],
"requireAcknowledgment": "true",
"signMessageWithX509Cert": "false",
"url": "https://arealurl/api/DocuSign-NotificationWebHook",
"useSoapInterface": "false"
},
"status": "sent",
"templateId": "template-guid-4b95-guid-template",
"templateRoles": [
{
"email": "someone#somewhere.com",
"name": "Someone Somewhere",
"roleName": "Something"
}
]
}
And the error that comes back is:
Error calling CreateEnvelope: {
"errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. Boolean value expected for parameter: includeDocuments"
}.
I have tried with the includeDocuments value being omitted, with it set to a string "true", and also with the boolean true as shown above.
The recipientEvents property is incorrect. Change includeDocuments to recipientEventStatusCode
"recipientEvents": [
{ "recipientEventStatusCode": "Sent" },
{ "recipientEventStatusCode": "Delivered" },
{ "recipientEventStatusCode": "Completed" },
{ "recipientEventStatusCode": "Declined" },
{ "recipientEventStatusCode": "AuthenticationFailed" },
{ "recipientEventStatusCode": "AutoResponded" }
],
Related
I am trying to sync DocuSign info and I want to track some envelope statuses and some recipient statuses.
I am using such data for draft envelope:
{
"emailSubject": "test 1",
"emailBlurb": null,
"recipients": null,
"documents": [
{
"documentId": 1,
"name": "DocuSign_current_sync.pdf",
"documentBase64": ".....",
"fileExtension": "pdf"
}
],
"status": "created",
"eventNotification": {
"url": "https://webhook.site/{id}",
"requireAcknowledgment": true,
"includeDocuments": false,
"includeEnvelopeVoidReason": true,
"includeSenderAccountAsCustomField": false,
"loggingEnabled": true,
"envelopeEvents": [
{
"envelopeEventStatusCode": "sent",
"includeDocuments": false
},
{
"envelopeEventStatusCode": "delivered",
"includeDocuments": false
},
{
"envelopeEventStatusCode": "declined",
"includeDocuments": false
},
{
"envelopeEventStatusCode": "voided",
"includeDocuments": false
},
{
"envelopeEventStatusCode": "completed",
"includeDocuments": false
}
],
"recipientEvents": [
{
"recipientEventStatusCode ": "signed",
"includeDocuments": false
},
{
"recipientEventStatusCode ": "completed",
"includeDocuments": false
}
],
"eventData": {
"format": "json",
"version": "restv2.1",
"includeData": [
"recipients"
]
}
}}
I am expecting to receive notification envelope status changes and notification each time when the recipient has signed/completed his process
But I am receiving only envelope level notifications and do not get any updates in a case when the recipient change his status
Any thoughts on what is wrong and how I can fix that?
Going to guess the issue is the extra space. I would expect an error message for an invalid recipient. Going to check into this.
"recipientEventStatusCode ": "signed",
Should be:
"recipientEventStatusCode": "signed",
While calling the create envilope API we are getting the error
{
"errorCode": "ACCOUNT_MISSING_ENTITLEMENT_CREATE_EMBEDDEDRECIPIENTSTARTURL",
"message": "The sender does not have required entitlement and is not allowed to set EmbeddedRecipientStartURL for the user"
}
Request url
/v2/accounts/8017620c-2355-481c-a7b2-50b645d40a52/envelopes
Request body (envelope)
{
"documents": [
{
"documentId": "1864177648",
"name": "powerpoint press.pptx",
"fileExtension": "pptx",
"matchBoxes": [],
"documentFields": [],
"documentBase64": ""
}
],
"recipients": {
"signers": [
{
"excludedDocuments": [],
"name": "Mehraj",
"email": "mehraj#mydomain.com",
"signingGroupUsers": [],
"recipientId": "cbd343d7-a735-4846-8138-243ec7b31348",
"socialAuthentications": [],
"clientUserId": "0e670c86-aa1a-4149-9ce6-9c27dd76d3b0",
"embeddedRecipientStartURL": "SIGN_AT_DOCUSIGN",
"customFields": [],
"routingOrder": "1",
"recipientAttachments": []
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": []
},
"eventNotification": {
"url": "https://mysite.mydomain.com/root/api/docusign/webhook/eventnotification",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "sent"
},
{
"envelopeEventStatusCode": "delivered"
},
{
"envelopeEventStatusCode": "completed"
},
{
"envelopeEventStatusCode": "declined"
},
{
"envelopeEventStatusCode": "voided"
}
],
"recipientEvents": [
{
"recipientEventStatusCode": "Sent"
},
{
"recipientEventStatusCode": "Completed"
},
{
"recipientEventStatusCode": "Declined"
},
{
"recipientEventStatusCode": "AuthenticationFailed"
},
{
"recipientEventStatusCode": "AutoResponded"
}
],
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "false",
"includeEnvelopeVoidReason": "true",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "false"
},
"templateRoles": [],
"compositeTemplates": [],
"status": "created",
"emailSubject": "powerpoint press",
"recipientsLock": "true"
}
** I have removed the documentBase64 contennts to make the post shorter **
In demo environment everything works fine, but in the production environment we are getting the specified error.
Setting the embedded start URL is a paid add-on feature. Your production account probably didn't include this feature.
Need to see your envelope before I can give you a complete answer but this page will likely shed light on what you maybe missing:
https://developers.docusign.com/docs/esign-soap-api/reference/sending-group/rules-for-createandsendenvelope-and-createenvelope/
Let me know if this helps.
I am sending REST request to docusign from Postman, but I am not able to get the eventNotification back to the url i am giving. Please help what I am doing wrong in the request.
{
"accountId": "8555983",
"emailSubject": "This request is sent from a Template",
"templateId": "4ce7f605-c2c8-40ab-b95b-7aaa0c765245",
"templateRoles": [{
"roleName": "Signer1",
"name": "Prakhar",
"email": "prakhar#example.com",
"eventNotification": {
"url": "[sfdc base url]/services/apexrest/Docusign",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "true",
"includeEnvelopeVoidReason": "true",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "sent"
},
{
"envelopeEventStatusCode": "delivered"
},
{
"envelopeEventStatusCode": "completed"
},
{
"envelopeEventStatusCode": "declined"
},
{
"envelopeEventStatusCode": "voided"
}
]
},
"tabs": {
"signHereTabs": [{
"xPosition": "138",
"yPosition": "654",
"documentId": "1",
"pageNumber": "1"
}],
"textTabs": [{
"tabLabel": "NameOfInstitution",
"value":"Example",
"locked": "true",
"xPosition": "245",
"yPosition": "310",
"documentId": "1",
"pageNumber": "1"
}
]
}
}],
"status": "sent"
}
The eventNotification attribute must be at the base level of the request object.
You're placing it within a templateRoles object.
Try the following:
{
"accountId": "8555983",
"emailSubject": "This request is sent from a Template",
"templateId": "4ce7f605-c2c8-40ab-b95b-7aaa0c765245",
"templateRoles": [{
"roleName": "Signer1",
"name": "Prakhar",
"email": "prakhar#example.com",
"tabs": {
"signHereTabs": [{
"xPosition": "138",
"yPosition": "654",
"documentId": "1",
"pageNumber": "1"
}],
"textTabs": [{
"tabLabel": "NameOfInstitution",
"value":"Example",
"locked": "true",
"xPosition": "245",
"yPosition": "310",
"documentId": "1",
"pageNumber": "1"
}]
}
}],
"status": "sent",
"eventNotification": {
"url": "[sfdc base url]/services/apexrest/Docusign",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "true",
"includeEnvelopeVoidReason": "true",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "sent"
},
{
"envelopeEventStatusCode": "delivered"
},
{
"envelopeEventStatusCode": "completed"
},
{
"envelopeEventStatusCode": "declined"
},
{
"envelopeEventStatusCode": "voided"
}
]
}
}
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.
We have a soap URL which receives webhooks from docusign as per configured status. It was sending webhooks but all of sudden it stopped receiving it. I have enablelogging turned is set to true and checked in admin connect tab and nothing in logs or failure as well. We used to get logs there before. We have a demo account.
Nothing has been changed in our code. Can anyone please suggest what could have cause this issue and how to resolve it
Regards,
Dishant
following request data sent to docusign restapi
{
"documents": [
{
"documentBase64": "<Base64BytesHere>",
"documentId": "1",
"fileExtension": "pdf",
"name": "00098O01.pdf"
}
],
"emailSubject": "Test",
"eventNotification": {
"envelopeEvents": [
{
"envelopeEventStatusCode": "Sent",
"includeDocuments": "false"
},
{
"envelopeEventStatusCode": "completed",
"includeDocuments": "true"
}
],
"includeTimeZone": "true",
"loggingEnabled": "true",
"recipientEvents": [
{
"includeDocuments": "false",
"recipientEventStatusCode": "Sent"
},
{
"includeDocuments": "false",
"recipientEventStatusCode": "Delivered"
}
],
"soapNameSpace": "xxxxx",
"url": "xxxx",
"useSoapInterface": "true"
},
"recipients": {
"signers": [
{
"email": "dishant.arora#caseflowacumen.com",
"name": "Dishant Arora",
"recipientId": "1",
"tabs": {
"signHereTabs": [
{
"documentId": "1",
"pageNumber": "1",
"tabLabel": "Sign Here",
"xPosition": "100",
"yPosition": "500"
}
]
}
}
]
},
"status": "sent"
}