ExperiencePropertyTypeBundle (Beta)

Represents a property type. When you create a custom property type for a Lightning web component, deploy this bundle to your org.

This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms.

Note

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.

Important

Parent Type

This type extends the Metadata metadata type and inherits its fullName field.

File Structure and Directory Location

ExperiencePropertyTypeBundle components are stored in the experiencePropertyTypeBundles folder. Here’s an example of how the folder is structured.

+--myMetadataPackage
    +--experiencePropertyTypeBundles (1)
        +--addressProperty (2)
            +--schema.json (3)
            +--design.json (4)
  • In the experiencePropertyTypeBundles folder (1) is a folder for each custom property type.
  • Each custom property type folder is named in the format propertyTypeName. In this example (2), the name is addressProperty.
  • Each propertyTypeName folder contains a JSON file or files that define the property type.
    • A schema.json file (3), which is a JSON schema that drives the property type validation
    • An optional design.json file (4), which provides the user experience and property editor information for that property type

Version

ExperiencePropertyTypeBundle components are available in API version 58.0 and later.

Special Access Rules

The ExperiencePropertyTypeBundle metadata type is available only for use with Lightning web components on LWR sites.

Fields

Field Name Description
description
Field Type
string
Description
Explanatory text about the property type.
masterLabel
Field Type
string
Description

Required. A user-friendly name for ExperiencePropertyTypeBundle, which is defined when the ExperiencePropertyTypeBundle is created.

resources
Field Type
ExperiencePropertyTypeBundleResource[]
Description
A list of source files in the experiencePropertyTypeBundles folder.

ExperiencePropertyTypeBundleResource

Represents a resource inside ExperiencePropertyTypeBundle.

Field Name Description
fileName
Field Type
string
Description

Required. The file name of the resource.

filePath
Field Type
string
Description

Required. The file path of the resource.

source
Field Type
base64Binary
Description

Required. The content of the resource.

Declarative Metadata Sample Definition

This package.xml file retrieves all the ExperiencePropertyTypeBundle components in an org.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>ExperiencePropertyTypeBundle</name>
    </types>
    <version>58.0</version>
</Package>

In the retrieved .zip file, each property type is nested under an experiencePropertyTypeBundles folder.

This example shows the directory structure in the .zip file of a property type named addressProperty.

experiencePropertyTypeBundles
    addressProperty
        schema.json
        design.json

Here are the contents of the files in the addressProperty directory. The addressProperty is a complex type that includes subproperties for firstName, lastName, address, city, state, and postal code. Each subproperty is a primitive type.

Contents of schema.json:

{
 "title": "Simple Address Type",
 "lightning:type": "lightning__objectType",
 "properties": {
   "firstName": {
     "lightning:type": "lightning__textType",
     "title": "First Name"
   },
   "lastName": {
     "lightning:type": "lightning__textType",
     "title": "Last Name"
   },
   "address": {
     "lightning:type": "lightning__textType",
     "title": "Address Line 1"
   },
   "city": {
     "lightning:type": "lightning__textType",
     "title": "City"
   },
   "state": {
     "lightning:type": "lightning__textType",
     "title": "State"
   },
   "postalCode": {
     "lightning:type": "lightning__numberType",
     "title": "Postal Code"
   }
 },
 "required": ["firstName", "lastName"]
}

Contents of design.json (an optional file):

{
 "definition": "lightning/tabsetLayout",
 "children": [
   {
     "definition": "lightning/tabLayout",
     “attributes”: {
        “label”: “First Tab”
     },
     “children”: [
       {
         "definition": "lightning/propertyLayout",
         "attributes": {
           "property": "aProperty"
         }
       },
       {
         "definition": "lightning/propertyLayout",
         "attributes": {
           "property": "bProperty"
         }
       },
    ]
   },
     {
     "definition": "lightning/tabLayout",
     “attributes”: {
        “label”: “Second Tab”
     },
     “children”: [
       {
         "definition": "lightning/propertyLayout",
         "attributes": {
           "property": "cProperty"
         }
       },
     ]
   },
 ]
}

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.