generating-ui-bundle-site

MUST activate when the project contains a uiBundles/*/src/ directory and the task involves creating or configuring site infrastructure. Use this skill when…

INSTALLATION
npx skills add https://github.com/forcedotcom/afv-library --skill generating-ui-bundle-site
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$28

Generation Workflow

Step 1: Resolve All Required Properties

Determine values for all five properties before constructing anything. Use the resolution strategies in the table above, falling through each option until a value is found.

Step 2: Create the Project Structure

Use available Salesforce metadata schema and field context for Network, CustomSite, DigitalExperienceConfig, and DigitalExperienceBundle to ensure each file uses valid structure.

Create any files and directories that don't already exist, using these paths:

Metadata Type

Path

Network

networks/{siteName}.network-meta.xml

CustomSite

sites/{siteName}.site-meta.xml

DigitalExperienceConfig

digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml

DigitalExperienceBundle

digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xml

DigitalExperience (sfdc_cms__site)

digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/*

The DigitalExperience directory contains only _meta.json and content.json. Do not create any directories other than sfdc_cms__site inside the bundle.

Step 3: Populate All Metadata Fields

Use the default templates in the docs below. Values in {braces} are resolved property references — substitute them with the actual values from Step 1.

Metadata Type

Template Reference

Network

configure-metadata-network.md

CustomSite

configure-metadata-custom-site.md

DigitalExperienceConfig

configure-metadata-digital-experience-config.md

DigitalExperienceBundle

configure-metadata-digital-experience-bundle.md

DigitalExperience (sfdc_cms__site)

configure-metadata-digital-experience.md

For URL updates, see update-site-urls.md.

Execution Note for Step 3: Load and use the docs

  • Agents MUST read the full contents of each docs/*.md file referenced in Step 3 before attempting to populate metadata fields.
  • Use your platform's file-read tool (for example, read_file) to load these files in full, then perform placeholder substitution for values in {braces} using the resolved properties from Step 1.
  • Files to load:
  • docs/configure-metadata-network.md
  • docs/configure-metadata-custom-site.md
  • docs/configure-metadata-digital-experience-config.md
  • docs/configure-metadata-digital-experience-bundle.md
  • docs/configure-metadata-digital-experience.md
  • Read entire file contents, replace placeholders (e.g. {siteName}) with the resolved values, then use the expanded templates to populate the metadata XML/JSON content.

Step 4: Do Not Modify Non-Templated Properties

Do not modify any default property values for Network, CustomSite, DigitalExperience, DigitalExperienceConfig, or DigitalExperienceBundle metadata that are not expressed as variables wrapped in {braces}.

Verification Checklist

Before deploying, confirm:

  • All five required properties are resolved
  • All metadata directories and files exist per the project structure
  • All metadata fields match the Step 3 templates with {braces} substituted only; no other default property values were added or changed
  • appSpace in content.json matches an existing UIBundle metadata record
  • Deployment validates successfully:
sf project deploy validate --metadata Network CustomSite DigitalExperienceConfig DigitalExperienceBundle DigitalExperience --target-org ${usernameOrAlias}

Common Workflows

Updating Experience Site URLs

Use when user wants to update or change site URLs (urlPathPrefix).

Steps:

  • Read update-site-urls.md to understand the three-component architecture and URL update workflow
  • Follow the step-by-step workflow in the doc to update URLs consistently across all three components (DigitalExperienceConfig, Network, CustomSite)
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card