Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Salesforce Enforces New Security Requirements in Summer 2026Read More
Agentforce and Einstein Generative AI
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create an Apex-Based Lightning Type

          Create an Apex-Based Lightning Type

          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

          • Manage Prompt Templates
          • Execute Prompt Templates

          OR

          Customize Application permission set

          1. Create an Apex class that defines the output structure. Ensure the Apex class implements: AICopilot.GenAIPromptTemplateOutput.
          2. In Setup, search and select Lightning Types.
          3. Create a Lightning type and associate it with the existing Apex class.
          4. Click Save.

          Apex-based Lightning types appear in Setup and used in Prompt Builder.

           
          Loading
          Salesforce Help | Article