尝试从模板创建信封时遇到问题。我无法为模板角色添加身份验证选项,如果我是从模板创建的,我无法使用收件人(我可以添加身份验证选项)。
{
"status": "sent",
"emailBlurb": "testing creation from template",
"emailSubject": "Please sign this template",
"templateId": "3f35473e-884a-4jf2-a9b5-19eahc4a9b8f",
"templateRoles": [{
"name": "Lllll",
"email": "l@someplace.com",
"roleName": "Signer 1",
"clientUserId": "1000",
"inPersonSignerName": "John Jay",
"routingOrder": "1",
"requireIdLookUp": "true",
"idCheckConfigurationName": "SMS Auth $",
"smsAuthentication": {
"senderProvidedNumbers": ["+376636355"]
}}, {
"name": "Jjj",
"email": "j@someplace.com",
"roleName": "Signer 2",
"clientUserId": "2000",
"routingOrder": "2"
}, {
"name": "Zzzzzz",
"email": "z@someplace.com",
"roleName": "Signer 3",
"clientUserId": "3000",
"routingOrder": "3"
}
],
"customFields": {
"textCustomFields": [{
"value": "3489y333n",
"required": "false",
"show": "false",
"name": "##SFContract"
}
]
},
"eventNotification": {
"RecipientEvents": [{
"recipientEventStatusCode": "Completed"
}, {
"recipientEventStatusCode": "sent"
}, {
"recipientEventStatusCode": "delivered"
}, {
"recipientEventStatusCode": "declined"
}
],
"EnvelopeEvents": [{
"envelopeEventStatusCode": "Delivered"
}, {
"envelopeEventStatusCode": "completed"
}, {
"envelopeEventStatusCode": "sent"
}, {
"envelopeEventStatusCode": "Declined"
}
]
},
}
'
这会创建信封,但不会显示身份验证屏幕。
有解决方法吗?您是否能够从模板创建信封并添加身份验证?我一直认为复合模板可能会有所帮助,但文档和示例很少。
谢谢!
答案 0 :(得分:1)
您必须使用CompositeTemplates,这样可以在从模板创建信封时提供更大的灵活性。
以下示例应该有效。链接到documentation
POST / v2 / accounts / {accountId} / envelope
{
"status": "sent",
"emailBlurb": "testing creation from template",
"emailSubject": "Please sign this template",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "3f35473e-884a-4jf2-a9b5-19eahc4a9b8f"
}
],
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"name": "Lllll",
"email": "l@someplace.com",
"roleName": "Signer 1",
"recipientId": "1",
"clientUserId": "1000",
"inPersonSignerName": "John Jay",
"requireIdLookUp": "true",
"idCheckConfigurationName": "SMS Auth $",
"smsAuthentication": {
"senderProvidedNumbers": [ "+376636355" ]
}
},
{
"name": "Jjj",
"email": "j@someplace.com",
"roleName": "Signer 2",
"clientUserId": "2000",
"routingOrder": "2",
"recipientId": "2"
},
{
"name": "Zzzzzz",
"email": "z@someplace.com",
"roleName": "Signer 3",
"clientUserId": "3000",
"routingOrder": "3",
"recipientId": "3"
}
]
},
"customFields": {
"textCustomFields": [
{
"value": "3489y333n",
"required": "false",
"show": "false",
"name": "##SFContract"
}
]
},
}
]
}
],
"eventNotification": {
"RecipientEvents": [
{ "recipientEventStatusCode": "Completed" },
{ "recipientEventStatusCode": "sent" },
{ "recipientEventStatusCode": "delivered" },
{ "recipientEventStatusCode": "declined" }
],
"EnvelopeEvents": [
{ "envelopeEventStatusCode": "Delivered" },
{ "envelopeEventStatusCode": "completed" },
{ "envelopeEventStatusCode": "sent" },
{ "envelopeEventStatusCode": "Declined" }
]
}
}
答案 1 :(得分:0)
使用@CodingDawg的答案作为基础(谢谢),我让JSON像这样工作:
{
"status": "sent",
"emailBlurb": "testing creation from template",
"emailSubject": "Please sign this template",
"compositeTemplates": [{
"serverTemplates": [{
"sequence": "1",
"templateId": "3f35423e-884a-4bf2-a9b5-19eaac4a5b8f"
}
],
"inlineTemplates": [{
"sequence": "1",
"recipients": {
"inPersonSigners": [{
"name": "LLLLL",
"email": "LLLL@some.com",
"hostemail": "LLLLL@some.com",
"hostname": "LLLLLL",
"roleName": "Signer 1",
"recipientId": "1",
"clientUserId": "1000",
"signerName": "John Signer",
"signerEmail": "jsigner@ds.com",
"requireIdLookUp": "true",
"idCheckConfigurationName": "SMS Auth $",
"smsAuthentication": {
"senderProvidedNumbers": ["+34676363577"]
}
}
],
"signers": [{
"name": "VVVVVVV",
"email": "v@onecompany.com",
"roleName": "Signer 2",
"clientUserId": "2000",
"routingOrder": "2",
"recipientId": "2"
}, {
"name": "ZZZZZ",
"email": "z@onecompany.com",
"roleName": "Signer 3",
"clientUserId": "3000",
"routingOrder": "3",
"recipientId": "3"
}
]
},
"customFields": {
"textCustomFields": [{
"value": "8009E0000006Qu5QAJ",
"required": "false",
"show": "false",
"name": "##SFContract"
}
]
},
}
]
}
],
"eventNotification": {
"RecipientEvents": [{
"recipientEventStatusCode": "Completed"
}, {
"recipientEventStatusCode": "sent"
}, {
"recipientEventStatusCode": "delivered"
}, {
"recipientEventStatusCode": "declined"
}
],
"EnvelopeEvents": [{
"envelopeEventStatusCode": "Delivered"
}, {
"envelopeEventStatusCode": "completed"
}, {
"envelopeEventStatusCode": "sent"
}, {
"envelopeEventStatusCode": "Declined"
}
]
}
}
这将为您提供一个模板和SMS Auth。
的信封这个JSON的问题在于,在完成路由命令的第一部分后,第二个和第三个签名者没有收到他们的电子邮件。 I've asked another question about that
由于