How to Call an AI Agent from Salesforce Flow? (Step-by-Step)
You know how to build a Flow. You know how to build an Agent. But can you make them talk to each other?
Master Agentforce today: ๐ Join the Agentforce Training by S2 Labs: https://s2-labs.com/salesforce-agentforce-training/?utm_source=YouTubeHulk
In this video, we unlock one of the most powerful patterns in Salesforce Agentforce: Calling an AI Agent directly from a Salesforce Flow.
We walk through a real-world healthcare scenario, automating patient treatment suggestions based on a diagnosis. You will learn why you cannot run this on an immediate path, how to handle the Asynchronous path, and most importantly, how to clean up the messy JSON response using Prompt Templates.
What Youโll Learn: The Use Case: Automating medical advice based on appointment diagnosis. The Flow Setup: Why you must use the Asynchronous Path for AI calls (Agentforce acts like an API). The Input: Passing context (Patient Name, Diagnosis) to the Agent. The Problem: Why the AI response comes back as raw JSON. The Fix: Using Prompt Templates to format the output into a readable paragraph.
Timestamps: 0:00 - Intro: Combining Flow & Agentforce 0:48 - The Real-World Use Case (Hospital Appointments) 1:42 - Step 1: Setting up the Record-Triggered Flow 1:53 - Why use the Asynchronous Path? 2:11 - Step 2: Creating Agent Inputs 2:57 - The Problem: Raw JSON Responses 3:05 - Step 3: Using Prompt Templates to Format Output 3:46 - Final Testing: The Clean Response
Follow S2 Labs on social media to get the latest tips, tutorials, and updates on Salesforce: Instagram: https://instagram.com/s2_labs Facebook: https://www.facebook.com/S2Labs.Shrey/ Twitter: https://twitter.com/s2_labs LinkedIn: https://www.linkedin.com/company/s2-labs-by-shrey-sharma/
Connect with Shrey Sharma AKA Salesforce Hulk: Instagram: https://www.instagram.com/imShreySharma/ Facebook: https://www.facebook.com/SalesforceHulk Twitter: https://twitter.com/iamshreysharma LinkedIn: https://www.linkedin.com/in/imshreysharma/ YouTube: https://www.youtube.com/channel/UCBOdSQZaXaiSpFdzEyy6gbA.
#salesforce #agentforce #salesforceflow #aiautomation