1

我正在使用使用 Apex 与 force.com 网站集成的 Docusign 演示帐户。我创建了一个模板,想将两个不同的邮件正文发送给两个不同的收件人。我有两个角色代理和经纪人。在代理邮件正文中,我想使用代理收件人姓名。我可以使用 [[Agent_UserName]] 获取主题中的名称,但不能在正文中。有没有办法在邮件正文中使用合并字段。

4

1 回答 1

3

电子邮件正文中不支持合并字段。

这是一个示例CreateEnvelope请求,用于为每个收件人发送唯一的电子邮件主题/正文。您必须为每个收件人添加emailNotification属性

{
  "status": "created",
  "compositeTemplates": [
    {
        "inlineTemplates": [
            {
                "sequence": "1",
                "recipients": {
                    "signers": [
                        {
                            "name": "recipient one",
                            "email": "recipientone@acme.com",
                            "routingOrder": "1",
                            "recipientId" : "1",
                            "roleName" : "texter",
                            "tabs": {
                                "textTabs" : [
                                    {
                                        "xPosition" : "100", "yPosition" : "100", "documentId" : "1","pageNumber" : "1"
                                    }
                                ]
                            },
                            "emailNotification": {
                              "emailSubject": "subject for one",
                              "emailBody": "Body for One",
                              "supportedLanguage": "en"
                            }
                        },
                        {
                            "name": "Jane Doe",
                            "email": "janedoe@acme.com",
                            "routingOrder": "2",
                            "recipientId" : "2",
                            "roleName" : "signer",
                            "tabs": {
                                "signHereTabs" : [
                                    {
                                        "xPosition" : "100", "yPosition" : "200", "documentId" : "1", "pageNumber" : "1"
                                    }
                                ]
                            },
                            "emailNotification": {
                              "emailSubject": "subject for two",
                              "emailBody": "Body for two",
                              "supportedLanguage": "en"
                            }                               
                        }
                    ]
                },
                "documents": [
                {
                    "documentId": "1",
                    "name": "Contract",
                    "fileExtension": "txt",
                    "documentBase64": "RG9jIFRXTyBUV08gVFdP"
                }
              ]
            }
        ]
     }       
  ]
}
于 2017-06-13T15:45:47.423 回答