I working on signup process that require new user to sign on documents. I am using DocuSign embed signing workflow for that
I have created template with pdf document in docusign admin panel and added 1 test route:
and in the backend I am performing following api calls:
- STEP 1 - Login API Call (used to retrieve your baseUrl) - restapi/v2/login_information
- STEP 2 - Create an Envelope from Template and Send - baseURL + "/envelopes"
- STEP 3 - Launch the Embedded Signing view (aka recipient view) - baseURL + uri + "/views/recipient"
and as parameters for email, username if I am sending test@mail.com, test2 (like in route) then when I go to the retrieved recipient view url I see that form already has the placeholder for Sign and Initials since I have added these tags for test2 user in admin panel and form looks like:
Which is GREAT!
But not if I will send test3 and test3@mail.com as username and email params in this case I see form like this:
Here user can place his sign and other elements where he wants(which is BAD)
I need that behavior for all usernames and emails of new users that will signup(like all user will see these tags to sign and initial) I can't add them into admin panel to route since I don't know emails of new users that will came to site.
Is there a way to accomplish that ?
RequestBody for STEP2 for @AndrewWilson's request
"<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" +
"<status>sent</status>" +
"<emailSubject>DocuSign API - Embedded Signing example</emailSubject>" +
"<templateId>" + TEMPLATE_ID + "</templateId>" +
"<templateRoles>" +
"<templateRole>" +
"<email>" + recipientEmail + "</email>" +
"<name>" + recipientName + "</name>" +
"<roleName>test2</roleName>" +
"<clientUserId>1</clientUserId>"
"</templateRole>" +
"</templateRoles>" +
"</envelopeDefinition>";
recipientEmail, recipientName it will be dynamic, templateId constant for doc
Here is a sample call that would fill out your recipient information on a template that has roleName of Awesome Role, while email and name are both blank
If you want to start adding additional tags dynamically, you'd want to start using compositeTemplates, these increase the difficulty of the call, but here is a sample call using the same template but adding a Signature tag for the recipient.
More on Composite Templates in the DocuSign REST API Guide