2

This is with the Rest api. We trying to use the same anchor text values in all the documents we have in an envelope. We also may have several different server templates being applied to an envelope. We found out, to our dismay, that Docusign applies the anchor tags wherever it sees the anchor text and this means that if we have 3 server templates in the envelope, that the processing will create the anchor tags 3 times for each anchor text that it finds in each document. This means that the user will need to click three times to officially sign a document. What would be the quickest way to alleviate this problem?

-Here is the json

 "compositeTemplates": [
{
  "compositeTemplateId": "1",
  "serverTemplates": [
    {
      "sequence": "1",
      "templateId": "61323293-7f78-4e2b-a296-0c084db16f19"
    }
  ],
  "inlineTemplates": [
    {
      "sequence": "2",
      "documents": [],
      "recipients": {
        "signers": [
          {
            "name": "Kathy Lori",
            "email": "kathylori@xxx.com",
            "recipientId": "1",
            "accessCode": "12345",
            "customFields": [],
            "routingOrder": "1",
            "note": "",
            "roleName": "Customer_SellerName",
            "emailNotification": {
              "emailSubject": "Please sign the  document(s) (Lori)",
              "emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign.  Please click on the View Documents link below, review the content, and sign the document.  If you have any questions, please contact your consultant.\r\n\r\nThank you!",
              "supportedLanguage": "en"
            }
          }
        ],
        "certifiedDeliveries": []
      },
      "customFields": {
        "textCustomFields": [
          {
            "name": "EnvelopeInfo",
            "value": "my data"
          }
        ]
      }
    }
  ],
  "document": {
    "documentId": "1",
    "name": "C:\\Temp\\Docusign\\Package\\Canyonlands-ViewOnly.docx",
    "fileExtension": ".docx",
    "order": "1",
    "documentFields": [
      {
        "name": "DMSID",
        "value": "1"
      }
    ],
    "documentBase64": "[Document:Base64Array]"
  }
},
{
  "compositeTemplateId": "2",
  "serverTemplates": [
    {
      "sequence": "2",
      "templateId": "14da6be4-c719-47d9-b183-da13295f86d5"
    }
  ],
  "inlineTemplates": [
    {
      "sequence": "2",
      "documents": [],
      "recipients": {
        "signers": [
          {
            "name": "Kathy Lori",
            "email": "kathylori@xxx.com",
            "recipientId": "1",
            "accessCode": "12345",
            "customFields": [],
            "routingOrder": "1",
            "note": "",
            "roleName": "Customer_SellerName",
            "emailNotification": {
              "emailSubject": "Please sign the document(s) (Lori)",
              "emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign.  Please click on the View Documents link below, review the content, and sign the document.  If you have any questions, please contact your consultant.\r\n\r\nThank you!",
              "supportedLanguage": "en"
            }
          }
        ],
        "certifiedDeliveries": []
      },
      "customFields": {
        "textCustomFields": [
          {
            "name": "EnvelopeInfo",
            "value": "my data"
          }
        ]
      }
    }
  ],
  "document": {
    "documentId": "60059128",
    "name": "C:\\Temp\\Docusign\\Package\\e AKA.docx",
    "fileExtension": ".docx",
    "order": "2",
    "documentFields": [
      {
        "name": "DMSID",
        "value": "2"
      }
    ],
    "documentBase64": "[Document:Base64Array]"
  }
},
{
  "compositeTemplateId": "3",
  "serverTemplates": [
    {
      "sequence": "3",
      "templateId": "6b1a11c6-9719-424b-b983-4b278a467dd6"
    }
  ],
  "inlineTemplates": [
    {
      "sequence": "2",
      "documents": [],
      "recipients": {
        "signers": [
          {
            "name": "Kathy Lori",
            "email": "kathylori@xxx.com",
            "recipientId": "1",
            "accessCode": "12345",
            "customFields": [],
            "routingOrder": "1",
            "note": "",
            "roleName": "Customer_SellerName",
            "emailNotification": {
              "emailSubject": "Please sign the document(s) (Lori)",
              "emailBody": "Hello,\r\n\r\nYour  consultant has sent you a new document to view and sign.  Please click on the View Documents link below, review the content, and sign the document.  If you have any questions, please contact your consultant.\r\n\r\nThank you!",
              "supportedLanguage": "en"
            }
          }
        ],
        "certifiedDeliveries": []
      },
      "customFields": {
        "textCustomFields": [
          {
            "name": "EnvelopeInfo",
            "value": "my data"
          }
        ]
      }
    }
  ],
  "document": {
    "documentId": "85586460",
    "name": "C:\\Temp\\Docusign\\Package\\e Equity Disbursement Instructions.docx",
    "fileExtension": ".docx",
    "order": "3",
    "documentFields": [
      {
        "name": "DMSID",
        "value": "3"
      }
    ],
    "documentBase64": "[Document:Base64Array]"
  }
},
{
  "compositeTemplateId": "4",
  "serverTemplates": [
    {
      "sequence": "4",
      "templateId": "61323293-7f78-4e2b-a296-0c084db16f19"
    }
  ],
  "inlineTemplates": [
    {
      "sequence": "2",
      "documents": [],
      "recipients": {
        "signers": [
          {
            "name": "Kathy Lori",
            "email": "kathylori@xxx.com",
            "recipientId": "1",
            "accessCode": "12345",
            "customFields": [],
            "routingOrder": "1",
            "note": "",
            "roleName": "Customer_SellerName",
            "emailNotification": {
              "emailSubject": "Please sign the  document(s) (Lori)",
              "emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign.  Please click on the View Documents link below, review the content, and sign the document.  If you have any questions, please contact your consultant.\r\n\r\nThank you!",
              "supportedLanguage": "en"
            }
          }
        ],
        "certifiedDeliveries": []
      },
      "customFields": {
        "textCustomFields": [
          {
            "name": "EnvelopeInfo",
            "value": "my data"
          }
        ]
      }
    }
  ],
  "document": {
    "documentId": "4",
    "name": "C:\\Temp\\Docusign\\Package\\EightDocument.docx",
    "fileExtension": ".docx",
    "order": "4",
    "documentFields": [
      {
        "name": "DMSID",
        "value": "4"
      }
    ],
    "documentBase64": "[Document:Base64Array]"
  }
},
{
  "compositeTemplateId": "5",
  "inlineTemplates": [
    {
      "sequence": "3",
      "documents": [
        {
          "documentId": "5",
          "name": "C:\\Temp\\Docusign\\Package\\FifthDocument.docx",
          "fileExtension": ".docx",
          "order": "5",
          "documentFields": [
            {
              "name": "DMSID",
              "value": "5"
            }
          ],
          "documentBase64": "[Document:Base64Array]"
        },
        {
          "documentId": "6",
          "name": "C:\\Temp\\Docusign\\Package\\FirstDocument.docx",
          "fileExtension": ".docx",
          "order": "6",
          "documentFields": [
            {
              "name": "DMSID",
              "value": "6"
            }
          ],
          "documentBase64": "[Document:Base64Array]"
        },
        {
          "documentId": "7",
          "name": "C:\\Temp\\Docusign\\Package\\FourthDocument.docx",
          "fileExtension": ".docx",
          "order": "7",
          "documentFields": [
            {
              "name": "DMSID",
              "value": "7"
            }
          ],
          "documentBase64": "[Document:Base64Array]"
        }
      ],
      "recipients": {
        "signers": [
          {
            "name": "Kathy Lori",
            "email": "kathylori@xxx.com",
            "recipientId": "1",
            "accessCode": "12345",
            "customFields": [],
            "routingOrder": "1",
            "note": "",
            "roleName": "Customer_SellerName",
            "emailNotification": {
              "emailSubject": "Please sign the document(s) (Lori)",
              "emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign.  Please click on the View Documents link below, review the content, and sign the document.  If you have any questions, please contact your consultant.\r\n\r\nThank you!",
              "supportedLanguage": "en"
            }
          }
        ],
        "certifiedDeliveries": []
      },
      "customFields": {
        "textCustomFields": [
          {
            "name": "EnvelopeInfo",
            "value": "my data"
          }
        ]
      }
    }
  ]
}
Larry K
  • 47,808
  • 15
  • 87
  • 140
Kathy Lori
  • 487
  • 6
  • 21

2 Answers2

2
  1. Create the Envelope with status=created

  2. Use the listRecipients api to retrieve all the tabs.

  3. Use the DeleteRecipientTabs api to delete the tabs in the envelope. You can Delete multiple tabs in a single call.

  4. Use the createRecipientTabs api to create the new Anchor tabs.

  5. Use the UpdateEnvelope api to mark the Envelope status as Sent.

Praveen Reddy
  • 7,295
  • 2
  • 21
  • 43
  • 1
    Unfortunately, we are too far down this path to change what we're doing. They want this out in production very soon, like next week. Plus, if I was to mention using all these additional api calls per envelope, I think someone would shoot me. I just wish that it was possible to have the searching for the anchor text be done on the server template level and not the whole envelope. But that's how it works and I'm sure there is a very good reason why it does work this way. – Kathy Lori Jun 08 '17 at 15:11
  • In your JSON request, what is the purpose of `compositeTemplateId=4`> You can remove it and just move the document to `compositeTemplateId=5`. That way there will be no duplicate Anchor Tags. – Praveen Reddy Jun 08 '17 at 15:51
  • So, if this particular server template is already in the envelope that I don't need to include it a second time? – Kathy Lori Jun 08 '17 at 16:03
  • It would make sense to include it the second time if you are going to reuse the document in the server Template. But it looks like you are anyway replacing the document in the Server Template, so there is no point in using the same server template the second time. – Praveen Reddy Jun 08 '17 at 16:07
  • No, that didn't fix it. Thanks for the help, though. – Kathy Lori Jun 09 '17 at 11:20
1

In your JSON request, there is no need to specify the compositeTemplateId=4 You can remove it and just move the document to compositeTemplateId=5. That way there will be no duplicate Anchor Tags.

It would make sense to include it the second time if you are going to reuse the document in the server Template. But it looks like you are anyway replacing the document in the Server Template, so there is no point in using the same server template the second time.

If you don't want to do the above approach, then follow the approach I suggested in my other answer

In the below Json I have removed the duplicate compositeTemplate and moved the document into the final template.

{
  "compositeTemplates": [
    {
        "compositeTemplateId": "1",
        "serverTemplates": [
            {
                "sequence": "1",
                "templateId": "61323293-7f78-4e2b-a296-0c084db16f19"
            }
        ],
        "inlineTemplates": [
            {
                "sequence": "2",
                "documents": [ ],
                "recipients": {
                    "signers": [
                        {
                            "name": "Kathy Lori",
                            "email": "kathylori@xxx.com",
                            "recipientId": "1",
                            "accessCode": "12345",
                            "customFields": [ ],
                            "routingOrder": "1",
                            "note": "",
                            "roleName": "Customer_SellerName",
                            "emailNotification": {
                                "emailSubject": "Please sign the  document(s) (Lori)",
                                "emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign.  Please click on the View Documents link below, review the content, and sign the document.  If you have any questions, please contact your consultant.\r\n\r\nThank you!",
                                "supportedLanguage": "en"
                            }
                        }
                    ],
                    "certifiedDeliveries": [ ]
                },
                "customFields": {
                    "textCustomFields": [
                        {
                            "name": "EnvelopeInfo",
                            "value": "my data"
                        }
                    ]
                }
            }
        ],
        "document": {
            "documentId": "1",
            "name": "C:\\Temp\\Docusign\\Package\\Canyonlands-ViewOnly.docx",
            "fileExtension": ".docx",
            "order": "1",
            "documentFields": [
                {
                    "name": "DMSID",
                    "value": "1"
                }
            ],
            "documentBase64": "[Document:Base64Array]"
        }
    },
    {
        "compositeTemplateId": "2",
        "serverTemplates": [
            {
                "sequence": "2",
                "templateId": "14da6be4-c719-47d9-b183-da13295f86d5"
            }
        ],
        "inlineTemplates": [
            {
                "sequence": "2",
                "documents": [ ],
                "recipients": {
                    "signers": [
                        {
                            "name": "Kathy Lori",
                            "email": "kathylori@xxx.com",
                            "recipientId": "1",
                            "accessCode": "12345",
                            "customFields": [ ],
                            "routingOrder": "1",
                            "note": "",
                            "roleName": "Customer_SellerName",
                            "emailNotification": {
                                "emailSubject": "Please sign the document(s) (Lori)",
                                "emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign.  Please click on the View Documents link below, review the content, and sign the document.  If you have any questions, please contact your consultant.\r\n\r\nThank you!",
                                "supportedLanguage": "en"
                            }
                        }
                    ],
                    "certifiedDeliveries": [ ]
                },
                "customFields": {
                    "textCustomFields": [
                        {
                            "name": "EnvelopeInfo",
                            "value": "my data"
                        }
                    ]
                }
            }
        ],
        "document": {
            "documentId": "60059128",
            "name": "C:\\Temp\\Docusign\\Package\\e AKA.docx",
            "fileExtension": ".docx",
            "order": "2",
            "documentFields": [
                {
                    "name": "DMSID",
                    "value": "2"
                }
            ],
            "documentBase64": "[Document:Base64Array]"
        }
    },
    {
        "compositeTemplateId": "3",
        "serverTemplates": [
            {
                "sequence": "3",
                "templateId": "6b1a11c6-9719-424b-b983-4b278a467dd6"
            }
        ],
        "inlineTemplates": [
            {
                "sequence": "2",
                "documents": [ ],
                "recipients": {
                    "signers": [
                        {
                            "name": "Kathy Lori",
                            "email": "kathylori@xxx.com",
                            "recipientId": "1",
                            "accessCode": "12345",
                            "customFields": [ ],
                            "routingOrder": "1",
                            "note": "",
                            "roleName": "Customer_SellerName",
                            "emailNotification": {
                                "emailSubject": "Please sign the document(s) (Lori)",
                                "emailBody": "Hello,\r\n\r\nYour  consultant has sent you a new document to view and sign.  Please click on the View Documents link below, review the content, and sign the document.  If you have any questions, please contact your consultant.\r\n\r\nThank you!",
                                "supportedLanguage": "en"
                            }
                        }
                    ],
                    "certifiedDeliveries": [ ]
                },
                "customFields": {
                    "textCustomFields": [
                        {
                            "name": "EnvelopeInfo",
                            "value": "my data"
                        }
                    ]
                }
            }
        ],
        "document": {
            "documentId": "85586460",
            "name": "C:\\Temp\\Docusign\\Package\\e Equity Disbursement Instructions.docx",
            "fileExtension": ".docx",
            "order": "3",
            "documentFields": [
                {
                    "name": "DMSID",
                    "value": "3"
                }
            ],
            "documentBase64": "[Document:Base64Array]"
        }
    },

    {
        "compositeTemplateId": "5",
        "inlineTemplates": [
            {
                "sequence": "3",
                "documents": [
                    {
                        "documentId": "4",
                        "name": "C:\\Temp\\Docusign\\Package\\EightDocument.docx",
                        "fileExtension": ".docx",
                        "order": "4",
                        "documentFields": [
                            {
                                "name": "DMSID",
                                "value": "4"
                            }
                        ],
                        "documentBase64": "[Document:Base64Array]"
                    },
                    {
                        "documentId": "5",
                        "name": "C:\\Temp\\Docusign\\Package\\FifthDocument.docx",
                        "fileExtension": ".docx",
                        "order": "5",
                        "documentFields": [
                            {
                                "name": "DMSID",
                                "value": "5"
                            }
                        ],
                        "documentBase64": "[Document:Base64Array]"
                    },
                    {
                        "documentId": "6",
                        "name": "C:\\Temp\\Docusign\\Package\\FirstDocument.docx",
                        "fileExtension": ".docx",
                        "order": "6",
                        "documentFields": [
                            {
                                "name": "DMSID",
                                "value": "6"
                            }
                        ],
                        "documentBase64": "[Document:Base64Array]"
                    },
                    {
                        "documentId": "7",
                        "name": "C:\\Temp\\Docusign\\Package\\FourthDocument.docx",
                        "fileExtension": ".docx",
                        "order": "7",
                        "documentFields": [
                            {
                                "name": "DMSID",
                                "value": "7"
                            }
                        ],
                        "documentBase64": "[Document:Base64Array]"
                    }
                ],
                "recipients": {
                    "signers": [
                        {
                            "name": "Kathy Lori",
                            "email": "kathylori@xxx.com",
                            "recipientId": "1",
                            "accessCode": "12345",
                            "customFields": [ ],
                            "routingOrder": "1",
                            "note": "",
                            "roleName": "Customer_SellerName",
                            "emailNotification": {
                                "emailSubject": "Please sign the document(s) (Lori)",
                                "emailBody": "Hello,\r\n\r\nYour consultant has sent you a new document to view and sign.  Please click on the View Documents link below, review the content, and sign the document.  If you have any questions, please contact your consultant.\r\n\r\nThank you!",
                                "supportedLanguage": "en"
                            }
                        }
                    ],
                    "certifiedDeliveries": [ ]
                },
                "customFields": {
                    "textCustomFields": [
                        {
                            "name": "EnvelopeInfo",
                            "value": "my data"
                        }
                    ]
                }
            }
        ]
    }
  ]
}
Praveen Reddy
  • 7,295
  • 2
  • 21
  • 43