generating-ui-bundle-custom-app
Custom Application for React UI Bundles
Create and configure a Salesforce Custom Application that hosts a React UI bundle in Lightning Experience. This skill generates the CustomApplication metadata so the app appears in the Lightning App Launcher and can be accessed by internal users.
Custom Applications differ from Experience Sites: they don't need Networks, CustomSite, DigitalExperienceConfig, or DigitalExperienceBundle metadata. The Custom Application acts as a thin launcher entry that delegates rendering to the React UI bundle referenced by uiBundle.
Required Properties
Resolve all properties before generating any metadata. Each has a fallback chain — work through each option in order until a value is found.
| Property | Format | How to Resolve |
|---|---|---|
| appName | lowercamelcase (e.g., myInternalApp) |
The UI bundle name from uiBundles/<name>/ directory |
| appNamespace | String | namespace in sfdx-project.json → sf data query -q "SELECT NamespacePrefix FROM Organization" --target-org ${usernameOrAlias} → default c |
| appLabel | Human-readable string | User-provided, or derive from appName by converting camelCase to Title Case |
The appNamespace and appName connect the Custom Application to the correct React UI bundle. In newer API versions this uses <uiBundle>{appNamespace}__{appName}</uiBundle>; in older versions it uses <webApplication>{appName}</webApplication>. Getting this wrong means the app launcher entry exists but shows a blank page. Step 2 of the workflow determines which field to use.
Generation Workflow
Step 1: Resolve All Required Properties
Determine values for all properties before constructing anything. Use the resolution strategies in the table above.