我试图通过自定义演示沙箱帐户中的“电子邮件资源文件”来更改DocuSign为各种事件(即,已完成/无效/已拒绝)发送的电子邮件的内容。我甚至以“发送自定义”的名义创建了一个新品牌并导入了一个示例资源并修改了“SenderEnvelopeComplete(en)”模板。我在我的其余api代码中也使用了brandid但是它显示了我的默认模板我发送文件的所有时间..
当我在我的代码上使用emailblurb并发送文档时,工作正常但我希望通过更改“电子邮件资源文件”中的内容来更改各种事件的整个电子邮件内容。试图看到这个“{{3 “但它对我帮助不大..如果有人给我一个清晰的镜头,这将是非常有帮助的。以下是我试图实现的事情的快照..
有另一个问题要求不确定这一点是否可行,我同时向两个不同的收件人发送同一个文件,是否可以分别为他们发送两个不同的电子邮件内容?
演示docusign沙盒帐户中的品牌屏幕截图:
Can we customize the DocuSign response Email Blurb(Content) at runtime on each envelope?
使用自定义BrandId创建文档的代码:
Signer signer = new Signer();
signer.Name = FormData.InsuredName;
signer.Email = FormData.InsuredEmail;
signer.RecipientId = "1";
// Create a |SignHere| tab somewhere on the document for the recipient to sign
signer.Tabs = new Tabs();
signer.Tabs.SignHereTabs = new List<SignHere>();
signer.Tabs.TextTabs = new List<Text>();
signer.Tabs.CheckboxTabs = new List<Checkbox>();
SignHere signHere = new SignHere();
for (int m = 0; m < 17; m++)
{
Text textHere = new Text();
if (m == 0)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Company/Insured Name";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 122).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top - 4).ToString();
textHere.Required = "false";
}
if (m == 1)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Contract/Account # (if known)";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 146).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 20).ToString();
textHere.Required = "false";
}
if (m == 2)
{
for (int c = 0; c < 2; c++)
{
Checkbox checkHere = new Checkbox();
checkHere.DocumentId = "1";
checkHere.PageNumber = (s + 1).ToString();
checkHere.RecipientId = "1";
if (c == 0)
{
checkHere.TabLabel = "Credit Automatic Payments";
checkHere.Required = "false";
checkHere.XPosition = ((int)extractorCredit.FoundText.Left + 118).ToString();
checkHere.YPosition = ((int)extractorCredit.FoundText.Top + 141).ToString();
}
else
{
checkHere.TabLabel = "Credit Down Payments";
checkHere.Required = "false";
checkHere.XPosition = ((int)extractorCredit.FoundText.Left + 319).ToString();
checkHere.YPosition = ((int)extractorCredit.FoundText.Top + 141).ToString();
}
signer.Tabs.CheckboxTabs.Add(checkHere);
}
}
if (m == 3)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Name on Card";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 82).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 170).ToString();
textHere.Required = "false";
}
if (m == 4)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Credit Card";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 82).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 195).ToString();
textHere.Required = "false";
}
if (m == 5)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Expiration Date";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 85).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 232).ToString();
textHere.Required = "false";
}
if (m == 6)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Expiration Year";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 112).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 232).ToString();
textHere.Required = "false";
}
if (m == 7)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "CVV Code";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 236).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 232).ToString();
textHere.Required = "false";
}
if (m == 8)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Billing Address";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 82).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 257).ToString();
textHere.Required = "false";
}
if (m == 9)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "City";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 82).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 282).ToString();
textHere.Required = "false";
}
if (m == 10)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "State";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 226).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 282).ToString();
textHere.Required = "false";
}
if (m == 11)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Zip";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 303).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 282).ToString();
textHere.Required = "false";
}
if (m == 12)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Name(s)";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 55).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 382).ToString();
textHere.Required = "false";
}
if (m == 13)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Date";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 258).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 382).ToString();
textHere.Required = "false";
}
if (m == 14)
{
SignHere signHereAch = new SignHere();
signHereAch.DocumentId = "1";
signHereAch.PageNumber = (s + 1).ToString();
signHereAch.RecipientId = "1";
signHereAch.TabLabel = "Signature";
signHereAch.XPosition = ((int)extractorCredit.FoundText.Left + 58).ToString();
signHereAch.YPosition = ((int)extractorCredit.FoundText.Top + 410).ToString();
signHereAch.ScaleValue = .6;
signHereAch.Optional = "true";
signer.Tabs.SignHereTabs.Add(signHereAch);
}
if (m == 15)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Contact Phone";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 336).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 432).ToString();
textHere.Required = "false";
}
if (m == 16)
{
textHere.DocumentId = "1";
textHere.PageNumber = (s + 1).ToString();
textHere.RecipientId = "1";
textHere.Locked = "false";
textHere.Font = "Arial";
textHere.FontSize = "4";
textHere.TabLabel = "Email Address";
textHere.XPosition = ((int)extractorCredit.FoundText.Left + 82).ToString();
textHere.YPosition = ((int)extractorCredit.FoundText.Top + 470).ToString();
textHere.Required = "false";
}
signer.Tabs.TextTabs.Add(textHere);
}
envDef.Recipients.Signers.Add(signer);
// set envelope status to "sent" to immediately send the signature request
envDef.EnvelopeIdStamping = "false";
envDef.Status = "sent";
envDef.BrandId = "31682b06-6e7a-4ab6-a13a-c9cd68253389";
//envDef.EmailBlurb = "Hi " + FormData.InsuredName + ",Please review the ***.";
// Use the EnvelopesApi to send the signature request!
EnvelopesApi envelopesApi = new EnvelopesApi();
EnvelopeSummary envelopeSummary = envelopesApi.CreateEnvelope(accountId, envDef);
答案 0 :(得分:2)
是的,您可以设置哪个brand
用于特定信封。来自the docs:
确定信封中使用的brandId的规则
以下规则用于确定信封中使用的brandId:
如果在信封/模板中指定了brandId且该brandId可供该帐户使用,则该信封将使用该品牌。
如果信封中使用了多个模板并且指定了多个brandId,则在整个信封中使用指定的第一个brandId。
如果未指定品牌且发件人属于集团;如果只有一个品牌与集团相关联,则该品牌将用于信封。否则,将使用该帐户的默认签名品牌。
对于不符合任何先前规则的信封,信封中将使用该帐户的默认签名品牌。
通过网络界面设置品牌。请仔细编辑品牌文件!我建议您将您的品牌文件置于源代码管理下并经常签入,这样您就可以在遇到问题时进行回溯。
问:我可以为每位收件人设置不同的邮件吗?
是。 emailblurb
字段用于公共消息。 emailNotification
字段使您可以提供特定于收件人的电子邮件设置。 API字段是一个对象,其字段为: