Create Apex-based Lightning types when you define schemas with Apex.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, and Unlimited Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations |
| User Permissions Needed | |
|---|---|
| To create and manage prompt templates in Prompt Builder: |
Prompt Template Manager permission set
OR Customize Application permission set |
- Create an Apex class that defines the output structure. Ensure the Apex class implements: AICopilot.GenAIPromptTemplateOutput.
- In Setup, search and select Lightning Types.
- Create a Lightning type and associate it with the existing Apex class.
- Click Save.
Apex-based Lightning types appear in Setup and used in Prompt Builder.