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

Available in: Lightning Experience
Available in: Enterprise, Performance, and Unlimited Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations
User Permissions Needed
To create and manage prompt templates in Prompt Builder:

Prompt Template Manager permission set

  • Manage Prompt Templates
  • Execute Prompt Templates

OR

Customize Application permission set

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
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.
  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, 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.