Unclear webhook eventNotification documentation

Viewed 218

There are several conflicts in the docs about the eventNotification object in the envelopeDefinition type.

First https://developers.docusign.com/docs/esign-rest-api/reference/Envelopes/Envelopes/create/#eventNotification Shows the following

{
  eventNotification:eventNotification{
    eventData:connectEventData{
      format:String,
      version:String,
      includeData:Array
    }
  }
}

while https://apiexplorer.docusign.com/#/esign/restapi?categories=Envelopes&tags=Envelopes&operations=create shows

{
  eventNotification:eventNotification{
    connectEventData:undeclared_type{
      format:String,
      version:String
    }
  }
}

It is unclear which of these is correct.

Secondly https://developers.docusign.com/docs/platform/webhooks/connect/architecture

Very heavily implies that a valid version and format would be v2.1 and JSON, however after many combinations I'm only ever able to get XML back. I was unable to find any place in the docs that list out the allowed versions and formats.

Lastly https://developers.docusign.com/docs/platform/webhooks/connect/configuration Is not what is shown at https://admindemo.docusign.com/connect/edit-custom?accountId=\

The questions that arose because of this are:

Is there some doc that I just missed in my exploration? If not then an answer to the following would be greatly appreciated.

What are valid format, version and includeData values?

Is the name of the object containing those fields eventData or connectEventData?

Does the webhook support any format other than XML?

2 Answers

To get json formatted connect messages from eventNotifications defined in the envelope create call, I'd refer to this blog for some great detail - https://www.docusign.com/blog/developers/connect-webhooks-json-notifications.

It will look something like:

"eventNotification": { "url": "https://yourwebhookurl", "loggingEnabled": "true", "requireAcknowledgment": "true", "eventData": { "version": "restv2.1", "format": "json", "includeData": ["tabs"] }, "envelopeEvents": [ {"envelopeEventStatusCode": "Completed", "includeDocuments": "false"} ]}

Keep in mind, SIM is not available for json at this time, so make sure your account is set for aggregate messaging.

After contacting support I got the following answer:

Connect publishing in JSON format is planned and near release, but due to some performance issues that needed to be addressed, the rollout has been delayed. Unfortunately, this means that some of our documentation is a bit ahead of schedule.

The notification format is as follows:

"eventNotification": {
    "url": "https://example/EventNotifications",
    "loggingEnabled": "true",
    "requireAcknowledgment": "false",
    "envelopeEvents": [{
            "envelopeEventStatusCode": "sent",
            "includeDocuments": "false"
        },
        {"envelopeEventStatusCode": "delivered"},
        {"envelopeEventStatusCode": "completed"},
        {"envelopeEventStatusCode": "declined"},
        {"envelopeEventStatusCode": "voided"}
    ]
}
Related