0
votes

The image below shows the docusign Salesforce Connect Object settings for attachments. It mentions "Envelope Subject" for the filename. I am trying to figure out how to set the Envelope Subject field when creating the envelope from the REST api.

Docusign Attachment Filename "Envelope Subject"

This is my create envelope callout:

{
  "status": "sent",
  "customFields": {
    "textCustomFields": [
      {
        "name": "Compliance_Item__c",
        "value": "' + cItem[0].Id + '",
        "configurationType": "salesforce"
      },
      {
        "name": "ComplianceItemId",
        "value": "' + cItem[0].Id + '",
        "configurationType": "salesforce"
      }
    ]
  },
  "templateRoles": [
    {
      "clientUserId": 1,
      "roleName": "Signer 1",
      "name": "' + c.Name + '",
      "email": "' + c.Email + '",
      "tabs": {
        "textTabs": [
          {
            "tabLabel": "SignerCompany",
            "xPosition": "104",
            "yPosition": "174",
            "name": "SignerCompany",
            "value": "' + c.Company_Name__c + '"
          },
          {
            "tabLabel": "SignerTitle",
            "xPosition": "104",
            "yPosition": "202",
            "name": "SignerTitle",
            "value": "' + c.Title + '"
          }
        ]
      }
    }
  ],
  "returnUrl": "https://demo.docusign.net",
  "email": "[email protected]",
  "authenticationMethod": "email",
  "userName": "WW Vendor",
  "emailSubject": "Please Sign",
  "templateId": "1234"
}
1
isn't it "Please Sign" where you have:"emailSubject": "Please Sign" in the JSON near the end? that's typically what the subject means. - Inbar Gazit

1 Answers

0
votes

The email subject and message body are stored in the envelope definitions as emailSubject and emailBlurb.

Changing the call to something along these lines should do the trick:

{
  "status": "sent",
  "customFields": {
    "textCustomFields": [
      {
        "name": "Compliance_Item__c",
        "value": "' + cItem[0].Id + '",
        "configurationType": "salesforce"
      },
      {
        "name": "ComplianceItemId",
        "value": "' + cItem[0].Id + '",
        "configurationType": "salesforce"
      }
    ]
  },
  "templateRoles": [
    {
      "clientUserId": 1,
      "roleName": "Signer 1",
      "name": "' + c.Name + '",
      "email": "' + c.Email + '",
      "tabs": {
        "textTabs": [
          {
            "tabLabel": "SignerCompany",
            "xPosition": "104",
            "yPosition": "174",
            "name": "SignerCompany",
            "value": "' + c.Company_Name__c + '"
          },
          {
            "tabLabel": "SignerTitle",
            "xPosition": "104",
            "yPosition": "202",
            "name": "SignerTitle",
            "value": "' + c.Title + '"
          }
        ]
      }
    }
  ],
  "returnUrl": "https://demo.docusign.net",
  "email": "[email protected]",
  "authenticationMethod": "email",
  "userName": "WW Vendor",
  "emailSubject": "This is my email subject line",
  "emailBlurb": "This is my email message body",
  "templateId": "1234"
}