---
schema_version: "1"
id: 4bd6fd1de92593a64391af6b6de7e5be61a95a630179f4740a6f7d565ee0c1b5
title: Ground Prompt Templates with Salesforce Resources
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_ground_template.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_ground_template.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4f2414c88fc7551bdcbd17d1b51019cfdbbef5223602f6ed0e37e40982e42309
description: With Prompt Builder, you can dynamically ground prompt templates with CRM data using merge fields.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Ground Prompt Templates with Salesforce Resources

With Prompt Builder, you can dynamically ground prompt templates with CRM data using merge fields.

### Required Editions

Grounding provides the LLM with the context to create personalized responses based on your accurate and up-to-date information. Sensitive data, such as personally identifiable information, stays in Salesforce and isn’t shared with the LLM. To see the placeholders for this data, look at the prompt template preview.

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

The zero-retention agreement in the Einstein Trust Layer ensures that anything shared with the LLM isn’t stored or used for training. For more information, see [The Einstein Trust Layer](https://trailhead.salesforce.com/content/learn/modules/the-einstein-trust-layer) Trailhead module.

When you create a prompt template in Prompt Builder, you first choose an object, such as an account or contact, to associate with your template. For a field generation template, you also select the field that you want Einstein to help users complete.

As you write your prompt template in the Prompt Template Workspace, you can use the **Insert Resource** button to add merge fields that reference record fields, flows, Apex, Data 360 DMOs, and related lists. When you create a prompt template, it works with Apex or flows whose required inputs are a subset of the prompt template inputs. For flows, all inputs are considered required and must be present in the prompt template. For Apex, inputs are optional unless annotated as required. Optional Apex inputs don’t have to be present in the prompt template. Apex and flows with no parameters work with all prompt templates.

#### See Also

- [Prompt Builder Limits](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_limits.htm&release=264.0.0&type=5 "Learn the numerical limits of prompt templates.")
- [Prompt Builder Limitations](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_limitations.htm&release=264.0.0&type=5 "Learn about the functional limitations of prompt templates that affect certain behaviors and outcomes.")
- [Troubleshoot Prompt Builder](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_troubleshoot.htm&release=264.0.0&type=5 "Solve common prompt template issues.")