Agentforce is Salesforce’s next-generation AI agent platform. It can be used to automate workflows, enhance customer interactions, and streamline sales processes. However, in order to fully leverage its capabilities, administrators must grasp the key components powering Agentforce—as well as how to deploy them effectively.
In this article, we’ll break down the building blocks of Agentforce—including Topics, Actions, Data Sources, and more—while guiding you through best practices for deployment, integration, and DevOps automation.
Let’s dive in.
Put simply, Agentforce helps companies automate repetitive tasks, resolve customer queries, and assist sales teams in finding the right information. In other words, it can be used to greatly streamline sales processes. By integrating structured and unstructured data from multiple sources, Agentforce provides quick and accurate responses that improve the overall customer experience and help optimize internal workflows.
Administrators and developers can also use Agentforce to build AI agents and related components.
Agents consist of Topics, Actions, Settings, and Data Sources. Salesforce provides an Agent Builder, housed within Agentforce Studio. The documentation on using Agent Builder and step by step instructions is well covered by Salesforce and beyond the scope of this document. But, in order to deploy Salesforce AI Agents effectively, you need to understand how all of these pieces fit together in practice. Let’s start with Topics and Actions.
Topics are specialized areas which define what your agent can understand and act upon. For instance, if you’re creating an agent to manage orders, you can configure a topic that explains the order management scope. This could, for example, involve answering questions about order history and the ability to modify product order specifications. Each topic then comes with a detailed configuration that includes its scope and description, ensuring clear boundaries between agents.
Topics must be deployed as part of the Agent definition. In addition, they will change over time as you refine the agent, so it’s good practice to track changes via your version control repository.
Actions are intrinsically linked to topics, and represent the actual tasks your agent can perform. These actions can be linked to Flows within Salesforce, Apex code, MuleSoft APIs, or custom prompts. The beauty of this system lies in its flexibility—administrators can easily assign existing actions to topics or create new ones as needed, all through a straightforward interface that guides you through the process.
Flows, code, and Mulesoft APIs are not new or specific to Agents. They are capabilities that have been part of the platform for years and are used to build all types of applications on Salesforce. So they should already be managed in your DevOps process.
Actions are the reason you should think of Agents as simply a new type of application that interacts with your users through a natural language interface. As such you should make them part of your standard DevOps process.
Data integration represents a key value proposition of Agentforce. This is primarily thanks to its deep integration with Data Cloud. For example, if customer orders are stored in a different system, Data Cloud can make these orders easily accessible to Agentforce—irrespective of how many orders you could be processing per year.
Data Cloud handles both structured data (such as traditional Salesforce records) and unstructured data (e.g. emails and voice memos). It serves as a foundational layer that enables smooth data flow between various Salesforce applications, with Agentforce acting as an intelligent interface layer above these systems.
The platform offers multiple methods for data integration, including direct Data Cloud ingestion, zero-copy virtualization for external systems, and MuleSoft API connections. Data Graphs provide visual representations of relationships between data model objects, enabling administrators to ensure proper data connectivity and availability for their agents.
The good news is that Data Cloud can now be configured in Sandboxes and promoted into production environments so they can now be part of your regular DevOps process. Given that these data sources will be continuously modified over time and likely include confidential information, it is important that you make it part of your change management process just like all of your other metadata.
Agent Builder may look simple, but it requires careful top-down planning and building from the bottom up. Using it is like icing a cake. It is where all of the pieces come together. But you have to bake the cake before you can decorate it. In this case, the cake represents the Actions. While you are able to use existing actions, it is likely that you will need to build new actions or make modifications to existing actions in order to satisfy the needs of the Agent. Actions must be created or updated before configuring your Agents.
A complete discussion of how to test an Agent is beyond the scope of this document, but we would be remiss if we did not mention that testing your agent before deployment is critical. That means testing in your Dev Org and every environment in the pipeline—up to and including Production.
Now that you have all the pieces built and you have thoroughly tested your Agent, you are ready to deploy it to the next environment. Deploying Agentforce requires a methodical approach starting with carefully including dependencies when selecting your metadata.
Agentforce uses different metadata types to define how agents function. These include:
In order to successfully deploy an agent to a destination environment, you’ll need to carry over the main Agent metadata component (GenAi Planner) together with its dependencies which include Topics (GenAi Plugins); any Actions (GenAi Functions) and their corresponding Flows and Apex Classes; any Prompt Templates if used; as well as Bot components when the agents get configured for external channels.
When deploying Agent Topic metadata components (GenAiPlugin), keep in mind that any related agent actions (GenAiFunctions) must exist in the destination environment. If they don’t exist, then they must be deployed alongside the GenAiPlugin metadata.
When deploying Agent action metadata components (GenAiFunction), keep in mind that the corresponding Apex class or flow must exist in the destination environment. If it doesn't, then it must be deployed alongside the GenAiFunction metadata.
When deploying Prompt Templates metadata components (GenAiPromptTemplate), keep in mind that related metadata like sObjects, Apex classes, flows or data cloud objects must exist in the destination environment. If they don't exist then they must be deployed alongside the GenAiPromptTemplate metadata.
Failure to follow the above steps will mean only one thing: the deployment or validation will fail.
Finally, it is likely that your Agent will require new Data Sources. This could mean new Data Cloud configurations are required. Data Cloud deployments have some of the same challenges as agents. Learn more about streamlining Data Cloud deployments.
The Metadata associated with your Agent Solution can generally be deployed automatically through your CICD system keeping in mind the considerations mentioned above. There are several items in Salesforce Setup that are not supported by the Metadata API (MDAPI). These items typically require manual steps during deployment. In fact, Copado has made it easy to document these steps and to coordinate them with the automations as part of a deployment. Lack of MDAPI is no longer a barrier to automation however. Robot Process Automation (RPA) tools like Copado Robotics enable these manual steps to be replaced with clicks from a script, thereby eliminating human intervention. This not only saves time, but also improves the reliability, since once the script is dialed in, it will be repeated the same way each time.
Successful Agentforce implementation requires ongoing attention to maintenance and optimization. Regular review and refinement of prompts, actions, and data streams ensure optimal performance. Administrators should pay particular attention to data quality and availability, as these factors directly impact agent response accuracy.
Agentforce represents a significant advancement in AI-powered business automation within the Salesforce ecosystem. While the platform offers powerful capabilities out of the box, success depends on careful configuration, thorough testing, and ensuring dependencies are included in deployments. Understanding the interplay between topics, actions and data integration enables administrators to create effective AI agents that can significantly improve organizational efficiency and the customer experience.
Learn more about how you can use powerful DevOps tools to take control of your Salesforce development.
Don’t let outdated processes slow you down. Discover how Copado can transform your Salesforce automation today: Learn more
Level up your Salesforce DevOps skills with our resource library.