Pull Data from Parent / Related Records

If you're looking for a way to pull data from a parent or related record, you'll have to use "subfields" inside your template.  Here's an example for pulling Account fields into a document being generated from a Contact record.

Inside our template, we're going to use merge fields like {$Account.Name}, {$Account.Favorite_Color__c}, etc.

- "Account" is the name of our merge field.  You can name this anything you'd like.

- "Favorite_Color__c" is the API Field Name of the field that you want to use.


Once you update your template in WebMerge, go to your WebMerge Mapping inside Salesforce, and we're going to look for our merge field (we used "Account").  For this merge field, we're going to match it up to the "Account: (Full Object)" option in the Salesforce Field dropdown:



When you select the (Full Object) option, that will send over all the fields for that object to your document as an array.  Then inside the document you can reference the individual fields with the subfields like {$Account.Phone} and {$Account.Car_Number__c}.

If you're not sure which subfields to use in your document, you can turn on Debug Mode to see the fields that are being sent over from Salesforce.  In this example, here's what our Debug Mode data looked like on the Overview tab of our document:


Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk