【发布时间】:2017-06-07 14:41:59
【问题描述】:
创建信封时如何使用复合模板指定预填充字段。
我尝试在inlineTemplate.recipients.signers[0].tabs 中包含标签信息,但我收到System.String cannot be cast to API_REST.Models.v2.tabs 的错误。
如果我将信息作为模板角色包含在templateRoles 中,则会被忽略。该文档提供了有关如何执行此操作的信息。似乎应该在内联模板中指定预填充数据。
我的其他未解决问题包括recipientId 做什么。 clientUserId 是做什么用的?我们目前为所有签名者将clientUserId 设置为相同的值。我看到它在签名者请求签名时使用。出于某种原因,它是否应该对每个签名者都是唯一的?
它看起来也像单个复合模板将服务器模板和内联模板叠加在一起。在单个复合模板中包含多个服务器模板或多个内联模板的用例是什么?
是否有计划改进文档以描述如何将复合模板用于各种目的?
签名者/模板角色:
{
"clientUserId": "clientUserId",
"email": "first+last@email.com",
"name": "First Last",
"roleName": "role1",
"tabs": {
"textTabs": [
{
"locked": true,
"tabLabel": "\\*FieldName",
"value": "prefillValue"
}
]
}
}
示例请求:
{
"compositeTemplates": [
{
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"clientUserId": "clientUserId",
"email": "first+last@email.com",
"name": "First Last",
"recipientId": 1,
"roleName": "role1",
"tabs": {
"textTabs": [{"tabLabel": "label", "value": "val"}]
}
}
]
},
"sequence": 1
}
],
"serverTemplates": [
{
"sequence": 1,
"templateId": "templateId1"
}
]
},
{
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"clientUserId": "clientUserId",
"email": "first+last@better.com",
"name": "First Last",
"recipientId": 1,
"roleName": "role1",
"tabs": {
"textTabs": [{"tabLabel": "label", "value": "val"}]
}
}
]
},
"sequence": 2
}
],
"serverTemplates": [
{
"sequence": 2,
"templateId": "templateId2"
}
]
}
],
"emailSubject": "Email subject",
"status": "sent",
"templateId": null,
"templateRoles": null
}
【问题讨论】:
标签: docusignapi docusigncompositetmplts