I want to assign a text field(read only) dynamically from code, separate for each recipient in a multi recipient embedded DocuSign using rest api (PHP SDK). How to do that using template role and tabs in php? or
How can I restrict certain fields from being viewed by specific recipients?
So your last question and the "single document" means you cannot use the DocuSign Visibility feature of DocuSign, I assume you know about that.
So, you can have readonly fields and you can have them assign to specific recipients, but other recipients will see them too.
You can also use pre-filled fields that enables to have a field that is not for any recipient and your code can fill it in.
What I recommend is this, since you need a template anyway. Create your template using the web app, make sure it works as you expect by trying it and sending documents to yourself using it.
Once you got it all working as expected in the web app, using the API is not that hard, all you have to do is get API logs of what the web app did using the API and you can do the same.
Related
How to create custom fields that have no link to recipients? Would it be prefill tools? the only option I found but it asks for recipientId and when I give a Get we don't have this information.
It depends on what you are trying to do:
If you are trying to add metadata to the envelope, but not change the way to documents look (meaning, the data is not imprinted on the documents for recipients to see), then you can use envelope custom fields. Those could be set via the web app or via API.
If, on the other hand, you want something to be visible to recipients, meaning, you want a change to the way to documents look and you don't want that to be associated with a recipient, then you need pre-fill fields. These can also be set via API, see this blog post.
My use case only requires Docusign for e-signature of pre-filled PDF forms.
The PDF forms will be generated on our application side where some fields will be automatically filled (using xPressions) and the user will fill in the remaining blank fields.
The use case:
In our web application the user is presented with a task/action.
After invoking the task the user is presented with a PDF form.
The user fills in the blank fields of the PDF form and closes it.
The user is then invited to e-sign the document.
The web applications initiates a session with Docusign and transfers the PDF document to Docusign.
The web application hands control over to Docusign (in an IFrame) where the user can add a signature to the document.
Docusign hands control back to the web application.
The user task is complete.
The web application retrieves the e-signed document.
End
In this use case we don't have a need for Docusign templates or powerforms as the PDF generation solution already exists. This existing PDF generation solution is quite complex and it would not feasible or cost effective re-implement within the Docusign solution.
My question, is the above, e-signature-only, use case feasible within the docusign solution?
You will want to use "embedded signing" to keep the entire flow within your web app. This is accomplished by specifying a "captive recipient" as the signer. In addition to name and email address, you will specify a "clientUserId" for the signer. This should be specific and unique to the actual signer, e.g. a "customer ID", employee ID, etc. In a pinch, you can use the email address.
See (https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/embedding/).
You can use this API endpoint to create an envelope by passing your pdf.
See guide and section "Attaching documents to an envelope"
I am working with existing Word documents that are currently updated in a mail merge. I would like to be able to (on the high-level) just be able to convert these documents in run-time to a Docusign template with signable fields and automatically send them (without having to upload documents to the Docusign site, etc., etc;). I don't want to change our current workflow, just add a "behind-the-scenes" step that automatically creates and sends the DocuSign envelope(s) to the specified signer. The users won't be signing into Word or DocuSign, they'll be literally clicking a "Generate and Send Document" button. Is the Docusign API object exposed in a way that makes this possible?
Chris Fleetwood
Software Developer
N.C. Partnership for Children, Inc.
cfleetwood#smartstart.org
One way you can do that is using the DocuSign Connector for Flow and PowerApps.
This does require you to have an account with Microsoft and potentially pay them extra (I'm not sure about that part, you would have to check with them) but it seems to have the functionality you need, without having to write any code.
DocuSign also has a Word Add-In that does support templates, but only through the template-match feature. If the document you are authoring looks like a document stored in your DocuSign account inside a template - you can use this template form Word with one-click.
I'm only mildly technical and not the web lead for my company, but I am the membership lead and I'm hoping to use your API for my workflow. This is what I need:
A web form on our website that asks for Name, e-mail, age, and a drop-down box of predetermined locations.
Using the above, I'd like the age to decide whether the requestor receives the Over 18 or Under 18 version of my form. Then I'd like the name to be auto-filled into the correct form. I'd like the form to be then e-mailed to them for a signature, and I'd like the signed, returned form to not only come to my primary e-mail address, but also to use the location to send a carbon copy to their local representative.
Can it be done? Thank you all for your help!
Yes you can use DocuSign to easily achieve the workflow you've stated. There's probably several ways you can implement this, I'll focus on the first that comes to my mind which is using DocuSign Templates.
Using Templates you can upload documents into your DocuSign account at design time, add workflow, tabs, routing, etc, then at run-time your app can reference these templates and match specific recipients to placeholder roles configured in the template.
For example, your flow would be:
Create 2 templates in your DocuSign account, one for 18+ case and one for Under 18 (note: you have unlimited templates in your account).
Add a Carbon Copy recipient as the second recipient for each template, make sure to give a routing order = 2 by setting the signing order.
Once your web form receives all input data from the user (ie Name, email, age, and location) use the Envelopes: create API to create an envelope with the form data populated in various tabs.
By default, once they are done signing the platform will email them a copy of the signed document (you can control this through account settings).
The Carbon Copy recipient will also receive a copy of the signed document once signing is complete, you can store a static email in the template or provide new recipient information at run-time when making the API request.
For more info see the DocuSign Developer Center. I also recommend you have a look at the Tabs section and Templates section for some highly useful information.
I have been successfully using DocuSign embedded signing in a J2EE application, using the createEnvelopeFromTemplates SOAP API, 1 template and 1 document to create 1 document in an envelope for 2 signers.
Now I am implementing a case with more than two signers. There are some checkboxes contained within the document. The chechboxes are to be checked by one of the signers. Not all signers sign each document, and which signer checks the checkboxes is determined at envelope creation time, based on which signers are actually present.
I tried to implement this case by using a set of templates with:
One template for all the possible signatures
Templates tagged for each possible signer that could fill in the checkboxes.
At envelope creation time, my website has collected the information to know which signers are present, and which signer will fill in the checkboxes. The appropriate templates are referenced in the call to DocuSign to create the envelope, and the appropriate roles are assigned. The problem is that when specifying multiple templates with the createEnvelopeFromTemplates operation, each TemplateReference object requires a document. I can't figure out how to tell the API to apply the multiple templates to the same document, so I will end up with a single document in the envelope.
Reading the DocuSign documentation, it appears that using createEnvelopesFromTemplatesAndForms with CompositeTemplates might work, but I would prefer to stay with the simpler CreateEnvelopeFromTemplates. Is there a way to apply multiple templates to a single document using CreateEnvelopeFromTemplates?
Thanks, Mark
You will need to use CompositeTemplates to solve this. The CreateEnvelopeFromTemplates() call that you are making adds what are known as ServerTemplates to your envelope, and since each server template contains a document (i.e. you can't save a design-time template in the DocuSign Console without providing a document) each time you add a server template to an envelope it adds the document too.
Using CompositeTemplates you can add ServerTemplates as well as InlineTemplates to your envelopes which means you can start with the template with the document(s) then use the properties of a second (inline) template without including its documents. Therefore, the SOAP call you should instead make is
CreateEnvelopeFromTemplatesAndForms()
And using the RoleName property you can assign your recipients to the template roles you have already created at design-time.
I was going to suggest testing this through the API Explorer but remembered you're using the SOAP API not REST and that's for testing with REST, so instead probably your best bet is the SOAP documentation and the samples found in the SOAP SDK on GithUb:
DocuSign SOAP SDK
SOAP Guide - CreateEnvelopeFromTemplatesAndForms
There are sample CreateEnvelopeFromTemplatesAndForms() calls in the SDK that show how to make the call.
We have found a solution that seems to work. We are still using the CreateEnvelopeFromTemplates operation, but we combined our templates into one and have a created a new role, "Question Answerer", and assigned all the checkboxes to that role. At envelope creation time, when we specify the role assignments, we specify the ID of the appropriate signer to both the signature role and the "Question Answerer" role.
Although we did not find a way to apply multiple templates to a single document using CreateEnvelopeFromTemplates, the above solution solves our problem.
Thanks, Mark