使用DocuSign Connect信封级webhook包含自定义字段



背景

我正在尝试使用RESTv2.1 API创建一个信封,该信封有一个与其关联的textCustomField(用于获取有关每个信封的一些个性化信息)。我还想设置一个信封级别的DocuSign Connect webhook(带有eventNotification),它也将包括customFields,这样我就可以在HTTP侦听器上获取它。然而,在文档中似乎不清楚如何确保信封级别的webhook包括customFields(而在配置自定义Connect配置时,在帐户级别使用tickboxes设置Connect自定义配置时,这似乎是可能的,我可以在HTTP侦听器中看到这一点)。这个问答;关于Connect的A(DocuSign Connect支持JSON数据或有效负载吗?)似乎表明您可以为eventNotificationeventData使用includeData。当我尝试用Postman测试这一点时,我似乎能够在创建信封时创建信封自定义字段,我可以用GET自定义字段信息来检查信封,但这些字段没有包含在webhook请求中。

问题

在信封级别注册webhook时,是否可以为信封自定义字段includeData,或者仅在使用Connect的帐户级别进行CCD_8?如果是的话,在通过REST API创建信封时,在webhook通知中包含customFields的正确属性是什么(因为includeData似乎不起作用)?

示例

作为请求的主体,我一直在尝试的内容摘录,以及下面的webhook收到的内容(经过编辑):

创建信封请求的正文:

{
"emailSubject": "Please sign this document",
"documents": [
{
"documentBase64": "dGVzdCBkb2M=",
"name": "Lorem Ipsum",
"fileExtension": "txt",
"documentId": "1"
}
],
"customFields": {
"textCustomFields": [
{
"fieldId": "1",
"name": "Custom Field Name",
"show": "true",
"required": "false",
"value": "Custom Field Value 1"
}
]
},
"recipients": {
"signers": [
{
"email": "x@email.com",
"name": "X Name",
"recipientId": "1",
"routingOrder": "1"
}
]
},
"eventNotification": {
"eventData": {
"version": "restv2.1",
"format": "json",
"inludeData": [
"recipients",
"customFields"
]
},
"envelopeEvents": [
{
"envelopeEventStatusCode": "Sent",
"includeDocuments": "false"
},
{
"envelopeEventStatusCode": "Delivered",
"includeDocuments": "false"
},
{
"envelopeEventStatusCode": "Completed",
"includeDocuments": "false"
}
],
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"url": "https://webhook.sitexxx"
},
"status": "sent"
}

由webhook接收(不包括customFields):

{
"status": "sent",
"documentsUri": "/envelopes/[x]/documents",
"recipientsUri": "/envelopes/[x]/recipients",
"attachmentsUri": "/envelopes/[x]/attachments",
"envelopeUri": "/envelopes/[x]",
"emailSubject": "Please sign this document",
"envelopeId": "[x]",
"signingLocation": "online",
"customFieldsUri": "/envelopes/[x]/custom_fields",
"notificationUri": "/envelopes/[x]/notification",
"enableWetSign": "true",
"allowMarkup": "false",
"allowReassign": "true",
"createdDateTime": "2021-02-21T15:07:38.05Z",
"lastModifiedDateTime": "2021-02-21T15:07:38.05Z",
"initialSentDateTime": "2021-02-21T15:07:39.067Z",
"sentDateTime": "2021-02-21T15:07:39.067Z",
"statusChangedDateTime": "2021-02-21T15:07:40.547Z",
"documentsCombinedUri": "/envelopes/[x]/documents/combined",
"certificateUri": "/envelopes/[x]/documents/certificate",
"templatesUri": "/envelopes/[x]/templates",
"expireEnabled": "true",
"expireDateTime": "2021-06-21T15:07:39.067Z",
"expireAfter": "120",
"sender": {
"userName": "[x]",
"userId": "[x]",
"accountId": "[x]",
"email": "[x]"
},
"purgeState": "unpurged",
"envelopeIdStamping": "true",
"is21CFRPart11": "false",
"signerCanSignOnMobile": "true",
"autoNavigation": "true",
"isSignatureProviderEnvelope": "false",
"hasFormDataChanged": "false",
"allowComments": "true",
"hasComments": "false",
"allowViewHistory": "true",
"envelopeMetadata": {
"allowAdvancedCorrect": "true",
"enableSignWithNotary": "true",
"allowCorrect": "true"
},
"anySigner": null,
"envelopeLocation": "current_site",
"isDynamicEnvelope": "false"
}

您拼错了属性名称(includeData而非inludeData)和项目值(custom_fields而非CCD15)。尝试:

... 
"includeData": [
"recipients",
"custom_fields"
]

DocuSign API忽略它无法识别的属性。

有关更多信息,请参阅Connect JSON博客文章。