---
schema_version: "1"
id: 657ebaec0211db3821c9170e58f66ba7b22a9bc0bfdb002b0a53abdb33466656
title: Prompt Template References
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_template_references.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_template_references.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: caaef01defa303cf575a3d8f08f46feecdd73652d40a15479f6d4914bcef8c71
description: Identify where a prompt template is used across your org. When you view references for a template, you can see the flows, agents, and other components that depend on that template.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Prompt Template References

Identify where a prompt template is used across your org. When you view references for a template, you can see the flows, agents, and other components that depend on that template.

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

Prompt templates are foundational building blocks that power multiple features and automations across your org. A single template can be referenced in multiple flows, agents, or custom code. Without visibility into these dependencies, updating or deleting a template can accidentally break downstream integrations and disrupt critical business processes.

Template References adds important guardrails so you can:

- Understand impact before changes: See everywhere a template is used before you modify, deactivate, or delete the template.
- Prevent breaking changes: Identify dependencies that break if you remove a template.
- Manage the template lifecycle safely: Understand which templates are actively used versus deprecated.
- Plan template updates: Know which dependent components need updates when you change a template's response format.

## Key Concepts

**Active Templates and Reference Restrictions**

- You can't delete a template version that's currently in use and has active references.
- You can't change the response format of an active template if the template has existing references.
- To update a response format, first remove or update all existing references.

References can include:

- **Flows:** Flows using the Prompt Template action.
- **Agents:** Agents and subagents referencing the template.
- **Other integrations:** Other components using the template.

![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 Apex classes use direct, hard coded references to prompt templates and must be tracked manually.

Template references are automatically displayed in these scenarios:

- **Attempting to delete a template:** A references modal shows current references before you can delete the template.
- **Attempting to deactivate a template version:** A references modal shows current active references before you can deactivate the template version.
- **Modifying a template response format:** A warning appears if the template has existing references.
- **Viewing template dependencies:** Some orgs have additional views to see template usage across the org.

- **[View Template References](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_view_template_references.htm&release=264.0.0&type=5)**  
    Use Template References to identify where a prompt template is used and safely remove those dependencies before making changes.
- **[Remove a Template Reference in a Flow](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_remove_template_reference_flow.htm&release=264.0.0&type=5)**  
    Remove dependencies on a prompt template so you can safely delete or modify the template without breaking other components.
- **[Remove a Template Reference in an Agent](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_remove_template_reference_agent.htm&release=264.0.0&type=5)**  
    Remove dependencies on a prompt template so you can safely delete or modify the template without breaking other components.
- **[Remove a Template Reference in an Apex Class](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_remove_template_reference_apex.htm&release=264.0.0&type=5)**  
    Remove dependencies on a prompt template so you can safely delete or modify the template without breaking other components.

#### See Also

- [View Template References](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_view_template_references.htm&release=264.0.0&type=5 "Use Template References to identify where a prompt template is used and safely remove those dependencies before making changes.")
- [Remove a Template Reference in a Flow](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_remove_template_reference_flow.htm&release=264.0.0&type=5 "Remove dependencies on a prompt template so you can safely delete or modify the template without breaking other components.")
- [Remove a Template Reference in an Agent](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_remove_template_reference_agent.htm&release=264.0.0&type=5 "Remove dependencies on a prompt template so you can safely delete or modify the template without breaking other components.")
- [Remove a Template Reference in an Apex Class](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_remove_template_reference_apex.htm&release=264.0.0&type=5 "Remove dependencies on a prompt template so you can safely delete or modify the template without breaking other components.")