Reputation: 53
I'm using Docusign Connect webhooks in demo account (Node.js).
I was testing receiving webhooks using per envelope configuration and wanted to receive the webhooks as JSON format instead of XML.
When I configure as such at account level, the webhooks come with JSON payload. However, in per envelope configuration they continue to come as XML.
Isn't JSON payload already supported in this configuration? Mentioned here
I'm using a standard eventNotification object with eventData as per examples:
eventData: {
version: 'restv2.1',
format: 'json',
includeData: ['custom_fields', 'extensions', 'folders', 'recipients'],
},
What could be the problem here?
Upvotes: 1
Views: 1161
Reputation: 1370
The JSON format for connect writeback is available. When dealing with eventNotifications the portion that determines whether it writes back in JSON Vs. XML is the inclusion of the eventData param you sited here. If you get rid of the eventData portion, writeback will resume in XML instead of JSON.
Example for XML writeback:
"eventNotification": {
"url": "https://asdfasdf.proxy.webhookapp.com",
"requireAcknowledgment": "true",
"loggingEnabled": "true",
"includeDocuments":"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"}
]
}
Example for JSON writeback:
"eventNotification": {
"url": "https://asdfasdf.proxy.webhookapp.com",
"requireAcknowledgment": "true",
"loggingEnabled": "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"}
],
"eventData": {
"version": "restv2.1",
"format": "json",
"includeData": ["custom_fields", "extensions", "folders",
"recipients", "powerform", "tabs", "payment_tabs","documents"]
}
I understand this ticket is a little stale, if you're still having issues with this and would like some help feel free to open up a ticket with support, myself or someone on my team would be happy to walk you through getting this operational.
Regards,
Matt King
Upvotes: 0
Reputation: 14015
The most common possible problem is your SIM mod (SIM = Send Individual Message). As Larry's blog clearly state, the JSON format can only be used if you use the aggregate mode, it is not supported for individual messages.
To change the SIM mode go to the Connect page in eSign Admin Settings and choose the mode you want.
Upvotes: 0