How to Set Email Subject Line and Email Message from JSON in Docusign

假装没事ソ 提交于 2019-12-12 23:35:34

问题


Could anyone explain to me that how to set email subject line and email message using JSON in Docusign.

Note:(JSON string has to be passed as HTTP request).

Thank you, Vignesh.B


回答1:


Use the emailNotification property to set separate email subject and email body per each individual recipient. The emailNotification property should be set per recipient.

Here is a sample Json for the createEnvelope request.

POST /v2/accounts/{accountId}/envelopes

{
  "recipients": {
    "signers": [
      {
        "email": "recipientone@acme.com",
        "name": "recipient one",
        "recipientId": "1",
        "routingOrder": "1",
        "emailNotification": {
              "emailSubject": "Please sign the  document Recipient One ",
              "emailBody": "Hello Recipient One,\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"
         },
        "tabs": {"signHereTabs": [{"documentId": "1", "pageNumber": "1", "xPosition": "100", "yPosition": "100"}]}
      },
      {
        "email": "recipienttwo@acme.com",
        "name": "recipient two",
        "recipientId": "2",
        "routingOrder": "2",
        "emailNotification": {
              "emailSubject": "Please sign the  document Recipient Two ",
              "emailBody": "Hello Recipient Two,\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"
         },        
        "tabs": {"signHereTabs": [{"documentId": "1", "pageNumber": "1", "xPosition": "100", "yPosition": "200"}]}
      }
    ]
  },
  "documents": [
    {
      "documentBase64": "RG9jIFRXTyBUV08gVFdP",
      "documentId": "1",
      "fileExtension": "txt",
      "name": "Simple Contract",
      "order": "1"
    }
  ],
  "status": "Sent"
}



回答2:


Use the emailSubject and emailBlurb properties to set the subject and message for all the recipients in the envelope. These properties have to be set at the root level of your json request.

Note: You can override the properties at the envelope level by specifying the emailNotification property for each recipient as suggested in this answer

Here is a sample Json for the createEnvelope request.

POST /v2/accounts/{accountId}/envelopes

{
 "emailSubject": "Email subject for all recipients",
 "emailBlurb": "Email body for all recipients",
 "status": "Sent",
 "recipients": {
     "signers": [
         {
             "email": "recipientone@acme.com",
             "name": "recipientone",
             "recipientId": "1",
             "routingOrder": "1",
             "tabs": { "signHereTabs": [ { "documentId": "1", "pageNumber": "1", "xPosition": "100", "yPosition": "100" } ] }

         },
         {
             "email": "recipienttwo@acme.com",
             "name": "recipient two",
             "recipientId": "2",
             "routingOrder": "1",
             "tabs": { "signHereTabs": [ { "documentId": "1", "pageNumber": "1", "xPosition": "100", "yPosition": "200" } ] }
         }
     ]
 },
 "documents": [
     {
         "documentBase64": "RG9jIFRXTyBUV08gVFdP",
         "documentId": "1",
         "fileExtension": "txt",
         "name": "Simple Contract",
         "order": "1"
     }
 ]
}


来源:https://stackoverflow.com/questions/44722653/how-to-set-email-subject-line-and-email-message-from-json-in-docusign

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!