Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Creating Salesforce Mapping

Overview

EchoSign’s Salesforce.com mappings allows customers to merge Salesforce.com data into their documents,
send them for signature and update data collected from signers back to Salesforce.com

For example:

• Merge the signer’s address into the document.

• The signer updates their address while signing.

• The updated address is be pushed back to salesforce

The EchoSign mapping mechanism includes two separate mappings

• Merging Salesforce.com data into EchoSign form fields

• Pushing EchoSign form field data into Salesforce.com objects

Copyright © EchoSign Inc. 2006-2010, All rights reserved


Merging Salesforce.com data into EchoSign form fields

Merging data from salesforce is done using a custom formula field on the EchoSign Agreement object
in Salesforce. This formula defines the merge mapping and retrieves the relevant values for each
agreement. EchoSign web needs to be configured to retrieve this field to activate the mapping.

The merge mapping is global and applies to all agreements sent from the customer’s Salesforce.com
account.

1. Create a custom field in the EchoSign Agreement object.

SetupCreateObjectsAgreement

Custom Fields & Relationships  New

Select “Formula”, click “Next”

Copyright © EchoSign Inc. 2006-2010, All rights reserved


Name the field (“Merge”) and set its type to text

2. Creating the Formula


The output of the formula should be a string with the following format:
{
“EchoSignFieldName1” : “Value1” ,
“EchoSignFieldName2” : “Value2” ,
}

To create this format, copy the template below into the agreement editor

Notice that the string “ is replaced by \” in the Salesforce formula.


Also notice that in order to ensure we can handle a quote being part of the value, we substitute
any “ with a \” using the salesforce SUBSTITUTE function.

To create a mapping with additional fields, copy lines 3 and 4 above for each additional field.

The strings highlighted in Cyan should be replaced with the EchoSign fields names (e.g.
FirstName_es_signer and LastName_es_signer) while the strings highlighted in yellow should be
replaced with references to Salesforce object fields.

Copyright © EchoSign Inc. 2006-2010, All rights reserved


For example, if we’d like to put the signer’s first name and last name from the Contact record in
the EchoSign fields mentioned above, change the two fields in cyan to get the following:
"{"
& "\”'FirstName_es_signer'\” : \”" & SUBSTITUTE( ValueField1 , “\””, “\\\””)
& "',"
& "\”'LastName_es_signer'\” : \”" & SUBSTITUTE( ValueField2 , “\””, “\\\””)
& "'}"

The salesforce formula editor provides an easy way to input the references to the Salesforce fields
in the agreement object and in any object referenced from the Agreement (e.g. the recipient’s
contact record, the opportunity, etc.)

In the example above, delete ValueField1 and use the formula editor to select the first name field
from the Recipient’s “FirstName”. Click “Insert” and then “Close”

The formula should now be:


"{"
& "\”'FirstName_es_signer'\” : \”" &
SUBSTITUTE(echosign_dev1__Recipient__r.FirstName , “\””, “\\\””)
& "',"
& "\”'LastName_es_signer'\” : \”" & SUBSTITUTE( ValueField2 , “\””, “\\\””)
& "'}"

Copyright © EchoSign Inc. 2006-2010, All rights reserved


Similarly, delete ValueField2 and use the formula editor to select the last name field from the
Recipient’s “LastName”.

The formula should now be:


"{"
& "\”'FirstName_es_signer'\” : \”" &
SUBSTITUTE(echosign_dev1__Recipient__r.FirstName , “\””, “\\\””)
& "',"
& "\”'LastName_es_signer'\” : \”" &
SUBSTITUTE(echosign_dev1__Recipient__r.LastName , “\””, “\\\””)
& "'}"

3. Deploying the formula


Click “Check Syntax”, verify no errors are reported and then click “Next”.

On the next screen, click “Next”

4. Troubleshooting
If you wish to view the actual values used in the mapping on individual agreements, leave the
checkboxes on the screen checked. Otherwise, uncheck them.
Click “Save”

When leaving the checkboxes enabled, you can view the values that will be merged on the
agreement page layout.
After troubleshooting, you may remove this field on the agreement page layout.

Copyright © EchoSign Inc. 2006-2010, All rights reserved


5. Configuring the EchoSign back-end to use the merge field
On the EchoSign admin, configure the salesforce org with the API name of the merge field defined
by the customer

6. Advanced mappings

- Advanced formulas

Salesforce formulas allow manipulating values from field – concatenating them, formatting
them, etc. You may use the formula editor to use those functions.
One interesting use case is a conditional mapping where the output of the formula can be
conditioned (e.g. if contract value > 100,000 then merge field X, otherwise merge field Y)

- Multiple mapping fields


Salesforce formulas are limited in length – 1000 characters. If you need complex mappings,
you may define several mapping fields, create them as described above and then update the
EchoSign back-end with the list of fields used.

Copyright © EchoSign Inc. 2006-2010, All rights reserved

You might also like