Send envelope - replacing multiple template documents

335 Views Asked by At

I have a question regarding the following scenario.

I have a Docusign template with 2 documents. Template contains two Template Roles with few signature tags applied on documents. There could be also Text Input tags, checkbox tags etc...

What I need is to send an envelope with documents that will replace both template documents but to apply DocuSign tags (signature, checkbox..) that were configured in the template, to apply document visibility, and as much DS template features as it can.

Signature request (envelope) is sent using DocuSign.eSign C# client library. I'm using following code that builds Composite Template that contains two new documents with appropriate documentIDs retrieved from DocuSign template.

 EnvelopeDefinition envDef = new EnvelopeDefinition();
 envDef.EmailSubject = "Subject";
 envDef.EmailBlurb = "Body";

 envDef.CompositeTemplates = new List<CompositeTemplate>();
 envDef.CompositeTemplates.Add(new CompositeTemplate
 {
      ServerTemplates = new List<ServerTemplate> {
          new ServerTemplate
          {
              Sequence = "2",
              TemplateId = "TEMPLATE_ID_GOES_HERE"
          }
      },
      InlineTemplates = new List<InlineTemplate>
      {
           new InlineTemplate
           {
                Sequence = "1",
                Documents = new List<DocuSign.eSign.Model.Document>
                {
                    new Document
                    {
                        DocumentBase64 = "...",    //document content
                        Name ="some.pdf",             
                        DocumentId = "TEMPLATE_DOC1_ID_GOES_HERE" //ID of template document that should be replaced
                    },
                    new Document
                    {
                        DocumentBase64 = "...",  //document content
                        Name ="another.pdf",
                        DocumentId = "TEMPLATE_DOC2_ID_GOES_HERE" //ID of template document that should to be replaced
                    }
                }
            }
        } 
    });

Envelope is successfully sent, signers can see both new documents, but there are no Tags that were configured in the Template (on Docusign Web UI), and I'd like to avoid sending recipient tabs from client.

Am I missing something?

Thanks.

1

There are 1 best solutions below

0
On

Change the sequencing order so the new documents are listed first.

With composite templates, order matters. For documents, the earlier documents are used. -- So your new documents should be before the server template (and its documents).

For everything else, the later information wins.

See this answer: https://stackoverflow.com/a/44376770/64904

On second thought, I see that you're doing this and it is all working except that the tabs are not being applied to the new documents.

Try the merge_roles_on_draft query parameter. Also, if you're using anchor tabs, add the applyAnchorTabs: 'true' element to the document objects.