2016-11-28 95 views
1

我如何在DocuSign中执行此操作?目前我正在做的是使用DocuSign的REST API将每个模板单独发送给受让人,并遵循这个example在一封电子邮件中发送多个DocuSign模板?

这是可以使用他们的REST API吗?此外,我正在考虑将$data变量转换为一个数组,其中包含模板发送所需的所有必要信息(如果甚至可能的话)。

+0

请将您的代码粘贴到需要帮助的地方。 –

+0

@RohitSuthar这就是问题我只知道如何发送个人模板,并没有任何代码或指导多个模板在一个电子邮件。我希望有人能指引我走向正确的方向。 – hungrykoala

+0

那么你在错误的地方。在这里你不能提出建议。所以首先实现你的代码中的想法,并要求错误,如何解决它? –

回答

3

要在DocuSign信封中放置多个模板,您需要在呼叫中使用复合模板结构。简而言之,每个模板都将存在于一个复合模板中。在每个组合模板中,您都可以识别您的服务器模板,然后使用内联模板来定义收件人以及试图合并到模板中的任何数据。

这是我在Runscope/Postman中使用的一些json。

{ 
    "emailSubject": "DocuSign Widget Order and NDA", 
    "emailBlurb": "Please let us know if you have any questions.", 
    "status": "sent", 
    "compositeTemplates": [ 
    { 
     "serverTemplates": [ 
     { 
      "sequence": "1", 
      "templateId": "templateIDremoved" 
     } 
     ], 
     "inlineTemplates": [ 
     { 
      "sequence": "1", 
      "recipients": { 
      "signers": [ 
       { 
       "email": "[email protected]", 
       "name": "Customer Bob", 
       "roleName": "Customer", 
       "recipientId": "1", 
       "tabs": { 
        "textTabs": [ 
        { 
         "tabLabel": "company", 
         "value": "ABC Corporation" 
        } 
        ] 
       } 
       }, 
       { 
       "email": "[email protected]", 
       "name": "Sender Rob", 
       "recipientId": "2", 
       "roleName": "Legal" 
       } 
      ] 
      } 
     } 
     ] 
    }, 
    { 
     "serverTemplates": [ 
     { 
      "sequence": "2", 
      "templateId": "templateIDremoved" 
     } 
     ], 
     "inlineTemplates": [ 
     { 
      "sequence": "2", 
      "recipients": { 
      "signers": [ 
       { 
       "email": "[email protected]om", 
       "name": "Customer Bob", 
       "recipientId": "1", 
       "roleName": "Customer" 
       } 
      ] 
      } 
     } 
     ] 
    } 
    ] 
} 
相关问题