0

I want to include anchor tabs from both a server template and an inline template in a composite template document (a document uploaded at runtime). The server template contains a single recipient with the role of Signer1. The inline template contains a different recipient with the role of Signer2. Below is the full request xml. I can include the server template json if needed. I have read the following documentation: Send an Envelope from a Template, Dev Center Templates Doc, and Rules for CompositeTemplate Usage.

<envelopeDefinition>
  <status>sent</status>
  <emailSubject>Please sign this document</emailSubject>
  <emailBlurb></emailBlurb>
  <compositeTemplates>
    <compositeTemplate>
      <inlineTemplates>
        <inlineTemplate>
          <recipients>
            <agents />
            <carbonCopies />
            <certifiedDeliveries />
            <editors />
            <inPersonSigners />
            <intermediaries />
            <signers>
              <signer>
                <recipientId>1</recipientId>
                <name>My name</name>
                <email>My email address</email>
                <routingOrder></routingOrder>
                <roleName>Signer2</roleName>
                <tabs>
                  <approveTabs>
                    <approve>
                      <anchorString>A string in the runtime doc</anchorString>
                      <anchorUnits>Pixels</anchorUnits>
                      <anchorXOffset>0</anchorXOffset>
                      <anchorYOffset>0</anchorYOffset>
                    </approve>
                  </approveTabs>
                  <companyTabs />
                  <dateSignedTabs />
                  <declineTabs />
                  <emailAddressTabs />
                  <envelopeIdTabs />
                  <firstNameTabs />
                  <fullNameTabs />
                  <initialHereTabs>
                    <initialHere>
                      <anchorString>A string in the runtime doc</anchorString>
                      <anchorUnits>Pixels</anchorUnits>
                      <anchorXOffset>0</anchorXOffset>
                      <anchorYOffset>0</anchorYOffset>
                    </initialHere>
                  </initialHereTabs>
                  <lastNameTabs />
                  <signerAttachmentTabs />
                  <signHereTabs />
                  <titleTabs />
                </tabs>
              </signer>
            </signers>
          </recipients>
          <sequence>2</sequence>
        </inlineTemplate>
      </inlineTemplates>
      <document>
        <documentId>My runtime doc id</documentId>
        <name>My runtime doc name</name>
        <documentBase64>PDF bytes</documentBase64>
      </document>
      <serverTemplates>
        <serverTemplate>
          <sequence>1</sequence>
          <templateId>My server template id</templateId>
        </serverTemplate>
      </serverTemplates>
    </compositeTemplate>
  </compositeTemplates>
</envelopeDefinition>

I would expect that the recipient in the server template (Signer1) receives the envelope with the server template tabs included and the recipient in the inline template receives an envelope with the inline template tabs included.

The good news is that the recipient in the server template does receive an envelope with the tabs specified in the server template.

The problem is that the recipient in the inline template receives an envelope without any tabs. I can't figure out why the tabs in the inline template are being ignored. I have used an anchor string in the server and inline templates to specify the location in the composite template document to place the tabs.

shortstak
  • 3
  • 1

1 Answers1

0

You can add document in an envelope from either server template or Inline Template. If you are adding document from InlineTemplate then you should define the tabs using anchor string and all the tabs will be created using InlineTemplate only. You cannot mix two strategies, i.e adding few tabs from server templates and few tabs (using Anchor String) from Inline Templates. If you have same document in both server and inline template then create envelope using InlineTemplate and create recipient tabs using anchor string, I am not able to understand why you are mixing one recipient from Server and another from Inline Template.

Amit K Bist
  • 6,760
  • 1
  • 11
  • 26
  • In my example a user has created a server template that consists solely of a number of anchor tab definitions. This template (the tabs) can then be applied to a composite template document that a user uploads (imagine this as a default list of tabs that the user knows will apply to any document they upload). When the user uploads a document they realize that they want to add more recipients and tabs (tabs not present in the default list within the server template) to the document. So they would expect both the server and inline tabs and recipients to be added to the doc. – shortstak Dec 12 '17 at 19:01
  • Composite Template does not work in that way, if user knows that it has more tabs and recipients than as mentioned in the server template then your code should only create composite template using inline template only and add all the recipients and its tabs (using Anchor String in your case) using InlineTemplates only, in this case adding server template is of no use, and mixing with server template might throw an error as well. – Amit K Bist Dec 12 '17 at 19:36
  • So are you saying that it is not possible to include a combination of tabs and recipients from server templates and inline templates when uploading an envelope definition? So if I have 10 tabs defined in my server template and I want to add one more when I create the envelope definition, I need to redefine the 10 tabs that are already present in my server template within an inline template? Please point me to any documentation that states that you can't use a combination tabs or recipients both from a server template and an inline template when you create an envelope definition. – shortstak Dec 12 '17 at 20:13
  • Yes, you cannot mix two strategies, that few tabs come from server template and few tabs are coming from inline template is not possible. There is no such documentation explaining its working in detail. Once you start using more composite templates then you will learn working of composite template in detail. – Amit K Bist Dec 12 '17 at 20:27