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

Scenario

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.

Solution

Create a Document Label/Envelope Custom Field to control the toggle at the sender level, then use advanced Connect filtering to filter based on that.

Note: 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.
  1. Create a Document Label/Envelope Custom Field in DocuSign.
    1. In DocuSign, Go to Admin > Document Label.
    2. Field settings:
      • Name: DfS Writeback
      • Show: Yes
      • Required: Yes
      • Type: List
      • List Values: True;False
    3. Update existing templates to include this field. If you have any templates that you know should always/never write back, set them accordingly.
  2. Create a field on the DocuSign Status Record in Salesforce to store this value
    1.  In Salesforce, Setup > Create > Objects > Click on DocuSign Status (Do not click Edit) > Custom Fields & Relationships > New - Data Type: Text
    2. Click Next
    3. Field Label: DFS Writeback
    4. Length: 9
    5. Click Next
    6. Field Level Security: Visible for all
    7. Click Next
    8. Add to page layouts: Add Field
    9. Click Save
  3. Create a DocuSign eSignature for Salesforce Connect custom object to write this value
    1. In DocuSign, Go to Admin > Connect > Salesforce > Add Salesforce Object
    2. Object settings:
      • Object Name: Writeback check
      • Select Salesforce.com Object: DocuSign Status
      • Add if no match: Checked
      • Select Where:
        • Salesforce.com Field: DocuSign Envelope ID (string)
        • DocuSign Field: Envelope ID
      • Update Fields:
        • Salesforce.com Field: DFS Writeback (string)
        •  DocuSign Field: Custom Field: DFS Writeback
        • Salesforce.com Field: DocuSign Envelope ID (string)
        •  DocuSign Field: Envelope ID
This object must be the first Connect object - Move it above dsfs__DocuSign_Status_c

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.

User-added image
User-added image
  1. Modify existing dsfs__DocuSign_Status__c object to honor value
    1. Add if No Match: *Uncheck*
    2. Select Where: Add additional line
      • Salesforce.com Field: DFS Writeback (string)
      • DocuSign Field: Custom, Value: True
User-added image

If other custom connect objects are present (for example, to attach the completed document to an opportunity), add an additional Select Where line to match DFS Writeback to True
  1. Test writeback
    1. Send an envelope with DFS Writeback: True
    2. Send an envelope with DFS Writeback: False
Note that the False envelope created a 'Dummy' Status record containing only the EnvelopeID. This is an unavoidable artifact of the process.
Consider updating reporting views based on the DFS Writeback value and your needs.