DocuSign Apex API: Add sign here and date tabs - docusignapi

I have implemented Docusign's embedded signing using the apex toolkit for docusign. I have stored my document to be signed in Documents object. I want to add the sign here tab to the document and then send it to docusign. ANy ideas on how can I achieve this?
Below is the code i've used to generate the envelope. I need to add the sign here tab to the envelope:
Id mySourceId = '0012v00002WathI';
Id myDocumentId = '0692v00000AF1yP';
dfsle.Envelope myEnvelope = dfsle.EnvelopeService.getEmptyEnvelope(
new dfsle.Entity(mySourceId)) // The initiating Salesforce entity.
.withDocuments(dfsle.DocumentService.getDocuments(
ContentVersion.getSObjectType(),
new Set<Id> {
myDocumentId
}))
.withRecipients(new List<dfsle.Recipient> {
dfsle.Recipient.newEmbeddedSigner(),
});
myEnvelope = dfsle.EnvelopeService.sendEnvelope(
myEnvelope, // The envelope to send
true); // Send now?

I may be wrong but from what I remember when working with the apex toolkit it does not allow you to add tags to documents through Apex. I'm pretty sure what you have there should work and when you initiate the embedded signing process you will get to choose where the sign tags go. You could set up a template for this document to decide where the tags go beforehand (which is useful if you send the same document often) for how to add documents with templates to envelopes see this page at step 3. The toolkit documentation isn't very clear so you may want to watch a demo to see how the whole process works like this one. Hope this helps.

Related

eSignature create envelope using API and activate the Send UI for manual tagging

I have created a web based application that allows for authentication and JWT impersonation. I can send a collection of documents and specify signers/recipients all just fine. I am trying to figure out how to get the DocuSign UI to open so the document signature and initials tags can be manually adjusted before the envelope is actually sent.
I have read through the SDK documentation and the QuickStart examples and since I am not using composer, I am not following the basic structures on how to call this UI. Are there any overly simplified code examples that show this process via API calls only and not utilizing a framework, just straight PHP?
Thank you in advance on this...
-greg
You are trying to use embedded sending and there's an [article you can][1] see on how to do that.
Here is the PHP code to get a URL back that you can use to embed the tagging of your envelope in your application:
Create sender view
$view_request = new \DocuSign\eSign\Model\ReturnUrlRequest(['return_url' => $args['ds_return_url']]);
$config = new \DocuSign\eSign\Configuration();
$config->setHost($args['base_path']);
$config->addDefaultHeader('Authorization', 'Bearer ' . $args['ds_access_token']);
$api_client = new \DocuSign\eSign\client\ApiClient($config);
$envelope_api = new \DocuSign\eSign\Api\EnvelopesApi($api_client);
$results = $envelope_api->createSenderView($args['account_id'], $envelope_id, $view_request);
# Switch to the Recipients / Documents view if requested by the user in the form
$url = $results['url'];
if ($args['starting_view'] == "recipient") {
$url = str_replace('send=1', 'send=0', $url);
}
return ['envelope_id' => $envelope_id, 'redirect_url' => $url];
}
Note: send=0 or send=1 specifies which page, the recipients selection or tagger is shown to your users first.
[1]: https://developers.docusign.com/docs/esign-rest-api/how-to/embedded-sending/

user can not sign because there’s no URL created and sent to us from Docusign

We are receiving the following error when I try to create a recipient view. Basically the document is sent to 2 users, one of them has already signed but the other user can not sign because there’s no URL created and sent to us from Docusign. We are using node.js docusign sdk.
var recipientView = new docusign.RecipientViewRequest();
recipientView.setReturnUrl();
recipientView.setUserName();
recipientView.setEmail(;
recipientView.setAuthenticationMethod("email");
recipientView.setClientUserId();
var envelopesApi = new docusign.EnvelopesApi();
envelopesApi.createRecipientView(accountId, envelope.id, recipientView,
function(error, viewUrl, response) {
// no url is returned here.the error (in the image) is shown
});
I printed the values of accountId, envelopeId and those seemed to be fine.I checked if the user had changed his first name, last name and there were no errors there. If I create a new user from scratch everything works fine.
FrontEnd Error
Response Error
Through your screenshots it looks like you are getting an UKNOWN_ENVELOPE_RECIPIENT error returned from the API. This means the recipient data you are sending to identify the recipient is not correct. It needs to exactly match the data you assigned to the recipient when you added them to the envelope, such as name, email, recipientId, and clientUserId.
Try calling the EnvelopeRecipients: List API before you make the request to generate the URL and ensure that the recipient data matches what you are sending in your createRecipientView() request. That should help identify which piece of data is off, once you correct that the call will then start returning the proper URL.
Also see the Embedded Signing features page in the DocuSign Developer Center which shows exactly which params you need to set etc:

Remove Envelope ID Stamping - Sandbox

Is it possible to remove the Envelope Id Stamping from dev/sandbox environment? The following still results in a pdf with the envelope id. I also see no option under Preferences >> etc, etc as other posts mention to remove this. Not possible in Sandbox?
{
// extra props removed
envelopeIdStamping : false,
}
thanks,
-mike
This is an admin setting that you can reach out to DocuSign support to have them enable/disable in your account.

DocuSign: Use API to send signing requests and signing this document automatically myself

I using the default envelope creation to request a signature like:
\"recipients\":{
\"signers\":[
{
\"email\":\"$email\",
\"name\":\"$name\",
\"recipientId\":\"1\",
\"tabs\":{
\"signHereTabs\":[
{
\"documentId\":\"1\",
\"xPosition\":\"65\",
\"yPosition\":\"180\",
\"pageNumber\":\"2\"
},
I cannot find how I can tell the envelop that I want to set my own signature on the first page and have this done automatically rather than routing the document to myself first before sending it onwards.
Thanks, T

Sharepoint task list doesn't send email on item creation

I've created a custom workflow which creates a task item when the workflow is kicked off.
alt text http://img19.imageshack.us/img19/2862/screenshot310200942100p.png
I've also created a few custom content types for the document library and task list.
For the document library:
First, I add a document library and configure it to allow custom content types. Then I add my content type, which is based off the document content type. After, I add a workflow under workflow settings. Here, I select my custom workflow, give it a name and tell sharepoint to create a New task list to store the tasks in.
For the task list:
Now that I have a sharepoint created task list, I go there and allow custom content types and make sure "Send e-mail when ownership is assigned?" is set to Yes. Then I add my two custom content types which are both based off a workflow task content type. Thats all I should do.
When I start my workflow, it does add the approval task (I'm using a CreateTaskWithContentType activity which is named createApprovalTask), but no email is sent out for the created task.
The code I'm using in the createApprovalTask activity is:
// make a new GUID for this task
createApprovalTask_TaskId = Guid.NewGuid();
// set simple properties of task
createApprovalTask.TaskProperties.AssignedTo = "a valid domain\user";
createApprovalTask.TaskProperties.Title = "Review Contract: " + approvalWorkflowActivated_WorkflowProperties.Item.DisplayName;
createApprovalTask.TaskProperties.SendEmailNotification = true;
If I create a document library and use one of Sharepoint's built-in workflows (Approval for example), and tell it to create a task list for it, when an item is added to that list, it sends out the email correctly. So, the setting for the outgoing mail server are correct, as we're receiving other emails just fine.
I'm using a SendEmail activity right after the createApprovalTask activity to send an email back to the submitter telling them we've received their approval request. The code for that is something similar to:
sendApprovalRecievedEmail.Body = emailBody;
sendApprovalRecievedEmail.Subject = emailSubject;
sendApprovalRecievedEmail.To = emailTo;
sendApprovalRecievedEmail.From = emailFrom;
This works, so the submitter receives their custom email, but the task owner never receives the task item email.
Unfortunately, our mail servers were blocking the emails for some reason. I wasted a good 2 1/2 days searching around for this problem...and it turns out our IT department didn't have their sh*t together.
Thanks everyone.
you have to make sharepoint outgoing email settings properly.
example is shown in below link
http://sharepoint-amila.blogspot.com/2008/02/outgoin-email-settings.html
if you need to send an email through the c#.net code you can use below method to send emails in custom workflows.
SPUtility.SendEmail Method (Microsoft.SharePoint.Utilities)
example is shown in below link
http://www.sharepoint-amila.blogspot.com/
Is it possible to point out a SharePoint user by "domain\user" like you do with createApprovalTask.TaskProperties.AssignedTo? Isnt the ID required?
"id;#domain\username"

Resources