DocuSign API : Captive recipient - docusignapi

I am using SOAP based API call "CreateAndSendEnvelope" to create an envelope into my DocuSign account for remote recipients. I haven't used captive recipients and I also have not created any envelopes from templates so far.
My main reason for not creating envelopes from templates is my document to be included in the DocuSign envelope is not static, it gets generated dynamically based upon certain conditions.
If I need to include recipients as captive recipients in an envelope, do I always have to create an envelope from a template?
As I mentioned earlier, I cannot create an envelope using template as then every time I need to create an envelope, I need to create a template first.
Is there a way to create an envelope first and then redirect a recipient to a signing page/console/URL?
I assume that as remote recipients, captive recipients need not be the DocuSign account users.

Yes you can definitely embed recipients without using any templates - they are two separate, unrelated things. To configure embedded recipients through the SOAP API you just need to set their captive info.
On each recipient there is CaptiveInfo property which has a clientUserId element that you need to set if you want to embed them. It's up to you what value to use for each recipient, but you just need to remember that info when later requesting the URL for them.
There's a whole page on the DocuSign Developer Center that discusses Embedding functionality and even though it's tailored for the REST API it will still give you some needed info:
https://www.docusign.com/developer-center/explore/features/embedding-docusign
Then to link it back to the SOAP API you can view sample code through the DocuSign SOAP SDK that's up on GitHub. It has 5 sample projects, written in Java, PHP, .NET, Ruby, and Salesforce (apex).
https://github.com/docusign/DocuSign-eSignature-SDK

Related

Using DocuSign SOAP API to send to a signing group removes all tags

We're using Salesforce and the DocuSign SOAP API to send documents for signature. For a specific case we have created a template in DocuSign and are using the SOAPs CreateEnvelopeFromTemplates method to create the envelope for this template.
In this particular case, the template has two roles. The first role is always an individual signer but the second role is to be a signing group. Each role has tags on the envelope to fill out.
I set up the recipients in the API, using the signingGroupId for the signing group and send away. The first recipient is able to interact with the document without issues, but the second recipient - the signing group - opens the document to find the tags they should be able to interact with gone.
If I explicitly set the second recipient to be an individual and not a signing group, the tags for the second recipient persist. But they get blown away when the recipient is set as a signing group. Is there any way to use the DocuSign SOAP API to set a recipient as a signing group and not have the tags for the recipient be removed from the template?
You are using an older not quite deprecated method. Try using CreateEnvelopeFromTemplatesAndForms as this link suggests. https://developers.docusign.com/docs/esign-soap-api/reference/sending-group/createenvelopefromtemplates/

Triggers available in Docusign on document completion

I have a web application integrated with DocuSign API, to pass in recipient details to a DocuSign template and initiate signing process. The template has tags for each recipient to enter relevant information and sign.
Once the document is completed/signed by all recipients, the information available in the document needs to be passed on to another web application bound to a DB. What are the options available in DocuSign to trigger document data(e.g. recipient1 signed date) transferred to a DB/other systems on document completion? Any advice on this is appreciated.
You probably need to provide more specific information but generally, you can use DocuSign Connect and configure your API source to integrate the data. After that, you will be able to use webhooks (or Connect) to send tabs data and signing statuses to your 'other systems'.
Once you get your Connect figured out, you can then have GET request using this
{{baseUrl}}/envelopes/{{envelopeId}}/recipients?include_tabs=true
and then have a wrapper class to export desired tabs (ex. Date Signed or other Text Tabs)
OR you can configure a webhook to sync your data between DocuSign and other systems:
Code Example: Using a Webhook to Track Envelope Status

Using docusign EnvelopeViews: createSender as preview

createSender creates a URL, which I would like to use to let the sender preview the document before it's send out. Hence the documents are created using templates and and the API.
The link which is created would lead me out of my UI. Does the user need to sign in? Future plan is to have many user's, which have no DocuSign account.
For embedded sending Your app will have to authenticate the user. If you are doing a Service Integration then your Api account will be used as the sender.
Once the sending url is generated using the createSenderView api, there is no authentication required to access the URL.
You also have an option to build a User Application using the docusign Api where your App can support sending from multiple accounts.
The createSenderView requires that the person is a DocuSign user (with their own account and password).
Only DocuSign users can send. We charge for sending, not for signing or receiving.
What exactly do you want to preview? (And why?)
the documents themselves? Use the EnvelopeDocuments resource. You can also preview the thumbnails of the documents.
the documents with the "fields" ("tabs") that indicate where people will sign? I'm not sure that is do-able.
or the recipients and their routing order? Use EnvelopeRecipients: list method.
Added
Another solution is to use a dummy certified delivery "recipient". Add this recipient as the first recipient. This will block the envelope from proceeding on the recipient routing.
Then get the envelope's documents to show as a preview.
Then, if ok, alter the envelope's recipients to remove the certified delivery recipient. The envelope will then continue on with the first "real" recipient.

Getting an embed url for an already created docusign envelope

In docusign is it possible to create a signing request via the web interface and then retrieve the sigining URL via the API
at the moment, I update the Envelope using the API to attach a clientUserID as this is lacking when created via the web interface.
Then I retrieve the signing view url however, there is no signing tab when navigating to that url. The only action I have is to close.
I have tested using the API and the envelope contains signing tabs so I'm not sure what the issue would be.
Any help would be much appreciated!
When you send a DocuSign envelope if you assign one or more tabs to your recipient it becomes what's known as a Free Form signing experience, where the recipient decides where to sign the document.
On the other hand if you specify one or more tabs for the recipient then it's a Guided Signing experience. In guided signing the recipient can only sign and take actions at the tabs the sender has specified.
It sounds like you are successfully creating the envelope and signing URL but that there are no tabs configured for the signer. If that's the case you should confirm your code is identifying the recipient correctly by specifying the name, email, recipientId, and clientUserId values.
I would also check that the tabs are being set in your request body correctly for the given recipient. First get the recipient information for the envelope using the EnvelopeRecipients: list API to ensure the data is what you expect, then generate the signing URL using the corresponding data.

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