Im trying to change the contents of the emails that DocuSign sends for various events (i.e., Completed/Voided/Declined) by customizing the "Email Resource File" in the demo sandbox account. I even created a new brand in the name of "Sending Custom" and imported a sample resource and modified the "SenderEnvelopeComplete(en)" template.. I have used the brandid in my rest api code too but it is showing me the default template all the time when i send documents..
When i use emailblurb on my code and send documents,things are working fine but i wish to change the whole email content for various events by changing things in the "Email Resource File".. Tried things seeing this "Can we customize the DocuSign response Email Blurb(Content) at runtime on each envelope?" but it didnt help me much.. It would be really helpful if someone gives me a clear shot on this.. Below is the snapshot for the things i have tried to achieve that..
Having another question to ask not sure whether this point is possible,im sending the same document to two different recipients at the same time and is that possible to send two different email contents for them respectively?
Screenshots of Branding in demo docusign sandbox account:
Code for creating documents using custom 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);