Hi Team, I’m encountering issues while working with a second-generation package for an agent component. I followed the official Salesforce documentation for packaging agents: https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/dev2gp_package_agent_templates.htm
Here's a summary of what I’ve done so far: Created a package for the agent using the above guide. Deployed the Agentforce component successfully to a scratch org. Verified the agent's functionality in the scratch org after deployment. Generated the corresponding bot template (Agentforce_Employee_Agent_v1_Template). However, when attempting to deploy the code (including the bot template) into the scratch org, I am encountering the following errors:
- Cannot find Bot Template with name: Agentforce_Employee_Agent_v1_Template
- Error parsing file:Element {http://soap.sforce.com/2006/04/metadata}agentTemplate invalid at this location in type BotTemplate
- API Exception: duplicate value found: ParentId duplicates value on record with id: 9ZVAu0000000OYkOAM Could you please help us to resolve these issues?
Hi @Sudhanshu Ray after generate template you need remove this tag in botTemplate
<agentTemplate>****Agent</agentTemplate>