Agentforce Agent Actions are how AI Agents get things done - they are a list of jobs that an AI Agent can do.
β
This guide will explain how to successfully deploy the Agent Action (GenAiFunction) 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 GenAiFunction
.
β
How to deploy through Gearset
To be able to deploy a GenAiFunction
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 GenAiFunction
. 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
The invocationTarget
and invocationTargetType
must corresponding to a valid target on your org. In the example above there must be a flow
with the name Issue_Resort_Credit
, if this does not exist then it must be deployed along side the GenAiFunction
metadata otherwise the validation/deployment will fail.
Limitations
GenAiFunction
metadata types have two accompanying schema.json
files associated with the metadata, each located in an input
and an output
folder.
There are two known limitations:
If you want to deploy changes to either schema then they MUST be accompanied by changes to the
GenAiFunction
metadata xml.JSON formatting changes i.e. adding or removing whitespace will not be updated.
These are due to Salesforce limitations
Scenario 1 - schema.json content changes but no xml changes:
This scenario will show as a successful deployment but will not actually deploy the schema content changes to your Salesforce org
Scenario 2 - schema.json content changes and xml changes:
This scenario will successfully deploy both xml and schema changes to your Salesforce org.
Scenario 3 - schema.json content and formatting changes and xml changes
This scenario will successfully deploy both xml and schema content changes to your Salesforce org however the formatting changes will not be deployed.
Before deployment (VCS to org)
βAfter deployment (org to VCS)
As can be seen the formatting changes are not transmitted. This is a Salesforce limitation.
JSON files can get into this state from different formatting being applied by different editors.
We recommend pushing the content changes to the org then pulling the file back down from the org into your VCS if your file gets into this state.
β