Merge Fields
Drive Connect's Template Builder utilizes merge fields to pull data from Salesforce records and insert it into a Google Drive document.
Merge fields power document generation and enable Salesforce users to create up-to-date and accurate documentation. They pull predefined data already available inside a Salesforce record and its related records and insert them into a new Google document, allowing for the accurate and rapid generation of important documentation.
- Navigate to the Drive Connect application in Salesforce and select the Template Builder tab.

- Create a new template or select an existing template to edit.

- On the merge field generator tab, click the Type drop-down and select [Record] Fields & Related Objects.

- In the second drop-down menu, select a field or related object. Related objects will be located lower than the record field selections on the list. Select the related object and continue to scroll down until you find the field that you are looking for.

- Once you have made your selection, copy and paste it into the appropriate section of your merge template.

Lookup Merge Fields
- Navigate to the Drive Connect application in Salesforce and select the Template Builder tab.

- Create a new template or select an existing template to edit.

- On the merge field generator tab, click the Type drop-down and select [Record] Fields & Related Objects.

- In the second drop-down, select a lookup from the field section denoted by a right-facing karat (>).
- A third dropdown will appear. From here, select the desired field or select another lookup and select the field from the next dropdown that appears.
- Once you have made your selection, copy and paste it into the appropriate section of your merge template.
Merge Fields in File Names
Adding merge fields to a file’s Generated Name field will enable generated documents to have names that include Salesforce data. This can help you identify generated documents when viewing them outside of Salesforce.
- Navigate to the Drive Connect application in Salesforce and select the Template Builder tab.

- Create a new template or select an existing template to edit.

- On the merge field generator tab, click the drop-down and select [Record] Fields & Related Objects.
- In the second drop-down, select a field, lookup, or related object. Related objects will be located lower than the record field selections on the list. Select the lookup or related object and continue to scroll down until you find the field that you are looking for.

- Once you have made your selection, copy and paste it into the generated name field of the template editor.
Date of Merge Function Fields
Template builders can add merge fields that reference date and date/time to merge templates. By adding date and date/time merge fields to a merge template, template builders can ensure that date-sensitive documentation always contains the correct date to avoid possible customer service and/or legal disputes.
- Navigate to the Drive Connect application in Salesforce and select the Template Builder tab.
- Create a new template or select an existing template to edit.
- In the merge field generator, select the Type drop-down and select Functions.
- In the Function drop-down, select Date of Merge.
- In the Day Offset field, enter a value greater than or equal to zero.
- In the Date Format dropdown, select the format that best fits your use case.
- Once you have formatted your date or date/time merge field, copy and paste it into the appropriate section of your merge template.