Docusign envelope recepient event notification - docusignapi

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

Related

While calling the create envilope API we are getting the error

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.

Error when using EU Advanced Signature with Templates

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.

INVALID_REQUEST_PARAMETER creating an envelope with notifications

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

Docusign webhooks listener not receiving event notification

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

Composite Templates and RoutingOrder - Nothing for second signer

I have been experimenting with the DocuSign eSign C# library, and everything has been working as expected for single template envelopes. I now need to use 2 different templates within a single envelope and have run into some issues.
I have 2 templates that I wish to combine. Everything works exactly as expected when I create a composite template, add the necessary recipients, and send the notification. This sends the combined templates to both recipients in parallel.
As soon as I add a RoutingOrder of 1/2 to the recipients, the first recipient gets prompted to sign as expected, and then once signed it is passed on to the second recipient. This is where the problem lies... the second recipient doesn't have any tabs to fill in and/or any place to sign.
If I switch the RoutingOrder of the recipients, I get the same behavior, so it is definitely related to a person being the second recipient.
Any thoughts on what I can do to fix this are greatly appreciated! The JSON generated by the DocuSign eSign API can be found below:
{
"eventNotification": {
"url": "<my_webhook_callback_url>",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"envelopeEvents": [
{ "envelopeEventStatusCode": "sent" },
{ "envelopeEventStatusCode": "delivered" },
{ "envelopeEventStatusCode": "completed" },
{ "envelopeEventStatusCode": "declined" },
{ "envelopeEventStatusCode": "voided" }
],
"recipientEvents": [
{ "recipientEventStatusCode": "Sent" },
{ "recipientEventStatusCode": "Delivered" },
{ "recipientEventStatusCode": "Completed" },
{ "recipientEventStatusCode": "Declined" },
{ "recipientEventStatusCode": "AuthenticationFailed" },
{ "recipientEventStatusCode": "AutoResponded" }
],
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "true",
"includeEnvelopeVoidReason": "true",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "true"
},
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "1b5230a2-15da-4502-8ea4-9a7a28ae02aa"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"name": "<customer_signer_name>",
"email": "<customer_signer_name>",
"recipientId": "1",
"routingOrder": "1",
"roleName": "Customer"
},
{
"name": "<internal_signer_name>",
"email": "<internal_signer_email>",
"recipientId": "2",
"routingOrder": "2",
"roleName": "InternalSigner"
}
]
}
}
]
},
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "ae08ac4b-2d92-43cc-9c18-5eaa0a6cc8c7"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"name": "<customer_signer_name>",
"email": "<customer_signer_name>",
"recipientId": "1",
"routingOrder": "1",
"roleName": "Customer"
},
{
"name": "<internal_signer_name>",
"email": "<internal_signer_email>",
"recipientId": "2",
"routingOrder": "2",
"roleName": "InternalSigner"
}
]
}
}
]
}
],
"status": "sent",
"emailSubject": "Test Email Subject"
}
Your server templates have both the recipients at routing order 1. Since the inlineTemplates specify the recipient at routing Order 2, the tabs in the server template will not be associated with the recipient at routing order 2.
Recipient matching is based on Recipient Role and Routing Order. If there are matches, the recipient information is merged together. A final pass is done on all CompositeTemplates, after all template overlays have been applied, to collapse recipients with the same email, username and routing order. This prevents having the same recipients at the same routing order.
You will have to either update the routing order of the recipient on your server template or specify tabs in the inline template.

Resources