SlideShare a Scribd company logo
Class 3: "Salesforce Flow using development"
Salesforce Flow, Development Components, and Gen AI!
Admin Group, Bangkok, TH
Salesforce Flow using development with Gen. AI
1. Introduction and Recap
2. Fundamentals of Salesforce Flow with Development Components
3. Leveraging Gen AI to Obtain Flow-Ready Components
4. Best Practices for Combining Flows, Components, and Gen. AI
5. Interactive Q&A
Agenda
Introduction: Group Leaders
Trailblazer Community Group - Bangkok
Trailblazers like you join these
groups to build their expertise,
expand their networks, and get
momentum around common
interests.
Admin group is sharing best
practices to deliver productivity
and innovation with Salesforce,
from managing users to building
custom apps with no-code and
low-code.
Of course, developers are
1. Class 1: "Salesforce Flow Fundamentals: The Complete Overview"
Perfect for introducing participants to the power of Flow and its use cases.
2. Class 2: "Salesforce Flow for Administrators: Automate with Ease”
Tailored to help admins create and manage flows to streamline business processes.
3. Class 3: "Salesforce Flow + Development Components + Gen AI: Deep Dive"
Enhance automation by integrating Flow with Apex and LWC.
Flow series:
✅ What is Salesforce Flow?
• A powerful automation tool to replace workflows & process builders.
• Enables click-based automation without Apex coding.
✅ Key Flow Types
• Screen Flow → User-driven interactions (data input, guided processes).
• Record-Triggered Flow → Auto-executed when records change.
• Scheduled Flow → Runs at a set time to automate tasks.
• Auto launched Flow → Called from Apex, processes, or APIs.
✅ Flow Building Blocks
• Elements: Decision, Assignment, Loop, Create/Update Records, Action (Apex).
• Resources: Variables, Collections, Formulas, Constants.
📌 Why It Matters: Flow empowers admins to create scalable and efficient automation without coding.
Class 1 – Flow Fundamentals: The Complete Overview
🎯 What We Covered
Class 2 –Flow for Administrators
✅ How Admins Can Use Flow for Business Automation
• Replace manual processes with automated actions.
• Build complex logic using Flow's Decision and Loop
elements.
• Integrate with Salesforce Objects to create/update records
dynamically.
✅ Best Practices for Building Flows
🔹 Use Record-Triggered Flows instead of Process Builder
for performance.
🔹 Minimize SOQL queries and DML statements to avoid
hitting limits.
🔹 Leverage Subflows to keep automation modular and
reusable.
🔹 Use Debug Mode & Fault Paths for troubleshooting.
✅ Real-World Use Cases
✔️Automating Lead Assignment – Assign leads based on
criteria using Decision elements.
✔️Auto-Closing Cases – Trigger a Flow when a case meets
resolution criteria.
✔️Approval Process Enhancements – Notify managers
based on conditions.
📌 Why It Matters: Admins can take full control of
automation to enhance efficiency & reduce manual work.
🎯 What We Covered
Fundamentals of Salesforce Flow with
Development Components
✅ Apex (Invocable Methods) – Perform complex calculations & bulk record updates.
✅ Lightning Web Components (LWC) – Enhance UI interactions within Screen Flows.
✅ Invocable Actions – Reusable business logic that admins can trigger in Flows.
✅ External API Integrations – Fetch real-time data from external systems.
📌 Why Use These?
• Flow is powerful but has limitations. Development components help fill the gaps.
• Apex handles business logic, LWC improves UI, and Flows connect everything.
🔹 Example: Instead of using multiple Flow loops, Apex can process large datasets
efficiently!
What Are Development Components?
Salesforce Flow can be enhanced using development components, including:
This is NOT Best Practice – Let’s Do Better
How Flows Integrate with Apex & LWC
🎯 Flow + Apex Integration
✅ Flow calls an Apex Invocable Method
for complex logic.
✅ Best for: Bulk processing, SOQL
queries, API calls.
🔹 Example:
• Opportunity.Amount is updated → Apex
calculates discount → Flow applies it
🎯 Flow + LWC Integration
✅ Screen Flows embed LWC for better
UI/UX.
✅ Best for: Dynamic forms, tables, charts,
interactive elements.
🔹 Example:
• A Flow asks users to select products in a
multi-select UI → LWC provides the
experience.
📌 Takeaway: Flows, Apex, and LWC work best together when each handles its ideal
function!
Invocable Actions and External API Integrations in Flow
✅ Invocable Actions – Reusable Business Logic (No Code
Required!)
🔹 Pre-built, reusable actions that Admins can trigger in
Flow.
🔹 Available natively in Salesforce or via AppExchange
(e.g., Send Email, Post to Slack, Submit for Approval).
🔹 No Apex needed – Admins can configure & use them
without coding.
📌 Example Use Cases:
✔ Send an Email Notification when a case is escalated.
✔ Auto-create a Task when an Opportunity reaches a
certain stage.
✔ Post to Chatter or Slack when a new deal is closed.
🎯 Both extend Flow’s capabilities, but choosing the right one depends on whether you
need pre-built logic or external data retrieval! 🚀
✅ External API Integrations – Real-Time Data Fetching
from External Systems
🔹 Apex-based Invocable Methods that call external
services via REST/SOAP APIs.
🔹 Requires Apex development (HttpRequest,
HttpResponse).
🔹 Used to fetch live data or send information outside
Salesforce.
📌 Example Use Cases:
✔ Fetch real-time shipping rates from FedEx/UPS.
✔ Retrieve currency exchange rates from a financial
service.
✔ Validate customer addresses using Google Maps API.
Leveraging Gen AI to Obtain Flow-Ready
Components
🎯 How Can AI Help?
✅ Generate Apex classes for Flow without writing code manually.
✅ Create Lightning Web Components optimized for Flow integration.
🔹 Why Use AI?
✔ Saves time by scaffolding reusable code.
✔ Ensures best practices (bulk processing, SOQL optimization).
✔ Reduces errors by generating Flow-compatible components.
📌 But AI is just a tool – validation & optimization are still required!
Leveraging Gen AI to Obtain Flow-Ready Components
What Should Be Included in an AI Prompt?
✅ Key Elements for Apex Prompts
✔ Purpose
– Clearly define what the class should do (e.g., “Calculate
discount for Opportunities”).
✔ Inputs & Outputs
– Specify what data Flow will send and receive (e.g.,
“Accepts a list of Opportunities, returns discount
percentages”).
✔ Governor Limits Considerations
– Ensure the AI follows bulk processing best practices.
✔ Security
– Include with sharing for proper access control.
✔ Flow Compatibility
– Explicitly mention @InvocableMethod if it needs to be
used in Flow.
✅ Key Elements for LWC Prompts
✔ Purpose
– Describe what the component should do (e.g., “Create a
multi-select product picker for Flow”).
✔ Flow Data Handling
– Mention how Flow will pass data (@api variables) and
receive user selections (CustomEvent).
✔ UI Components
– Specify the Lightning components to use (e.g.,
lightning-dual-listbox).
✔ Performance Optimizations
– State how the component should handle state updates
using @track.
✔ Event Handling
– Detail how user interactions should trigger events back
to Flow.
When generating Apex & LWC with AI, the prompt must be specific and detailed
AI-Generated Apex for Flow
🎯 Example: AI Prompt for Invocable Apex
You are a Salesforce Apex developer.
Generate an Apex class for use in a Salesforce Flow.
This class should:
- Be a Method that receives a list of Opportunities.
- Calculate a discount based on the Opportunity Amount:
- If Amount >= 50,000 → Apply 20% discount
- If Amount >= 20,000 → Apply 10% discount
- Otherwise, apply 5% discount
- Return the discount percentage for each Opportunity.
- Use bulk processing best practices to handle multiple Opportunities in a single transaction.
- Optimize for governor limits and ensure security with `with sharing`.
AI-Generated Apex Code (Flow-Ready)
🎯 How Can AI Help?
✅ Generate Apex classes for Flow
without writing code manually.
✅ Create Lightning Web
Components optimized for Flow
integration.
🔹 Why Use AI?
✔ Saves time by scaffolding reusable
code.
✔ Ensures best practices (bulk
processing, SOQL optimization).
✔ Reduces errors by generating
Flow-compatible components.
📌 But AI is just a tool – validation &
optimization are still required!
AI-Generated LWC for Flow
🎯 Example: AI Prompt for LWC
You are a Salesforce LWC expert.
Generate a Lightning Web Component that:
- Receives a list of recommended Product IDs and names from Flow.
- Displays a multi-select picklist to allow users to choose Products.
- Returns the selected Product IDs to Flow.
- Ensures optimal performance for state updates.
- Uses best practices for caching, usability, and accessibility.
- Shows a loading spinner while retrieving product data.
AI-Generated LWC Code (Flow-Ready)
📌 Now, Flow can send data to LWC, and LWC can send data back to Flow!
Live Demo
Sales reps at Universal Containers want:
✔ Automatic discount calculations based on Opportunity Amount.
✔ A better way to select products for Opportunities inside a Flow.
Live Demo – Business Case & User Story
🎯 Business Case: Universal Containers’ Sales Automation
📌 Before:
•Sales reps manually calculate and enter discounts.
•Inconsistent application of discount rules.
📌 Solution:
•Flow triggers an Apex method, which automatically applies the correct discount.
Scenario 1: Discount Calculation (Flow + Apex)
📌 Before:
•Sales reps struggle with basic picklists for selecting products.
•No easy way to select multiple products efficiently.
📌 Solution:
•A Screen Flow integrates with an LWC to allow dynamic product selection.
Scenario 2: Product Selection (Flow + LWC)
✅ How to generate Apex & LWC using AI
✅ How to debug AI-generated code using real errors
✅ How Apex, LWC, and Flow automate business processes
📌 Now, let’s see it in action in the live demo! 🚀
Summary & Final Thoughts
🎯 We covered:
✅ Generating Invocable Apex using AI
• AI can generate Apex logic with best practices
• Example Prompt → "Generate an Apex class for discount calculation in Flow"
✅ Generating LWC using AI
• AI can scaffold UI components quickly
• Example Prompt → "Generate a Lightning Web Component for multi-select product selection
in Flow"
📌 AI accelerates development, but human validation is key!
"AI won’t replace your developers—but it will definitely help when they’re too busy to assist you."
OR
"No developer? No problem! AI is here to support the lonely Admins who have to do it all." 🚀
Leveraging Gen AI for Flow Components
Best Practices for Combining Flows,
Components, and Gen. AI
🎯 Optimizing Performance
✅ Use Apex for heavy data processing (SOQL queries, DML operations).
✅ Use Flow for declarative logic (record updates, approvals).
✅ Use LWC for UI/UX improvements (forms, selections, dynamic UI).
🔹 Example: Instead of multiple Flow loops, let Apex handle data logic.
🎯 AI Code Generation: Security Considerations
✅ AI-generated code must be reviewed.
✅ Follow governor limits and sharing rules.
✅ Always validate SOQL queries to prevent SOQL injection.
📌 AI can accelerate development, but security and governance must not be overlooked!
Best Practices for Combining Flows, Components, and AI
🎯 Flow + Apex: Use Apex for complex logic
🎯 Flow + LWC: Use LWC for UI improvements
🎯 AI in Flow: Generate Flow-ready Apex & LWC
🎯 Best Practices: Optimize performance & security
📌 With these techniques, you can supercharge your Salesforce
automation! 🚀
Key Takeaways
Q&A
💡 Key Takeaways:
✅ Flow is still the best tool for Admins to automate without code.
✅ AI-generated Apex & LWC extend what Flow can do but don’t replace it.
✅ The best approach: Flow for rapid automation, AI-generated components
for complex logic.
📌 AI speeds up development, but Flow remains the foundation of
business automation.
If AI Can Generate Development Components, Why Use Flow?
Understanding Flow’s role in an AI-driven environment
🚀 Why Flow Still Matters:
✔ Visual & Easy to Modify – Business users & Admins can adjust without code.
✔ Faster Deployment – No development cycles or complex testing required.
✔ Governance & Maintainability – Easier to troubleshoot and debug than custom Apex.
✔ Flexibility – Flow + AI-generated Apex allows for scalable automation.
📌 Flow remains the best way to manage business automation while leveraging AI-
generated components when needed.
AI Generates Apex & LWC—Does That Make Flow Obsolete?
Flow + AI-powered components = A balanced approach
💡 What Matters More Than Coding Knowledge?
✅ Knowing when Flow alone isn’t enough
✅ Understanding what inputs & outputs are needed
✅ Structuring a clear prompt for AI to generate the right component
📌 AI doesn't replace the need for understanding automation—Admins must think like
architects, not coders.
AI Generates Code, But Do Admins Need Development Knowledge?
The key skill is structured thinking, not coding
⚠️Reality Check – AI Doesn’t Guarantee:
🚩 Efficiency – Code may not be optimized for governor limits.
🚩 Security – AI won’t always enforce Salesforce security best practices.
🚩 Seamless Integration – The output may require small modifications to work with Flow.
📌 AI speeds up development, but just like Flow automation, all components must be
tested.
AI is Powerful, But It’s Not Perfect
Why AI-generated components must be reviewed before deployment
✅ Steps to Validate AI-Generated Code:
1 ️
1️⃣Define Clear Business Needs – Ensure the component aligns with automation goals.
2️⃣Test in a Sandbox – Validate that it works as expected in a test environment.
3 ️
3️⃣Use Debug Logs & Developer Console – Check for unexpected behavior.
4️⃣Leverage Trailhead & Salesforce Docs – Ensure compliance with best practices.
5 ️
5️⃣Collaborate with Developers When Needed – Seek assistance for complex scenarios.
📌 Admins already validate Flows—testing AI-generated components follows the same
logic.
Using AI-Generated Components Safely
A simple process for Admins to follow
🚀 AI’s Role in Salesforce Automation:
Generates Apex & LWC faster, reducing reliance on developers for routine automation.
✔
Helps Admins build solutions beyond Flow’s limitations.
✔
Provides a
✔ starting point—but testing and validation are still necessary.
📌 AI is a tool that enhances automation, not a magic solution that removes the need for
structured thinking.
AI Doesn’t Replace Admins or Developers
It makes both faster and more efficient
✅ AI does not replace Flow—it extends what Flow can do.
✅ Admins don’t need coding skills, but they need structured problem-solving.
✅ AI-generated components must be validated—just like Flows.
✅ The best Admins understand when to use Flow, Apex, LWC, and AI together.
✅ Collaboration with developers ensures scalable, maintainable solutions.
📌 Instead of fearing AI, leverage it as a tool to supercharge automation while following
best practices.
AI, Flow, and the Future of Admins
Becoming an AI-powered Salesforce Admin
Turn on your camera, give us a big
smile, and let’s snap a great group
photo! 😃📷
Salesforce Flow using development with Gen. AI
Ad

More Related Content

Similar to Salesforce Flow using development with Gen. AI (20)

SFDC_BRAJ
SFDC_BRAJSFDC_BRAJ
SFDC_BRAJ
Brajmohan Sharma
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best Practices
Teamstudio
 
Generating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager StatisticsGenerating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager Statistics
WSO2
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesis
confluent
 
uppada_kishore_resume (1)
uppada_kishore_resume (1)uppada_kishore_resume (1)
uppada_kishore_resume (1)
kishore reddy uppada
 
SFDC 3.0 RESUME
SFDC 3.0 RESUMESFDC 3.0 RESUME
SFDC 3.0 RESUME
Sankararao M
 
shankarresumehacer
shankarresumehacershankarresumehacer
shankarresumehacer
shankar k
 
pravin_1yr_exp
pravin_1yr_exppravin_1yr_exp
pravin_1yr_exp
Pravin Pandagale
 
Resume
ResumeResume
Resume
Ankit.Rustagi
 
summer21-fr
summer21-frsummer21-fr
summer21-fr
Thierry TROUIN ☁
 
Resume (1)
Resume (1)Resume (1)
Resume (1)
tmanu 696
 
Selenium_WebDriver_Java_TestNG
Selenium_WebDriver_Java_TestNGSelenium_WebDriver_Java_TestNG
Selenium_WebDriver_Java_TestNG
Basul Asahab
 
Advanced Flow Techniques with Apex and Visualforce
Advanced Flow Techniques with Apex and VisualforceAdvanced Flow Techniques with Apex and Visualforce
Advanced Flow Techniques with Apex and Visualforce
Salesforce Developers
 
5YearsOfExperience_Shivdeep_Salesforce_Developer
5YearsOfExperience_Shivdeep_Salesforce_Developer5YearsOfExperience_Shivdeep_Salesforce_Developer
5YearsOfExperience_Shivdeep_Salesforce_Developer
shivdeep gupta
 
Top 10 Shopify Integration Challenges and How to Address Them.pdf
Top 10 Shopify Integration Challenges and How to Address Them.pdfTop 10 Shopify Integration Challenges and How to Address Them.pdf
Top 10 Shopify Integration Challenges and How to Address Them.pdf
CartCoders
 
APIfying an ERP - ongoing saga
APIfying an ERP - ongoing sagaAPIfying an ERP - ongoing saga
APIfying an ERP - ongoing saga
Marjukka Niinioja
 
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics PlatformWSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
WSO2
 
LITE 2018 – A Deep Dive Into the API [Iain Brown]
LITE 2018 – A Deep Dive Into the API [Iain Brown]LITE 2018 – A Deep Dive Into the API [Iain Brown]
LITE 2018 – A Deep Dive Into the API [Iain Brown]
getadministrate
 
Smartone v1.0
Smartone v1.0Smartone v1.0
Smartone v1.0
Jinyean Tan
 
Informatica 5+years of experince
Informatica 5+years of experinceInformatica 5+years of experince
Informatica 5+years of experince
Dharma Rao
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best Practices
Teamstudio
 
Generating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager StatisticsGenerating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager Statistics
WSO2
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesis
confluent
 
shankarresumehacer
shankarresumehacershankarresumehacer
shankarresumehacer
shankar k
 
Selenium_WebDriver_Java_TestNG
Selenium_WebDriver_Java_TestNGSelenium_WebDriver_Java_TestNG
Selenium_WebDriver_Java_TestNG
Basul Asahab
 
Advanced Flow Techniques with Apex and Visualforce
Advanced Flow Techniques with Apex and VisualforceAdvanced Flow Techniques with Apex and Visualforce
Advanced Flow Techniques with Apex and Visualforce
Salesforce Developers
 
5YearsOfExperience_Shivdeep_Salesforce_Developer
5YearsOfExperience_Shivdeep_Salesforce_Developer5YearsOfExperience_Shivdeep_Salesforce_Developer
5YearsOfExperience_Shivdeep_Salesforce_Developer
shivdeep gupta
 
Top 10 Shopify Integration Challenges and How to Address Them.pdf
Top 10 Shopify Integration Challenges and How to Address Them.pdfTop 10 Shopify Integration Challenges and How to Address Them.pdf
Top 10 Shopify Integration Challenges and How to Address Them.pdf
CartCoders
 
APIfying an ERP - ongoing saga
APIfying an ERP - ongoing sagaAPIfying an ERP - ongoing saga
APIfying an ERP - ongoing saga
Marjukka Niinioja
 
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics PlatformWSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
WSO2
 
LITE 2018 – A Deep Dive Into the API [Iain Brown]
LITE 2018 – A Deep Dive Into the API [Iain Brown]LITE 2018 – A Deep Dive Into the API [Iain Brown]
LITE 2018 – A Deep Dive Into the API [Iain Brown]
getadministrate
 
Informatica 5+years of experince
Informatica 5+years of experinceInformatica 5+years of experince
Informatica 5+years of experince
Dharma Rao
 

More from Jihun Jung (20)

2022-12-02 Trailblazer Winter Coming to the Town.pptx
2022-12-02 Trailblazer Winter Coming to the Town.pptx2022-12-02 Trailblazer Winter Coming to the Town.pptx
2022-12-02 Trailblazer Winter Coming to the Town.pptx
Jihun Jung
 
2022-11-08 All About career path in Salesforce Eco System_KR.pdf
2022-11-08 All About career path in Salesforce Eco System_KR.pdf2022-11-08 All About career path in Salesforce Eco System_KR.pdf
2022-11-08 All About career path in Salesforce Eco System_KR.pdf
Jihun Jung
 
2021 10-06 about user experience (ux) designer
2021 10-06 about user experience (ux) designer2021 10-06 about user experience (ux) designer
2021 10-06 about user experience (ux) designer
Jihun Jung
 
2021 09-29 dreamforce 21 success party
2021 09-29 dreamforce 21 success party2021 09-29 dreamforce 21 success party
2021 09-29 dreamforce 21 success party
Jihun Jung
 
2021 09-13 fireside chat
2021 09-13 fireside chat2021 09-13 fireside chat
2021 09-13 fireside chat
Jihun Jung
 
2020 07-22 fireside chat record ownership deep dive(kor)
2020 07-22 fireside chat record ownership deep dive(kor)2020 07-22 fireside chat record ownership deep dive(kor)
2020 07-22 fireside chat record ownership deep dive(kor)
Jihun Jung
 
2020 07-22 fireside chat : Record Ownership Deep Dive
2020 07-22 fireside chat : Record Ownership Deep Dive2020 07-22 fireside chat : Record Ownership Deep Dive
2020 07-22 fireside chat : Record Ownership Deep Dive
Jihun Jung
 
Bangkok Admin Group TrailheaDX 2020 Global Gathering v2
Bangkok Admin Group TrailheaDX 2020 Global Gathering v2Bangkok Admin Group TrailheaDX 2020 Global Gathering v2
Bangkok Admin Group TrailheaDX 2020 Global Gathering v2
Jihun Jung
 
2020 07-08 fireside chat sharing architecture kor
2020 07-08 fireside chat sharing architecture kor2020 07-08 fireside chat sharing architecture kor
2020 07-08 fireside chat sharing architecture kor
Jihun Jung
 
2020 07-08 fireside chat sharing architecture
2020 07-08 fireside chat sharing architecture2020 07-08 fireside chat sharing architecture
2020 07-08 fireside chat sharing architecture
Jihun Jung
 
2020 06-24 fireside chat implicit sharing
2020 06-24 fireside chat implicit sharing2020 06-24 fireside chat implicit sharing
2020 06-24 fireside chat implicit sharing
Jihun Jung
 
2020 06-24 fireside chat implicit sharing kor
2020 06-24 fireside chat implicit sharing kor2020 06-24 fireside chat implicit sharing kor
2020 06-24 fireside chat implicit sharing kor
Jihun Jung
 
2020 06-10 Fireside Chat : Dynamic Pages
2020 06-10 Fireside Chat : Dynamic Pages2020 06-10 Fireside Chat : Dynamic Pages
2020 06-10 Fireside Chat : Dynamic Pages
Jihun Jung
 
2020 05-27 fireside chat virtual dreamin
2020 05-27 fireside chat virtual dreamin2020 05-27 fireside chat virtual dreamin
2020 05-27 fireside chat virtual dreamin
Jihun Jung
 
2020 05-02 fireside chat lightning flow
2020 05-02 fireside chat lightning flow2020 05-02 fireside chat lightning flow
2020 05-02 fireside chat lightning flow
Jihun Jung
 
Certification story contest
Certification story contestCertification story contest
Certification story contest
Jihun Jung
 
Ask salesforcecertanything
Ask salesforcecertanythingAsk salesforcecertanything
Ask salesforcecertanything
Jihun Jung
 
20200115 admin group_networking_party_v2
20200115 admin group_networking_party_v220200115 admin group_networking_party_v2
20200115 admin group_networking_party_v2
Jihun Jung
 
20191211 Admin group Seoul Dreamforce Global Gathering
20191211 Admin group Seoul Dreamforce Global Gathering20191211 Admin group Seoul Dreamforce Global Gathering
20191211 Admin group Seoul Dreamforce Global Gathering
Jihun Jung
 
[Salesforce Community Group] Seoul, KR Admin Group September Meeting
[Salesforce Community Group] Seoul, KR Admin Group September Meeting[Salesforce Community Group] Seoul, KR Admin Group September Meeting
[Salesforce Community Group] Seoul, KR Admin Group September Meeting
Jihun Jung
 
2022-12-02 Trailblazer Winter Coming to the Town.pptx
2022-12-02 Trailblazer Winter Coming to the Town.pptx2022-12-02 Trailblazer Winter Coming to the Town.pptx
2022-12-02 Trailblazer Winter Coming to the Town.pptx
Jihun Jung
 
2022-11-08 All About career path in Salesforce Eco System_KR.pdf
2022-11-08 All About career path in Salesforce Eco System_KR.pdf2022-11-08 All About career path in Salesforce Eco System_KR.pdf
2022-11-08 All About career path in Salesforce Eco System_KR.pdf
Jihun Jung
 
2021 10-06 about user experience (ux) designer
2021 10-06 about user experience (ux) designer2021 10-06 about user experience (ux) designer
2021 10-06 about user experience (ux) designer
Jihun Jung
 
2021 09-29 dreamforce 21 success party
2021 09-29 dreamforce 21 success party2021 09-29 dreamforce 21 success party
2021 09-29 dreamforce 21 success party
Jihun Jung
 
2021 09-13 fireside chat
2021 09-13 fireside chat2021 09-13 fireside chat
2021 09-13 fireside chat
Jihun Jung
 
2020 07-22 fireside chat record ownership deep dive(kor)
2020 07-22 fireside chat record ownership deep dive(kor)2020 07-22 fireside chat record ownership deep dive(kor)
2020 07-22 fireside chat record ownership deep dive(kor)
Jihun Jung
 
2020 07-22 fireside chat : Record Ownership Deep Dive
2020 07-22 fireside chat : Record Ownership Deep Dive2020 07-22 fireside chat : Record Ownership Deep Dive
2020 07-22 fireside chat : Record Ownership Deep Dive
Jihun Jung
 
Bangkok Admin Group TrailheaDX 2020 Global Gathering v2
Bangkok Admin Group TrailheaDX 2020 Global Gathering v2Bangkok Admin Group TrailheaDX 2020 Global Gathering v2
Bangkok Admin Group TrailheaDX 2020 Global Gathering v2
Jihun Jung
 
2020 07-08 fireside chat sharing architecture kor
2020 07-08 fireside chat sharing architecture kor2020 07-08 fireside chat sharing architecture kor
2020 07-08 fireside chat sharing architecture kor
Jihun Jung
 
2020 07-08 fireside chat sharing architecture
2020 07-08 fireside chat sharing architecture2020 07-08 fireside chat sharing architecture
2020 07-08 fireside chat sharing architecture
Jihun Jung
 
2020 06-24 fireside chat implicit sharing
2020 06-24 fireside chat implicit sharing2020 06-24 fireside chat implicit sharing
2020 06-24 fireside chat implicit sharing
Jihun Jung
 
2020 06-24 fireside chat implicit sharing kor
2020 06-24 fireside chat implicit sharing kor2020 06-24 fireside chat implicit sharing kor
2020 06-24 fireside chat implicit sharing kor
Jihun Jung
 
2020 06-10 Fireside Chat : Dynamic Pages
2020 06-10 Fireside Chat : Dynamic Pages2020 06-10 Fireside Chat : Dynamic Pages
2020 06-10 Fireside Chat : Dynamic Pages
Jihun Jung
 
2020 05-27 fireside chat virtual dreamin
2020 05-27 fireside chat virtual dreamin2020 05-27 fireside chat virtual dreamin
2020 05-27 fireside chat virtual dreamin
Jihun Jung
 
2020 05-02 fireside chat lightning flow
2020 05-02 fireside chat lightning flow2020 05-02 fireside chat lightning flow
2020 05-02 fireside chat lightning flow
Jihun Jung
 
Certification story contest
Certification story contestCertification story contest
Certification story contest
Jihun Jung
 
Ask salesforcecertanything
Ask salesforcecertanythingAsk salesforcecertanything
Ask salesforcecertanything
Jihun Jung
 
20200115 admin group_networking_party_v2
20200115 admin group_networking_party_v220200115 admin group_networking_party_v2
20200115 admin group_networking_party_v2
Jihun Jung
 
20191211 Admin group Seoul Dreamforce Global Gathering
20191211 Admin group Seoul Dreamforce Global Gathering20191211 Admin group Seoul Dreamforce Global Gathering
20191211 Admin group Seoul Dreamforce Global Gathering
Jihun Jung
 
[Salesforce Community Group] Seoul, KR Admin Group September Meeting
[Salesforce Community Group] Seoul, KR Admin Group September Meeting[Salesforce Community Group] Seoul, KR Admin Group September Meeting
[Salesforce Community Group] Seoul, KR Admin Group September Meeting
Jihun Jung
 
Ad

Recently uploaded (20)

TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Ad

Salesforce Flow using development with Gen. AI

  • 1. Class 3: "Salesforce Flow using development" Salesforce Flow, Development Components, and Gen AI! Admin Group, Bangkok, TH
  • 3. 1. Introduction and Recap 2. Fundamentals of Salesforce Flow with Development Components 3. Leveraging Gen AI to Obtain Flow-Ready Components 4. Best Practices for Combining Flows, Components, and Gen. AI 5. Interactive Q&A Agenda
  • 5. Trailblazer Community Group - Bangkok Trailblazers like you join these groups to build their expertise, expand their networks, and get momentum around common interests. Admin group is sharing best practices to deliver productivity and innovation with Salesforce, from managing users to building custom apps with no-code and low-code. Of course, developers are
  • 6. 1. Class 1: "Salesforce Flow Fundamentals: The Complete Overview" Perfect for introducing participants to the power of Flow and its use cases. 2. Class 2: "Salesforce Flow for Administrators: Automate with Ease” Tailored to help admins create and manage flows to streamline business processes. 3. Class 3: "Salesforce Flow + Development Components + Gen AI: Deep Dive" Enhance automation by integrating Flow with Apex and LWC. Flow series:
  • 7. ✅ What is Salesforce Flow? • A powerful automation tool to replace workflows & process builders. • Enables click-based automation without Apex coding. ✅ Key Flow Types • Screen Flow → User-driven interactions (data input, guided processes). • Record-Triggered Flow → Auto-executed when records change. • Scheduled Flow → Runs at a set time to automate tasks. • Auto launched Flow → Called from Apex, processes, or APIs. ✅ Flow Building Blocks • Elements: Decision, Assignment, Loop, Create/Update Records, Action (Apex). • Resources: Variables, Collections, Formulas, Constants. 📌 Why It Matters: Flow empowers admins to create scalable and efficient automation without coding. Class 1 – Flow Fundamentals: The Complete Overview 🎯 What We Covered
  • 8. Class 2 –Flow for Administrators ✅ How Admins Can Use Flow for Business Automation • Replace manual processes with automated actions. • Build complex logic using Flow's Decision and Loop elements. • Integrate with Salesforce Objects to create/update records dynamically. ✅ Best Practices for Building Flows 🔹 Use Record-Triggered Flows instead of Process Builder for performance. 🔹 Minimize SOQL queries and DML statements to avoid hitting limits. 🔹 Leverage Subflows to keep automation modular and reusable. 🔹 Use Debug Mode & Fault Paths for troubleshooting. ✅ Real-World Use Cases ✔️Automating Lead Assignment – Assign leads based on criteria using Decision elements. ✔️Auto-Closing Cases – Trigger a Flow when a case meets resolution criteria. ✔️Approval Process Enhancements – Notify managers based on conditions. 📌 Why It Matters: Admins can take full control of automation to enhance efficiency & reduce manual work. 🎯 What We Covered
  • 9. Fundamentals of Salesforce Flow with Development Components
  • 10. ✅ Apex (Invocable Methods) – Perform complex calculations & bulk record updates. ✅ Lightning Web Components (LWC) – Enhance UI interactions within Screen Flows. ✅ Invocable Actions – Reusable business logic that admins can trigger in Flows. ✅ External API Integrations – Fetch real-time data from external systems. 📌 Why Use These? • Flow is powerful but has limitations. Development components help fill the gaps. • Apex handles business logic, LWC improves UI, and Flows connect everything. 🔹 Example: Instead of using multiple Flow loops, Apex can process large datasets efficiently! What Are Development Components? Salesforce Flow can be enhanced using development components, including:
  • 11. This is NOT Best Practice – Let’s Do Better
  • 12. How Flows Integrate with Apex & LWC 🎯 Flow + Apex Integration ✅ Flow calls an Apex Invocable Method for complex logic. ✅ Best for: Bulk processing, SOQL queries, API calls. 🔹 Example: • Opportunity.Amount is updated → Apex calculates discount → Flow applies it 🎯 Flow + LWC Integration ✅ Screen Flows embed LWC for better UI/UX. ✅ Best for: Dynamic forms, tables, charts, interactive elements. 🔹 Example: • A Flow asks users to select products in a multi-select UI → LWC provides the experience. 📌 Takeaway: Flows, Apex, and LWC work best together when each handles its ideal function!
  • 13. Invocable Actions and External API Integrations in Flow ✅ Invocable Actions – Reusable Business Logic (No Code Required!) 🔹 Pre-built, reusable actions that Admins can trigger in Flow. 🔹 Available natively in Salesforce or via AppExchange (e.g., Send Email, Post to Slack, Submit for Approval). 🔹 No Apex needed – Admins can configure & use them without coding. 📌 Example Use Cases: ✔ Send an Email Notification when a case is escalated. ✔ Auto-create a Task when an Opportunity reaches a certain stage. ✔ Post to Chatter or Slack when a new deal is closed. 🎯 Both extend Flow’s capabilities, but choosing the right one depends on whether you need pre-built logic or external data retrieval! 🚀 ✅ External API Integrations – Real-Time Data Fetching from External Systems 🔹 Apex-based Invocable Methods that call external services via REST/SOAP APIs. 🔹 Requires Apex development (HttpRequest, HttpResponse). 🔹 Used to fetch live data or send information outside Salesforce. 📌 Example Use Cases: ✔ Fetch real-time shipping rates from FedEx/UPS. ✔ Retrieve currency exchange rates from a financial service. ✔ Validate customer addresses using Google Maps API.
  • 14. Leveraging Gen AI to Obtain Flow-Ready Components
  • 15. 🎯 How Can AI Help? ✅ Generate Apex classes for Flow without writing code manually. ✅ Create Lightning Web Components optimized for Flow integration. 🔹 Why Use AI? ✔ Saves time by scaffolding reusable code. ✔ Ensures best practices (bulk processing, SOQL optimization). ✔ Reduces errors by generating Flow-compatible components. 📌 But AI is just a tool – validation & optimization are still required! Leveraging Gen AI to Obtain Flow-Ready Components
  • 16. What Should Be Included in an AI Prompt? ✅ Key Elements for Apex Prompts ✔ Purpose – Clearly define what the class should do (e.g., “Calculate discount for Opportunities”). ✔ Inputs & Outputs – Specify what data Flow will send and receive (e.g., “Accepts a list of Opportunities, returns discount percentages”). ✔ Governor Limits Considerations – Ensure the AI follows bulk processing best practices. ✔ Security – Include with sharing for proper access control. ✔ Flow Compatibility – Explicitly mention @InvocableMethod if it needs to be used in Flow. ✅ Key Elements for LWC Prompts ✔ Purpose – Describe what the component should do (e.g., “Create a multi-select product picker for Flow”). ✔ Flow Data Handling – Mention how Flow will pass data (@api variables) and receive user selections (CustomEvent). ✔ UI Components – Specify the Lightning components to use (e.g., lightning-dual-listbox). ✔ Performance Optimizations – State how the component should handle state updates using @track. ✔ Event Handling – Detail how user interactions should trigger events back to Flow. When generating Apex & LWC with AI, the prompt must be specific and detailed
  • 17. AI-Generated Apex for Flow 🎯 Example: AI Prompt for Invocable Apex You are a Salesforce Apex developer. Generate an Apex class for use in a Salesforce Flow. This class should: - Be a Method that receives a list of Opportunities. - Calculate a discount based on the Opportunity Amount: - If Amount >= 50,000 → Apply 20% discount - If Amount >= 20,000 → Apply 10% discount - Otherwise, apply 5% discount - Return the discount percentage for each Opportunity. - Use bulk processing best practices to handle multiple Opportunities in a single transaction. - Optimize for governor limits and ensure security with `with sharing`.
  • 18. AI-Generated Apex Code (Flow-Ready) 🎯 How Can AI Help? ✅ Generate Apex classes for Flow without writing code manually. ✅ Create Lightning Web Components optimized for Flow integration. 🔹 Why Use AI? ✔ Saves time by scaffolding reusable code. ✔ Ensures best practices (bulk processing, SOQL optimization). ✔ Reduces errors by generating Flow-compatible components. 📌 But AI is just a tool – validation & optimization are still required!
  • 19. AI-Generated LWC for Flow 🎯 Example: AI Prompt for LWC You are a Salesforce LWC expert. Generate a Lightning Web Component that: - Receives a list of recommended Product IDs and names from Flow. - Displays a multi-select picklist to allow users to choose Products. - Returns the selected Product IDs to Flow. - Ensures optimal performance for state updates. - Uses best practices for caching, usability, and accessibility. - Shows a loading spinner while retrieving product data.
  • 20. AI-Generated LWC Code (Flow-Ready) 📌 Now, Flow can send data to LWC, and LWC can send data back to Flow!
  • 22. Sales reps at Universal Containers want: ✔ Automatic discount calculations based on Opportunity Amount. ✔ A better way to select products for Opportunities inside a Flow. Live Demo – Business Case & User Story 🎯 Business Case: Universal Containers’ Sales Automation
  • 23. 📌 Before: •Sales reps manually calculate and enter discounts. •Inconsistent application of discount rules. 📌 Solution: •Flow triggers an Apex method, which automatically applies the correct discount. Scenario 1: Discount Calculation (Flow + Apex)
  • 24. 📌 Before: •Sales reps struggle with basic picklists for selecting products. •No easy way to select multiple products efficiently. 📌 Solution: •A Screen Flow integrates with an LWC to allow dynamic product selection. Scenario 2: Product Selection (Flow + LWC)
  • 25. ✅ How to generate Apex & LWC using AI ✅ How to debug AI-generated code using real errors ✅ How Apex, LWC, and Flow automate business processes 📌 Now, let’s see it in action in the live demo! 🚀 Summary & Final Thoughts 🎯 We covered:
  • 26. ✅ Generating Invocable Apex using AI • AI can generate Apex logic with best practices • Example Prompt → "Generate an Apex class for discount calculation in Flow" ✅ Generating LWC using AI • AI can scaffold UI components quickly • Example Prompt → "Generate a Lightning Web Component for multi-select product selection in Flow" 📌 AI accelerates development, but human validation is key! "AI won’t replace your developers—but it will definitely help when they’re too busy to assist you." OR "No developer? No problem! AI is here to support the lonely Admins who have to do it all." 🚀 Leveraging Gen AI for Flow Components
  • 27. Best Practices for Combining Flows, Components, and Gen. AI
  • 28. 🎯 Optimizing Performance ✅ Use Apex for heavy data processing (SOQL queries, DML operations). ✅ Use Flow for declarative logic (record updates, approvals). ✅ Use LWC for UI/UX improvements (forms, selections, dynamic UI). 🔹 Example: Instead of multiple Flow loops, let Apex handle data logic. 🎯 AI Code Generation: Security Considerations ✅ AI-generated code must be reviewed. ✅ Follow governor limits and sharing rules. ✅ Always validate SOQL queries to prevent SOQL injection. 📌 AI can accelerate development, but security and governance must not be overlooked! Best Practices for Combining Flows, Components, and AI
  • 29. 🎯 Flow + Apex: Use Apex for complex logic 🎯 Flow + LWC: Use LWC for UI improvements 🎯 AI in Flow: Generate Flow-ready Apex & LWC 🎯 Best Practices: Optimize performance & security 📌 With these techniques, you can supercharge your Salesforce automation! 🚀 Key Takeaways
  • 30. Q&A
  • 31. 💡 Key Takeaways: ✅ Flow is still the best tool for Admins to automate without code. ✅ AI-generated Apex & LWC extend what Flow can do but don’t replace it. ✅ The best approach: Flow for rapid automation, AI-generated components for complex logic. 📌 AI speeds up development, but Flow remains the foundation of business automation. If AI Can Generate Development Components, Why Use Flow? Understanding Flow’s role in an AI-driven environment
  • 32. 🚀 Why Flow Still Matters: ✔ Visual & Easy to Modify – Business users & Admins can adjust without code. ✔ Faster Deployment – No development cycles or complex testing required. ✔ Governance & Maintainability – Easier to troubleshoot and debug than custom Apex. ✔ Flexibility – Flow + AI-generated Apex allows for scalable automation. 📌 Flow remains the best way to manage business automation while leveraging AI- generated components when needed. AI Generates Apex & LWC—Does That Make Flow Obsolete? Flow + AI-powered components = A balanced approach
  • 33. 💡 What Matters More Than Coding Knowledge? ✅ Knowing when Flow alone isn’t enough ✅ Understanding what inputs & outputs are needed ✅ Structuring a clear prompt for AI to generate the right component 📌 AI doesn't replace the need for understanding automation—Admins must think like architects, not coders. AI Generates Code, But Do Admins Need Development Knowledge? The key skill is structured thinking, not coding
  • 34. ⚠️Reality Check – AI Doesn’t Guarantee: 🚩 Efficiency – Code may not be optimized for governor limits. 🚩 Security – AI won’t always enforce Salesforce security best practices. 🚩 Seamless Integration – The output may require small modifications to work with Flow. 📌 AI speeds up development, but just like Flow automation, all components must be tested. AI is Powerful, But It’s Not Perfect Why AI-generated components must be reviewed before deployment
  • 35. ✅ Steps to Validate AI-Generated Code: 1 ️ 1️⃣Define Clear Business Needs – Ensure the component aligns with automation goals. 2️⃣Test in a Sandbox – Validate that it works as expected in a test environment. 3 ️ 3️⃣Use Debug Logs & Developer Console – Check for unexpected behavior. 4️⃣Leverage Trailhead & Salesforce Docs – Ensure compliance with best practices. 5 ️ 5️⃣Collaborate with Developers When Needed – Seek assistance for complex scenarios. 📌 Admins already validate Flows—testing AI-generated components follows the same logic. Using AI-Generated Components Safely A simple process for Admins to follow
  • 36. 🚀 AI’s Role in Salesforce Automation: Generates Apex & LWC faster, reducing reliance on developers for routine automation. ✔ Helps Admins build solutions beyond Flow’s limitations. ✔ Provides a ✔ starting point—but testing and validation are still necessary. 📌 AI is a tool that enhances automation, not a magic solution that removes the need for structured thinking. AI Doesn’t Replace Admins or Developers It makes both faster and more efficient
  • 37. ✅ AI does not replace Flow—it extends what Flow can do. ✅ Admins don’t need coding skills, but they need structured problem-solving. ✅ AI-generated components must be validated—just like Flows. ✅ The best Admins understand when to use Flow, Apex, LWC, and AI together. ✅ Collaboration with developers ensures scalable, maintainable solutions. 📌 Instead of fearing AI, leverage it as a tool to supercharge automation while following best practices. AI, Flow, and the Future of Admins Becoming an AI-powered Salesforce Admin
  • 38. Turn on your camera, give us a big smile, and let’s snap a great group photo! 😃📷