DocuSign一个包含多个服务器模板的信封 [英] DocuSign one envelope with multiple server templates

查看:91
本文介绍了DocuSign一个包含多个服务器模板的信封的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将docusign API与单个模板,角色,选项卡等配合使用已经取得了很多成功。我的用例现在是:

I have had plenty of success using docusign API with single template, roles, tabs, etc... My use case is now:

1)有一个包含多个服务器模板的信封

1) Have a single envelope that contains multiple server templates

2)两个服务器模板的角色将相同

2) The roles will be the same for both server templates

3)但是,每个模板的每个角色可能会有不同的选项卡

3) However there may be different tabs for each role for each template

通过阅读Docusign API和反复试验,我很接近,但是在这里看不到终点。这是我当前的JSON:

Through reading the Docusign API and trial and error I am close, but just cant get across the finish line here. Here is my current JSON:

accountId = 414772
baseUrl = https://demo.docusign.net/restapi/v2/accounts/414772
{
    "accountId": "414772",
    "emailSubject": "DocuSign API - Signature Request from Template",
    "compositeTemplates": [
        {
            "serverTemplates": [
                {
                    "sequence": 1,
                    "templateId": "F42C617E-0C61-4A98-944E-F9CAA0AE55D9"
                }
            ],
            "inlineTemplates": [
                {
                    "sequence": 2,
                    "recipients": {
                        "signers": [
                            {
                                "recipientId": 1,
                                "email": "reirealtor@mailinator.com",
                                "name": "REI Realtor",
                                "roleName": "Realtor",
                                "tabs": {
                                    "textTabs": [
                                        {
                                            "tabLabel": "\\*header_address",
                                            "value": "SOME TEST INFO GOES HERE"
                                        },
                                        {
                                            "tabLabel": "Address",
                                            "value": "123 REally Cool St"
                                        }
                                    ]
                                }
                            },
                            {
                                "recipientId": 2,
                                "email": "reibuyer@mailinator.com",
                                "name": "John Doe",
                                "roleName": "Client"
                            }
                        ]
                    }
                }
            ]
        },
        {
            "serverTemplates": [
                {
                    "sequence": 1,
                    "templateId": "47F5C07B-016C-4E6D-B31D-DCEF9AEAAA69"
                }
            ],
            "inlineTemplates": [
                {
                    "sequence": 2,
                    "recipients": {
                        "signers": [
                            {
                                "recipientId": 1,
                                "email": "reirealtor@mailinator.com",
                                "name": "REI Realtor",
                                "roleName": "Realtor",
                                "tabs": {
                                    "textTabs": [
                                        {
                                            "tabLabel": "\\*header_address",
                                            "value": "SOME TEST INFO GOES HERE"
                                        },
                                        {
                                            "tabLabel": "Some Other Tab",
                                                "value": "Populate some text here"
                                        }
                                    ]
                                }
                            },
                            {
                                "recipientId": 2,
                                "email": "reibuyer@mailinator.com",
                                "name": "John Doe",
                                "roleName": "Client"
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "status": "sent"
}

显然,这是行不通的,但是我没有真正得到关于为什么的任何反馈,Docusign只是不回答。我将其范围缩小到第4个签名者

So obviously this doesn't work, but I don't really get any feedback as to why, Docusign just doesn't reply. I have narrowed it down to the 4th signer block

"recipientId": 2,
"email": "reibuyer@mailinator.com",
"name": "John Doe",
"roleName": "Client"

如果我删除此块,它将创建信封并发送,但是我的第二个模板没有签名块。我怀疑我一开始就做错了。

If I remove this block, it creates the envelope and sends it, but then my second template doesn't have a signing block. I suspect I am just doing this all wrong to begin with.

有什么想法吗?

推荐答案

我认为您真正的问题是序列号和id上的数字与字符串。我将在今天晚些时候与您的JSDON一起模拟POST,但这是一个有效的示例,供您同时查看:

I think your real issue is number vs string on sequence and ids. I will mock up a POST with your JSDON later today, but here is a valid sample for you to review in the mean time:

{
        "emailSubject": "Test 3",
        "emailBlurb": "Using two templates from composite template structure",
               "brandId" : "f8c86e34-722e-4360-a9a0-54647bcd3004",
        "status": "created",   
        "compositeTemplates": [{
               "serverTemplates": [{
                       "sequence": "1",
                       "templateId": "6E558133-112C-434E-BF84-7C4DF340F042"
               }],
               "inlineTemplates": [{
                       "sequence": "1",
                       "recipients": {
                              "signers": [{
                                      "email": "David.grigsby@docusign.com",
                                      "name": "David W. Grigsby",
                                      "recipientId": "1",
                                      "roleName": "Role",
                                      "tabs": {
                                             "textTabs": [{
                                                     "value": "David Grigsby",
                                                     "tabLabel": "name"
                                             },
                                             {
                                                     "value": "David",
                                                     "tabLabel": "first_name"
                                             }]
                                      }
                              }]
                       }
               }]
        },
        {
               "serverTemplates": [{
                       "sequence": "2",
                       "templateId": "12C8894E-505C-480F-92FF-245DC387AD34"
               }],
               "inlineTemplates": [{
                       "sequence": "2",
                       "recipients": {
                              "signers": [{
                                      "email": "David.grigsby@docusign.com",
                                      "name": "David W. Grigsby",
                                      "recipientId": "1",
                                      "roleName": "Role",
                                      "tabs": {
                                             "textTabs": [{
                                                     "value": "David W. Grigsby",
                                                     "tabLabel": "name"
                                             },
                                             {
                                                     "value": "Grigsby",
                                                     "tabLabel": "last_name"
                                             }]
                                      }
                              }]
                       }
               }]
        }]
}

这篇关于DocuSign一个包含多个服务器模板的信封的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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