This guide walks you through integrating Agent.ai’s intelligent agents directly within Salesforce without requiring external code. By setting up Named Credentials and creating a Flow with HTTP callouts, you’ll enable your Salesforce instance to seamlessly communicate with Agent.ai’s services. This integration allows your agents to respond to record creation events, process data from your Salesforce objects, and write results back to your records—all while maintaining the security and governance controls of your Salesforce environment. Follow these step-by-step instructions to set up this powerful integration in under 30 minutes.
Before setting up the Salesforce integration with Agent.ai, ensure you have:Tested Your Agent with cURL:Verify your Agent.ai webhook is functional by testing it with cURL first. This confirms the endpoint is working and helps you understand the expected request/response format:
Salesforce fields you want to use for input/output
Salesforce Edition: Confirm you’re using a Salesforce edition that supports Named Credentials and Flows (Enterprise, Unlimited, Developer, or Performance).
Taking these preparatory steps will significantly streamline the integration process and help avoid common setup issues.
Check “Include a Run Asynchronously path to access an external system after the original transaction for the triggering record is successfully committed”
Use this checklist to troubleshoot if your Agent.ai integration isn’t working properly:
External Credentials: Verify name contains no spaces and “No Authentication” is selected
Named Credentials: Confirm URL is correct and “Enabled for Callouts” is checked
Principal: Check that Principal is created with correct sequence number
Permission Set: Ensure External Credential Principal is enabled
User Assignments: Confirm relevant users have the permission set assigned
Flow Trigger: Verify flow is set to trigger on the correct object and event
HTTP Callout: Check that the webhook URL path is correct
Request Body: Confirm input parameters match what your Agent expects (e.g., “input_name”)
Response Handling: Ensure output variables are correctly mapped
Field Updates: Verify targeted fields exist and are accessible for updates
Asynchronous Execution: Confirm “Include to Run Asynchronously” is checked
External Service: Check Named Credential is properly selected in External Service
Flow Activation: Make sure the flow is activated after testing
Agent Webhook: Verify your Agent.ai webhook endpoint is active and responding
SFDC Logs: Review debug logs for any callout errors
If issues persist, check your SFDC debug logs for specific error messages and verify that your Agent.ai webhook is responding as expected with proper formatting.
Congratulations! You’ve successfully integrated Agent.ai with Salesforce using native SFDC capabilities, eliminating the need for middleware or custom code. This integration creates a powerful automation pipeline that leverages AI agents to enhance your Salesforce experience. As records are created in your system, they now automatically trigger intelligent processing through your Agent.ai webhooks, with results flowing seamlessly back into your Salesforce records. This approach maintains Salesforce’s security model while expanding its capabilities with Agent.ai’s intelligence.Consider extending this implementation by creating additional flows for different record types, implementing decision branches based on agent responses, or adding more complex data transformations. As you grow comfortable with this integration, you can enhance it to support increasingly sophisticated business processes, bringing the power of Agent.ai to all aspects of your Salesforce implementation. Remember to monitor your usage and performance to ensure optimal operation as your integration scales.