Is the issue with KBA activation through DOCUSIGN API resolved? - docusignapi

I am facing issue while trying to enable "ID Check $" through docusign Rest API.
I could see there were lot of work arounds provided. Still following I am not successful.
It would be great if someone can comment if the issue with KBA is still there or any sample code for REST JSON would be greatly appreciated.
Due to this I am thinking of TWO templates one with KBA enabled and other without. So I can take a decision to use the template based on my business rule
Appreciate your time
The following way of creating the envelope did not result in KBA to the signer
{
"accountId": "YYY",
"templateId":"ZZZ",
"status": "SENT",
"templateRoles": [
{
"name": "AAA",
"roleName": "CCC",
"email": "test#test.com",
"tabs": {
"textTabs": [],
"checkBoxTabs": [],
"emailTabs": [],
"dateTabs": [],
}
},
{
"name": "BBB",
"roleName": "DDD",
"email": "example#example.com",
"accessCode": "A380",
"requireIdLookup": "true",
"idCheckConfigurationName": "ID Check $",
"tabs": {
"textTabs": [],
"checkBoxTabs": [],
"emailTabs": [],
"dateTabs": []
}
}
]
}

If you're creating an Envelope using a DocuSign Template, and want to sometimes require ID Check authentication and other times not, the way you can accomplish this is to use Composite Templates in your Create Envelope API call.
In your template (i.e., via the DocuSign UI), don't select any form of advanced recipient authentication (i.e., simply set Identify = "Email").
Then, to create an envelope using the template via the API, and specify ID Check as the recipient authentication method, the Create Envelope request would look like this:
POST https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes
{
"emailSubject": "Please sign",
"emailBlurb": "Please sign...thanks!",
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": 1,
"templateId": "YOUR_TEMPLATE_ID"
}
],
"inlineTemplates": [
{
"sequence": 2,
"recipients": {
"signers": [
{
"email": "sallysemail#test.com",
"name": "Sally Adamson",
"recipientId": "1",
"roleName": "Signer1",
"requireIdLookup": "true",
"idCheckConfigurationName": "ID Check $"
}
]
}
}
]
}
]
}
The request for creating an envelope (using the same template) that does NOT require any advanced form of recipient authentication would look identical to the request above -- except that it would NOT include the requireIdLookup property or the idCheckConfigurationName property.

Related

DocuSign: How do I send the values of the Document Custom Fields (aka tab definitions) while creating an envelope?

I need some help to identify how to send Document Custom Fields' values at the stage of creating an envelope. Below is the workflow:
Create the Document Custom Fields (account specific) with name, type and initial value through API (POST [BaseURI]/tab_definitions)
Create a template with document through API and place the required Document Custom Fields in the document through DocuSign UI
Create an envelope and send specific values for the Document Custom Fields through API (POST [BaseURI]/envelopes)
Creating an envelope is working fine referring (https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create). I have tried sending the values through:
document -> documentFields
customFields -> textCustomFields
{
"templateId": "51234567-1244-1234-1234-12345a857203",
"templateRoles": [
{
"roleName": "Role1",
"name": "Jane Doe",
"email": "jane#doe.com"
},
{
"roleName": "Role2",
"name": "John Doe",
"email": "john#doe.com"
}
],
"customFields": {
"textCustomFields": [
{
"name": "Account.Name",
"value": "account-name1234"
},
{
"name": "Candidate.FullName",
"value": "candidate-name1234"
},
{
"name": "Candidate.Mobile",
"value": "0412345678"
}
]
},
"status": "sent"
}
The CustomFields parameter is for Envelope Custom Fields. If you want to define tag values for a recipient, the tag parameters should be nested under the TemplateRole. You'll also want to use the tabLabel parameter to identify tabs instead of the name. Finally, make sure your Role Names and TabLabels match exactly between your template and your API call. Try this:
{
"templateId": "51234567-1244-1234-1234-12345a857203",
"templateRoles": [
{
"roleName": "Role1",
"name": "Jane Doe",
"email": "jane#doe.com"
"tabs": {
"TextTabs": [
{
"tabLabel": "Account.Number",
"value": "00000000"
},
{
"tabLabel": "Account.Name",
"value":"ExampleAccount"
}
],
},
{
"roleName": "Role2",
"name": "John Doe",
"email": "john#doe.com"
}
],
"status": "sent"
}
Finally, you may want to consider using a Composite Template instead of the basic Envelope Creation call. Details as to why are available here: https://www.docusign.com/blog/dsdev-why-use-composite-templates/

Docusign: REST API: BulkSendRecipients using CSV/Text

I need to fill some fields in our fillabe .pdf, apply our Docusign template to it and do a bulk send for 2 roles, so here is my approach:
1- I create a draft envelope from the pre-filled .pdf and I use the template in creating the envelope:
POST
"https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes"
Body:
{
"status": "created",
"documents": [{
"documentId": "documentId_placeholder",
"name": "RaymondJames_prefilled.pdf",
"documentBase64": "lcDocumentBase64",
"transformPdfFields": "true"
}],
"templateId": "TemplateID_placeholder",
"templateRoles":
[
{
"roleName": "RecipientNo1RoleName_placeholder",
"isBulkRecipient": "true",
"name":"Name_placeholder",
"email":"Email_placeholder",
"emailSubject": "EmailSubject_placeholder",
"tabs":{
"textTabs":[
{
"tabLabel":"First Name",
"value": "FirstName_placeholder"
},
{
"tabLabel":"managertext",
"value": "ManagerText_placeholder"
}
]
}
},
]
}
2- Then I upload the bulk csv to the envelope bulk_recipients:
PUT "https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/"+{envelopeId}+"/recipients/"+{recipientId}+"/bulk_recipients"
Body:
"Name,Email,Email Subject,managertext,Home Phone,First Name John
S.,test1#test1.com,Please revise the form and sign,Manager #1,888-111-1111,JS_firstname Mary S.,test2#test2.com,Please revise the form and sign,Manager #2,888-111-1111,MS_firstname"
3- Then I change the status of the envelope to "Sent" and send the envelope to the bulk recipients.
The above is working but as soon as change the csv filed name from Name to Role1::Name (the way that is mentioned in the documentations), it looks for filed "Name" and doesn't accept the roles at all.
so for adding roles I tried other endpoint but none could do what I need for having pre-filled pdf + docusign template and docusign fileds added + bulk_recipients.
I would appreciate your help on this.
Thanks,
Kathy
for step #2 you do not use a CSV but a JSON
here is an example JSON
{
"name": "sample.csv",
"bulkCopies": [{
"recipients": [{
"recipientId": "39542944",
"role": "signer",
"tabs": [],
"name": "Alice UserName",
"email": "alice.username#example.com"
},
{
"recipientId": "84754526",
"role": "cc",
"tabs": [],
"name": "Bob CarbonCopied",
"email": "bob.carboncopy#example.com"
}],
"customFields": []
},
{
"recipients": [{
"recipientId": "39542944",
"role": "signer",
"tabs": [],
"name": "Carol NextUser",
"email": "carol.nextuser#example.com"
},
{
"recipientId": "84754526",
"role": "cc",
"tabs": [],
"name": "Dave NextCarbon",
"email": "dave.nextcarbon#example.com"
}],
"customFields": []
}]
For a complete code example showing how to use Bulk Send go to:
https://developers.docusign.com/esign-rest-api/code-examples/bulk-sending-envelopes

DocuSign API creating an envelope in a specific folder

i am able to create an envelope with the DocuSign api. according to the documentation there is the attribute to specify the folderid in which you want to put the envelope. i have tried many things and the envelope never goes to the specified folder it only goes to the sent folder. how do we make sure the envelope is created in the specified folder id? there seems to be no sample code / syntax on how to do this via the documentation.
i've tried folder.folderId and folder[0].folderId and folders[0].folderId
[
{
"emailSubject": "This request is sent from a Template",
"emailBlurb": "Please sign...thanks!",
"templateId": "hidden",
"envelopeIdStamping": "false",
"templateRoles": [
{
"roleName": "Signer 1",
"name": "Matt",
"email": "email#email.com",
"recipientId": "1",
"tabs": {
"textTabs": [
{
"tabLabel": "dateField",
"value": "July 19, 2019"
}
]
}
}
],
"folders": [
{
"folderId": "folderIDhere"
}
],
"status": "sent"
}
]
no errors at all it just doesnt save in the folder
I'm not sure that you can create an envelope directly into a folder. I believe you'll need to take the Envelope ID you get in response to the Envelope Creation call, then plug it in to a Folders::MoveEnvelopes call like so:
PUT /v2.1/accounts/{accountId}/folders/{folderId}
{
"envelopeIds": [
"{envelope_id}"
],
}

Mapping between actual signer and delegated signer

I have integrated DocuSign APIs with my application. DocuSign provides feature to assign signing responsibility to someone else. When I try to get the status of all the recipients I am unable to identify which signer delegated his responsibility to which signer.
{
"witnesses": [],
"seals": [],
"intermediaries": [],
"currentRoutingOrder": "1",
"carbonCopies": [{
"requireIdLookup": "false",
"recipientId": "1",
"status": "completed",
"email": "charles#gmail.com",
"recipientIdGuid": "15e02ae9-a4cb-4562-a05f-381d9d555894",
"userId": "0e6e3f29-6f69-4b48-92a1-be7443b0ac58",
"name": "Charles Kom",
"routingOrder": "1"
}],
"agents": [],
"recipientCount": "2",
"signers": [{
"requireIdLookup": "false",
"recipientId": "155500",
"creationReason": "sender",
"status": "sent",
"email": "anna#gmail.com",
"recipientIdGuid": "405ccc6e-b6b4-4d7a-b21a-cfab853a8499",
"userId": "521911fd-3215-4a83-93f3-7a62991ca64d",
"name": "Anna",
"routingOrder": "1",
"identityVerification": {},
"note": "sdfsae",
"isBulkRecipient": "false"
}],
"editors": [],
"inPersonSigners": [],
"certifiedDeliveries": []
}
This is the response I receive from API. Here there is no mean to find which signer delegated responsibility to whom if I have more than one signers and more than one have delegated.
Is there any other API to find out this thing?
One possible solution I thought is DocuSign also has feature of View Envelope History. But I couldn't found any REST API for that.
GET /v2.1/accounts/{accountId}/envelopes/{envelopeId}/audit_events is the API call to get the envelope audit history. On check the response, you will the Action as Reassign and Message also will have Original Signer and new Signer's name and email address.
{
"name": "Action",
"value": "Reassign"
},
{
"name": "Message",
"value": "John Smith reassigned the envelope to Daisy Duck [daisyduck+delegate#gmail.com] routing order 1"
}
DS Docs has more details about this API.

Confusion over defining recipients for generic DocuSign templates

I have an embedded signing application where users going through a web interview have to sign certain documents at the end. The documents are generic templates, currently defined with the user name and email address left blank. I am providing the user name, email address and a clientUserId in the envelope creation, matching the role that is defined in the template. But I keep getting the error UNKNOWN_ENVELOPE_RECIPIENT - The recipient you have identified is not a valid recipient of the specified envelope. What constitutes a "valid recipient" of a generic template? Am I supposed put something in the user and email fields of the template? I'm confused.
In answer to Larry K below, that appears to be exactly what I have done. Here's the JSON for the create envelope request that results in the error:
{
"accountId":"1234567",
"emailSubject":"Certification Documents",
"status":"sent",
"compositeTemplates":[
{
"serverTemplates":[
{
"sequence":"1",
"templateId":"5ed3d600-5a57-4fee-931f-53233858dc65"
}
],
"inlineTemplates":[
{
"sequence":"1",
"recipients":{
"signers":[
{
"name":"John Doe",
"roleName":"Applicant",
"recipientId":"1",
"clientUserId":"62",
"email":"jd#mydomain.com",
"tabs":{
"textTabs":[
{
"tabLabel":"EmplName",
"value":"John Doe"
},{
"tabLabel":"SSN",
"value":"123456789"
},{
"tabLabel":"DoB",
"value":"08\/26\/1991"
}
]
}
}
]
}
}
]
}
]
}
Here is the Get Recipients response:
{
"signers": [
{
"isBulkRecipient": "false",
"name": "",
"email": "",
"recipientId": "63543029",
"recipientIdGuid": "29a731f6-2f82-490f-9589-f551727414d9",
"requireIdLookup": "false",
"smsAuthentication": {},
"routingOrder": "1",
"note": "",
"roleName": "Applicant",
"status": "created",
"declinedReason": "",
"deliveryMethod": "email",
"templateLocked": "false",
"templateRequired": "false"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [
{
"name": "Real Person",
"email": "rp#mydomain.com",
"recipientId": "83856197",
"recipientIdGuid":
"0f80a5ab-2050-472a-b072-7a18794a4726",
"requireIdLookup": "false",
"smsAuthentication": {},
"routingOrder": "1",
"note": "",
"roleName": "Mancon",
"status": "created",
"declinedReason": ""
}
],
"certifiedDeliveries": [],
"inPersonSigners": [],
"recipientCount": "2"
}
I've got it. Too many iterations of messing with code, mixing live code with debug stuff. It looked like the error was coming from the envelope creation because I had stepped on a debug message. But in fact the code was going through to the signing view request, which actually was generating the error. And there, as you might guess, was a debug clientUserId, which did not match the envelope. I hate it! Thanks for the coaching. It eventually led me to the real problem.
To troubleshoot, I'd suggest executing a Get Template Recipients request for the Template you're using (GET /v2/accounts/{accountId}/templates/{templateId}/recipients), then compare the contents of that response with the recipients portion of your Create Envelope From Template request that's resulting in the error UNKNOWN_ENVELOPE_RECIPIENT. If you can't spot a difference, feel free to update your post (question above) with the trace of your original Create Envelope request as well as the response from Get Template Recipients (removing any sensitive info, of course), and perhaps someone here can spot the issue.
Another answer from a second DocuSign consultant:
He suggests that perhaps the reason you received the error was that you didn't use the exact same triplet of {recipient/signer name, email, client id} in both your call to Envelopes: create and to EnvelopeViews: createRecipient
The following should work:
Call to Envelopes: create:
{
"emailSubject":"My subject",
"emailBlurb":"My blurb",
"templateId":"My template id",
"templateRoles":[
{
"clientUserId":"123456789",
"roleName":"My role",
"name":"Name",
"email":"email"
}
],
"status":"sent"
}
Call to EnvelopeViews: createRecipient:
{
"authenticationMethod": "password",
"email": "email",
"returnUrl": "https://www.docusign.com",
"userName": "Name",
"clientUserId": "123456789"
}
A solution from one of our DocuSign consultants is below. He recommends compositing the recipient information with the template. Here's the json for the Envelopes: create call:
{
"emailSubject": "Create Envelope with embedded recipient",
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence": "1",
"templateId": "{Template ID}"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"clientUserId": "Unique Identifier",
"email": "signer1#example.com",
"name": "Signer One",
"recipientId": "1",
"roleName": "Customer"
}
]
}
}
]
}
]}

Resources