Docusign signing url - Showing document 1 of a com

2019-02-28 15:14发布

Using the docusign rest api i would like to create an envelope with 2 documents. I will then be using the Post Recipient view to show document 1 to the first recipient (in an iframe) and once signed show document 2 in the same envelope to another recipients.

i have created the templates with different tempalteRoles (different names, order 5 and 10).

Its my understanding using a userId and the right settings in my docusign account, i can show document 1 to recipient 1 and then document 2 to recipient 2.

When i try and create the composite envelope the whole document is shown. when i call the recipient status for the envelope it only shows one signer.

I have found the envelope will only create when the 2 template roles have the same clientUserId, userName and email, otherwise i get the error "ONESIGNALLSIGN_NOT_SATISFIED"

here is the envelope i am sending through

{
  "accountId": "ACCOUNT_ID",
  "emailSubject": "Email subject",
  "status": "sent",
  "templateId": "TEMPLATE_ID",
  "templateRoles": [
    {
      "roleName": "PDS Customer",
      "email": "pds@example.com",
      "name": "TestFirstName TestSurname",
      "clientUserId": "1",
      "tabs": {
        "textTabs": [
          {
            "tabLabel": "DocumentNumber",
            "value": "123456789",
            "locked": true,
            "documentId": 1,
            "pageNumber": 1
          }
          ...removed some
        ]
      }
    },
    {
      "roleName": "Customer",
      "email": "test@example.com",
      "name": "mrTestFirstName TestSurname",
      "clientUserId": "2",
      "tabs": {
        "textTabs": [
          {
            "tabLabel": "StorerEmail_LocalPart",
            "value": "test",
            "locked": true,
            "documentId": 2,
            "pageNumber": 1
          }
          ...removed some
        ]
      }
    }
  ],
  "compositeTemplates": [
    {
      "compositeTemplateId": 1,
      "serverTemplates": [
        {
          "sequence": 1,
          "templateId": "TEMPLATE_ID_2"
        }
      ]
    }
  ]
}

1条回答
Explosion°爆炸
2楼-- · 2019-02-28 15:38

The error message is due to having Document Visibility enabled. In that scenario, each signer must have at least one tab present. Your second signer (embedded or not) must have at least one tab. In this case it'd probably be on the second document.

Your API call above does refer to a second documentId though so you may be okay there.

I would suggest that you not mix the "simple" sending (using templateRoles at the top level) with composite templates. Instead, add an inline template to the compositeTemplates structure with all of your recipient information. You may be seeing some odd behavior due to mixing those.

Lastly, the default Document Visibility configuration will show a document to a recipient only if they have a tab on that document. If your second signer should see all documents then you must either add a tab for them on each document or explicitly set visibility per document.

查看更多
登录 后发表回答