The AgentForce Developer Integration Guide specifies that Flex prompt templates are the correct type for custom or embedded integrations, such as invoking a prompt from a Lightning Web Component (LWC).
Flex templates are designed for general-purpose use cases and can be called programmatically via Apex, Flow, or LWC APIs. They offer flexible input and output structures, allowing developers to integrate AgentForce reasoning into custom applications and UI components.
Option A, Field Generation, is used to populate or update Salesforce fields, not for external invocation. Option B, Sales Email, is specific to generating pre-formatted communication messages and cannot be invoked directly from LWCs.
Therefore, the correct template type for a prompt used within a Lightning Web Component is Option C – Flex, as it is purpose-built for dynamic, reusable, and programmatic use cases.
[Reference: AgentForce Developer Guide — “Using Flex Prompt Templates with Lightning Web Components.”, , , , ]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit