【发布时间】:2020-06-06 06:20:01
【问题描述】:
我正在使用复合模板,因为我需要在信封中包含多个模板。在所有模板中,签名角色都是相同的。我有以下角色和签名顺序。
当我创建信封时,我还需要为每个角色提供自定义电子邮件主题和正文。
这是我使用复合模板创建信封的请求 json。故意将第二个复合模板部分留空,以免它太大。
{
"status": "created",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "de231abb-4566-4433-8c10-6fae41d5f36e"
}
],
"inlineTemplates": [
{
"envelope": {
"customFields": {
"textCustomFields": [
{
"name": "policy",
"value": "12345"
}
]
}
},
"sequence": "1",
"recipients": {
"carbonCopies": [
{
"recipientId": "1",
"email": "email2@domain.com",
"name": "Supervisor Name",
"roleName": "Supervisor",
"routingOrder": "2",
"emailNotification": {
"supportedLanguage": "en",
"emailSubject": "Custom email subject for supervisor",
"emailBody": "Custom email body for supervisor"
}
},
{
"recipientId": "2",
"email": "email1@domain.com",
"name": "Admin Name",
"roleName": "Admin",
"routingOrder": "4",
"emailNotification": {
"supportedLanguage": "en",
"emailSubject": "Custom email subject for admin",
"emailBody": "Custom email body for admin"
}
}
],
"signers": [
{
"recipientId": "3",
"email": "email3@domain.com",
"name": "Data entry person Name",
"roleName": "DataEntry",
"routingOrder": "1",
"emailNotification": {
"supportedLanguage": "en",
"emailSubject": "Custom email subject for data entry person",
"emailBody": "Custom email body for data entry person"
},
"tabs": {
"textTabs": [
{
"tabLabel": "field name",
"value": "field value"
}
]
}
},
{
"recipientId": "4",
"email": "email4@domain.com",
"name": "client Name",
"roleName": "Client",
"routingOrder": "3",
"emailNotification": {
"supportedLanguage": "en",
"emailSubject": "Custom email subject for the client",
"emailBody": "Custom email body for the client"
},
"tabs": {
"textTabs": [
{
"tabLabel": "other field name",
"value": "other value"
},
{
"tabLabel": "other2 field name",
"value": "other2 value"
}
]
}
}
]
}
}
]
},
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "de231abb-4566-4433-8c10-6fae41d5f36e"
}
],
"inlineTemplates": [
{
.
- repeat same recipient information again
.
}
]
}
]
}
当我准备信封创建请求 json 时,我必须为我需要包含的每个模板创建一个 CompositeTemplate。在 compositeTemplates[x]/inlineTemplates[0]/recipients 中,我为所有 4 个收件人指定了信息(姓名、电子邮件、角色名称、routingOrder、电子邮件主题、电子邮件正文和选项卡,如果适用)。我必须在 CompositeTemplate 中重复相同的 compositeTemplates[x]/inlineTemplates[0]/recipients ,其中包含重复的信息(姓名、电子邮件、角色名称、routingOrder、电子邮件主题、电子邮件正文),这对我来说听起来不正确。
问题#1 -你知道有没有办法在一个地方提供收件人而不是在每个 CompositeTemplate 下复制它?
我的下一个问题是关于从不同的角度证明收件人和标签信息。在 inlineTemplates 下的 Composite 模板中,我必须使用 EnvelopeRecipients 来指定收件人及其选项卡。在这种情况下,我需要知道每个收件人/角色的签名权限,因为我需要将它们放在签名者、corbonCopy 等之下。如果是带有单个模板的信封,我可以轻松地在 EnvelopDefinition 下使用templateRole 来指定收件人及其标签信息按角色。我不需要知道角色的签名权限。
问题#2 – 有没有办法在 CompositeTemplate 中按角色指定收件人信息,而无需像使用单个模板信封那样知道签名权限?
【问题讨论】:
-
在下面回答。如果有帮助,请务必支持并接受。周五快乐
标签: docusignapi