Preserving Email Subject & Email Message from actual Template when sending via Custom Button in Salesforce - docusignapi

I would like to preserve the Email Subject & email Message that are defined on the Docusign Template and send those vs sending generic email subject & message when sending a document via Custom Button in Salesforce? Below is my button code
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
var DST='<Docusign Template Id>';
var LA='0';
var OSO = 'Send';
var CRL = 'Email~{!Fulfillment__c.Primary_Contact_Email__c};Role~Client;FirstName~ {!Fulfillment__c.Primary_Contact_First_Name__c};LastName~{!Fulfillment__c.Primary_Contact_Last_Name__c}';
var CCRM='Client~Client';
window.location.href = '/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID='+eSignatureNotSent.Id+'&DST='+DST+'&LA='+LA+'&CRL='+CRL+'&OCO='+OCO+'&CCRM='+CCRM;
I think Docusign is using Default Email Subject and Default Email Message defined in the Admin settings in Salesforce. I do not want to send it as all the work is done when building templates in Docusign.

If you leave the Default Email Message blank in the Admin settings, it will grab the contents of the Template Email Message.
The API has a hard requirement to define an email subject through the request. Currently because Salesforce uses the API, it has to follow this guideline.
My best advice is making a custom button that defines the Email subject that you'd like for each workflow that you may have.

Related

DocuSign how to customize name and company for each envelope without create users?

Is that possible to customize name and company name for each envelope without create all users? or even just hide it?
If this is not possible, what is the recommendations for the following scenario?
We have 5,000 users, they are from different companies(different email domain)
User purchase points on our system, and they use points to buy eSign envelope
We don't want to create 5,000 users under our DocuSign account (not only adding them, we also don't want them to have account to login to DocuSign and create envelope without pay us.
We like to show their name and company in highlight area below
We are OK the email send to the singer is from DocuSign
What you show is the name and company of the sender, the account holder, the person who initiated the request to sign. Not the signer, the person who needs to act on it. Hope this is clear.
You can change the name and company name of the sender/company account programmatically, and then send the next envelope.
However, if you want to do something like this, you won't be able to use bulk send, because it doesn't allow you to make the change between each envelope.
You can run a loop that does this:
Change name/company
Create envelope
Send envelope
Doing this 5000 times also has an issue with API limit (default to 3000/hour) so you will either have to throttle this or contact support to increase your limit
Changing the name of the account holder can be done like this:
Here is C# code for this:
var apiClient = new ApiClient(basePath);
// You will need to obtain an access token using your chosen authentication method
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
UsersApi usersApi = new UsersApi(apiClient);
UserProfile userProfile = new UserProfile();
userProfile.UserDetails = new UserInformation();
userProfile.UserDetails.FirstName = "Inbar";
userProfile.UserDetails.LastName = "Gazit";
usersApi.UpdateProfile(accountId, userId, userProfile);
You can find all other langs and more details here - https://www.docusign.com/blog/developers/common-api-tasks-update-the-name-docusign-user

Anonymous register an account, will send mail to notify the person in charge

I have facing some difficulty on changing principal : as "Anonymous" in the email during sending an email.
My system is an online system that allow user to register their account, then Admin will just need to click the register button to register their staff in their organization.
For my understanding, Anonymous is a default account in domino system for "outsider" whoever accessing their server / website.
below is my sample coding:
var web = setdoc.getItemValueString("InternetAddress");
var maildoc:NotesDocument = database.createDocument()
maildoc.replaceItemValue("Form", "Memo");
maildoc.replaceItemValue("Subject","Request for Email Account By Applicant);
session.setConvertMime(false);
var stream = session.createStream();
stream.writeText("<html><body>");
stream.writeText("<p>Dear " + "department reviewer" + ",</p>");
stream.writeText('<p>Kindly review this request by '+document1.getItemValueString('Name')+" on "+I18n.toString(#Today(), 'dd/MM/yyyy')+ ",</p>");
stream.writeText("</body></html>");
var body = maildoc.createMIMEEntity("Body");
body.setContentFromText(stream, "text/html;charset=UTF-8", 1725);
stream.close();
maildoc.closeMIMEEntities(true);
session.setConvertMime(true);
maildoc.replaceItemValue("SendTo",document1.getItemValue("Dep_rev"));
maildoc.send();
Attached will be sample photo of my email:
Is there any way to change the Anonymous name to other name?
You are using the current session to send the mail. Therefore the sender is anonymous.
You have several options:
Use sessionAsSigner to get hold of the database and create your mail document from there. This should change the sender
Set the From and Principal fields to the name of the sender. You must include the Domino domain name at the end of the Principal field (sender#company.com#dominodomain)
Set the From and Principal fields and copy the mail directly to mail.box on the server.

Docusign use replyEmailAddressOverride to send signed docs to a different recipient

My company is trying to avoid having many Docusign logins for the group (group X) using Docusign. We were wondering about using one login to do the create, but override the email settings to have it go to members of group X without them having to have Docusign credentials. I was wondering if that would be possible with the replyEmailAddressOverride.
You can do so by using the "Send On Behalf Of" feature where you specify an email address in the authentication header in order to "assign" each transaction to a specific person with the same and unique credentials.
{
"Username": "",//Email of Group X credentials
"Password": "", // Password of Group X credentials
"IntegratorKey": "",// Integrator Key of Group X credentials
"SendOnBehalfOf": "" // Email of the specific person to be assigned the DocuSign transaction
}
If I understand your question correctly, I am not sure that using the replyEmailAddressOverride feature will accommodate what you need.
From the official documentation, this email will be used when the user decided to "reply" to the email sent from DocuSign.
Example in C# below :
EmailSettings settings = new EmailSettings
{
ReplyEmailAddressOverride = "otherUserThanTheSende#fakeemail.com",
ReplyEmailNameOverride = "Other User"
};
envelope.EmailSettings = settings;
If you configure the above email settings, when the signer receives the DocuSign email inviting him to initiate the signing ceremony, if he/she decides to reply to this email, the original DocuSign sender email will not be used but instead the email you have configured will be used.
Example, my "Frederic "account was used to create a transaction so the sender appears as "Frederic" in the DocuSign email. However, when I decide to reply, it doesn't go back to "Frederic" but instead to the user I have configured in the envelope :
But if I understand correctly, you want to send a transaction from a specific sender and this email override setting doesn't affect the transaction sender but the transaction reply.
If you want to use replyEmailAddressOverride and replyEmailNameOverride as present in DS Docs then when an email goes to the signer from DocuSign and if they want to revert to that email then it will go the email which is mentioned in replyEmailAddressOverride property

Docusign Custom button throws Invalid email address error for correct email

I have a custom button in Salesforce that has the javascript code to generate the docusign parameter with template id and recipient list CRL. And using demo docusign account for testing purpose. Here, am using docusign Salesforce Connect and not API.
Eventhough my email address is correct, when I click on the docusign custom button, I am getting an error message as follows,
Error: Incorrect email address format. Verify the email address or
contact your administrator for the correct format
But the docusign param generated values are correct for the email address,
https://dsfs.cs62.visual.force.com/apex/DocuSign_CreateEnvelope?
CES=Medical+Release+Form.pdf&
RES=0%2C0%2C0%2C0%2C0%2C0&
DST=E1377257-80EB-4F3D-A046-A1D033CBD4F5&
DSEID=0&
LA=0&
SourceID=5005C000000UNG1&
CEM=Please+sign+the+forms+given&
OCO=Send&
CRL=Email~+kamatchidevi%40mstsolutions.com%3BLastName~+test+doc+%3BRole~Signer1
Thanks & Regards,
Kamatchi Devi
The + signs are causing the issue here, there is also no need to encode it yourself as it's done by the manage package into the URL. However, if you are going to URL encode I would recommend doing the entire string, like so
CRL = encodeURIComponent('Email~kamatchidevi#mstsolutions.com;LastName~test doc;Role~Signer1')

Not received email using dialog "Save your Copy" in "In Person" signing

Not received email that was typed in textbox "Email Address" using dialog "Save your Copy" in "In Person" signing.
While signing the envelope in In-Person mode there is an window (popup) to send a copy of the document in an email. We have entered the email (many times and different email services) but no email received. Checked settings in the DocuSign portal account but not able to find any setting for this. Please let us know how to enable the save a copy email in DocuSign.
We using DocuSign SOAP API under C#.
For InPererson Recipient we add :
new Recipient
{
Email = "email of host recipient",
UserName = "name of host recipient",
SignerName = "name of current recipient",
ID = "id current recipient",
Type = RecipientTypeCode.InPersonSigner,
RoutingOrder = 2,
RequireIDLookup = false,
CaptiveInfo =
new RecipientCaptiveInfo {ClientUserId = "special id of current recipient"}
};
And we open docusign token url (RequestRecipientToken method) in new browser window without iframe we open it in IE 8-11 and Google Chrome
What we have to specify in addition to this , when creating and sending envelope or in account preferences of main account in docusign.com?
First, keep in mind that the email you're describing will only be sent upon Completion of the Envelope -- so if there are other recipients after the In-Person signer in the routing order for the Envelope, the In-Person signer wouldn't receive the email until all recipients have completed their required actions and the Envelope is complete.
Second, you might want to verify (in Preferences >> Features within the DocuSign web console) that these two settings are set as shown here:
These settings control whether or not emails are sent to "embedded/captive" recipients. Even though you're using "In-Person" signing -- it sounds like you're launching the host's signing session using "Embedded Signing" (i.e., RequestRecipientToken), so these settings might be affecting whether or not the email actually gets sent to the signer.

Resources