Pass data between actions in Prompt Builder to create dynamic and flexible prompt workflows. Use the output of one action as input to another to generate more contextual and relevant responses.
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
OR Customize Application permission set |
Before you being, verify all actions are properly configured. Confirm the source action produces the required output.
- In Prompt Builder, open a prompt template.
- Add the required actions (for example, a prompt template and a retriever).
- Configure the first action to generate an output.
- Select the second action.
- In the input field (such as Search Parameters), reference the output of the first action.
Example
Can you answer this question? {!$PromptTemplate:Generate_Stack_Overflow_Query.promptResponse}
When the prompt runs, the first action (prompt template) generates output. The second action uses that output as input. The final response includes results from both actions
Tip To analyze performance, open the Performance Insights panel and review metrics such as response time and token usage. Each action appears as a separate step.