Salesforce Guidelines for Agent-Ready Automation
- •Salesforce published a guide on June 17, 2026, for making automation systems compatible with Agentforce.
- •Refactoring strategy involves isolating monolithic processes into single-purpose actions using structured Apex data contracts.
- •The process mandates strict security measures, including the use of "with sharing" and "WITH USER_MODE" keywords.
Salesforce released a guide on June 17, 2026, for configuring existing automation systems to be compatible with Agentforce. The process centers on refactoring monolithic processes into isolated, deterministic actions that balance probabilistic reasoning with reliable execution. Developers should triage assets into four categories: prime candidates (single-purpose flows or Apex methods), transitional candidates (logic requiring minor decoupling), marginal candidates (tightly coupled dependencies), and high-risk anti-patterns (processes bypassing user permissions).
Effective refactoring requires decoupling capabilities, such as separating discount calculations, invoice generation, and notifications into individual units. Technical requirements include bulkifying assets to process lists synchronously, enforcing strict data contracts using Apex wrapper classes, and utilizing @InvocableVariable annotations to define clear JSON schemas for the agent. Developers must also secure execution by applying the "with sharing" keyword and "WITH USER_MODE" for all data operations.
These modularized assets function as Agentforce custom actions, where the agent manages human intent while the underlying Salesforce architecture provides governance. The strategy recommends starting with a single prime candidate to establish a baseline before scaling. This modular approach not only facilitates agent integration but also improves the overall security, compliance, and reliability of the organization's automation estate.