How do I make only certain envelopes appear in DocuSign eSignature for Salesforce?


I have DocuSign eSignature for Salesforce setup with Connect enabled, but I don't want all envelopes to write back. Most commonly this is due to sensitive / PII data collection.


Create an Envelope Custom Field to control the toggle at the Sender level, then use advanced Connect filtering to filter based on that.

Note: This is a custom workflow not supported by DocuSign Support. If you need assistance with this flow, please visit our Contact Support Page and create a case to schedule time with our Professional Services team. Additionally, at a minimum the Envelope ID must be written back. Salesforce reporting/automation can be used to delete the extraneous records, but that is outside the scope of this article.

In DocuSign, create an Envelope Custom Field

  1. In DocuSign eSignature click the Settings tab.
  2. Click Envelope Custom Field on the left-hand column.
  3. Click Add Field, then create it with the following parameters:
    • Field Name: DfS Writeback
    • Show field to envelope creators: Check
    • Make field required for envelopes: Check
    • Type: List
    • List Values: true;false
  4. Update any existing Templates to include this field, which can be done with the steps listed in the Add Envelope Custom Fields guide. If you have any Templates that you know should always/never write back, set them accordingly.

In Salesforce, create a field on the DocuSign Status Record for the value

  1. In Salesforce Lightning, click the Gear Icon in the top right-hand corner followed by Setup.
  2. Use the Quick Find to locate the Object Manager and click it from the list.
  3. Click on DocuSign Status from the list.
  4. On the left, click Fields & Relationships.
  5. Click the New button.
  6. For Data Type select the radio button for Text, then click Next.
  7. On the details page set the following parameters, then click Next:
    • Field Label: DFS Writeback
    • Length: 9
  8. On the Field Level Security page check the Visible checkbox for all, then click Next.
  9. On the Add to Page Layouts page check the Add Field checkbox, then click Save.

In DocuSign, create a custom object in your Salesforce Connect configuration to write this value to Salesforce.

  1. In DocuSign eSignature click the Settings tab.
  2. Click Connect on the left-hand column.
  3. Click Salesforce in the list.
  4. Under the Connect Objects section click New Object, then Salesforce Object.
  5. Set the following parameters for the new Connect Object:
    • Change the Inactive Object drop-down to Activate Object.
    • Object Name: Writeback check
    • Select Salesforce Object: DocuSign Status
    • Add If No Match: Check
    • Select Where:
      • Field: DocuSign Envelope ID (string)
      • DocuSign Field: Envelope ID
    • Update Fields:
      • Field: DFS Writeback (string)
      • DocuSign Field: Custom
        • Value: EnvelopeCustomWriteback:DFS Writeback
      • DFS Writeback
    • Update Fields (Click +Add New Item to add another row):
      • Field: DocuSign Envelope ID (string)
      •  DocuSign Field: Envelope ID 
  6. At this point, if you want any other information to write back for ALL envelopes, include it in the Update Fields. Otherwise proceed to the next step.  
  7. Click Save.

Update the Connect objects listed order

The new "Writeback check" object must be the first Connect object so move it above dsfs__DocuSign_Status_c in the Connect Objects list. Because the Connect objects publish in the listed order, having the "Writeback check" object send first will ensure that the Envelope Custom Field will be sent to Salesforce record, which will allow the next step in this guide to function correctly.

Modify the existing dsfs__DocuSign_Status__c object to honor the value

  1. From the Connect Objects section, click on dsfs__DocuSign_Status__c.
  2. Uncheck the checkbox next to Add if No Match.
  3. For Select Where click +Add New Item and enter the following:
    • Field: DFS Writeback (string)
    • DocuSign Field: Custom
      • Value: True
With this change, only envelopes whose "DfS Writeback" Envelope Custom Field was set as "True" will have the Update Fields listed in the DocuSign Status Connect object written back to Salesforce.
User-added image

Update any other Connect objects with this same value

If other custom Connect objects are present (for example, to attach the completed document to an opportunity), edit that Connect object and add an additional Select Where line to match DFS Writeback to True. Note that you may need to add the DFS Writeback field in the Salesforce record object layout, such as we did for the DocuSign Status object in the 2nd section of this guide.

Test the writeback functionality

  1. Send an envelope with the Envelope Custom field 'DFS Writeback' set to True.
  2. Send an envelope with the Envelope Custom field 'DFS Writeback' set to False.
Note that the False envelope created a 'Dummy' Status record containing, at minimum, only the EnvelopeID. As mention earlier in this article this an unavoidable artifact of the process. If you wish to address this, consider updating your Salesforce reporting views based on the DFS Writeback value and your needs.