使用 C#,DocuSign API SDK 4.5.2。
我将在同一个信封中寄出 3 份文件以供签名。每个文档将使用相同的服务器模板(它只是使用锚标记将签名元素放置在文档上)。我可以寄出信封,然后从 DocuSign 收到电子邮件以查看/签署文档。
我遇到的问题是,当我去签名时,我必须对每个文档签名 3 次(总共 9 次),然后才能单击“完成”按钮。每份文件上只有 1 个地方可以签名,但我必须点击签名按钮 3 次才能接受。如果我有 2 个收件人,则每个人的金额都是相同的。如果我更改代码以仅发送 1 个文档,则它工作正常,因此很明显在信封请求中未正确生成某些内容。
我还尝试为每个收件人提供不同的 ID 号,即使只有 2 个角色和 2 个不同的姓名/电子邮件地址。
在调用 API 实际发送文档之前,我捕获 JSON 以进行调试:
{
"compositeTemplates": [
{
"compositeTemplateId": "1",
"document": {
"documentBase64": "---Document 1 Bytes---",
"documentId": "1",
"fileExtension": "pdf",
"name": "MultiDocument1"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "[email protected] /cdn-cgi/l/email-protection",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "[email protected] /cdn-cgi/l/email-protection",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "2"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "99321CB1-A3E8-44A0-BDF4-D4F20069BC7B"
}
]
},
{
"compositeTemplateId": "2",
"document": {
"documentBase64": "---Document 2 Bytes---",
"documentId": "2",
"fileExtension": "pdf",
"name": "MultiDocument2"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "[email protected] /cdn-cgi/l/email-protection",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "[email protected] /cdn-cgi/l/email-protection",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "2"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "99321CB1-A3E8-44A0-BDF4-D4F20069BC7B"
}
]
},
{
"compositeTemplateId": "3",
"document": {
"documentBase64": "---Document 3 Bytes---",
"documentId": "3",
"fileExtension": "pdf",
"name": "MultiDocument3"
},
"inlineTemplates": [
{
"recipients": {
"signers": [
{
"email": "[email protected] /cdn-cgi/l/email-protection",
"name": "Client Name",
"recipientId": "1",
"roleName": "Signer1"
},
{
"email": "[email protected] /cdn-cgi/l/email-protection",
"name": "Advisor Name",
"recipientId": "2",
"roleName": "Advisor"
}
]
},
"sequence": "2"
}
],
"serverTemplates": [
{
"sequence": "1",
"templateId": "99321CB1-A3E8-44A0-BDF4-D4F20069BC7B"
}
]
}
],
"emailSubject": "Multiple Documents for Signature",
"status": "Sent"
}
这是我正在使用的文档之一。其他两个是相似的——不同的文本,但使用相同的锚标记。
我还尝试替换我在测试文档 1 时成功使用的另一个文档 - 它完全不同,但仍然使用相同的锚标记。我得到了相同的结果——每个签名都必须签名 3 次。
谁能看到我做错了什么吗?如果您需要更多信息,请告诉我。
谢谢,
兰迪
Update:按照 Inbar 和 Larry 的建议,我联系了 DocuSign 支持并将“锚点人口范围”设置从“信封”更改为“文档”。不幸的是,这让事情变得更糟。我仍然需要多次单击签名元素才能签名,但只能签署第一个文档。其他文件没有附加任何签名元素。
更新#2:我想知道我使用模板的方式是否可能令人困惑并导致这些问题。我可能应该更清楚地解释自己。我正在使用的服务器模板有一个“虚拟”Word 文档,其中仅包含一组用于签名和日期的通用锚标记。我将其作为模板上传,并将签名和日期 UI 元素分配给锚标记。但是,当我从应用程序发送请求时,我使用的是在运行时选择/生成的不同文档。该文档替换了模板中的虚拟 Word 文档,但具有相同的锚标记,因此所有签名和日期元素都可以在真实文档中找到其位置。当仅发送 1 个文档时,这非常有效,但我无法让多个文档同时工作。
Update #3: Requirements -- We are adding digital signature capability to our website (ASP.NET, WinForms). We already have a page where an Advisor can either print out a document for a physical signature or start a digital signature process with DocuSign. All our documents come from MS Report Server because they need to contain Client data from our database. We currently do not send out any static documents. In the code behind on the page, I get the PDF bytes from Report Server and add that (as a document) to a composite template to be sent to DocuSign. It also contains a reference to a server template in my account of a Word document (see below) containing the anchor tags and signature elements (mentioned in Update #2) to be overlaid on the Report Server document. What happens is the Report Server document replaces the text of the Word template (like a form background) and because I'm using the same text as anchor tags, the signature elements on the Word template find their match on the Report Server document and move to their positions on the document. I finally include 1 or more names/email addresses of the Clients and usually 2 other required signers (Advisor and Manager). This is then sent to DocuSign (SDK API) to start the signing process. Using a single document, this is working well. We are preparing for when we will need to send more than 1 document to a Client and we'd like to do that in a single request. If you need more info, please let me know.