---
schema_version: "1"
id: 8eb03b513f95eab17d6b265cd235c8574137f6847fad07efd46de83c50b6f2e1
title: Ground with Record Merge Fields
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_ground_merge_fields.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_ground_merge_fields.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 548a01b5e52b2155a023978120b4925b70d62c1fb6d12719d94a4c04c325c4ff
description: Record merge fields connect your prompt templates to Salesforce object fields. The prompt template type and the objects that you associated with your prompt template determine which merge fields are available.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Ground with Record Merge Fields

Record merge fields connect your prompt templates to Salesforce object fields. The prompt template type and the objects that you associated with your prompt template determine which merge fields are available.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations</td></tr></tbody></table>

Sales email prompt templates can have merge fields corresponding to these objects.

- Recipient (the contact or lead)
- Sender (the user)
- Current Organization (the Sender’s Organization)

Field generation prompt templates can have merge fields corresponding to these objects.

- Current User
- Current Organization (the user’s Organization)
- The object that you associated with the prompt template

Flex prompt templates can have merge fields corresponding to these objects.

- Current User
- Current Organization (the user’s Organization)
- The objects that you associated with the prompt template

When you select a standard or custom object field in the Prompt Template Workspace, the field is added to your template as `Input:RecordName.FieldName`. During prompt resolution, real CRM values populate the merge fields based on the specific records that your user selects.

For example, you have a prompt template that includes this sentence:

```
You are a support representative and you need to create a short summary of all open cases for the [Account Name] account.
```

You select the Astro’s Bakery account record in Prompt Builder to associate it with your template, and then you run your template.

```
You are a support representative and you need to create a short summary of all open cases for the {!$Input:Account.Name} account.
```

Prompt Builder replaces the `Input:Account.Name` merge field with the account name “Astro’s Bakery.” The resolved response could look like this.

```
You are a support representative and you need to create a short summary of all open cases for the Astro’s Bakery account.
```

To use record merge fields in Prompt Builder, see:

- [Add Record Merge Fields to a Sales Email Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_merge_fields_sales_email.htm&release=264.0.0&type=5 "Merge fields are critical to scaling a sales email prompt template for multiple customers and products. They connect your prompt templates to Salesforce record fields, such as from sales or service records. In a prompt template, a merge field acts like a placeholder. After you run the template, the LLM replaces the merge field with your actual data.")
- [Add Record Merge Fields to a Field Generation Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_merge_fields_field_gen.htm&release=264.0.0&type=5 "Save time with templates that use specific information from your Salesforce objects to create case summaries, and more, at scale. Use merge fields in a field generation prompt template to have an LLM write content by using up-to-the-minute data.")