**Legacy** DocuSign eSignature for Salesforce - How do I format a date merge field in DocuSign eSignature for Salesforce?

DocuSign dates are formatted as yyyy-mm-dd when creating date merge fields from Salesforce.

Why Does This Happen?
DocuSign is not formatting the value after it is received from Salesforce. Running the following SOQL query displays the true data values from the Salesforce database.

SELECT Date, CloseDate__c FROM Opportunity WHERE Id = '0061a000003oDge'

Why Address This Problem?
It is simple formatting that some may overlook and question that the effort isn't worth the reward. However, when reviewing agreements or contracts for example, signers expect the date in a certain format.

  1. Create formula fields from Salesforce
  2. Remap merge fields to point to the new formula fields​
  1. Building Formula Fields
  2. Create Merge Fields for Users - DocuSign eSignature for Salesforce

Building Formula Fields

In Salesforce
Add a new custom formula field to Salesforce opportunity objects.

  1. In Salesforce go to "Setup".
  2. Go to the "Build" Section and select "Customize".
  3. Under Opportunity select "fields" and click on the "New" button.
  4. Choose "Formula" as Data Type, click "Next".
  5. Select "Text" for the output Type, Enter a "Field Label" and "Field Name",  click "Next" 
  6. Select the "Advanced Formula" tab and  type the formula below:

European Format

text(DAY( TODAY() )) +'/'+  text(MONTH( TODAY() )) +'/'+ text(YEAR( TODAY() ))

United States Format:

text(MONTH( TODAY() )) +'/'+ text(DAY( TODAY() )) +'/'+  text(YEAR( TODAY() ))

Note:  This sample is using TODAY()  as the  date field but you can replace TODAY() with the desired field. For Instance CloseDate is one of the default date field for Opportunity. The following example takes CloseDate and converted in format DD/MM/YYYY.

European Format:

text(DAY( CloseDate )) +'/'+  text(MONTH( CloseDate )) +'/'+ text(YEAR( CloseDate ))

United States Format

text(MONTH( CloseDate )) +'/'+  text(DAY( CloseDate )) +'/'+  text(YEAR( CloseDate ))

  1. Make it available for the desired "Security Profile", click "Next" (use default for testing purpose)
  2. Select the layout you wish to default the custom fields (field is Read Only)
  3. Click Save & New to populate the new field into all your opportunity objects

In DocuSign
Create a custom merge fields tag in DocuSign, related to the newly created formula field.

  1. In Salesforce, go to the DocuSign Admin Tab and select the DocuSign link to Log into DocuSign.
  2. Go to "Preferences" > "Custom Tags" > "Add".
  3. Check "Relate to Salesforce" box.
  4. Select the Salesforce object.
  5. Select the Salesforce custom formula field.
  6. Label it and Save.

If your merge fields are added to templates. Delete the merge fields and add back in from your "custom" tag list.