Docusign Anchor tab - docusignapi

I am trying to send a document for signing via the DocuSign REST API. I'm using Sign Here tabs with an Anchor text string.
The JSON Object request:
"emailSubject" : "This is email subject",
"emailBlurb" : "This is email body",
"recipients" : {
"signers" : [ {
"routingOrder" : "1",
"name" : "Recipeient Name",
"email" : "Recipeient Email Address",
"recipientId" : "1",
"tabs" : {
"signHereTabs" : [ {
"anchorString" : "By:",
"anchorXOffset" : "1",
"anchorYOffset" : "1",
"anchorIgnoreIfNotPresent" : "true",
"anchorUnits" : "inches"
} ]
}
} ]
},
"documents" : [ {
"name" : "document.pdf",
"documentId" : "1",
"bytes" : "Byte Representaton of document"
} ],
"status" : "sent"
}
This is working perfectly fine with a minor glitch: The document has two matching strings "By:", and the Sign Here tab is placed on both of them.
Is there a way I can restrict this to only add the Sign Here tab to the first instance of the string "By:" in the document?

Unfortunately, no. The anchor strings on your document must be unique, otherwise that tag will be placed anywhere that string is found. See the Rules for working with anchors section here.

Related

The identity workflow intput option phone number list specified is empty

I'm trying to create and send an envelope using a DocuSign Template and In Person Signing with SMS Verification. I'm able to send an envelope using regular recipient signers, but having trouble with the Template/In Person Signers combination. I'm getting this response with my request:
{
"errorCode" : "IDENTITY_WORKFLOW_INVALID_INPUTOPTION_EMPTY_PHONE_NUMBER_LIST",
"message" : "The identity workflow intput option phone number list specified is empty."
}
Here's the JSON for my envelope that I'm sending:
{
"disableResponsiveDocument" : false,
"emailBlurb" : "",
"emailSubject" : "Please DocuSign Company Agreement",
"recipients" :
{
"carbonCopies" : []
},
"status" : "sent",
"templateId" : "xxxx-xxx-xxx-xxx-xxxxxxx",
"templateRoles" :
[
{
"hostEmail" : "host#acmetrading.com",
"hostName" : "John Simpson",
"identityVerification" :
{
"inputOptions" :
[
{
"name" : "phone_number_list",
"phoneNumberList" :
[
{
"countryCode" : "61",
"number" : "0412 345 678"
}
],
"valueType" : "PhoneNumberList"
}
],
"steps" : null,
"workflowId" : "xxxx-xxx-xxx-xxx-xxxxxxx"
},
"inPersonSignerName" : "Jenny Jones",
"roleName" : "Customer",
"routingOrder" : "1",
"tabs" : {}
}
]
}
I've followed the instructions for phone authentication and the same code works for regular signers so not sure what I'm doing wrong here?
Phone numbers cannot include spaces
0412 345 678 - is bad
0412345678 is good
(BTW, if this is your real number, you got an SMS from DocuSign - that was me trying it)

How to block users on realtime database in community app (android)

I want to make a app. -> When user a blocks user b user a immediately can't see user b's posts or comments
My structure data doesn't have Users node. Because I'm making app simply.
"Comment" : {
"-MptDdCq-j5JAuqgHkGt" : {
"-Mq8JFEZ5gdJhYIpQ4Vm" : {
"content" : "1",
"timestamp" : 1638686327979,
"uid" : "",
"uimg" : "",
"uname" : ""
}
}
"Posts" : {
"-Mqsc-nqUAOWNb9_kSvl" : {
"description" : "",
"picture" : "",
"postKey" : "-Mqsc-nqUAOWNb9_kSvl",
"timeStamp" : 1639480036785,
"title" : "",
"userId" : "",
"userPhoto" : ""
},
"-MqshZSrx0aO8OPMGC2M" : {
"description" : "",
"picture" : "",
"postKey" : "-MqshZSrx0aO8OPMGC2M",
"timeStamp" : 1639481493534,
"title" : "",
"userId" : "",
"userPhoto" : ""
}
Here is my structure. Can I make a blocking function without Users node?
I learned solution by How to block users on Firebase in a social media app? for iOS
But that solution needs Users node.. Is there no other way?
I updated BlockUser node.
Here is a new structure.
"BlockUser" : {
"k1kn0JF5idhrMzuw46GarEIBgPw2" : "OMBueDmbXdQhePnVaVH2teyOGzl2",
"kVAREcjmrHgLlvOldJetBCoiLx93" : "kVAREXdQhePnVaVH2JetBCoiLx93"}
left part is user id who blocks and right part is user id who have been blocked.
Then can I make block user function? Using firebase rules.
My firebase rule
"rules": {
".read": "auth.uid != null",
".write": "auth.uid != null"}

How to read a particular element from array which is the part of object in handlebar file from mongodb?

Below is my mongo db json file.
I want to read the 'topic' element from array 'Addtasks' for each its object element in .hbs(handle bar) file when the route /addTask is called in express.
{
"_id" : ObjectId("5f2313cb1351d606046660fd"),
"email" : "mike#g.com",
"name" : "Mike Tyson",
"Addtasks" : [
{
"otherdetails" : "haha great!",
"website" : "asad.com",
"keywords" : "article importance, article generation, article quality",
"words" : 1000,
"topic" : "How article is generated?",
"_id" : ObjectId("5f2314011351d606046660ff")
},
{
"otherdetails" : "Not much thanks!",
"website" : "abcdxyz.co.in",
"keywords" : "niggas are great, yo whatsup!",
"words" : 2000,
"topic" : "whats your name nigga?",
"_id" : ObjectId("5f23142d1351d60604666101")
}
],
}
You can use the second arg to .find() to project the values you want.
https://mongoplayground.net/p/LLuM1sd5Raq
db.collection.find({}, {
"Addtasks.topic": 1,
name: 1, // Add whatever other fields you need as well, remove if not
email: 1,
})
Yields:
[
{
"Addtasks": [
{
"topic": "How article is generated?"
},
{
"topic": "whats your name nigga?"
}
],
"_id": ObjectId("5f2313cb1351d606046660fd"),
"email": "mike#g.com",
"name": "Mike Tyson"
}
]
If you pass in your data something like this::
res.render('mytemplate.hbs', { items: jsObject.Addtasks });
then your hbs could look like this:
<ul>
{{#each items}}
<li>{{this.topic}}</li>
{{/each}}
</ul>
(Somewhat unrelated, but that json-file is not valid JSON. JSON and javascript objects are not the same thing. )

DocuSign API - textTab appears as required when not set

I"m using the DocuSign API and have added a text tab for the recipient to enter their name. When they receive the email it appears as a required field - they can't continue unless they complete this field. However in my request I have not set this field to be mandatory/required.
Here's the data for the textTab:
"textTabs" :
[
{
"documentId" : "1",
"pageNumber" : "6",
"tabLabel" : "Name",
"xPosition" : "86",
"yPosition" : "273"
}
]
I haven't included the "required" parameter so not sure why this is appearing as a required field?
If you do not set "required" property for Text Tab then it is required in DocuSign. To make it optional, set "required":"false"
"textTabs" :
[
{
"documentId" : "12345",
"pageNumber" : "1",
"tabLabel" : "Name",
"xPosition" : "86",
"yPosition" : "273",
"required":"false"
}
]
}

Switch signers on an In Process shared document

Is it possible to switch a signer (with tabs), on a shared document, once an envelope's In Process?
Our process goes like this:
A single shared PDF document is generated (not using a DocuSign template) with signing placeholders for all signers.
We create and send an envelope for the document PDF.
One or more customers sign the document (using an embedded signing page).
The last signer (our employee) signs the document (also using an embedded signing page).
The employee signer could be one of several employees, but, whomever it is, they'll always sign the same locations on the document. We'd like to be able to delay the choice of which employee signs the document until the end of the process, instead having to specify them at envelope creation.
Once the envelope is In Process, I'm able to add and delete employee recipients, but I can't find a way to include their tabs too. I include the tabs in the request, but the added employee is always in a draft-like 'created' state without tabs. The embedded view still asks the viewer to manually place their tabs. I need the tabs to be already placed and locked in position on the document so the employee can sign.
We're using the REST API and this needs to be an automated solution (no manual envelope corrections). Is there some way to achieve this or something similar?
Here's my add-recipient request
POST https://demo.docusign.net/restapi/v2/accounts/<account>/envelopes/<envelope-id>/recipients?resend_envelope=true
{
"signers" : [{
"recipientId" : 4,
"email" : "john#example.com",
"name" : "John Citizen",
"tabs" : {
"initialHereTabs" : [{
"documentId" : "1",
"recipientId" : 4,
"name" : "InitialHere_3",
"pageNumber" : 1,
"xPosition" : 282,
"yPosition" : 454,
"tabName" : "InitialHere_3"
}
],
"signHereTabs" : [{
"documentId" : "1",
"recipientId" : 4,
"name" : "SignHere_3",
"pageNumber" : 1,
"xPosition" : 81,
"yPosition" : 447,
"tabName" : "SignHere_3"
}
],
},
"clientUserId" : "LTEST_Resident4",
"routingOrder" : 2,
}
]
}
(I've also tried the same request with PUT instead of POST. The result is the same)
It sounds like your workflow needs to do the following:
Create Envelope with a "Blocker Recipient"
Add Additional Recipient when they're identified
Add Tags to new Recipient
Delete "Blocker Recipient" when you want the document sent on
I'll assume you have 1. taken care of and I'll go through quick examples of 2-4.
2. Create Additional Recipient
POST: https://demo.docusign.net/restapi/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients
{
"signers": [
{
"email": "email#domain.com",
"name": "Andrew Wilson",
"recipientId": "3",
"defaultRecipient": "true",
"routingOrder": "3"
}
]
}
3. Add Tags to Recipient
POST: https://demo.docusign.net/restapi/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs
{
"signHereTabs": [
{
"xPosition": "100",
"yPosition": "200",
"documentId": "1",
"pageNumber": "1"
},
{
"xPosition": "200",
"yPosition": "200",
"documentId": "1",
"pageNumber": "1"
}
]
}
4. Delete Blocker Recipient
DELETE: https://demo.docusign.net/restapi/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}
It sounds like you are trying to Modify or Correct and Resend Recipient Information.
https://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf Page 137
Modify or Correct and Resend Recipient Information
This lets you modify recipients in a draft envelope or correct recipient information for an in process envelope.For draft envelopes, you can edit: email, userName, routingOrder, faxNumber, deliveryMethod,accessCode and requireIdLookup. Once an envelope has been sent, you can only edit: email, userName, signerName, routingOrder,faxNumber, and deliveryMethod.You can also select to resend an envelope by using the resend_envelope option.
Example Request:
PUT https://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes/{envelopeId}/recipients?resend_envelope=true
X-DocuSign-Authentication:<DocuSignCredentials><Username>{name}</Username><Password>{password}</Password><IntegratorKey>{integrator_key}</IntegratorKey></DocuSignCredentials>
Accept: application/json
Content-Type: application/json
{
"signers": [
{
"email": "email#domain.com",
"name": "John Smith",
"recipientId": "1"
}
]
}
Response
The response returns if the correction was successful.The following example shows the response json body.
Example Response:
{
"recipientUpdateResults": [
{
"errorDetails": {
"errorCode": "SUCCESS",
"message": ""
},
"recipientId": "1"
}
]
}

Resources