---
schema_version: "1"
id: 9ac61dde50bb3b07c3d576750081ae3108402ba29aada14001a198ed43ecefc5
title: Add Record Merge Fields to a Field Generation Prompt Template
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_add_merge_fields_field_gen.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_merge_fields_field_gen.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e899a4e7880ba3746017d7f437fe1f327aa74b31d0736b54a25de653301f1272
description: 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.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Add Record Merge Fields to a Field Generation Prompt Template

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.

### 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>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d196990e63">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d196990e63 ">To create and manage prompt templates in Prompt Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d196990e63 ">
              <p>Prompt Template Manager permission set</p>
              <ul>
                <li>Manage Prompt Templates</li>

                <li>Execute Prompt Templates</li>

              </ul>
              <p>OR</p>
              <p style="margin-bottom:0;">Customize Application permission set</p>
            </td>

          </tr>
        </tbody>
      </table>

Let’s look at a field generation prompt template that uses a merge field to create an account description. It’s a simple example of how to use an LLM with your up-to-the-minute data to create content.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)

Note A field generation prompt template supports only one object. To use multiple objects, create a flex prompt template instead. For more information, see [Add Record Merge Fields to a Flex Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_merge_fields_flex.htm&release=264.0.0&type=5 "Save time with templates that use specific information from your Salesforce objects to create unique and detailed product descriptions, custom text messages, and more, at scale. Use merge fields in a flex template to have an LLM write content based on up-to-the-minute data.").

1. In the Prompt Template Type dropdown, select **Field Generation**.
2. For the Prompt Template Name, enter Draft an Account Description.
3. For the Object, select **Account**.
4. For the Object Field, select **Account Description**.
5. Leave the Description field blank.
6. Click **Create**, and you’re redirected to the Prompt Template Workspace.
7. In the [Field Generation Example Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_field_generation_example_templates.htm&release=264.0.0&type=5 "These example prompt templates cover typical use cases for field generation."), find the prompt template titled: Draft an Account Description. Copy and paste this template into the Prompt Template Workspace.
    
    This example contains placeholder text for prompt template resources. Before you can run this template in Prompt Builder, use the Insert Resource selector in the Prompt section to replace the placeholders with real merge fields. When the template is resolved into a prompt, the merge fields are replaced with real data.
8. Run the prompt template and see the LLM-generated account description.
    1. Click the Preview Settings button.
    2. Under Inputs, enter an account name in the Record search bar, and select one.
    3. In the Configure Response and Display sections, verify that Generate Response, Display Prompt, and Display Resolution are selected or deselected based on what you want to test.
    4. Click **Save & Preview**, and review the response.