Lesson 31 of 41 · All lessons
Salesforce Agentforce Specialist
0 of 41 complete
1Exam Overview
  1. 1.1Agentforce Specialist Complete Exam Overview
2Prompt Engineering20%
  1. 2.1When to Use Prompt Builder
  2. 2.2Prompt Template Access Controls
  3. 2.3Field Generation and Flex Prompt Template Types
  4. 2.4Grounding Techniques for Prompt Templates
  5. 2.5Creating, Activating, and Executing Prompt Templates
  6. 2.6Best Practices for Writing Effective Prompts
  7. 2.7Trust Layer Security and Privacy Features
  8. 2.8Managing and Preventing Specific Models from Being Accessed
3Data 360 Fundamentals20%
  1. 3.1Agentforce Data Library
  2. 3.2Data 360 Concepts for Agentforce
  3. 3.3Chunking
  4. 3.4Indexing
  5. 3.5Retrievers
  6. 3.6Choosing a Grounding Approach for a Scenario
4AI Agents35%
  1. 4.1How an Agentforce Agent Works
  2. 4.2Agent Building Blocks and Agent Script
  3. 4.3Hybrid Reasoning and Deterministic Behavior
  4. 4.4Agentforce Builder: Canvas and Script Views
  5. 4.5Filters, Variables, and Template Expressions
  6. 4.6Standard and Custom Topics
  7. 4.7Standard and Custom Agent Actions
  8. 4.8Configure Topics, Instructions, and Actions for a Use Case
  9. 4.9Connecting Agents to Digital Experience, Email, Voice, and Slack
  10. 4.10Agent Security Context and Action Execution
  11. 4.11Choosing Between Employee and Service Agents
  12. 4.12When to Use Agent API
5Testing, Deployment, and Maintenance10%
  1. 5.1Testing Agents with Testing Center
  2. 5.2Understanding Testing Center Evaluations
  3. 5.3Deploying Agents from Sandbox to Production
  4. 5.4Deploying Prompt Templates Between Environments
  5. 5.5Reviewing Agent Behavior After Changes
6Governance and Observability10%
  1. 6.1Managing and Monitoring Agents
  2. 6.2Agent Analytics and Performance Signals
  3. 6.3Identifying Opportunities to Optimize Agent Behavior
  4. 6.4Using Observations to Guide Improvements
7Multi-Agent Orchestration5%
  1. 7.1Choosing a Multi-Agent Architecture
  2. 7.2Orchestrators and Connected Subagents
  3. 7.3Handoff and Supervisor Modes
  4. 7.4Model Context Protocol (MCP)
  5. 7.5Agent-to-Agent (A2A) Communication

Section 5 · Testing, Deployment, and Maintenance · 10% of exam

5.4 Deploying Prompt Templates Between Environments

3 min read Updated Nov 16, 2026

Exam objective

Identify the considerations for moving prompt templates from a sandbox to production, including dependencies, version status, and activation.

Treat the template as a dependency chain

A prompt template can depend on resources such as objects, fields, flows, Apex, retrievers, models, and permissions. Before deployment, list the resources the template references and make sure each exists in the target org with compatible configuration. A template that deploys successfully can still fail at runtime if a referenced flow is missing or inactive, a model configuration differs, or users lack access to required data. Salesforce provides multiple ways to move metadata, including change sets and Salesforce CLI. Follow the considerations for the method you use because behaviors are not identical across change sets, CLI, and packages.

Understand versions and activation

Prompt template versions have statuses. Activating a version publishes it, and a published version cannot be edited back into a draft. When using change sets, templates do not automatically become active in the target by default. Salesforce documents a target-org setting and permission that can enable automatic activation for change-set deployments; without it, deployed templates remain inactive and need manual activation. This setting applies to change sets, not CLI or package deployments. Plan the target activation step and ensure there is an approved active version before an agent or automation calls the template.

Check dependencies and target differences

Include dependent components and review deployment warnings. Salesforce notes that a Flow referenced by a prompt template is not automatically activated when deployed; running a template with an inactive referenced Flow can produce an error. If a custom model configuration is used, confirm the target org has a model with the matching name. Consider whether the target has the necessary feature licenses, data access, retriever, permissions, and connected resources. Do not assume the template’s source-org activation state or model availability will be reproduced automatically in production.

Test after deployment

After moving the template, inspect the target version, inputs, grounding, model selection, and activation status. Run representative prompt tests with production-like data and users. If an agent uses the template, test the full agent path as well as the template by itself, because the agent may supply different values or action outputs. Check output quality, error handling, and downstream Flow or action behavior. Document which version is active and how to restore the prior approved version if a release has problems. Deploying a template is a lifecycle event: a target-org validation is required before the dependent agent or process relies on it.

TIP: If a deployed prompt template fails, check activation, dependent Flow status, model availability, input mappings, and target-org permissions before rewriting the prompt.

Automatic template activation is a change-set-specific behavior controlled by target-org configuration; do not assume the same behavior for CLI or packages.

Extra concept: A published prompt template version is immutable. Make and test a new version when a change is needed, then deliberately activate the intended target version.

Official references:

  • Change Set Considerations for Prompt Templates https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_changeset.htm&language=en_US&type=5
  • Salesforce CLI Considerations for Prompt Templates https://help.salesforce.com/s/articleView?id=ai.prompt_builder_considerations_cli.htm&language=en_US&type=5

Key takeaways

  • Track template dependencies and differences between change-set, CLI, and package deployments.
  • Check target activation, referenced Flow status, model configuration, access, and data resources.
  • Run prompt and end-to-end agent tests in the target org before relying on the deployed template.

Check your knowledge

Answer exam-style Testing, Deployment, and Maintenance questions with answers and explanations.

Practice Testing, Deployment, and Maintenance
Finished this lesson? Mark it complete to track your progress.

Ready for the real exam?

Take the timed Salesforce Agentforce Specialist simulator: same number of questions, same time limit.

Get Complete Access