Skip to main content
All CollectionsCompare and deploy metadataGuides on comparing and deploying specific metadata
How to deploy Agentforce Prompt Template (GenAiPromptTemplate) metadata
How to deploy Agentforce Prompt Template (GenAiPromptTemplate) metadata

A walkthrough on how to deploy Agentforce Prompt Template (GenAiPromptTemplate) metadata

Gareth Hefferon avatar
Written by Gareth Hefferon
Updated yesterday

Agentforce Prompt Templates are a key component in creating AI Agents. They are a set of instructions that guide AI Agents to generate responses to user queries.

This guide will explain how to successfully deploy the Prompt Template (GenAiPromptTemplate) metadata via Gearset.

Prerequisites

You must make sure to use at least API version 60 for the comparison. Read the prerequisite section of the How to deploy GenAi metadata guide to find out how to do this.

What metadata is needed in the filter?

In your metadata filter you will only need to include GenAi prompt template.

How to deploy through Gearset

To be able to deploy a GenAiPromptTemplate metadata type, you need to make sure that all dependencies exist on the target org, if they don't then you need to deploy them along side the GenAiPromptTemplate. Note: This is not required for VCS targets, however it is strongly recommended to keep your VCS up to date with all required metadata.

Example 1 - Dependency added to the <relatedEntity> and <relatedField> xml tags

In this case the Account custom object with the field AccountNumber would need to be present on the target org, if it is not present then it will need to be deployed along side the GenAiPromptTemplate metadata otherwise the validation/deployment will fail.

Example 2 - Dependency added to the <content> xml tag

In this case the Apex class PersonalizedGuestExperiences would need to be present on the target org, if it is not present then it will need to be deployed along side the GenAiPromptTemplate metadata.

As you can see from the examples above GenAiPromptTemplate metadata can potentially have dependencies on a large amount of objects. We will be adding Problem Analyzers over time to help highlight any missing dependencies before a Validation or Deployment occurs.

Did this answer your question?