DocuSign Recipient and Custom Fields - docusignapi

I am new to DocuSign technology and need to get few pointers.
I have tested some java API to send emails out thru Docusign and did my homework. Few questions:
Can I create a DocuSign Template without a Recipient? DocuSign is not letting me to add custom fields without a recipient.
My use case is: Put a template on docusign with some custom fields (say 10). My application would pass values for 3 custom fields along with new recipient (email address). I expect recipient would fill rest of custom fields.
How can I create/send an envelope with a Template ID and Recipients? I see error that you can pass only one of them.
I am able to pass values to custom fields via EnvelopeDifinition->TemplateRole->Tabs->TexTabs. But, the values are not populated if there are multiple recipients.
I am looking at some guidance on the approach for my use case and some pseudo code if that helps.
Thanks

You cannot create a template without recipients, because you cannot create an envelope without recipients. At least one is required. A template is a repetitive envelope and if it were created without recipients - you can have an envelope without recipients which is not allowed.
There are two types of recipients in templates. The one you probably need is a role based (templateRole) that does not include the email/name but has to be provided when an envelope is created from the template (also called placeholder). That recipient can still have fields (tabs, tags) and the API can provide the value for some of them.
This article talks about how to set the values of tabs in an envelope created from a template and is exactly what you're saying you want to do.

Related

Ability to modify template tabs to have values in an envelope when a template is applied to an envelope

I am using docusign APIs to use an existing template when i send an envelope. In the Envelope definition (env), using env.setTemplateId(), i am able to set the template to the envelope. I want to be able to edit the tabs (to make them read-only and populate values) added through the template only in the context of the envelope (without modifying the template).
But on trying to retreive the envelope contents, the tabs are not listed as part of the envelope.
Any pointers on this?
Have seen a few similar questions (Docusign API - prefilling tab values on envelope created from template, Docusign API - prefilling tab values on envelope created from template), but no concrete solution yet.
By default GET on an envelope would not retrieve the tabs. You can do that by making this API call:
GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs
Which requires that you know the documentID.
If you are using one of our SDKs, you can see code examples that do just that here:
https://developers.docusign.com/esign-rest-api/code-examples/set-template-tab-values

Creating envelopes where first signer specifies next recipient(s)

I need to send out a document / envelope. I'm using the C# SDK, since we'll be sending from a service. We know who the recipients of the document COULD be, but it's up to the first recipient to either sign or choose a recipient.
The first recipient of the document can do one of two things-
Sign the document
select a different recipient from a drop-down list of Roles, and then have the document go to that user for their signature.
these future roles are "Dealer" and "Lawyer". We'll know, at the time of
selection who these user's are (names & emails).
Right now, I have a template (from Word), with tabs that will be populated when sending the initial envelope, so that all users can see the data.
My question(s) are:
Is using the Template the best option? Should I attempt to update the text within the Word document, by not having it configured as a template?
How should I add the users / roles / signers to the envelope, since they can be chosen ? I saw something about Intermediaries - is this what I should be using to specify the next recipient in the document? Currently, I have three "Roles" defined in my template- one for "Provider" - the first recipient, then "Dealer" and "Lawyer".
IF not using a Template, how should I specify / add the follow-up users, "Dealer" and "Lawyer"?
Any assistance is greatly appreciated!
Using a template is probably what you need. You can update the document inside a template before sending an envelope that is created from the template. (you can also use"correct" to update an envelope that was sent, but only by the original sender and there are some other limitations)
see comment from Drew, you cannot do a conditional recipient yet, but there are other options, including a special type of recipient that can add other recipients (if that's what you want).
You can create a more complex workflow that have the first envelope trigger a second envelope with the recipients you want. That could work for you. Not sure yet about all your requirements, but the first signer can trigger this using our web-hook from connect.

DocuSign API: Changing the filename when signing from a template

Using the DocuSign API via VisualStudio, I create and send an Envelope out to customers based on a Template on my DocuSign account which contains a list of the recipients and a standard pdf document.
I specify the TemplateRoles and the TemplateId using the EnvelopeDefinition object then create the Envelope. The pdf document returned when everything is signed will have the same name as the pdf on the Template document.
What I need to do is change the name of this document for each Envelope/customer. Ideally I could change the document name to that of the customer to make it easier to store and find, instead of getting a lot of different docs back with one generic name.
Is it at all possible to change the name of the finished document?
I don't know about changing the name of the document.
But you can change the subject of the envelope when you create the envelope. And it is the subject of the envelope that you see in the DocuSign web tool.
You can also set an envelope custom property and later search for envelopes with that property. Using this technique, you could easily bring up all envelopes related to a particular customer (probably best to store your customer_id as an envelope custom property in this case).
This is a bit of a hack but it works.
You can create a dummy cc recipient and their name can be anything (their email address can be random letters). Set up your template with the merge fields to include in the message subject (this also automatically edits the envelope name). Using this guide:
https://support.docusign.com/en/guides/ndse-user-guide-template-merge-fields
Then when you create your envelope from the template, fill in the dummy name with whatever text you want to be added to the envelope name.

How to use Custom Fields on the envelope

I am new to DOCUSIGN and learning the features of it.
I could see there is a feature to create custom Fields for a template.
I am not able to find the documentation about how to use custom fields in the envelope.
Is it possible to use the custom fields as a placeholder inside email to fill some data dynamically. So that the creator of envelope just fills in the information in the custom field and it will be used in the email body/subject etc..
is this possible.
need some advise.
"Custom fields" in DocuSign exist at various levels -- i.e., Envelope Custom Fields, Document Custom Fields, Recipient Custom Fields, etc. -- and simply facilitate you being able to associate metadata you specify with a specific object. For example, you might create an Envelope Custom Field called "CustId" and populate that field with the Id of the corresponding customer for each Envelope you create/send. Then, because you associated "CustId" value with each Envelope, you could later utilize this data for reporting purposes (for example: to find all envelopes associated with a particular customer). Custom fields cannot facilitate the functionality you've inquired about.
It's not possible via DocuSign functionality to utilize 'placeholders' as you've described to dynamically inject Envelope-specific values into the Email Subject/Body. However, you could easily have your application collect the relevant information (perhaps from the sender via a webform, or via a database lookup if you're app already has the relevant info there), and then use that information to programmatically (in your code) assemble the complete Subject and Body for the email, before using an API call to create the Envelope (specifying Subject and Body as part of your API request).

Unable to Apply Multiple Templates to a Single Document in a DocuSign Envelope using CreateEnvelopeFromTemplates

I have been successfully using DocuSign embedded signing in a J2EE application, using the createEnvelopeFromTemplates SOAP API, 1 template and 1 document to create 1 document in an envelope for 2 signers.
Now I am implementing a case with more than two signers. There are some checkboxes contained within the document. The chechboxes are to be checked by one of the signers. Not all signers sign each document, and which signer checks the checkboxes is determined at envelope creation time, based on which signers are actually present.
I tried to implement this case by using a set of templates with:
One template for all the possible signatures
Templates tagged for each possible signer that could fill in the checkboxes.
At envelope creation time, my website has collected the information to know which signers are present, and which signer will fill in the checkboxes. The appropriate templates are referenced in the call to DocuSign to create the envelope, and the appropriate roles are assigned. The problem is that when specifying multiple templates with the createEnvelopeFromTemplates operation, each TemplateReference object requires a document. I can't figure out how to tell the API to apply the multiple templates to the same document, so I will end up with a single document in the envelope.
Reading the DocuSign documentation, it appears that using createEnvelopesFromTemplatesAndForms with CompositeTemplates might work, but I would prefer to stay with the simpler CreateEnvelopeFromTemplates. Is there a way to apply multiple templates to a single document using CreateEnvelopeFromTemplates?
Thanks, Mark
You will need to use CompositeTemplates to solve this. The CreateEnvelopeFromTemplates() call that you are making adds what are known as ServerTemplates to your envelope, and since each server template contains a document (i.e. you can't save a design-time template in the DocuSign Console without providing a document) each time you add a server template to an envelope it adds the document too.
Using CompositeTemplates you can add ServerTemplates as well as InlineTemplates to your envelopes which means you can start with the template with the document(s) then use the properties of a second (inline) template without including its documents. Therefore, the SOAP call you should instead make is
CreateEnvelopeFromTemplatesAndForms()
And using the RoleName property you can assign your recipients to the template roles you have already created at design-time.
I was going to suggest testing this through the API Explorer but remembered you're using the SOAP API not REST and that's for testing with REST, so instead probably your best bet is the SOAP documentation and the samples found in the SOAP SDK on GithUb:
DocuSign SOAP SDK
SOAP Guide - CreateEnvelopeFromTemplatesAndForms
There are sample CreateEnvelopeFromTemplatesAndForms() calls in the SDK that show how to make the call.
We have found a solution that seems to work. We are still using the CreateEnvelopeFromTemplates operation, but we combined our templates into one and have a created a new role, "Question Answerer", and assigned all the checkboxes to that role. At envelope creation time, when we specify the role assignments, we specify the ID of the appropriate signer to both the signature role and the "Question Answerer" role.
Although we did not find a way to apply multiple templates to a single document using CreateEnvelopeFromTemplates, the above solution solves our problem.
Thanks, Mark

Resources