---
schema_version: "1"
id: 933b8c4c266629662b46e654df11991ab05698abc2df30369ceda852b018b080
title: LightningTypeBundle
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_lightningtypebundle.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_lightningtypebundle.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 549bbf088d08f13a81245e99b698a806833a1c60c7d615a5b77ddd1795dc24db
description: Represents a custom Lightning type. Use this type to override the default user interface to create a customized appearance based on your business requirements. Deploy this bundle to your organization to implement the overrides.
---
# LightningTypeBundle

Represents a custom Lightning type. Use this type to override the default user interface to create a customized appearance based on your business requirements. Deploy this bundle to your organization to implement the overrides.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field.

## File Structure and Directory Location

LightningTypeBundle components are stored in the lightningTypes folder.

Here’s an example of the LightningTypeBundle structure.

+--myMetadataPackage
    +--lightningTypes (1)
        +--TYPE\_NAME (2)
           +--schema.json (3)
           +--CHANNEL\_NAME (4)
              +--editor.json (5) OR +--renderer.json (6)

The bundle includes these resources.

- The lightningTypes folder (1) contains a folder for each created custom Lightning type in the format {typeName} (2).
- Each custom lightning type folder contains a schema.json file (3) that defines the JSON schema that drives the custom Lightning type validation.
- Optional channel-specific folders (4). To override the default UI for a specific Salesforce application, the bundle contains a folder named after that channel. The supported channel folders are:
    
    - lightningDesktopGenAi (Agentforce Employee agent in Lightning Experience)
    - enhancedWebChat (Agentforce Service agent via Enhanced Chat v2)
    - lightningMobileGenAi (Agentforce Employee agent on Mobile and Agentforce Service agent via Enhanced Chat v2 on Mobile)
    - experienceBuilder (Experience Builder)
    
    Inside the {channelName} folder, you can configure:
    
    - The editor.json file (5) containing custom user interface and editor information
    - The renderer.json file (6) containing custom user interface and renderer information
        
        ![Note](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note.png)
        
        #### Note
        
        This file isn’t supported in experienceBuilder.

## Version

LightningTypeBundle components are available in API version 64.0 and later.

## Fields

| Field Name | Description |
| --- | --- |
| description | 
Field Type

string

Description

Describes the lightning type.



 |
| masterLabel | 

Field Type

string

Description

Required. Represents the name of a LightningTypeBundle which is defined when the LightningTypeBundle is created.





 |
| resources | 

Field Type

[LightningTypeBundleResource\[\]](#LightningTypeBundleResource)

Description

The list of resource files in the lightningTypes folder.



 |

## LightningTypeBundleResource

Represents a resource inside a LightningTypeBundle.

| Field Name | Description |
| --- | --- |
| fileName | 
Field Type

string

Description

Required. Name of the resource file.





 |
| filePath | 

Field Type

string

Description

Required. Path of the resource file.





 |
| source | 

Field Type

base64Binary

Description

Required. The JSON content of the resource.





 |

## Declarative Metadata Sample Definition

This package.xml file retrieves all the LightningTypeBundle components in an org.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>\*</members\>
        <name\>LightningTypeBundle</name\>
    </types\>
    <version\>64.0</version\>
</Package\>

In the retrieved .zip file, each custom Lightning type is nested under a lightningTypes folder.

This example shows the directory structure in the .zip file of a custom Lightning type named flightResponse:

+--lightningTypes
    +--flightResponse
        +--schema.json
        +--lightningDesktopGenAi
            +--renderer.json

In this example, the custom Lightning type flightResponse is a complex type that references an Apex class named Flight.

global class Flight {

    @AuraEnabled
    global String flightId;

    @AuraEnabled
    global Integer numLayovers;

    @AuraEnabled
    global Boolean isPetAllowed;

    @AuraEnabled
    global Long price;

    @AuraEnabled
    global Double discountPercentage;

    @AuraEnabled
    global Integer durationInMin;

    global Flight(String flightId, Integer numLayovers, Boolean isPetAllowed,
                  Long price, Double discountPercentage, Integer durationInMin) {
        this.flightId = flightId;
        this.numLayovers = numLayovers;
        this.isPetAllowed = isPetAllowed;
        this.price = price;
        this.discountPercentage = discountPercentage;
        this.durationInMin = durationInMin;
     }
}
global class FlightRequestFilter {

    @AuraEnabled
    global Long price;

    @AuraEnabled
    global Double discountPercentage;
}

Here are the contents of the files in the flightResponse directory. This sample code shows the contents of the schema.json file.

{
  "title": "My Flight Response",
  "description": "My Flight Response",
  "lightning:type": "@apexClassType/c\_\_Flight"
}

The lightningDesktopGenAi folder (optional) includes a renderer.json file that overrides the default UI of the custom Lightning type flightResponse when you use the Flight Apex class as an output parameter for an agent action.

Contents of the renderer.json file.

{
  "renderer": {
    "componentOverrides": {
      "$": {
        "definition": "c/flightDetails"
      }
    }
  }
}

![Note](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note.png)

#### Note

flightDetails is a custom LWC component referenced in renderer.json file.

This example shows the directory structure in the .zip file of a custom Lightning type named flightFilter:

+--lightningTypes
    +--flightFilter
        +--schema.json
        +--lightningDesktopGenAi
            +--editor.json

In this example, the custom Lightning type flightFilter is a complex type that references an Apex class named FlightRequestFilter.

global class Flight {

    @AuraEnabled
    global String flightId;

    @AuraEnabled
    global Integer numLayovers;

    @AuraEnabled
    global Boolean isPetAllowed;

    @AuraEnabled
    global Long price;

    @AuraEnabled
    global Double discountPercentage;

    @AuraEnabled
    global Integer durationInMin;

    global Flight(String flightId, Integer numLayovers, Boolean isPetAllowed,
                  Long price, Double discountPercentage, Integer durationInMin) {
        this.flightId = flightId;
        this.numLayovers = numLayovers;
        this.isPetAllowed = isPetAllowed;
        this.price = price;
        this.discountPercentage = discountPercentage;
        this.durationInMin = durationInMin;
     }
}
global class FlightRequestFilter {

    @AuraEnabled
    global Long price;

    @AuraEnabled
    global Double discountPercentage;
}

Here are the contents of the files in the flightFilter directory. This sample code shows the contents of the schema.json file.

{
  "title": "Flight Filter",
  "description": "Flight Filter",
  "lightning:type": "@apexClassType/c\_\_FlightRequestFilter"
}

The lightningDesktopGenAi folder (optional) includes an editor.json file that overrides the default UI of the custom Lightning type flightFilter when you use the Flight Apex class as an input parameter for an agent action.

Contents of the editor.json file.

{
  "editor": {
    "componentOverrides": {
      "$": {
        "definition": "c/flightFilter"
      }
    }
  }
}

![Note](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note.png)

#### Note

flightFilter is a custom LWC component referenced in editor.json file.

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").

#### See Also

- [Lightning Types Developer Guide](https://developer.salesforce.com/docs/platform/lightning-types/guide/lightning-types.html "Lightning Types Developer Guide - html (New Window)")
- [Custom Lightning Type Examples](https://developer.salesforce.com/docs/einstein/genai/guide/lightning-types-examples.html "Custom Lightning Type Examples - html (New Window)")