我正在使用Docusign的模拟账户,使用Apex与force.com网站集成。 我创建了一个模板,并希望将两个不同的邮件正文发送给两个不同的收件人。我有两个角色Agent和Broker。 在Broker邮件正文中,我想使用代理收件人名称。我可以使用[[Agent_UserName]]获取主题中的名称,但不能在正文中获取。有没有办法在Mail正文中使用合并字段。
答案 0 :(得分:2)
以下是每个收件人发送唯一电子邮件主题/正文的示例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"
}
]
}
]
}
]
}