2017-06-13 60 views
0

我正在使用Docusign與使用Apex的force.com站點集成的演示帳戶。 我創建了一個模板,並希望將兩個不同的郵件正文發送給兩個不同的收件人。我有兩個角色代理和經紀人。 在代理郵件正文中,我想使用代理收件人名稱。我可以通過使用[[Agent_UserName]]在主體中獲取名稱,但不能在主體中獲取。有什麼辦法可以在郵件正文中使用合併字段。docusign中每個收件人的自定義郵件正文

回答

2

Merge fields在電子郵件正文中不受支持。

以下是樣本CreateEnvelope請求爲每個收件人發送唯一的電子郵件主題/正文。您必須爲每個收件人添加emailNotification屬性

{ 
    "status": "created", 
    "compositeTemplates": [ 
    { 
     "inlineTemplates": [ 
      { 
       "sequence": "1", 
       "recipients": { 
        "signers": [ 
         { 
          "name": "recipient one", 
          "email": "[email protected]", 
          "routingOrder": "1", 
          "recipientId" : "1", 
          "roleName" : "texter", 
          "tabs": { 
           "textTabs" : [ 
            { 
             "xPosition" : "100", "yPosition" : "100", "documentId" : "1","pageNumber" : "1" 
            } 
           ] 
          }, 
          "emailNotification": { 
           "emailSubject": "subject for one", 
           "emailBody": "Body for One", 
           "supportedLanguage": "en" 
          } 
         }, 
         { 
          "name": "Jane Doe", 
          "email": "[email protected]", 
          "routingOrder": "2", 
          "recipientId" : "2", 
          "roleName" : "signer", 
          "tabs": { 
           "signHereTabs" : [ 
            { 
             "xPosition" : "100", "yPosition" : "200", "documentId" : "1", "pageNumber" : "1" 
            } 
           ] 
          }, 
          "emailNotification": { 
           "emailSubject": "subject for two", 
           "emailBody": "Body for two", 
           "supportedLanguage": "en" 
          }        
         } 
        ] 
       }, 
       "documents": [ 
       { 
        "documentId": "1", 
        "name": "Contract", 
        "fileExtension": "txt", 
        "documentBase64": "RG9jIFRXTyBUV08gVFdP" 
       } 
       ] 
      } 
     ] 
    }  
    ] 
} 
相關問題