# Deploying prompt templates from sandbox to production

*Agentforce Specialist Study Guide · Testing, Deployment, and Maintenance · Last updated November 6, 2026 · https://www.certifyforce.com/study-guide/agentforce-specialist/testing-deployment-and-maintenance/deploying-prompt-templates-from-sandbox-to-production*

How prompt templates and dependent flows deploy, which activation and version settings apply to each deployment path, and how cloning and namespace affect packaged-template overrides.

- Certification: Salesforce Agentforce Specialist
- Exam section: Testing, Deployment, and Maintenance
- Study guide: https://www.certifyforce.com/study-guide/agentforce-specialist

**Official exam objective:**

> Identify the considerations for deploying a template from sandbox to production.

## What the exam expects

- Deploy a prompt template together with the flows and Apex it references, and recover when that deployment fails.
- Predict which versions arrive in the target org and whether any version is active afterwards.
- Configure the two Einstein Setup settings: auto-activation of deployed templates and deploying only the active version.
- Deploy or retrieve one template with Salesforce CLI using the GenAiPromptTemplate metadata type.
- Recognise what deployment can't do: delete templates, modify published versions, or bring a missing custom model.
- Key terms: **GenAiPromptTemplate** (the metadata type for a prompt template); **published version** (a version that was ever activated; immutable); **template-triggered flow** (a flow a template calls to fetch grounding data); **Deploy Prompt Templates** (the change set permission that auto-activates source-active templates); **Deploy Only the Active Template Version** (the setting that skips inactive versions).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Template-triggered flows | Build with manual inputs; deploy flow and template together | [Deployment Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_deployment.htm&language=en_US&type=5) |
| Failed template-plus-flow deployment | Deploy the flow first, then the template separately | [Deployment Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_deployment.htm&language=en_US&type=5) |
| Default activation after change set | All templates arrive inactive; activate manually | [Change Set Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_changeset.htm&language=en_US&type=5) |
| Deploy Prompt Templates | Auto-activates source-active templates; change sets only | [Change Set Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_changeset.htm&language=en_US&type=5) |
| Default versions in a change set | All versions, active or inactive | [Change Set Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_changeset.htm&language=en_US&type=5) |
| Deploy Only Active Version, no active version | Deployment fails with an error | [Change Set Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_changeset.htm&language=en_US&type=5) |
| Published versions | Immutable; skipped on redeploy | [Change Set Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_changeset.htm&language=en_US&type=5) |
| Custom LLM in a template | Target org needs a model with the same name | [Change Set Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_changeset.htm&language=en_US&type=5) |
| CLI metadata type | GenAiPromptTemplate:TemplateName | [Salesforce CLI Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?language=en_US&id=ai.prompt_builder_considerations_cli.htm&type=5) |
| Deleting templates | Not by change set or CLI; CLI can delete versions | [Salesforce CLI Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?language=en_US&id=ai.prompt_builder_considerations_cli.htm&type=5) |

## Check yourself

- Why explicitly check overridability on a cloned packaged template?
- When does Prompt Builder show Template Overrides?
- Why decide the overridable setting before customers install it?

## Sources

- [Change Set Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_changeset.htm&language=en_US&type=5)
- [Deployment Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_deployment.htm&language=en_US&type=5)
- [Salesforce CLI Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?language=en_US&id=ai.prompt_builder_considerations_cli.htm&type=5)
- [Packaging Considerations for Prompt Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_packaging.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)
- [GenAiPromptTemplate](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_genaiprompttemplate.htm)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit and reading progress are included in the full study guide. The separate practice exams option includes the reviewed question bank and timed mock exams. The bundle includes both where available. See [current options and prices](https://www.certifyforce.com/pricing).
