复合模板的意外行为
Unexpected behavior with composite templates
我在理解内嵌模板的工作原理时遇到了问题。我有 2 个服务器模板和 2 个内联模板,1 个内联模板与服务器模板结合使用。我想看看我是否不填写信封仍然有效的内联模板信息。这是我的要求:
请求
{
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "8a3a21af-4348-45e1-85b9-72a331c9c67a"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": []
}
}
],
"document": {
"documentId": "2",
"name": "FinalSale.docx",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
},
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "d22048be-4bfe-43c2-9acf-3d5bcd79144f"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"name": "Kathy Keaton",
"email": "KathyKeaton1@outlook.com",
"recipientId": "1",
"accessCode": "5000",
"routingOrder": "1",
"roleName": "##Buyer1"
},
{
"name": "Kathy Lloyd",
"email": "KathyLloyd1@outlook.com",
"recipientId": "2",
"accessCode": "5000",
"routingOrder": "2",
"roleName": "##Seller1"
}
]
}
}
],
"document": {
"documentId": "1",
"name": "Going to test out signatures and initials.docx",
"fileExtension": "docx",
"documentFields": [
{
"name": "dgsvalue",
"value": "dgs-222"
}
],
"documentBase64": [bytearray]
}
}
],
"status": "sent",
"emailSubject": "Please sign the following 2 documents at 2:39 PM"
}
回应
{
"envelopeId": "f8a090cf-ddc3-4612-8f24-9ff13beddc48",
"uri": "/envelopes/f8a090cf-ddc3-4612-8f24-9ff13beddc48",
"statusDateTime": "2017-02-01T19:39:26.2330000Z",
"status": "sent"
}
我假设内联模板必须提供所有签名者。 2 个模板中的角色名称相同(##Buyer1 和##Seller1 在两个模板中)。我原以为没有填写内联模板将意味着它会在该特定文档上失败。我错了,但我不确定为什么。它是否成功是因为两个服务器模板上的角色名称相同并且为一个内联模板指定它就足够了吗?
您不需要在内联模板中提供所有签名者。
这是 Composite template usage 的完整规则。
在这里引用其中的一些内容。
Each CompositeTemplate adds a new document and templates overlay into
the envelope. For each CompositeTemplate these rules are applied:
Templates are overlaid in the order of their Sequence value.
If Document is not passed into the system, the first template’s
document (based on template’s Sequence value) is used.
Last in wins in all cases except for the document (i.e. envelope
information, recipient information, secure field information). This
was done to keep things simple. There is no special casing.
For example, if you want higher security on a tab, then that needs to be specified in the last template in which the tab is included. If you want higher security on a role recipient it needs to be in the last template in which that role recipient is specified.
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.
我在理解内嵌模板的工作原理时遇到了问题。我有 2 个服务器模板和 2 个内联模板,1 个内联模板与服务器模板结合使用。我想看看我是否不填写信封仍然有效的内联模板信息。这是我的要求:
请求
{
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "8a3a21af-4348-45e1-85b9-72a331c9c67a"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": []
}
}
],
"document": {
"documentId": "2",
"name": "FinalSale.docx",
"fileExtension": "docx",
"documentBase64": [bytearray]
}
},
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "d22048be-4bfe-43c2-9acf-3d5bcd79144f"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"name": "Kathy Keaton",
"email": "KathyKeaton1@outlook.com",
"recipientId": "1",
"accessCode": "5000",
"routingOrder": "1",
"roleName": "##Buyer1"
},
{
"name": "Kathy Lloyd",
"email": "KathyLloyd1@outlook.com",
"recipientId": "2",
"accessCode": "5000",
"routingOrder": "2",
"roleName": "##Seller1"
}
]
}
}
],
"document": {
"documentId": "1",
"name": "Going to test out signatures and initials.docx",
"fileExtension": "docx",
"documentFields": [
{
"name": "dgsvalue",
"value": "dgs-222"
}
],
"documentBase64": [bytearray]
}
}
],
"status": "sent",
"emailSubject": "Please sign the following 2 documents at 2:39 PM"
}
回应
{
"envelopeId": "f8a090cf-ddc3-4612-8f24-9ff13beddc48",
"uri": "/envelopes/f8a090cf-ddc3-4612-8f24-9ff13beddc48",
"statusDateTime": "2017-02-01T19:39:26.2330000Z",
"status": "sent"
}
我假设内联模板必须提供所有签名者。 2 个模板中的角色名称相同(##Buyer1 和##Seller1 在两个模板中)。我原以为没有填写内联模板将意味着它会在该特定文档上失败。我错了,但我不确定为什么。它是否成功是因为两个服务器模板上的角色名称相同并且为一个内联模板指定它就足够了吗?
您不需要在内联模板中提供所有签名者。
这是 Composite template usage 的完整规则。
在这里引用其中的一些内容。
Each CompositeTemplate adds a new document and templates overlay into the envelope. For each CompositeTemplate these rules are applied:
Templates are overlaid in the order of their Sequence value.
If Document is not passed into the system, the first template’s document (based on template’s Sequence value) is used.
Last in wins in all cases except for the document (i.e. envelope information, recipient information, secure field information). This was done to keep things simple. There is no special casing.
For example, if you want higher security on a tab, then that needs to be specified in the last template in which the tab is included. If you want higher security on a role recipient it needs to be in the last template in which that role recipient is specified.
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.