Docusign使用一对一的文档到签名者映射将多个信封发送到多个签名者 [英] Docusign Send Multiple Envelope to multiple Signer with one to one Document to Signer mapping

查看:150
本文介绍了Docusign使用一对一的文档到签名者映射将多个信封发送到多个签名者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在从事Salesforce到Docusign集成的工作。我为每个文档有多个带有特定签名者的文档,即应将一个文档发送给一个特定的用户,而不是全部发送给。但是我想在一个对docusign的Rest API调用中做到这一点!这些文档存储在为每个用户特定的用户动态创建的帐户附件中。



我一直在尝试使用 CompositeTemplates ,我正在做的是在每个 inlineTemplate 中添加文档和签名者,但是它会将所有文档按顺序发送给所有用户。
我不想向所有用户显示所有文档,他们应该只看到特定于他们的文档。



下面是我要发送的JSON:

  {
status:已发送,
compositeTemplates:[
{
inlineTemplates:[
{
sequence: 1 ,
收件人:{
签名者:[
{
roleName:签名者1,
recipientId: 1,
name: Anmol,
email: test@gmail.com
}
]
},
信封: {
status:已发送,
emailSubject: test1
},
documents:[
{
name : 文档1,
的fileExtension: 文档,
的documentId: 1,
的documentBase64: + JVBERi0xLjQKJeLjz9MKN58HkeCg8gJEomcWGJdEFtOYYklsXV2dlT6R6Owc FXFMNSlpckKM6M / ioTGkROkEjkxBDrgthySkvMxGpQJYapHKWwcwXtRU9GCg ==
}
],
customFields:{
listCustomFields:[
{
value: 00128000003tPKB,
show: true,
必填: false,
名称:帐户,
fieldId: 1,
configurationType: salesforce
}
]
}
}
],
compositeTemplateId: 1
},
{
inlineTemplates:[
{
sequence: 1,
收件人:{
签名人:[
{
roleName:签名者2,
recipientId: 1,
名称: Anmol,
电子邮件: test1@gmail.com
}
]
},
信封:{
status:已发送,
emailSubject: test2
},
documents:[
{
name: Doc 2,
fileExtension: doc ,
documentId: 2,
documentBase64: JVBERi0xLjYNJeLjz9MNCjEzIDAgb2JqDTw8L0xpbmVhcmlmDQoxMTYNCiUlRU9GDQo =
}
],
listCustomFields:[
{
value: 00128000003tPKB,
show: true,
required: false,
name:帐户,
fieldId: 1,
configurationType:销售人员
}
]
}
}
],
compositeTemplateId: 2
}
]
}

任何有关我遵循的方法的文档,代码或建议都将非常有帮助。


解决方案

要在单个api调用中完成,请指定排除的文档属性 nofollow noreferrer> EnvelopeCreate 请求


excludedDocuments :指定不可见的文档收件人。必须为该帐户启用文档可见性,并且必须将该文件的EnforcerSignerVisibility属性设置为true才能使用该信封。


POST / v2 / accounts / {accountId} / envelopes



的示例Json注意:我已经合并了将您的所有内联模板都整合到一个 inlineTemplate中。

  {
status:已发送,
emailSubject:电子邮件受所有收件人,
emailBlurb:向所有收件人发送电子邮件正文,
compositeTemplates:[
{
inlineTemplates:[
{
序列: 1,
收件人:{
签名者:[
{
recipientId: 1,
名称:收件人之一,
email: recipientone@dsxtr.com,
excludedDocuments:[ 2]
},
{
recipientId: 2,
name:收件人二,
email: recipienttwo@dsxtr.com,
excludedDocuments:[ 1 ]
}
]
},
文档:[
{
name: Doc 1,
fileExtension: doc,
documentId: 1,
documentBase64:
},
{
name: Doc 2,
fileExtension: doc,
documentId: 2,
documentBase64:
}
]
}
],
compositeTemplateId: 1
}
]
}


I have been working on Salesforce to Docusign Integration. I have multiple documents with Specific signer for each document i.e. one document should be send to one specific user, not all. But I want to do this in one Rest API call to docusign! The documents are stored in Accounts attachments which are created dynamically for each user which are specific to user.

I have been trying this using CompositeTemplates, what I am doing is, adding document and Signer in each inlineTemplate, But it is sending all the documents to all the users in sequence. I don't want to show all document to all the user, they should see only document specific to them.

Below is the JSON which I am sending:

{
  "status": "Sent",
  "compositeTemplates": [
    {
      "inlineTemplates": [
        {
          "sequence": "1",
          "recipients": {
            "signers": [
              {
                "roleName": "Signer 1",
                "recipientId": "1",
                "name": "Anmol",
                "email": "test@gmail.com"
              }
            ]
          },
          "envelope": {
            "status": "Sent",
            "emailSubject": "test1"
          },
          "documents": [
            {
              "name": "Doc 1",
              "fileExtension": "doc",
              "documentId": "1",
              "documentBase64": "JVBERi0xLjQKJeLjz9MKN58HkeCg8gJEomcWGJdEFtOYYklsXV2dlT6R6Owc+FXFMNSlpckKM6M/ioTGkROkEjkxBDrgthySkvMxGpQJYapHKWwcwXtRU9GCg=="
            }
          ],
          "customFields": {
            "listCustomFields": [
              {
                "value": "00128000003tPKB",
                "show": "true",
                "required": "false",
                "name": "Account",
                "fieldId": "1",
                "configurationType": "salesforce"
              }
            ]
          }
        }
      ],
      "compositeTemplateId": "1"
    },
    {
      "inlineTemplates": [
        {
          "sequence": "1",
          "recipients": {
            "signers": [
              {
                "roleName": "Signer 2",
                "recipientId": "1",
                "name": "Anmol",
                "email": "test1@gmail.com"
              }
            ]
          },
          "envelope": {
            "status": "Sent",
            "emailSubject": "test2"
          },
          "documents": [
            {
              "name": "Doc 2",
              "fileExtension": "doc",
              "documentId": "2",
              "documentBase64": "JVBERi0xLjYNJeLjz9MNCjEzIDAgb2JqDTw8L0xpbmVhcmlmDQoxMTYNCiUlRU9GDQo="
            }
          ],
          "customFields": {
            "listCustomFields": [
              {
                "value": "00128000003tPKB",
                "show": "true",
                "required": "false",
                "name": "Account",
                "fieldId": "1",
                "configurationType": "salesforce"
              }
            ]
          }
        }
      ],
      "compositeTemplateId": "2"
    }
  ]
}

Any doc, code or suggestions about the approach I am following for this will be very helpful.

解决方案

To do it in a single api call, specify the excludedDocuments property in the EnvelopeCreate request

excludedDocuments: Specifies the documents that are not visible to the recipient. Document Visibility must be enabled for the account and the enforceSignerVisibility property must be set to true for the envelope to use this.

Here is a sample Json for POST /v2/accounts/{accountId}/envelopes

Note: I have combined both your inline templates into a single inlineTemplate.

{
  "status": "Sent",
  "emailSubject": "Email Subject to all recipients",
  "emailBlurb": "Email body to all recipients",
  "compositeTemplates": [
    {
        "inlineTemplates": [
            {
                "sequence": "1",
                "recipients": {
                    "signers": [
                        {
                            "recipientId": "1",
                            "name": "recipient one",
                            "email": "recipientone@dsxtr.com",
                            "excludedDocuments": [ "2" ]
                        },
                        {
                            "recipientId": "2",
                            "name": "recipient two",
                            "email": "recipienttwo@dsxtr.com",
                            "excludedDocuments": [ "1" ]
                        }
                    ]
                },
                "documents": [
                    {
                        "name": "Doc 1",
                        "fileExtension": "doc",
                        "documentId": "1",
                        "documentBase64": ""
                    },
                    {
                        "name": "Doc 2",
                        "fileExtension": "doc",
                        "documentId": "2",
                        "documentBase64": ""
                    }
                ]
            }
        ],
        "compositeTemplateId": "1"
    }
   ]
}

这篇关于Docusign使用一对一的文档到签名者映射将多个信封发送到多个签名者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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