---
schema_version: "1"
id: 3041efbda2805ebedfc8b48f836daeed26fcf62098b5803a0ea465a2ee9e968b
title: Use Prompt Templates as Actions
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_use_prompt_template_actions.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_use_prompt_template_actions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 25fc7f4853645e9f69b3439aaa966686edcb4386959ebc6f82927b83bd839e3c
description: 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.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Use Prompt Templates as Actions

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

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

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

#### See Also

- [Add a Prompt Template as an Action](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_action_prompt_template.htm&release=264.0.0&type=5 "Add a prompt template as an action within another prompt template to reuse logic and incorporate its output into your prompt. Invoke one prompt template from another to build consistent, modular prompt workflows.")