DocuSign has a mountain of great documentation when it pertains to Java, Ruby, Node.js, C# and the like, but their documentation is relatively light on sending raw JSON requests. I have a template that has checkbox tabs and I need to be able to create a document to sign with prefilled checkbox data. No examples exist on how to do that with a raw JSON request.
How do you create an envelope from template with checkbox tab data?
After reverse engineering the format from the /accounts/$accountId/envelopes/$envelopeId/documents/$documentId/tabs endpoint, I was able to discover that the checkboxTabs node of your request must look like this:
"checkboxTabs": [
{
"tabLabel": "ACCESSORIES",
"name": "LIGHT_USB_C_ADAPTER",
"selected": "true"
}
]
Glad you found the answer. Just wanted to point out that we do show how to make direct JSON calls in both our reference material as well as in our code examples. We use bash scripts with curl to make these calls, so you may see "Bash" or "CURL" in the title of the language when you look up our code examples.
For your case you can dinf it here - https://developers.docusign.com/esign-rest-api/code-examples/set-envelope-tab-values
Just wanted to add, You can always visit corresponding SDK Method documentation in DocuSign website. For Envelopes::createEnvelope method, refer - https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create
You will see the definition of the checkbox and use the available options accordingly.
Related
I have an envelope with a single document and two signers saved as a server-side template. The signers execute the agreement in a specific order. The document has a number of pre-fill fields in it.
I am trying to automate sending this agreement out using Integromat. Unfortunately, Integromat's module doesn't allow for pre-fill fields in templates, leaving me to create the API request manually. This is where I get stuck.
The closest I have come is the JSON request below, POSTed to:
…/v2.1/accounts/{accountId}/envelopes, with capitalised values filled in automatically:
{
"templateId": "TEMPLATE_ID",
"templateRoles": [
{
"email": "CLIENT_EMAIL",
"name": "CLIENT_NAME",
"roleName": "Recipient",
"tabs": {
"prefillTabs": {
"textTabs": [{
"tabLabel": "Prefill: Purpose",
"value": "PURPOSE_FIELD_DATA"
}]
}
}
}, {
"email": "STAFF_EMAIL",
"name": "STAFF_NAME",
"roleName": "Company"
}
],
"status": "sent"
}
The response from the API is:
The operation failed with an error. [400] A Required field is
incomplete. TabId: GUI_HERE
What I can't figure out is how to get the pre-fill data submitted since it's not tied to a particular signer. I have scoured the v2.1 API documentation but there is no scenario simple enough for this request.
Apologies if I am missing something obvious here; this is my first rodeo with DocuSign's API.
Do you have any idea what I am doing wrong or, better yet, what the body of the request should be for this (presumably) simple scenario?
Update: For pre-fill tabs, you need to have both the tabId and tabLabel, not enough to just have tabLabel like regular tabs.
My guess is a mismatch of the tabId field for the tabs on your template vs. what's in the API request:
You had this value in your request:
Prefill: Purpose
Does it match how the template was set?
I just tried this with composite templates.
When I added the prefill tabs to a recipient I received the error
Error code: INVALID_TAB_OPERATION.
Message: The Tab specified is not valid for the requested operation.
PrefillTab not allowed for recipient.
which makes sense since prefill tabs are associated with a document, not a recipient.
I tried by adding a document to the composite template, but that didn't work either.
I suggest that you use regular tabs. Mark them locked so they can't be changed. Mark them shared so every signer will see them. Then fill in their values as part of your Envelopes:create call.
Here's a live example of doing this. Note the text2 tab which is locked. (It should have the shared attribute set to true. You can add that from the Tabs/text toolbox on the left.)
Also see this blog post about templates.
Integromat does even without using DocuSign Rest APIs.
You can use Powerforms, it will save your cost for Rest APIs.
I recently did this, but issue is for first recipient, you need to send email manually with powerform link.
Here I dynamically construct PowerForm URL where I pass values to pre populate template fields.
To send email from integromat, you can configure Gmail module or any other email module and create html template where you can append Powerform URL in anchor tag
I am passing a json file from salesmate into Zapier, and from Zapier I am passing those variables into docusign to auto populate a contract. some of the fileds like "company" and "email" are assigned correctly. however, I am unable to make custom assignments to specific fields. Does anyone have any experience or suggestions linking zapier to docusign or hellosign or any contract software?
{
"title": "{{Task.title}}",
"qty_of_units": "{{Task.textCustomField1}}",
"term_of_rental": "{{Task.textCustomField2}}",
"total_no_of_rental_payments": "{{Task.textCustomField3}}",
"amount_of_each_payment": "{{Task.textCustomField4}}",
"primaryContact": "{{Contact.name}}",
"primaryCompany": "{{Company.name}}",
"email": "{{Contact.email}}"
}
This is Hazem from HelloSign API support and would happy to help with your ask.
When sending a signature request with HelloSign via Zapier, you will be using a template that holds custom fields assigned to the sender/signer. These fields can be pre-filled with data when sending the request. In this case you can use a JSON file to pass that data into the fields.
You can read more about this use-case below:
Using-Editable-Merge-Fields-aka-Custom-Fields
Merge-fields-for-templates
Zapier-Sending-a-signature-request-from-a-template
I hope this help clear things up for you! Please let us know if you have any other questions or concerns.
I am trying to add a bug via REST API, but I can't find path for release notes field.
I checked official documentation for field list, but there are no info regarding release notes field
official documentation link
Following could should create opertion to insert info into release notes, but the Path is wrong
patchDocument.Add(
new JsonPatchOperation()
{
Operation = Operation.Add,
Path = "/fields/Microsoft.VSTS.Common.ReleaseNotes",
Value = "1"
}
);
Is there any unofficial documentation, or some library where I can see list of all available API endpoints for fields?
Short answer - yes! - the link that you have in the question is that API. However, that doc is the API reference for Get Work Item Types operation which contains just an example modelling the sample response one might get, and not the holistic list.
Before I begin, I'm assuming that Release Notes is a Custom-defined field here, as I don't see it in the default Work item field index.
To know what path for this (custom) field might look like, it'd help to execute the Get Work Item Types API for type bug within the scope of your project, and look at the response. This is what I got, for example:
where "dependsOn" is the custom field that I defined in the process used by my Project.
So for creating a bug, I provided the request body in the following format to the Create Work Item API:
[
{
"op": "add",
"path": "/fields/System.Title",
"from": null,
"value": "Sample Bug"
},
{
"op": "add",
"path": "/fields/Custom.dependsOn",
"value": "Auth"
}
]
and voila, had a bug created. Hope this helps!
I would like to know if it is possible to show/hide parts of DocuSign document template depending on the data which is passed in as a request.
I already have document template created and uploaded to DocuSign. I then use templateId to create envelope for that document and I also send some data (as json) to prepopulate certain fields inside the envelope.
The thing I am asking now is:
If the template has, let's say, 3 paragraphs, is it possible to hide one of them completely, based on the passed in json data?
Creating and uploading multiple templates is not an option due to large number of conditionally displayed sections.
I have been reading DocuSign API documentation, but couldn't find an answer to this.
To do that you will have to use Responsive Signing.
This feature change the format of the document you sign from PDF to HTML.
With HTML being the format, there are a lot more things you can do.
For example, you can use what we call "Smart Sections" which is exactly what you want. Sections that can be shown off/on based on logic you set.
Find out more about the responsive signing API here - https://developers.docusign.com/esign-rest-api/guides/responsive-signing/api-overview
I've tried to implement an Dialogflow app (Actions on Google) and it works quite well so far. However: does anyone know if it is possible to define further action parameters / context via node.js, so I can use them somehow to create dynamic "link out suggestions" in Dialogflow?
In Detail: I try to request some parameters from the users, map them on a set of urls (=implemented as some kind of database) and then write the result url into the json response. Goal: include these response url as $url, #deeplink.url (or similar) in Dialogflow's "Response > Google Assistant > Enter URL".
Is this possible in any way? Thank you in advance.
UPDATE: I also tested the approach of building a rich reponse, but it does not seem to work. Example:
const richResponse = app
.buildRichResponse()
.addSimpleResponse('Flight from ' + origin + ' to' + destination)
.addSuggestions("Find your flight:")
.addSuggestions("Basic Card", "List", "Carousel")
.addSuggestionLink("Search now", url);
(app is an instance of require('actions-on-google').DialogflowApp)
However, he seems to stop after "addSimpleResponse".
Yes. You can create a context in your webhook, and include parameters in that context that contain the values that you want. To use your example, you could create a context "deeplink" and set a parameter in it named "url" with the URL you're going to link to. You should probably also have a "title" parameter, since the Link Out Suggestion and Basic Card requires a title or website name in addition to the link.
Creating a context is fairly simple, but depends on exactly how you're generating the JSON. If you're using the actions-on-google library for node.js, you would create it with a command something like
var contextParameters = {
title: "Example Website!",
url: "http://example.com/"
};
app.setContext( "deeplink", 1, contextParameters );
If you're creating the response JSON yourself, you will have a contextOut array with the context objects you want to set. This portion of the JSON might look something like
"contextOut": [
{
"name": "deeplink",
"lifespan": 1,
"parameters": {
"title": "Example Website!",
"url": "http://example.com/"
}
}
]
Then, in the fields for the Link Out or Basic Card, you would reference them as #deeplink.title and #deeplink.url. For a Link Out, it might look something like this:
However, once you're doing fulfillment, sometimes it becomes easier to generate the VUI and GUI elements in the webhook instead of setting them as part of the Dialogflow builder. This is particularly true if you have a varying number of cards or carousel items that you want to generate.
The Actions on Google documentation provides the various UI elements that can be returned along with sample JSON and node.js code to generate each. These are the same elements that Dialogflow offers through the Actions on Google response tab - just that you can generate them from your webhook instead.