Global tabs for document templates - docusignapi

Is there a way to assign tabs to a document, without having a recipient declared?
Situation: We want to have a template for an employee application, and then use the API to fill the fields, assign the recipients, and embed for signing.
When I create the template with no recipient, it doesn't allow me to place any tags. Given that I don't know the recipient until the time I call the API, does that mean I can't place the tabs until then? I really don't want to have to place 50 tabs dynamically.
Thanks in advance.
Chase

DocuSign tabs are always with respect to a given recipient, never the document itself, however I believe you can still accomplish this workflow. If you create a Template through the DocuSign Console you can add a template role without providing any recipient info (i.e. name or email) at that time. Afterwards when you reference this template through a signature request API call you can then supply the actual recipient names and emails in the request and map them to your already configured envelope tabs through the
roleName
property for each recipient.
The very first DocuSign API Walkthrough has code that demonstrates how to do this with just one role, but note that this is just an example and you can have multiple roles.
DocuSign API Walkthroughs
From a high level these are the steps you want to take:
Create a template in the DocuSign Console.
Add document(s), then add at least one recipient but only fill in the role field.
Now on your document you'll see that you can add whatever tabs you want to the envelope, under that role.
Save the template.
Make an API call for requesting a signature, which references the templateId and has the roleName parameter present for your recipient(s). This roleName value should match the role that you saved with the template in step 2.
If you named the role Signer1 for instance, your request body (in JSON format) might look like this:
{
"accountId": "123456",
"emailSubject": "DocuSign API Call - Signature Request from Template",
"emailBlurb": "Sample email body",
"templateId": "B977F511-CAB0-...................",
"templateRoles": [
{
"roleName": "Signer1",
"email": "test#docusign.com",
"name": "John Doe"
}
],
"status": "sent"
}

Related

How To fill all the recipients /Signer and move the workflow to the second signer through API/Rest Web Service

I have a docusign template created with below signing order(1.Employee 2.Manager).[Ref below screen]
I am able to fill the form element and the send the draft envelope to the first signer i.e Employee through API using the POSTMAN.()
Problem Statement:-
1.As of now I have hard coded the manager name and email Id in Template but actually I wanted to fill this dynamically while creating the Envelope.
2.When I am sending the Envelope with the data from postman, It is creating a draft Envelope for the first signer i.e for employee but my requirement is that the first signer task (Entering the data and move the workflow to Manager ) should be perform from API.
Thanks For helping Us.
You can update your draft envelope by making an additional RESTful request:
PUT /restapi/v2.1/accounts/{{accountId}}/envelopes/{{envelope_id}}
If you want to fill in the fields of your employee recipient, just specify something like this in your request body:
{
"recipients": {
"signers": [
{
"name": "InsertDynamicNameHere",
"email": "emailGoesHere",
"recipientId": "2"
}
]
}
}

DocuSign: template sign position issue when establishing routing order

My question is related to a specific REST operation for sending an Envelope using a Template where there are at least 2 roles defined as Signers (Signer1, Signer2)
The template is defined as follows: there is a document uploaded, 2 roles as signers (with no routing order, no email, no name) and the position of the Sign for each signer.
I have tried from the API explorer, and this is the JSON request:
{
"emailSubject": "template to sign",
"status": "sent",
"templateId": "xxxxx",
"templateRoles": [
{
"email": "email1#gmail.com",
"name": "signer1",
"roleName": "Signer1",
"routingOrder": "1"
},
{
"email": "email2#gmail.com",
"name": "signer2",
"roleName": "Signer2",
"routingOrder": "2"
}
]}
All works fine except for the possition of the sign for Signer2. It should only appear the square of the sign in the document. However, It behaves like this role does not exist, and all objects for signing are available to this user.
If this same Envelope is sent without the routing order for neither of both signers, the position of the sign works as defined in the template for both signers, i.e. it works as expected.
I don't know if it is a bug, or something I am doing wrong or didn't understand well, but the tests have been executed using the Docusign API explorer.
Thanks in advance.
Updated answer
You can update the routing order but you must:
Use the composite templates API feature to do so.
Tell DocuSign that you're changing the routing order from the template's original routing by setting a query parameter.
Full details in this answer.
Original answer
First, try using the template for an envelope from the DocuSign webtool.
My guess from your question is that the template is not set up the way you want it.
When you use the tagger window of the web tool for your template, check that you're creating the signing tabs for the two different roles. There's a dropdown chooser for each role in the tagger window. See the screenshot. It sets the owner for the document tabs (fields) shown on the screen
Once the envelope (driven by the template) is working well from the DocuSign web tool, switch to using the API.

TemplateRoles Adding, not replacing signer

Left Column 'Get' recipients, Right Col 'Post' envelopes
The problem is Instead of Replacing the Client as I expected based on docs.
It Added a second signer to the process. My template was set up for two roles Advisor and Client. I excpected the client to ONLY be the one I passed via the api. Instead it sent 3 emails total. One to Template Client, One to Template Advisor and one to Api Passed Client.
Unless I misunderstand the api function, It should not have sent an email to
original template Client.
When this happens, it usually means that the values you specified for the recipient in your "Create Envelope" API call did not exactly match the values that the template specified for the recipient role (i.e., roleName, etc.).
To resolve this issue, I'd suggest that you issue a "Get Recipients" call for your template (GET /v2/accounts/{accountId}/templates/{templateId}/recipients) to identify the exact values that the template defines for the "Client" recipient role, and then ensure that your "Create Envelope" API request specifies the same exact values (including case) for the recipient that you want to occupy the "Client" role. If you try this and still can't figure it out, then please update your question with your "Create Envelope" request and the results of the "Get Recipients" request, and someone here on SO will likely be able to spot your issue.
The template b521bece-6440-430a-9762-bf8d4543edc5 already has the recipient email/name filled.
Since recipients details are already filled, in the template, you will not be able to substitute the values during envelope creation.
You can modify the template and leave the name and email fields empty.
Then Create the envelope with just a single recipient. The notifications will only be sent to the single recipient.
POST /v2/accounts/{accountId}/envelopes
{
"status": "sent",
"templateId": "b521bece-6440-430a-9762-bf8d4543edc5",
"templateRoles": [
{
"email": "mike#acme.com",
"name": "Mike TestName",
"roleName": "Client"
}
]
}

Embedded Docusign Signing URL - using document visibility to only show 1 document in the envelope

I am creating an envelope via the Docusign Rest API. this envelope has 2 inline templates each have their own roles and do not share any tabs. I have a custom workflow that requires the user to fill in each document separately so i use the (/views/reciepients) endpoint to get a signing url.
The first signer sees the first (and only the first) document correctly, it is filled in and completed. Then i want to show the second document from the envelope in an iframe to a user. When i get the signing URL for the second recipient (signer) it also includes the first document all filled out.
I have document visibility set up on the account.
I have read the documentation a few times and there is one confusing, under "Post Recipient View" there is a field "userName" which is not mentioned when creating the recipient or in the response from the recipient end point. I assume this is the "name" field.
to make it a bit easier to read i have put all the API requests into paste bin.
Generate Envelope with 2 templates and 2 signers.
Request = http://pastebin.com/e98Dwaj8
Get First signing URL using /envelope/xxxx/views/recipient
Request =
{
"returnUrl": "http:\/\/local.example.com\/return.html",
"authenticationMethod": "none",
"email": "role1#example.com",
"userName": "TestFirstName TestSurname",
"clientUserId": "1"
}
Get recipients for envelope after first signer has completed
Response = http://pastebin.com/9VmGsE3p
Get second signing url (this shows both documents when visited)
Request =
{
"returnUrl": "http:\/\/local.example.com\/return.html",
"authenticationMethod": "none",
"email": "test#example.com",
"userName": "TestFirstName TestSurname1",
"clientUserId": "2"
}
Is there a way i can show the second signer only the second document?
Is it possible or will the completed document always show? does the /views/recipient url only hide documents in "draft" or "sent" and always shows "completed"?
note: this is a follow up to Docusign signing url - Showing document 1 of a composite template but that question was answered and solved the original issue so i thought it best to open a new more specific question.
In order for certain signers to only see certain documents, you will want to investigate the Document Visibility feature and settings. There is some starting documentation available at: https://support.docusign.com/guides/cdse-user-guide-advanced-sending-using-document-visibility-in-a-template
In short, signers can only see documents in an envelope for which they have at least 1 tab assigned. This is honored during the signing ceremony as well as any view of the completed document.
Regarding your last question, you should only be able to start a POST /recipient/view (signing ceremony) for an envelope which has been SENT. If you perform this action against an envelope which is completed it will start the signing session in a read only viewing mode (since the transaction is complete).
Is the 2nd signer a member on the sending account? If so, they would be able to see all documents in the envelope based on "Must sign to view unless Sender Account". This setting essentially means internal signers that have memberships on the same account as the Sender can see everything.

Using the docusign api c# access code for authentication of signer

Using the sample C# send document API call, how can I send a data element located in my system, such as zip code or last 4 of ssn, to be enable this as an access code to view the document? This way I know that the person signing has another level of authentication tat ties back to the signer.
Have you read through the DocuSign API documentation yet? Just add the accessCode property to your signer JSON object and give it a value. Basically, something like this:
"recipients":
{
"signers": [
{
"email": "test_1#email.com",
"name": "Name 1",
"accessCode": "1234",
...
Description from API docs:
"This Optional element specifies the access code a recipient has to enter to validate their identity. This can be a maximum of 50 characters."

Resources