Add a prompt template as an action within another prompt template to reuse logic and
standardize how responses are generated. Invoke one prompt template from another to build more
consistent, modular prompt workflows.
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
What Are Prompt Template Actions?
A prompt template action calls one prompt template from another.
When used as an action, the referenced prompt template runs during execution. It generates a
response based on its inputs and that response goes back to the main prompt. Prompt templates
can be chained together to create a prompt chain, where each template builds on the previous
one.
Why Use Prompt Templates as Actions?
Using prompt templates as actions helps you reuse prompt logic across multiple templates. It
standardizes outputs for common use cases and assists in breaking complex prompts into smaller,
manageable parts.
Use the Action Output in Your Prompt
Reference the output of the prompt template action in your prompt.
Summarize the following response: {!Prompt_Template_Action_Output}
When the prompt runs, the prompt template action executes and its response becomes part of the
final output.
Considerations
Only active prompt templates are available as actions
Add up to five prompt template actions in a prompt chain
Changes to a referenced template affect all templates that use it
Prompt template actions help with reuse, but don’t replace other action types like flows or retrievers
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.