简体   繁体   中英

Is it impossible to use the Automated Anchor Tags if recipient info (signer) are not provided before creating envelope?

I am using the Embedded Sending View so that a user can finish a DocuSign Envelope with their taste and send it. What I am doing only before opening the Embedded Sender View is to upload documents that they want to DocuSign through REST API and don't set any recipient info at all. Some uploading documents have anchor tags like \\s1\\, \\s2\\, and so on. For recipients, signer or cc, a user provides it when they are in the Embedded Sender View.

What I would like to do is to show documents with anchor tags replaced with Sign tab when a user moves to the Tagging view using the recipients who a user provided in the Embedded Sender View, not pre-defined signer info.

From my tests, it seems that anchor tags like \\s1\\ are never replaced with the Sign Here tab automatically if there is no signer information provided in the envelope definition before creating an envelope. When I created signer object and set only recipient ID to it, it works with only \\s1\\. It seems to me that the Signer has to be provided in order to use the AutoPlace feature before creating an envelope.

The following code is what I used for testing. When I provided the signer explicitly, the AutoPlace feature works only with the anchor tag for Signer 1, \\s1\\

        ...
        EnvelopeDefinition envelopeDefinition = new EnvelopeDefinition();
        envelopeDefinition.setEmailSubject("Please sign this document");

        envelopeDefinition.setEmailBlurb("Something");

        Document doc1 = new Document();
        doc1.setDocumentBase64(new String(Base64.encode(DSHelper.readContent("Sign here.docx"))));
        doc1.setName("Sign Here Test");
        doc1.setFileExtension("docx");
        doc1.setDocumentId("1");

        // The order in the docs array determines the order in the envelope
        envelopeDefinition.setDocuments(Arrays.asList(doc1));

        //When I provided the signer explicitly, 
        //the AutoPlace feature works only with the anchor tag for Signer 1, \s1\\
        //Otherwise, it doesn't work at all
        Signer signer1 = new Signer();
        signer1.setRecipientId("1");  //This is mandatory 

        // Add the recipients to the envelope object
        Recipients recipients = new Recipients();
        recipients.setSigners(Arrays.asList(signer1));

        envelopeDefinition.setRecipients(recipients);        

        // create a signer recipient to sign the document, identified by name and email
        // We're setting the parameters via the object creation
        EnvelopesApi envelopeApi = new EnvelopesApi(this.apiClient);
        EnvelopeSummary results = envelopeApi.createEnvelope(this.getAccountId(), envelopeDefinition);

        //Generate Embedded Sender View URL....and so on
        ...

UPDATE I provided the two recipients in the Embedded Sending View as you can see the below image, but only one \\s1\\ tag was replaced with Sign Here in the Tagging View after clicking the Next on the Embedded Sending View.

This is the Embedded Sending View using the above code

This is the document preview with above code's result on the Tagging View

Is there the best way to achieve my case?

Since you're creating the envelope as a draft anyway, you don't actually need to define the second signer's Name and Email. When the Sender accesses the envelope, they can fill in the empty name & email and it will be associated with the tags the integration has already placed.

One way to do that is to use a template. Templates can have placeholders which do not have the recipient information but allow you to have tags for these eventual recipients. You can create the envelope from your template at which point you have to provide actual recipient information (name and email).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM