---
schema_version: "1"
id: 6fca8ae894bb92ff991056d47e8e8bd9eaa1391a3f4eec0a3a4a74dcbaedf788
title: Create an Object-Based Lightning Type
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_create_object_based_lt.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_create_object_based_lt.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1637e85bb7bc4f967400d334677abfcb7f29804d9b4da2f2113dd1259acea431
description: Create an Object-Based Lightning Type when you need a new schema for prompt template output.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Create an Object-Based Lightning Type

Create an Object-Based Lightning Type when you need a new schema for prompt template output.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d152621e68">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d152621e68 ">To create and manage prompt templates in Prompt Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d152621e68 ">
              <p>Prompt Template Manager permission set</p>
              <ul>
                <li>Manage Prompt Templates</li>

                <li>Execute Prompt Templates</li>

              </ul>
              <p>OR</p>
              <p style="margin-bottom:0;">Customize Application permission set</p>
            </td>

          </tr>
        </tbody>
      </table>

1. Open a prompt template in Prompt Builder.
2. Click **Template Settings**.
3. In **Response**, select **Lightning Type**, then click **Create New Lightning Type**.
4. In the Lightning Type window, add the label, API name, and description.
5. Click **Next**.
6. Add the output fields:
    1. Specify the field name, description, and data type.
    2. Select **Required** to make sure that users enter a value.
7. Click **Add Field** to include more fields.
8. Click **Save**.

The Lightning Type becomes available for selection immediately and enforces validation when the prompt template runs.

- **[Manage Changes to Object-Based Types](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_manage_object_types.htm&release=264.0.0&type=5)**  
    You create object-based custom Lightning types in Prompt Builder to structure prompt template output. When you edit these types, you can’t modify certain field properties to avoid disrupting integrations. Modifications such as renaming fields, changing data types, deleting fields, or making optional fields required can cause integrations and references to fail.

#### See Also

- [_Salesforce Help_: Citations in Retrievers](https://developer.salesforce.com/docs/einstein/genai/guide/lightning-types-custom-schema.html)