You are here:
Merge Fields
Your template content can store fields that show field values from different objects. These merge fields are automatically updated in your content when the referenced field is updated on the other object. This process is useful if you want template content to reflect changes made elsewhere in your org. (Salesforce CPQ Managed Package)
Required Editions
| Available in: All CPQ Editions |
For example, let’s say you have a template content record that displays vendor information. This content could include a merge field that references the sales rep field on your quote. You can use this content in templates for different quotes, and the content’s sales rep information in the document always matches the sales rep on any of the quotes you choose. If the sales rep changes during the quoting process, the documents for a given quote are up to date.
Merge fields take the format of {!recordname.fieldname} in your template content. Replace fieldname with your field's API name and recordname with the name of the object containing your field. If you're using a Salesforce CPQ field, enter SBQQ__ at the beginning of your field name. If you're using a custom field, including fields from a managed package such as Salesforce CPQ, include __c at the end of your field name.
When a merge field references a picklist field, Salesforce CPQ uses either the field’s Label or API Name based on the Enable Multi-Language Translations package setting. If the setting is active, Salesforce CPQ uses the picklist value’s Label. Otherwise, it uses the picklist value’s API Name.
Salesforce CPQ template content supports merge fields that reference fields from the following objects.
| Object | Merge Field Appearance | Supported Fields |
|---|---|---|
| This merge field references all fields related to the Salesforce CPQ quote template object. | !template. | Standard fields, CPQ managed package fields, custom fields |
| This merge field references all fields related to the Salesforce CPQ quote object. | !quote. | Standard fields, CPQ managed package fields, custom fields |
| This merge field references all fields related to the Primary Contact on the Salesforce CPQ quote object. | !primaryContact. | Supported standard fields |
| This merge field references all fields related to the Sales Rep on the Salesforce CPQ quote object. | !salesRep. | Supported standard fields |
You can also use !companyLogo on its own to show the image referenced in your quote template's Logo field.
| Merge Field | Description |
|---|---|
| {!quote.SBQQ__BillingName__c} | References the Billing Name field on the quote object. |
| {!template.SBQQ__ShipToTitle__c} | References the Ship To Title field on the quote template object. |
| {!primaryContact.Name} | References the Primary Contact lookup (to the Contact object) field on the quote object. The field does not reference the "SBQQ__" prefix because contacts are standard Salesforce objects. Although this field is a lookup field, you don't need a formula field to reference the contact's name because Primary Contact is a standard Salesforce field. |
| {!salesRep.Name} | References the Sales Rep field on the quote object. salesRep.Name is a standard Salesforce field, so it doesn't need the "SBQQ__" prefix. |
| {!quote.Type_of_Transaction__c} | In this case, the admin made a custom Type of Transaction field. This merge field references the Type of Transaction field on the quote object. |
- Supported Merge Fields for Primary Contacts and Sales Reps
Salesforce CPQ supports only certain Primary Contact and Sales Rep fields as merge fields within template content. Review these fields to ensure that your merge fields appear correctly. (Salesforce CPQ Managed Package)

