How to Invoke Flex Prompt Templates in Salesforce (REST API + Apex Demo) – Arabic
Автор: Code With Sally
Загружено: 2025-10-04
Просмотров: 69
🚀 في السيشن دي، كمّلنا على موضوعنا عن Flex Prompt Templates!
المرة اللي فاتت عملنا الـ Template وربطناه بـ Apex.
النهاردة بنخد الخطوة الجاية: إزاي نعمله invoke من REST API (عن طريق Workbench)، وبعد كده من Apex باستخدام ConnectApi.
💡 المهم تعرف إن Flex Template مش زي Sales Email أو Field Generation templates — مفيش entry point out-of-the-box.
وعشان كده السيشن دي مهمة جدًا 💥
🔑 هتتعلم إيه؟
✅ الفرق بين Sales Email، Field Generation، وFlex Templates من حيث الـ entry point
✅ إزاي تستخدم Workbench عشان تبعت request لـ Flex Prompt Template
✅ تقرا Documentation صح وتفهم الـ Input/Output structure
✅ إزاي تظبط الـ JSON format وتختبره باستخدام JSON Formatter
✅ إزاي تعمل نفس الحاجة بالظبط من جوه Apex باستخدام ConnectApi
✅ إزاي تجرب الكود بتاعك في Developer Console
✅ Bonus: إزاي تستخدم الميثود دي جوه LWC في real app 💻
📂 الكود على GitHub:
https://github.com/CodeWithSally/Code...
🌐 Links مهمة:
Workbench: https://workbench.developerforce.com/...
Salesforce API Docs:
https://developer.salesforce.com/docs...
JSON Formatter: https://jsonformatter.curiousconcept....
📺 السيشن اللي فاتت (Part 7 – Create & Ground Flex Template):
• Salesforce Apex Invocable Methods – Part 7...
🔔 ماتنساش تعمل Like وSubscribe وتفعل الجرس عشان يوصلك كل جديد عن Salesforce development!
===========
🚀 In this session, we continue our Flex Prompt Template journey! Last time, we built and grounded a Flex Template with Apex. Today, we’ll take the next step and learn how to invoke it — first from the REST API (Workbench), then from Apex code using the ConnectApi namespace.
Flex Templates don’t have out-of-the-box entry points like Sales Email or Field Generation templates. That’s why this session is critical: you’ll learn how to bridge that gap and actually run your Flex prompts in Salesforce.
🔑 What You’ll Learn:
✅ Difference between Sales Email, Field Generation, and Flex entry points
✅ How to use Workbench REST Explorer to call a Flex Prompt Template
✅ How to read Salesforce API documentation for the right input/output structure
✅ How to format JSON requests correctly (and test with a JSON formatter)
✅ How to call the same Flex Template using Apex with Connect in Apex (ConnectApi namespace)
✅ How to test your Apex code in Developer Console
✅ Bonus: How to use this method inside LWC for real-world apps
⏱️ Timestamps
00:00 – Welcome & 3-week break announcement
01:57 – YouTube Channel reminder
04:40 – Session Intro + Recap of Flex Template from last session
11:11 – Why Flex Templates need manual invocation (REST & Apex)
12:37 – Demo: Invoke Flex Template via REST API (Workbench)
40:55 – Demo: Invoke Flex Template via Apex (ConnectApi method)
1:02:32 – Test call from Developer Console & using it in LWC
1:07:36 – Recap of both approaches & use case review
1:11:13 – Bonus: Flex Template from Flow (Coming Soon!)
1:12:02 – Session Closing
📂 GitHub Code:
https://github.com/CodeWithSally/Code...
🌐 Useful Links:
Workbench: https://workbench.developerforce.com/...
Einstein Prompt Template Generations API: https://developer.salesforce.com/docs...
JSON Formatter: https://jsonformatter.curiousconcept....
📺 Previous Flex Prompt Session (Part 7 – Creating & Grounding):
• Salesforce Apex Invocable Methods – Part 7...
================================
Music I Use: Bensound.com/royalty-free-music
License code: LC2Q0I068I2YLTEN
Artist: : Benjamin Tissot
Music I Use: https://www.bensound.com/free-music-f...
License code: DTXNEXFDDSWCR9FN
Artist: : Benjamin Tissot
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: