2016-11-28 77 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" 
       } 
      ] 
      } 
     } 
     ] 
    } 
    ] 
} 
相關問題