# Prompt template lifecycle: build, preview, activate, invoke

*Agentforce Specialist Study Guide · Prompt Engineering · Last updated October 15, 2026 · https://www.certifyforce.com/study-guide/agentforce-specialist/prompt-engineering/prompt-template-lifecycle-build-activate-invoke*

How a prompt template goes from New Prompt Template in Setup through the Prompt Template Workspace, Preview, saved versions and activation to execution from a record page, a flow, Apex or an agent, and why an unactivated template is invisible to every consumer.

- Certification: Salesforce Agentforce Specialist
- Exam section: Prompt Engineering
- Study guide: https://www.certifyforce.com/study-guide/agentforce-specialist

**Official exam objective:**

> Explain the process for creating, activating, and executing prompt templates.

## What the exam expects

- Name the org prerequisites for building templates: Einstein turned on and the Prompt Template Manager permission set (or Customize Application).
- Walk through creating a template in Setup: type first, name, then the Prompt Template Workspace.
- Explain what Preview does (resolution plus a real LLM response) and what it does not do (activate the template or bypass access).
- Use versions and activation to change a live template without disrupting its users.
- Pick how an active template executes: generative field on a record page, Prompt Template flow action, invocable action or agent action.
- Key terms: **Prompt Template Workspace** (the editor where you write, ground and preview the prompt); **resolution** (replacing merge fields with real data before the prompt goes to the model); **version** (a saved, numbered copy of the template body, grounding and model); **active version** (the single version consumers run); **Prompt Template action** (the Flow action that runs an active template).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Permission to build and activate | Prompt Template Manager (Manage + Execute Prompt Templates) or Customize Application | [Create a Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_build_template.htm&language=en_US&type=5) |
| Where templates are created | Setup, Quick Find "Prompt Builder", New Prompt Template | [Create a Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_build_template.htm&language=en_US&type=5) |
| Template description | Optional; shown in the Setup list of templates | [Create a Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_build_template.htm&language=en_US&type=5) |
| Default availability | Not available to users until a version is activated | [Activate and Deactivate](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_activate_deactivate_templates.htm&language=en_US&type=5) |
| Active versions | One at a time; none active means the template is unavailable | [Activate and Deactivate](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_activate_deactivate_templates.htm&language=en_US&type=5) |
| Editing an ever-active version | Not possible; Save As > Save as a New Version | [Use Multiple Versions](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_use_multiple_versions.htm&language=en_US&type=5) |
| New version availability | Not available to users until activated | [Use Multiple Versions](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_use_multiple_versions.htm&language=en_US&type=5) |
| Preview | Resolves input, then returns a real LLM response | [Run-time Execution](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_runtime.htm&language=en_US&type=5) |
| Grounding access | Governed by the executing user's permissions | [Run-time Execution](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_runtime.htm&language=en_US&type=5) |
| Flow action requirements | Prompt Builder enabled, Prompt Template User on the running user, an active version | [Prompt Template Flow Action](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_actions_generate_prompt_response.htm&type=5) |
| Flow action output | Prompt Response | [Prompt Template Flow Action](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_actions_generate_prompt_response.htm&type=5) |

## Check yourself

- Why can't users select a template right after it is saved?
- When must you create a new version instead of editing the one on screen?
- Why can two builders see different resolved prompts in Preview for the same record?
- Which three conditions must hold for the Prompt Template flow action to run?

## Sources

- [Create a Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_build_template.htm&language=en_US&type=5)
- [Activate and Deactivate Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_activate_deactivate_templates.htm&language=en_US&type=5)
- [Use Multiple Versions of a Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_use_multiple_versions.htm&language=en_US&type=5)
- [Prompt Template Run-time Execution](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_runtime.htm&language=en_US&type=5)
- [Enable Prompt Builder](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_enable.htm&language=en_US&type=5)
- [Flow Core Action: Prompt Template Actions](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_actions_generate_prompt_response.htm&type=5)
- [Troubleshoot Prompt Builder](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_troubleshoot.htm&language=en_US&type=5)
- [Prompt Builder Key Concepts](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_key_concepts.htm&language=en_US&type=5)
- [Create a Flex Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_create_flex_prompt_template.htm&language=en_US&type=5)
- [Add a Field Generation Prompt Template to a Lightning Record Page](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_field_gen_to_lightning_record_page.htm&language=en_US&type=5)
- [Flex Prompt Templates in Action](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_templates_in_action_flex.htm&language=en_US&type=5)
- [Prompt Builder Limitations](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_limitations.htm&language=en_US&type=5)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 8 linked practice questions, and unlimited timed mock exams are included with the Agentforce Specialist pack (USD $19): https://www.certifyforce.com/practice-exams
