Loading
Agentforce and Einstein Generative AI
Troubleshoot Agent Upgrade Errors

Troubleshoot Agent Upgrade Errors

When you upgrade an existing agent, Agentforce does most of the work for you. But metadata and syntax differences between the new and legacy Agentforce Builders can still cause validation errors when you save or commit your upgraded agent. Learn more about common issues and how to solve them.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions with Foundations, or Agentforce 1 or Einstein 1 Editions
Invalid Data Library

Invalid data library errors can occur because the required format for data library IDs varies between the legacy builder and Agentforce Builder.

If you get an error that your knowledge.rag_feature_config_id isn't valid, manually add the data library to the upgraded version of your agent from the Explorer in Agentforce Builder.

Invalid Source for an Agent Action

In Agent Script, the source field is the API name for an agent action. When included in an agent action, it works together with the target field to tell the agent which action to run and what reference action (the underlying functionality, such as an Apex class, flow, or prompt template) to call. Invalid source errors can occur because of metadata discrepancies, or because the legacy builder appended an ID suffix to agent action sources that Agentforce Builder doesn't require.

If you get an error that Agentforce can't find a source for an agent action, in Script view:

  • Delete the alphanumeric ID suffix from the source. For example, My_Action_1792ce20299b41c becomes My_Action.
  • For custom agent actions, you can also delete the source field from the action entirely, unless the action is from a managed package. Custom agent actions can generally use the target field alone. Actions from a managed package can require a namespace from the source field.

If the action is available in the asset library, you can remove the action from your agent and then re-add it. Or if it's a custom action specific to your agent, you can remove the action and recreate it based on the same reference action.

Missing Source Field for Linked Variables

Context variables (also called linked variables) are mapped to an object field, which is identified as the variable's source in Agentforce Builder and Agent Script. For example, the source of the RoutableId variable is the ID field on the Messaging Session object. When you upgrade an agent that contains context variables, the source field can be missing in Agent Script.

If you get an error that the source field for a variable is invalid or missing when you save or commit your upgraded agent, manually add the source in Script view. If you're not using the variables, it's safe to delete them. This table lists common context variables and their sources.

Context Variable Source
VoiceCallId @VoiceCall.Id
EndUserId @MessagingSession.MessagingEndUserId
ChannelType @MessagingSession.ChannelType
RoutableId @MessagingSession.Id
EndUserLanguage @MessagingSession.EndUserLanguage
ContactId @MessagingEndUser.ContactId
 
Laster
Salesforce Help | Article