AiAgentDefinitionVersion
Represents a version of an Agentforce agent definition, conversation variables, planner configuration, and behavior settings. For information about retrieving and deploying an Agentforce agent, see Use Use Metadata to Move an Agent to a New Org.
The fullName is the agent’s API name, for example, MyAgent. Each version of the agent is an AiAgentDefinitionVersion component named with a version number, for example MyAgent#1 or MyAgent#2.
This type extends Metadata and inherits its fields.
AiAgentDefinitionVersion components have the suffix .aiAgentDefinitionVersion-meta.xml suffix and are stored in a subfolder for the agent in the AiAgentDefinitionVersions folder. Agent components are stored in these subfolders:
plannerActions/localActions/agentGraph/agentScript/—contains a compiled copy of the script, not the Agent Script source
Introduced in API version 68.0.
AiAgentDefinitionVersion is available only if Agents is enabled in your org.
- Type: AiAgentDefinitionFieldLevelRecordAccess[]
- Required: No
- Description: The field-level record access settings that define which object fields the agent can read or write.
- Type: boolean
- Required: No
- Description: Indicates whether the agent generates answers from knowledge articles using generative AI (
true) or not (false).
- Type: AgentBillingMode (enumeration of type string)
- Required: No
- Description: The billing model for the agent.
- Possible values:
- ActionBased
- OutcomeBased
- Type: BotDialog[]
- Required: No
- Description: The list of dialogs in this agent version.
This field isn’t returned when you retrieve the metadata. To set the welcome, error, and escalation messages, use welcomeMessage , errorMessage , and escalationMessage . You can’t specify this field together with any of those message fields in the same agent version.
- Type: boolean
- Required: No
- Description: Indicates whether the agent includes citations in its responses (
true) or not (false).
- Type: string
- Required: No
- Description: Reserved for internal use.
- Type: ConversationVariable[]
- Required: No
- Description: A container that stores a specific piece of data collected from the customer. You can use variables within dialog actions as both inputs and outputs.
- Type: Language (enumeration of type string)
- Required: No
- Description: The primary language that the agent uses in conversations.
- Type: string
- Required: No
- Description: The additional languages that the agent supports beyond the primary language.
- Type: string
- Required: No
- Description: A reference to the first dialog that the agent presents to your customer.
This field isn’t returned when you retrieve the metadata. To set the welcome, error, and escalation messages, use welcomeMessage , errorMessage , and escalationMessage .
- Type: string
- Required: No
- Description: The message that the agent displays when it encounters an error.
- Type: string
- Required: No
- Description: The message that the agent displays when it escalates a conversation to a human.
- Type: string
- Required: No
- Description: The API name of the planner that powers the agent’s reasoning and actions.
This field isn’t returned when you retrieve the metadata. To set the welcome, error, and escalation messages, use welcomeMessage , errorMessage , and escalationMessage .
- Type: boolean
- Required: No
- Description: Indicates whether the agent is compatible with Agent Script (
true) or not (false).
- Type: boolean
- Required: No
- Description: Indicates whether the agent can use knowledge actions to answer questions (
true) or not (false).
- Type: boolean
- Required: No
- Description: Indicates whether the agent falls back to knowledge articles when no other action applies (
true) or not (false).
- Type: string
- Required: No
- Description: A reference to the dialog identified as the main menu dialog.This field isn’t returned when you retrieve the metadata. To set the welcome, error, and escalation messages, use
welcomeMessage,errorMessage, andescalationMessage.
- Type: AiAgentDefinitionPlanner
- Required: No
- Description: The planner configuration that defines how the agent selects and runs actions.
- Type: string
- Required: No
- Description: A description of the agent’s role and purpose.
- Type: boolean
- Required: No
- Description: Indicates whether the agent responds to small talk (
true) or not (false).
- Type: boolean
- Required: No
- Description: Indicates whether the agent uses static prompts (
true) or not (false).
- Type: BotStatusCode (enumeration of type string)
- Required: No
- Description: The activation status of the agent.
- Possible values:
- Active
- Inactive
- Type: boolean
- Required: No
- Description: Indicates whether the agent stops showing recommended prompts (
true) or not (false).
- Type: boolean
- Required: No
- Description: Indicates whether the agent is available across its configured surfaces (
true) or not (false).
- Type: GenAiBotToneType (enumeration of type string)
- Required: No
- Description: The conversational tone that the agent uses in its responses.
- Possible values:
- Casual
- Formal
- Neutral
- Type: int
- Required: No
- Description: The version number of the agent definition.
- Type: string
- Required: No
- Description: The message that the agent displays at the start of a conversation.
Represents the field-level record access settings that define which object fields the agent can read or write.
-
Type: AiAgentRecordAccessLevel (enumeration of type string)
-
Required: Yes
-
Description: Required.
The level of access that the agent has to the specified field.
-
Possible values:
- ReadWrite
-
Type: string
-
Required: Yes
-
Description: Required.
The API name of the field that the access setting applies to.
-
Type: string
-
Required: Yes
-
Description: Required.
The API name of the object that the access setting applies to.
Represents the planner configuration that defines how the agent selects and runs actions.
This type extends Metadata and inherits its fields.
- Type: GenAiPlannerAttrMapping[]
- Required: No
- Description: The attribute mappings that the planner uses.
- Type: string
- Required: No
- Description: The API name of the bot template that the planner is based on.
- Type: string
- Required: No
- Description: The capabilities available to the planner.
- Type: string
- Required: No
- Description: A description of the planner.
- Type: GenAiPlannerFunctionDef[]
- Required: No
- Description: The functions available to the planner.
- Type: GenAiPlannerFunctionDef[]
- Required: No
- Description: The plugins available to the planner.
-
Type: string
-
Required: Yes
-
Description: Required.
The label displayed in the Salesforce user interface.
- Type: AiPlannerSurfaceDef[]
- Required: No
- Description: The surfaces on which the planner is available.
-
Type: PlannerType (enumeration of type string)
-
Required: Yes
-
Description: Required.
The type of planner that powers the agent.
-
Possible values:
- AiCopilot__AgileAppDev
- AiCopilot__ReAct
- AiCopilot__SequentialPlannerIntentClassifier
- Atlas__ConcurrentMultiAgentOrchestration
- Atlas__VoiceAgent
- BYOP__waiiplanner
- SentOS__SearchAgent
- Type: GenAiPlannerRuleExprAsgn[]
- Required: No
- Description: The rule expression assignments for the planner.
- Type: GenAiPlannerRuleExprDef[]
- Required: No
- Description: The rule expressions defined for the planner.
- Type: boolean
- Required: No
- Type: boolean
- Required: No
- Type: AiPlannerSurfOtbdRouteDef[]
- Required: No
- Type: string
- Required: Yes
- Type: SurfaceType (enumeration of type string)
- Required: Yes
- Type: string
- Required: No
- Type: string
- Required: Yes
- Type: OutboundRouteType (enumeration of type string)
- Required: Yes
Represents the dialogs in this agent version. This metadata type isn’t returned during a retrieve operation. You can’t deploy both dialogs and the messages (welcomeMessage, errorMessage, or escalationMessage) in the same deploy. We recommend using messages instead of dialogs.
- Type: string
- Required: No
- Description: The bot dialog group that contains this bot dialog.
- Type: BotStep[]
- Required: No
- Description: The ordered steps that make up this dialog.
- Type: string
- Required: No
- Description: A description of the bot dialog.
-
Type: string
-
Required: Yes
-
Description: Required.
This unique name prevents conflicts with other dialogs associated with the same bot version. This name can contain only underscores and alphanumeric characters. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
Only users with View DeveloperName OR View Setup and Configuration permission can view, group, sort, and filter this field.
- Type: boolean
- Required: No
- Description: In a bot block, indicates whether a dialog is a placeholder (
true) or not (false). In a bot template or bot version not associated with a bot block, this field is read-only and the value isfalse.
-
Type: string
-
Required: Yes
-
Description: Required.
A label that identifies the dialog throughout the Salesforce user interface.
-
Type: string
-
Required: No
-
Description: Required.
The name of the intent associated with a dialog.
- Type: boolean
- Required: No
- Description: Indicates whether Einstein is turned on to train an intent model for the dialog intent (
true) or turned off for the exact match option (false). The default value isfalse.
- Type: boolean
- Required: No
- Description: Indicates whether to show this dialog in the Bot Options menu. The default value is
false.
Represents a specific piece of data collected from the customer. You can use variables within dialog actions as both inputs and outputs.
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.
- Type: ConversationVariableCollectionType (enumeration of type string)
- Required: No
- Description: This field defines whether a variable is designated as a List Variable. Valid value is List.
- Type: ConversationDataType (enumeration of type string)
- Required: Yes
- Description: Required.
- Possible values:
- Boolean
- Currency
- Date
- DateTime
- Id
- Object
- Number
- Text
- Type: string
- Required: No
- Description: A description of this variable. This value can be used by the Agentforce planner service.
-
Type: string
-
Required: Yes
-
Description: Required.
This name can contain only underscores and alphanumeric characters and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. Only users with View DeveloperName OR View Setup and Configuration permission can view, group, sort, and filter this field.
- Type: boolean
- Required: No
- Description: Indicates whether the variable is injected into the prompt sent to the Agentforce model. If
true, the variable appears in the Included Fields section of the UI.
The default variables Id , EndUserId , and EndUserLanguage always appear in the Included Fields section of the UI, regardless of their value of includeInPrompt . We recommend that you don’t change the value of includeInPrompt for these default variables, as changing the value can prevent your agent from accessing important session data.
-
Type: string
-
Required: Yes
-
Description: Required.
Label that identifies a variable throughout the Salesforce user interface.
- Type: string (enumeration of type string)
- Required: No
- Description: Specifies the SObjectType of the ID stored in a bot variable.
- Possible values:
- BotDefinition
- Queue
- Type: ConversationVariableVisibilityType (enumeration of type string)
- Required: No
- Description: Determines which components can set this variable. If the visibility is
internal, the variable can only be set by action outputs. If the visibility isexternal, the variable can also be set by the API. - Possible values:
- internal
- external
Represents a custom agent topic.
- Type: AiPluginUtteranceDef[]
- Required: No
- Type: boolean
- Required: No
- Type: string
- Required: Yes
- Description: A description of this component. The description should explain the component’s purpose and behavior so that administrators and developers understand when to use it.
- Type: GenAiPluginFunctionDef[]
- Required: No
- Type: GenAiPluginInstructionDef[]
- Required: No
- Type: string
- Required: Yes
- Type: string
- Required: No
- Type: string
- Required: Yes
- Description: The master label for this component. This display value is the internal label that isn’t translated.
- Type: string
- Required: Yes
- Type: PluginType (enumeration of type string)
- Required: Yes
- Type: string
- Required: No
Represents an attribute mapping, which enables you to map the output of one action attribute to the input of another attribute. This mapping enables you to propagate sensitive data safely without relying on untrusted user input.
- Type: string
- Required: Yes
- Type: AttributeType (enumeration of type string)
- Required: Yes
- Type: string
- Required: No
- Type: string
- Required: No
- Type: AttributeMappingType (enumeration of type string)
- Required: Yes
Represents an agent topic or action definition.
- Type: GenAiLocalPlugin
- Required: No
- Type: string
- Required: No
- Type: string
- Required: No
Represents a rule-expression assignment to either a topic or an action.
- Type: string
- Required: Yes
- Type: string
- Required: Yes
- Type: string
- Required: Yes
Represents a condition for a rule expression.
- Type: string
- Required: Yes
- Type: GenAiAgentVariableType (enumeration of type string)
- Required: Yes
- Type: GenAiRuleExpressionOperator
- Required: Yes
- Type: string
- Required: No
Represents a rule expression, which conditionally locks or unlocks topics and actions based on defined security criteria.
- Type: GenAiPlannerRuleExprCondition[]
- Required: No
- Type: string
- Required: No
- Type: string
- Required: Yes
- Type: string
- Required: Yes
- Type: ExpressionType (enumeration of type string)
- Required: No