How can I attach a Custom Tab to a Docusign Envelope? - docusignapi

Looking through the Docusign API documentation I am unable to figure out how to attach a Custom Tab to an Envelope. Using the traditional tabs sometimes forbid me from setting the text. Hence, the need for a Custom Tab. Using the CustomTabsAPI I can create a Custom Tab. What remains is the ability to attach the Custom Tab to the envelope.
You can add custom tabs to envelopes and templates by setting the
customTabId property when creating an envelope, template recipient, or
when adding a new tab for an existing recipient.
I am using the EnvelopeDefinition to create my envelope. I was expecting something like:
envelope_definition = EnvelopeDefinition(
custom_fields=custom_fields,
documents=documents,
recipients=recipients,
status='created',
event_notification=event_notification,
email_settings=email_settings,
custom_tabs=custom_tabs # <------ SOMETHING LIKE THIS
)
Any suggestions? An example of how to add custom tabs? Documentation? TIA
EDIT: Here is the textTab I currently have in place
signer = Signer(**args)
title_text = Text(
anchor_string=anchor_string,
anchor_units="pixels", anchor_y_offset="10",
anchor_x_offset="0", width="180", value=initial_value
)
signer.tabs = Tabs(text_tabs=[title_text])
example img of text not editable
example img of custom tab this can be edited
If I can get the TextTab to be edited, that would be great.

Summary of the solution:
The title tab is a system tab so the value can't be set.
Instead, the OP will use a text tab, set its value, and set the attribute locked to false to enable the signers to update it.

Related

DocuSign - Add pre-fill tabs through JSON marker

I'm creating a html document and want to place tabs using JSON markers. This method works for common tabs of signers. However, I want to add pre-fill tabs for senders using the same approach but all pre-fill tabs are not showing up.
I'm using CompositeTemplate to generate the envelope. As pre-fill tabs don't belong to any recipients, so I put them under document level. The code snippet looks like
EnvelopeDefinition().apply {
emailSubject = ...
emailBlurb = ...
this.status = "created"
compositeTemplates = listOf(
CompositeTemplate().apply {
document = Document().apply {
documentId = "1"
name = "some document.pdf"
htmlDefinition = "<div>{{\"tabLabel\": \"exampleTextTab\"}}</div>"
tabs = Tabs().apply {
prefillTabs = listOf(
PreFillTab().apply {
tabLabel = "exampleTextTab"
font = "arial"
fontSize = "size8"
locked = "true"
}
)
}
Pre-fill tabs don't currently work with Composite Templates. DocuSign internal ticket TT-5404
Solutions
Will your API program be setting the values of the pre-fill tabs? If so, then don't use pre-fill tabs. Instead:
use regular tabs with the first signer
set the locked attribute to true
This makes the tabs read-only and they will be visible to all recipients. This will have the same effect as your API application adding and setting pre-fill tabs to the envelope.
Pre-fill tabs are needed when the Sender needs to fill in the values and the Sender is not one of the recipients of the envelope.
For an API program that uses the Sender View to enable the Sender to review the envelope and fill in pre-fill tabs, there are some options:
Your API application can ask the Sender for the pre-fill tab values. Your application can then set those values as regular (locked) tabs as described above.
Or you could add the pre-fill tabs to the template itself.
Or (I have not tried this), instead of adding the pre-fill tabs as part of the composite template object, make an additional API call to add the pre-fill tabs by using EnvelopeDocumentTabs:create

What is a DocuSign template's documentID?

I'm using a DocuSign template that has multiple documents. I want to use composite templates to substitute a new document at runtime.
How do I determine the document ID that the template is using?
The template's first document usually has ID 1.
To see a specific document ID:
Open the template for editing
Click View for the document of interest
On the document's modal display: open the browser's menu and choose "Open image in new tab"
Inspect the new tab's URL. The number after /documents/ is the document ID. Eg URL .../documents/456/pages/... has document ID 456

Aldryn Forms setup: how to add add recipients

I try to use Aldryn forms on the Aldryn platform.
In one form, a setup for recepients is possible.
In another form the recipients part are missing.
What could be the difference between both forms?
How do I add recipients to a form?
Here is how to do it:
One has to choose a theme: default.
Then click:
+ Add another New email notification.
screenprint initial settings
Then one has to save first and reopen the form settings.
Now there is a section "Recipients" and "Email".
Here you can enter the addresses.
screenprint reopened after save
Create and "advanced form" to enter custom email addresses, or one has to choose from the cms-user list.

#DocuSignAPI and using the CRCL parameter

I have a question about the CRCL parameter in a Custom Related List using the #DocuSignAPI.
Besides the example listed in the documentation, does anyone have any examples to share? Does this mean this button can be put on a related list in Salesforce and be able to mass send? Does it mass send to all at once??
Sounds like you are referring to Custom Button Logic in DocuSign for Salesforce. The CRCL parameter allows the selection of recipients from a custom list related to the object where the button is placed.
The parameters do not affect the placement of the button. This is handled by placing the button in the Salesforce "layout".
If your goal is to send documents to many recipients you can either hard code the recipients in the CRL parameter, load default contacts from the object or use CRCL to define recipients from a custom list related to the object.
Here is Custom Button code sample to send to multiple hard coded
recipients using the CRL parameter.
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
//********* Option Declarations (Do not modify )*********//
var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';var CCNM='';var CRCL=''; var CRL='';var OCO='';var DST='';var LA='';var CEM='';var CES='';var STB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';
//*************************************************//
CCRM = 'Signer 1~Signer 1;Signer 2~Signer 2;Signer 3~Signer 3';
CCTM = 'Signer 1~Signer;Signer 2~Signer;Signer 3~CarbonCopy';
CRL = 'Email~sam#sample.com;FirstName~Sam;LastName~Sample;Role~Signer 1;RoutingOrder~1;Email~{!Opportunity.OwnerEmail};FirstName~Sally;LastName~Simple;Role~Signer 2;RoutingOrder~2;Email~sue#simple.com;FirstName~Sue;LastName~Simple;Role~Signer 3;RoutingOrder~3';
//********* Page Callout (Do not modify) *********//
window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Opportunity.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&CRL="+CRL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES;
//*******************************************//

Parent value of conditional initial tag - Docusign REST API

We are using the Docusign REST API. Now we have an conditional initial tab whose parent tag is a check box. I was able to set the check box to selected when there is no conditional initial field depending on it using the following code: checkboxTabs {tabLabel: "", selected: true}
But when I added the initial field and set the check box as its parent, I was not able to set the check box value.
What is wrong with my code?
I see in the REST API guide it state this about Check Box tabs:
If the parent tab is a Checkbox, Radio button, Optional Signature, or Optional Initial use “on” as the value to show that the parent tab is active.
Are you doing this?
DocuSign Documentation Page
Docusign marks TabLabel for parent fields with some kind of GUID. Unfortunately, it is not visible in template editor, so you have to download template's xml and find your tab there.
Tab label will look like:
<TabLabel>##parent3deb3045-7e98-4ae6-9186-1f9192e3cc79##LABEL_NAME</TabLabel>
You have to use this name in order to prepopulate it.
P.S. This issue was very confusing. I think it should be mentioned in official documentation.

Resources