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

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

Related

Apex Toolkit How to Create Embedded Signing Session for Contact that Isn't Logged in

We are using the DocuSign Apex Toolkit. We have a scenario where a sales representative is logged into Salesforce and is working with an in-person contact to fill out an application. Once they fill out the required fields in the application we would like to create an embedded signing session for the contact to sign a document.
I am following the instructions for Embedded Signing using the toolkit. I see that we have to create an embedded signer using the following method dfsle.Recipient.newEmbeddedSigner(). We have found that when we start the signing session the first recipient is always the user that is logged in. Instead, we need the recipient to be the contact related to the application. Is there any way to start an embedded signing session for the contact?
See code example below. You can replace the myContact.Email and myContact.Name with whatever you need to achieve your objective.
public class ApexToolkitDemo {
public static void sendEnvelopeMethod() {
Id mySourceId; // The ID of the initiating Salesforce object.
// Create an empty envelope.
dfsle.Envelope myEnvelope = dfsle.EnvelopeService.getEmptyEnvelope(
new dfsle.Entity(mySourceId));
// The initiating Salesforce entity.
// Use myEnvelope for later
// Use a Salesforce contact record as a Recipient here
Contact myContact = [SELECT Id, Name, Email FROM Contact LIMIT 1];
// Use the Recipient.fromSource method to create the Recipient
dfsle.Recipient myRecipient = dfsle.Recipient.fromSource(
myContact.Name, // Recipient name
myContact.Email, // Recipient email
null, // Optional phone number
'Signer 1', // Role Name. Specify the exact role name from template
new dfsle.Entity(myContact.Id)); // Source object for the Recipient
// Add Recipient to the Envelope
myEnvelope = myEnvelope.withRecipients(new List<dfsle.Recipient> { myRecipient });

add new template role to existing docusign envelope with status 'sent'

I'm trying to implement embeded signing using docusign, where we have two template roles. I know one of them initialy. So I'm creating an new envelope with the known role. After he signs I need to update the existing envelope with the second template role, I'm unable to do so.
This is how I'm doing it:
envDef = new (docusign.EnvelopeDefinition)
assigneeRole = new (docusign.TemplateRole)
assigneeRole.setRoleName templateRoleNames[1]
assigneeRole.setName assignee.fullName
assigneeRole.setEmail assignee.email
assigneeRole.setClientUserId assignee.id
# create a list of template roles and add our newly created role
templateRolesList = [assigneeRole]
# assign template role(s) to the envelope
envDef.setTemplateRoles templateRolesList
envelopesApi = new (docusign.EnvelopesApi)
await envelopesApi.update accountId, envelopeId, envDef, {advanced_update: 'true'}, defer(err, envelopeUpdateSummary, response)
if err
next err
return
If the existing recipient (from the template) is the last recipient, then after that recipient signs, the envelope will (very) quickly become complete.
So you need to update the recipients before the first recipient has signed. Try EnvelopeRecipients::create
You should also add a tab for the new recipient, else she will need to manually add a signing tab which is not a good user experience.
Another idea is to create the template with a dummy signer (whose email goes to a black hole email). Then update the envelope to correct the second signer' information.

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

Update Sales Force DB with Docusign Envelope ID using Docusign API

Team,
I'm using the demo version of docusign API in my web application (test),
I have updated the connect functionality to connect to the salesforce in the demo account that i have. I need to understand how can I update the envelope status to sales force for the opportunity Im writing the contract for.
Steps
1 The user logs into our website
2 Clicks the DocuSign link (i call the demo API to show the docusign website in an IFrame)
3 The user is an Opportunity in salesforce
3 Depending upon the User response I show a final message page.
need to do.
Apart form the mails i receive, I want to update the docusign section for that user(oppurtinuity) in sales force. Our salesforce database is connected to the docusign.
Please do let me know if you need any other details. Appreciate your help.
Just add the following code:
envelopeInfo.CustomFields = new CustomField[] {
new CustomField {
Name = "##SFAccount",
Value = account.Id,
Show="",
Required=""
},
new CustomField {
Name = "##SFContract",
Value = contact.Id,
Show="",
Required=""
},
new CustomField {
Name = "##SFOpportunity",
Value = opportunity.Id,
Show="",Required=""
}
};

Resources