0

Below the request xml I am using to prefill Company tab. Based on this Docusign: creating envelopes through templates with the REST API and prefilling tags I changed rolename to start with Signer but it didnt help. What am I missing here -

<envelopeDefinition xmlns="http://www.docusign.com/restapi">
  <accountId>accountId</accountId>
  <status>sent</status>
  <compositeTemplates>
    <compositeTemplate>
      <serverTemplates>
        <serverTemplate>
          <sequence>1</sequence>
          <templateId>templateid</templateId>
        </serverTemplate>
      </serverTemplates>
      <inlineTemplates>
        <inlineTemplate>
          <sequence>1</sequence>
          <recipients>
            <signers>
              <signer>
                <email> sverma@icontract.com </email>
                <name>afhoauf vouagi</name>
                <recipientId>1</recipientId>
                <roleName>Contractor</roleName>
                <clientUserId>1</clientUserId>
                <tabs>
                  <companyTabs>
                    <company>
                      <documentId>1</documentId>
                      <pageNumber>1</pageNumber>
                      <recipientId>1</recipientId>
                      <xPosition>70</xPosition>
                      <yPosition>156</yPosition>
                      <tabLabel>Company</tabLabel>
                      <value>SomeName</value>
                      <concealValueOnDocument>false</concealValueOnDocument>
                    </company>
                  </companyTabs>
                </tabs>
              </signer>
              <signer>
                <email> </email>
                <name></name>
                <recipientId>3</recipientId>
                <roleName>Icon</roleName>
                <clientUserId>1</clientUserId>
              </signer>
            </signers>
          </recipients>
        </inlineTemplate>
      </inlineTemplates>
    </compositeTemplate>
    <compositeTemplate>
      <serverTemplates>
        <serverTemplate>
          <sequence>2</sequence>
          <templateId>templateid</templateId>
        </serverTemplate>
      </serverTemplates>
      <inlineTemplates>
        <inlineTemplate>
          <sequence>1</sequence>
          <recipients>
            <signers>
              <signer>
                <email> sverma@icontract.com </email>
                <name>afhoauf vouagi</name>
                <recipientId>1</recipientId>
                <roleName>Contractor</roleName>
                <clientUserId>1</clientUserId>
                <tabs></tabs>
              </signer>
              <signer>
                <email> </email>
                <name></name>
                <recipientId>3</recipientId>
                <roleName>Icon</roleName>
                <clientUserId>1</clientUserId>
              </signer>
            </signers>
          </recipients>
        </inlineTemplate>
      </inlineTemplates>
    </compositeTemplate>
    <compositeTemplate>
      <serverTemplates>
        <serverTemplate>
          <sequence>3</sequence>
          <templateId>templateid</templateId>
        </serverTemplate>
      </serverTemplates>
      <inlineTemplates>
        <inlineTemplate>
          <sequence>1</sequence>
          <recipients>
            <signers>
              <signer>
                <email> sverma@icontract.com </email>
                <name>afhoauf vouagi</name>
                <recipientId>1</recipientId>
                <roleName>Contractor</roleName>
                <clientUserId>1</clientUserId>
                <tabs></tabs>
              </signer>
              <signer>
                <email> </email>
                <name></name>
                <recipientId>3</recipientId>
                <roleName>Icon</roleName>
                <clientUserId>1</clientUserId>
              </signer>
            </signers>
          </recipients>
        </inlineTemplate>
      </inlineTemplates>
    </compositeTemplate>
    <compositeTemplate>
      <serverTemplates>
        <serverTemplate>
          <sequence>4</sequence>
          <templateId>templateid</templateId>
        </serverTemplate>
      </serverTemplates>
      <inlineTemplates>
        <inlineTemplate>
          <sequence>1</sequence>
          <recipients>
            <signers>
              <signer>
                <email> sverma@icontract.com </email>
                <name>afhoauf vouagi</name>
                <recipientId>1</recipientId>
                <roleName>Contractor</roleName>
                <clientUserId>1</clientUserId>
                <tabs></tabs>
              </signer>
              <signer>
                <email> </email>
                <name></name>
                <recipientId>3</recipientId>
                <roleName>Icon</roleName>
                <clientUserId>1</clientUserId>
              </signer>
            </signers>
          </recipients>
        </inlineTemplate>
      </inlineTemplates>
    </compositeTemplate>
    <compositeTemplate>
      <serverTemplates>
        <serverTemplate>
          <sequence>5</sequence>
          <templateId>templateid</templateId>
        </serverTemplate>
      </serverTemplates>
      <inlineTemplates>
        <inlineTemplate>
          <sequence>1</sequence>
          <recipients>
            <signers>
              <signer>
                <email> sverma@icontract.com </email>
                <name>afhoauf vouagi</name>
                <recipientId>1</recipientId>
                <roleName>Contractor</roleName>
                <clientUserId>1</clientUserId>
                <tabs></tabs>
              </signer>
              <signer>
                <email> </email>
                <name></name>
                <recipientId>3</recipientId>
                <roleName>Icon</roleName>
                <clientUserId>1</clientUserId>
              </signer>
            </signers>
          </recipients>
        </inlineTemplate>
      </inlineTemplates>
    </compositeTemplate>
  </compositeTemplates>
</envelopeDefinition>
Community
  • 1
  • 1

2 Answers2

0

I'm not sure why you changed the roleName to start with "Signer", that is definitely not a requirement and the post that you linked to doesn't state you have to use that at all. Instead, that is probably your issue right there.

You need to make sure you are using the same role name that you saved in the template in your API request. For instance, if you create a Template through the console and give it one role named "Customer", then in your api request you need to reference that same name to assign the recipient to the role, ie:

<signers>
    <signer>
        <email> sverma@icontract.com </email>
        <name>afhoauf vouagi</name>
        <recipientId>1</recipientId>
        <roleName>Customer</roleName>
        ...

Also, I'm not sure if this is a copy paste error coming into Stack Overflow but you should remove the extra spaces you have around the recipient's email:

<email> sverma@icontract.com </email>
Ergin
  • 9,254
  • 1
  • 19
  • 28
  • Thanks Ergin. I changed the rolename to Signer in both the places i.e. the template and the request, so I am using the same rolename in both the places. Also in the post the questioner has an update where he specifies the usage of rolename starting with signer solved his problem, so I tried that too - **And it populated! It seems if I start the role name with anything other than Signer it doesn't work. Weird! And yes, I'm changing the role name on Docusign from Random1 to Signer2, in this case. For example, Signer3 also worked.** – Nilesh Singh Dec 13 '14 at 04:23
  • Also if I change the tabLabel and set some value to it, it creates a new tab in the document but even that one doesnt show any value – Nilesh Singh Dec 13 '14 at 04:33
0

I'm not sure that you can set the value for a tag named "Company". I believe that conflicts with DocuSign's built-in Company tag which may only be filled by the signer. If you need to prefill such a tag, just use a normal text tab and set the name/label to something else. E.g. "CompanyName"

Jeff Kyllo
  • 698
  • 3
  • 8