Gearset's Agentforce metadata deployment solution simplifies and streamlines the process of deploying AI-powered configurations, including Prompt Templates, in Salesforce. 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 with Gearset.
Prerequisites
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'll only need to include GenAiPromptTemplate
.
How to deploy GenAiPromptTemplate metadata with Gearset
To be able to deploy the GenAiPromptTemplate
metadata type, you need to make sure that all dependencies exist in the target org. If they don't then you need to deploy them alongside the GenAiPromptTemplate
.
Note: This is not required for VCS targets, however it's 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's not present then it will need to be deployed alongside 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's is not present then it will need to be deployed alongside the GenAiPromptTemplate
metadata.
As you can see from the examples above, the GenAiPromptTemplate
metadata can have dependencies on a large amount of objects. We will be adding more problem analyzers over time to help highlight any missing dependencies before you validate or deploy your Agentforce metadata.