Docusign:带选项卡的复合模板 [英] Docusign: composite templates with tabs

查看:68
本文介绍了Docusign:带选项卡的复合模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建信封时,如何使用复合模板指定预填充字段。

How do I specify prefilled fields with composite templates when creating an envelope.

我尝试在 inlineTemplate.recipients.signers [0] .tabs 中包含选项卡信息,但我得到了无法将 System.String强制转换为API_REST.Models.v2.tabs 的错误。

I tried including the tabs information in the inlineTemplate.recipients.signers[0].tabs, but I get an error that System.String cannot be cast to API_REST.Models.v2.tabs.

如果我将信息作为模板角色包含在 templateRoles 中,则将其忽略。该文档提供有关如何执行此操作的信息。似乎应该在嵌入式模板中指定预填充数据。

If I include information as a template role in templateRoles, it is ignored. The documentation is light on information about how to do this. It seems like the prefill data should be specified in the inline template.

我还有其他未解决的问题,其中包括 recipientId 做。 clientUserId 的用途是什么?目前,我们将所有签名者的 clientUserId 设置为相同的值。我看到签名者请求签名时使用了它。

Other open questions I have include what does the recipientId do. What is the clientUserIdused for? We currently set clientUserId to the same value for all signers. I see it's used when signer requests a signature. Should it be unique to every signer for some reason?

它看起来也像是单个复合模板,使服务器和内联模板彼此重叠。在单个组合模板中具有多个服务器模板或多个内联模板的用例是什么?

It also looks like a single composite template overlays the server and inline templates on top of each other. What's the use case for having multiple server templates or multiple inline templates in a single composite template?

是否有计划改进文档以描述如何针对各种用途使用组合模板

Are there plans to improve the documentation to describe how to use composite templates for various purposes?

签名者/模板角色:

{
  "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
}


推荐答案

从发送信封的信息可以找到服务器模板此处。

Information on sending an envelope from a server template can be found here.

选项卡元素使用收件人ID指示要签名的收件人当clientuserID指定用户时,文档是否为远程或嵌入式,建议每个签名者都唯一(但不是必需的)。

RecipientID is used by the tab element to indicate which recipient is to sign the Document while the clientuserID specifies if the user is remote or embedded and it is recommended it be unique per signer (but not required).

我还建议阅读关于复合模板的本页,希望这个概念会更有意义,但我与您一样,缺乏关于复合模板的文档可能会带来麻烦。

I'd also suggest reading this page about composite templates, hopefully the concept will make a bit more sense but I am with you that the lack of documentation on composite templates can be troublesome.

不幸的是,我没有一个包含选项卡数据的示例,但是将下面示例中的每个收件人添加到选项卡下的部分应该没有问题。

Unfortunately, I don't have a sample with tab data included, but adding the tab section under each recipient from my sample below should work with no issues.

{
  "emailSubject": "DocuSign Comp Test 1",
  "emailBlurb": "Example - Composite Templates",
  "status": "sent",
  "compositeTemplates": [
    {
      "serverTemplates": [
        {
          "sequence": "1",
          "templateId": "templateId1"
        }
      ],
      "inlineTemplates": [
        {
          "sequence": "1",
          "recipients": {
            "signers": [
              {
                "email": "testsigner123@gmail.com",
                "name": "Test Tester",
                "recipientId": "1",
                "roleName": "Signer 1"
              }
            ]
          }
        }
      ]
    },
    {
      "serverTemplates": [
        {
          "sequence": "2",
          "templateId": "templateId2"
        }
      ],
      "inlineTemplates": [
        {
          "sequence": "2",
          "recipients": {
            "signers": [
              {
                "email": "testsigner123@gmail.com",
                "name": "Test Tester",
                "recipientId": "1",
                "roleName": "Signer 1"
              }
            ]
          }
        }
      ]
    },
    {    
      "serverTemplates": [
        {
          "sequence": "3",
          "templateId": "templateId3"
        }
      ],
      "inlineTemplates": [
        {
          "sequence": "2",
          "recipients": {
            "signers": [
              {
                "email": "testsigner123@gmail.com",
                "name": "Test Tester",
                "recipientId": "1",
                "roleName": "Signer 1"
              }
            ]
          }
        }
      ]
    }
  ]
}

这篇关于Docusign:带选项卡的复合模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆