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.
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.
This type extends Metadata and inherits its fields.
LightningTypeBundle components are stored in the lightningTypes folder.
Here’s an example of the LightningTypeBundle structure.
The bundle includes these resources.
- The
lightningTypesfolder (1) contains a folder for each created custom Lightning type in the format{typeName}(2). - Each custom lightning type folder contains a
schema.jsonfile (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)
{channelName}folder, you can configure:- The
editor.jsonfile (5) containing custom user interface and editor information - The
renderer.jsonfile (6) containing custom user interface and renderer informationNote: This file isn’t supported in
experienceBuilder.
Introduced in API version 64.0.
- Type: string
- Required: No
- Description: Describes the lightning type.
- Type: string
- Required: Yes
- Description: Required. Represents the name of a LightningTypeBundle which is defined when the LightningTypeBundle is created.
- Type: LightningTypeBundleResource[]
- Required: No
- Description: The list of resource files in the
lightningTypesfolder.
Represents a resource inside a LightningTypeBundle.
- Type: string
- Required: Yes
- Description: Required. Name of the resource file.
- Type: string
- Required: Yes
- Description: Required. Path of the resource file.
- Type: string
- Required: Yes
- Type: base64Binary
- Required: Yes
- Description: Required. The JSON content of the resource.
This package.xml file retrieves all the LightningTypeBundle components in an org.
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:
In this example, the custom Lightning type flightResponse is a complex type that references an Apex class named Flight.
Here are the contents of the files in the flightResponse directory. This sample code shows the contents of the schema.json file.
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.
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:
In this example, the custom Lightning type flightFilter is a complex type that references an Apex class named FlightRequestFilter.
Here are the contents of the files in the flightFilter directory. This sample code shows the contents of the schema.json file.
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.
flightFilter is a custom LWC component referenced in editor.json 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.