Skip Navigation
Expand
Inserting merge fields into a quote template
Answer ID 2030   |   Last Review Date 12/19/2018

How do I insert merge fields in a quote template?

Environment

Outreach / Feedback, Mailings, Merge Fields

Resolution

When configuring quote templates, you can insert merge fields  in the template so that when the sales quote is generated, specific sales, contact, or organization data are included in your sales quote. Merge fields allow you to incorporate database information into the specific quote.


The merge field represents a database table and field that is replaced with specific information when the quote is generated. Within the quote template, merge fields are displayed in italics so that you can easily see which part of the quote will be replaced with specific data when the quote is generated.

There are three types of merge fields that can be added to a template: single, group, and indexed. The screenshot below provides a basic example of a quote template.

Single Items: Click this dropdown menu to select merge fields that have a one-to-one relationship with opportunities. For example, an opportunity can only be associated with one organization. As a result, fields such as Organization Name (orgs.name) and organization custom fields are single merge fields. 

Group Items: Click this dropdown menu to select merge fields that have a many-to-one relationship with opportunities. For example, a quote can have many products (sa_prod2quotes.original_name_group) associated with it. Similarly, several different contacts can be associated with an opportunity.

As a result, contact information, product to quote information and even organization address data (since an organization can have more than one type of address) can all be used as group fields in a quote. The most common use of merged fields is to create a table of the products, costs, and quantities to be purchased.

Grouped merge fields must be used in a table. Note: You must create a table with column headers before using merge fields from the Group Items dropdown menu. After the table is created with column headers, a merge field from the Group items dropdown menu must be inserted into a single cell in a table. Word automatically adds rows to the table based on how many values are in the group. The font of the column headers determines the font of the merge fields in the table.

When the quote is generated, the multiple records are listed as separate rows in the table. That is, if you use group fields to list the various contacts associated with the opportunity, if there are five contacts associated, the resulting table will have six rows -- the top row is the column headings and the five rows include the contact information as generated from the merged fields. 

Indexed Items: Indexed merge fields also have a many-to-one relationship with opportunities. In addition, these fields are indexed in the database to distinguish each item that is associated.

Indexed merge fields include a number after the field name so that you can specify which specific record to include in the quote. When selecting an indexed field, there is an "N" at the end of the field. You must change the "N" to be a numeric value to indicate the specific record you wish to populate into the quote. While using a field from the Group Items dropdown returns all of the contacts associated with an opportunity, using a field from the Indexed Items dropdown menu returns only the contact you specify according to "N". When working with contact fields, use "1" in place of the "N" to indicate the primary contact that is associated with the opportunity.

For example, an opportunity can have many contacts and contacts.full_nameN  is the indexed merge field you can select to display the full name of the contacts associated with the opportunity. To list the full name of the primary contact, use contacts.full_name1  in your quote template.


The font of single and indexed merge fields in a quote template is determined by the font of the non-merge field text in the template. The font of merge fields is determined by the font of the non-merge field text directly preceding the first merge field in the template. This will cause all merge fields in the template to display in the merged quote in that font.

Select Word Editor from the Templates Editor to see options such as Single Items, Groups Items and Indexed Items.

The font of merge fields is determined by the font of the non-merge field text directly preceding the first merge field in the template.


For more information on quote templates, refer to Answer ID 2005: Adding or Editing a Quote Template.