
Generating Ui Bundle Custom App
- 1.4k installs
- 763 repo stars
- Updated July 24, 2026
- forcedotcom/sf-skills
How do I create a CustomApplication metadata record to host a React UI bundle in Lightning Experience without using a Digital Experience Site?
About
This skill generates Salesforce CustomApplication metadata records that expose React UI bundles in the Lightning App Launcher for internal user access. Developers use it when a uiBundles/ directory exists and they need to create a launcher entry without building a Digital Experience Site. The workflow resolves appName, appLabel, and appNamespace; queries the target org's API version to determine field compatibility (uiBundle vs. webApplication); generates the .app-meta.xml file in applications/; and optionally updates .uibundle-meta.xml with the target field. Step 2 ensures the metadata matches the org's Salesforce API version, preventing blank-page errors from mismatched bundle references.
- Resolves appName, appLabel, appNamespace via sfdx-project.json, user input, or org query
- Queries salesforce-api-context MCP to detect API version and field availability (uiBundle vs. webApplication)
- Generates applications/{appName}.app-meta.xml with version-aware XML structure
- Updates .uibundle-meta.xml with target field if supported by org API version
- Includes deployment validation command and pre-deploy checklist
Generating Ui Bundle Custom App by the numbers
- 1,428 all-time installs (skills.sh)
- +7 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #328 of 4,386 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
generating-ui-bundle-custom-app capabilities & compatibility
- Capabilities
- resolve appname, applabel, appnamespace from pro · query api version to determine field compatibili · generate xml metadata with version aware structu · create and update metadata files in correct dire · validate deployment prerequisites
- Use cases
- api development · devops
- Platforms
- macOS · Windows · Linux · WSL
- Runs
- Runs locally
- Pricing
- Free
What generating-ui-bundle-custom-app says it does
Custom Applications differ from Experience Sites: they don't need Networks, CustomSite, DigitalExperienceConfig, or DigitalExperienceBundle metadata.
Getting this wrong means the app launcher entry exists but shows a blank page. Step 2 of the workflow determines which field to use.
npx skills add https://github.com/forcedotcom/sf-skills --skill generating-ui-bundle-custom-appAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.4k |
|---|---|
| repo stars | ★ 763 |
| Last updated | July 24, 2026 |
| Repository | forcedotcom/sf-skills ↗ |
What it does
Generate CustomApplication metadata to surface a React UI bundle in Salesforce Lightning Experience app launcher.
Who is it for?
Salesforce developers deploying internal React UI bundles to Lightning Experience without Digital Experience Sites; teams building custom apps that must appear in the app launcher.
Skip if: Experience Sites, public-facing portals, or apps using tabs, action overrides, or flexipages; manual CustomApplication edits without UI bundle context.
When should I use this skill?
uiBundles/*/src/ directory exists; applications/*.app-meta.xml needs creation or modification; user wants to expose app via Lightning App Launcher without a Digital Experience Site.
What you get
A properly configured CustomApplication metadata file (applications/{appName}.app-meta.xml) appears in the Lightning App Launcher and correctly references the UI bundle for the target org's API version.
- applications/{appName}.app-meta.xml file with correct uiBundle or webApplication reference
- Updated .uibundle-meta.xml with target field (if supported)
- Deployment validation passing
By the numbers
- Supports both older (webApplication field) and newer (uiBundle field) CustomApplication API versions
- Resolves appNamespace through 3 fallback strategies: sfdx-project.json, org query, default
- Generates 1-2 metadata files: CustomApplication + conditional UIBundle target update
Files
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.
Step 2: Query API Context (Version-Aware Field Discovery)
Call salesforce-api-context MCP tools to discover which fields exist for the target org's API version. This ensures the generated metadata is compatible with the user's Salesforce version.
Required calls: 1. Call get_metadata_type_fields for CustomApplication — check whether the uiBundle field exists 2. Call get_metadata_type_fields for UIBundle — check whether the target field exists
Field resolution based on API response:
| Field Check | If present | If absent (older API version) |
|---|---|---|
CustomApplication.uiBundle | Use <uiBundle>{appNamespace}__{appName}</uiBundle> | Use <webApplication>{appName}</webApplication> (no namespace) |
UIBundle.target | Use <target>CustomApplication</target> | Omit the <target> element entirely |
If salesforce-api-context is unavailable after a real attempt, fall back to the newer field names (uiBundle + target).
Step 3: Create the Project Structure
Create any files and directories that don't already exist:
| Metadata Type | Path |
|---|---|
| CustomApplication | <sourceDir>/applications/{appName}.app-meta.xml |
Note: <sourceDir> is determined from sfdx-project.json. Read packageDirectories[] and use the entry where "default": true; the full source directory is <path>/main/default. If no default is set, use the first entry. Commonly force-app/main/default, but this path is configurable.
Step 4: Populate All Metadata Fields
Use the default template in the doc below. Values in {braces} are resolved property references — substitute them with the actual values from Step 1. Apply the field resolution from Step 2 to determine which XML elements to use.
| Metadata Type | Template Reference |
|---|---|
| CustomApplication | configure-metadata-custom-application.md |
Execution Note for Step 4: Load and use the doc
- Agents MUST read the full contents of the docs/*.md file referenced in Step 4 before attempting to populate metadata fields.
- Read the file in full, replace placeholders (e.g.
{appName}) with the resolved values, then use the expanded template to populate the metadata XML content. - If Step 2 determined the older field names apply, substitute
<uiBundle>with<webApplication>in the generated output.
Step 5: Update UI Bundle Meta XML
If Step 2 confirmed the target field exists on UIBundle, add <target>CustomApplication</target> to the .uibundle-meta.xml file (skip if the field doesn't exist in the org's API version):
<?xml version="1.0" encoding="UTF-8"?>
<UIBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<masterLabel>{appName}</masterLabel>
<description>A Salesforce UI Bundle.</description>
<isActive>true</isActive>
<version>1</version>
<target>CustomApplication</target>
</UIBundle>Step 6: Do Not Modify Non-Templated Properties
Do not modify any default property values for CustomApplication metadata that are not expressed as variables wrapped in {braces}.
Verification Checklist
Before deploying, confirm:
- [ ] All required properties are resolved
- [ ] API context was queried to determine available fields (Step 2)
- [ ]
applications/{appName}.app-meta.xmlexists with correct content - [ ] The bundle reference field matches the org's API version (
<uiBundle>or<webApplication>) - [ ] If
targetfield is supported:.uibundle-meta.xmlhas<target>CustomApplication</target> - [ ] Deployment validates successfully:
sf project deploy validate --metadata CustomApplication UIBundle --target-org ${usernameOrAlias}Configure Metadata: CustomApplication
Purpose
This configuration file creates a net-new, default CustomApplication metadata record for a Lightning Experience app that hosts a React UI bundle. It is not intended to edit or modify an existing CustomApplication record. Use this template only when provisioning a brand-new Custom Application for a UI bundle.
File Location
<sourceDir>/applications/{appName}.app-meta.xmlNote: Determine <sourceDir> from sfdx-project.json → packageDirectories[] → find the entry with "default": true → use its path value + /main/default. Commonly force-app/main/default, but this is configurable.
Default Template (newer API versions — uiBundle field available)
<?xml version="1.0" encoding="UTF-8"?>
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
<brand>
<headerColor>#0070D2</headerColor>
<shouldOverrideOrgTheme>false</shouldOverrideOrgTheme>
</brand>
<formFactors>Small</formFactors>
<formFactors>Large</formFactors>
<isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
<isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
<isOmniPinnedViewEnabled>false</isOmniPinnedViewEnabled>
<label>{appLabel}</label>
<navType>Standard</navType>
<uiBundle>{appNamespace}__{appName}</uiBundle>
<uiType>Lightning</uiType>
</CustomApplication>Fallback Template (older API versions — uiBundle field NOT available)
<?xml version="1.0" encoding="UTF-8"?>
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
<brand>
<headerColor>#0070D2</headerColor>
<shouldOverrideOrgTheme>false</shouldOverrideOrgTheme>
</brand>
<formFactors>Small</formFactors>
<formFactors>Large</formFactors>
<isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
<isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
<isOmniPinnedViewEnabled>false</isOmniPinnedViewEnabled>
<label>{appLabel}</label>
<navType>Standard</navType>
<webApplication>{appName}</webApplication>
<uiType>Lightning</uiType>
</CustomApplication>Field Reference
| Field | Required | Version | Description |
|---|---|---|---|
brand.headerColor | Yes | All | Hex color for the app header bar in Lightning Experience. Default: #0070D2 (Salesforce blue). |
brand.shouldOverrideOrgTheme | Yes | All | Whether this app's branding overrides the org theme. Default: false. |
formFactors | Yes | All | Supported form factors. Include both Small (mobile) and Large (desktop) for full coverage. |
isNavAutoTempTabsDisabled | Yes | All | Disable auto-creation of temporary tabs. Default: false. |
isNavPersonalizationDisabled | Yes | All | Disable user personalization of navigation. Default: false. |
isNavTabPersistenceDisabled | Yes | All | Disable persistence of nav tabs across sessions. Default: false. |
isOmniPinnedViewEnabled | Yes | All | Enable Omni-channel pinned view. Default: false. |
label | Yes | All | Human-readable label shown in the App Launcher and app switcher. |
navType | Yes | All | Navigation type. Use Standard for standard Lightning navigation. |
uiBundle | Conditional | Newer | Namespace-qualified developer name of the UI bundle ({appNamespace}__{appName}). Use when get_metadata_type_fields confirms this field exists on CustomApplication. |
webApplication | Conditional | Older | Developer name of the UI bundle ({appName}, no namespace). Use when uiBundle field is not available. |
uiType | Yes | All | UI framework type. Must be Lightning for UI bundle apps. |
Related skills
Forks & variants (1)
Generating Ui Bundle Custom App has 1 known copy in the catalog totaling 201 installs. They canonicalize to this original listing.
- forcedotcom - 201 installs
FAQ
When should I use generating-ui-bundle-custom-app vs. generating-custom-application?
Use generating-ui-bundle-custom-app when the project contains uiBundles/ and you need a launcher entry for internal users. Use generating-custom-application for tabs, action overrides, or flexipages. UI bundle apps do not support those features.
What does Step 2 API context query do?
It calls salesforce-api-context MCP to check whether your org's API version supports uiBundle field (newer) or only webApplication (older). This prevents generating incompatible metadata that results in blank pages in the app launcher.
How do I resolve appNamespace if sfdx-project.json has no namespace entry?
Run `sf data query -q "SELECT NamespacePrefix FROM Organization" --target-org ${usernameOrAlias}`. If the query returns empty/null, default to `c` (unmanaged namespace).