diff --git a/package-lock.json b/package-lock.json index 994befd..4340f18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@salesforce/afv-skills", - "version": "1.6.4", + "version": "1.6.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@salesforce/afv-skills", - "version": "1.6.4", + "version": "1.6.5", "license": "CC-BY-NC-4.0", "devDependencies": { - "@salesforce/ui-bundle-template-app-react-sample-b2e": "^1.119.5", - "@salesforce/ui-bundle-template-app-react-sample-b2x": "^1.119.5", + "@salesforce/ui-bundle-template-app-react-sample-b2e": "^1.120.2", + "@salesforce/ui-bundle-template-app-react-sample-b2x": "^1.120.2", "@salesforce/webapp-template-app-react-sample-b2e-experimental": "^1.117.1", "@salesforce/webapp-template-app-react-sample-b2x-experimental": "^1.117.1", "@types/js-yaml": "^4.0.9", @@ -690,22 +690,22 @@ } }, "node_modules/@salesforce/sdk-core": { - "version": "1.119.5", - "resolved": "https://registry.npmjs.org/@salesforce/sdk-core/-/sdk-core-1.119.5.tgz", - "integrity": "sha512-dv5VMPYSBeBwc7Zxp/bGILKTnwg8rxWVsqB2iDvW1o7/vrQF/L7yO1JaH5fhvB2u5fZvpdI0AFO6xjDzXZXK9g==", + "version": "1.120.2", + "resolved": "https://registry.npmjs.org/@salesforce/sdk-core/-/sdk-core-1.120.2.tgz", + "integrity": "sha512-PZzUfYgi1+0EDTxu+DwvChvb88CqedYp7zv6mAQA7VrVgScTU980CEcgqN6ecDDMcf0jN2AzFDCqVkjdQEBSzA==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt" }, "node_modules/@salesforce/sdk-data": { - "version": "1.119.5", - "resolved": "https://registry.npmjs.org/@salesforce/sdk-data/-/sdk-data-1.119.5.tgz", - "integrity": "sha512-DTB4Fe3p/kxZZ9WDxVfEKkrYOA1EoVnBbbdLnS6CLsrH9mCQKSSoGkYnzJm3Si50Q/Dm9ViNFbcBE5HG3qim3g==", + "version": "1.120.2", + "resolved": "https://registry.npmjs.org/@salesforce/sdk-data/-/sdk-data-1.120.2.tgz", + "integrity": "sha512-bOoKJXo5SJo9eXbf9Bvf/JNHkyz8AYQ7XBYbFRB/o35jnOk666toBF62LDVnyo4YrwK4UrQxIOz0f/IJpEZljg==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@conduit-client/service-fetch-network": "3.17.0", "@conduit-client/utils": "3.17.0", - "@salesforce/sdk-core": "^1.119.5" + "@salesforce/sdk-core": "^1.120.2" } }, "node_modules/@salesforce/ts-types": { @@ -719,14 +719,14 @@ } }, "node_modules/@salesforce/ui-bundle": { - "version": "1.119.5", - "resolved": "https://registry.npmjs.org/@salesforce/ui-bundle/-/ui-bundle-1.119.5.tgz", - "integrity": "sha512-ZrIXpdC4WNXxjh+DMo5gWyyKrJchSQFAstZFcl2Zh4WCtKxJNUK1wEdiPuNviNk0ReMAEZ1lVQOONU230J0aQg==", + "version": "1.120.2", + "resolved": "https://registry.npmjs.org/@salesforce/ui-bundle/-/ui-bundle-1.120.2.tgz", + "integrity": "sha512-LqjsEc1GVDPjkAV/8SGrUZSjELTaR8nCVMfAxhYV+zSSRdRYhatE4HXlFPC5UubwIziliYW4b02gbTC13yrGWg==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@salesforce/core": "^8.23.4", - "@salesforce/sdk-data": "^1.119.5", + "@salesforce/sdk-data": "^1.120.2", "micromatch": "^4.0.8", "path-to-regexp": "^8.3.0" }, @@ -735,20 +735,20 @@ } }, "node_modules/@salesforce/ui-bundle-template-app-react-sample-b2e": { - "version": "1.119.5", - "resolved": "https://registry.npmjs.org/@salesforce/ui-bundle-template-app-react-sample-b2e/-/ui-bundle-template-app-react-sample-b2e-1.119.5.tgz", - "integrity": "sha512-h/Gs6TVO3uBNahiAM+oUuQDjYODBcjwtjveZoHzIU/TsVBo2wQ5QatPljVnu3xR5xPF0A5f/Q6HW4gmOIVKEQA==", + "version": "1.120.2", + "resolved": "https://registry.npmjs.org/@salesforce/ui-bundle-template-app-react-sample-b2e/-/ui-bundle-template-app-react-sample-b2e-1.120.2.tgz", + "integrity": "sha512-jdugbOdYbA968HGJcCojWQTNmwKcpLvKjXmGNAgSvhivXUTe2ol80ZmTQvJAR3xjUQbKbMhd/ilSDjsWpHka8Q==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { - "@salesforce/ui-bundle": "^1.119.5", + "@salesforce/ui-bundle": "^1.120.2", "sonner": "^1.7.0" } }, "node_modules/@salesforce/ui-bundle-template-app-react-sample-b2x": { - "version": "1.119.5", - "resolved": "https://registry.npmjs.org/@salesforce/ui-bundle-template-app-react-sample-b2x/-/ui-bundle-template-app-react-sample-b2x-1.119.5.tgz", - "integrity": "sha512-oIwaFNU8Xr47SGu3nz8Dlaa0sQqHGJErN5ZaYSiKEsYR2MzkRxUQh6lN6t2KOVp3MVUmyAUs/6Ccmp9zGKQTHg==", + "version": "1.120.2", + "resolved": "https://registry.npmjs.org/@salesforce/ui-bundle-template-app-react-sample-b2x/-/ui-bundle-template-app-react-sample-b2x-1.120.2.tgz", + "integrity": "sha512-0z3Xo3rJ7dGWn8BharC8WnbyYfJ56cQsbUTKnLxf0rDDAXkKyViwTwbtNCAa9dDK1F78+hk83KEBfTUhwCdJ0w==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt" }, diff --git a/package.json b/package.json index 02b1b28..c291072 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "registry": "https://registry.npmjs.org" }, "devDependencies": { - "@salesforce/ui-bundle-template-app-react-sample-b2e": "^1.119.5", - "@salesforce/ui-bundle-template-app-react-sample-b2x": "^1.119.5", + "@salesforce/ui-bundle-template-app-react-sample-b2e": "^1.120.2", + "@salesforce/ui-bundle-template-app-react-sample-b2x": "^1.120.2", "@salesforce/webapp-template-app-react-sample-b2e-experimental": "^1.117.1", "@salesforce/webapp-template-app-react-sample-b2x-experimental": "^1.117.1", "@types/js-yaml": "^4.0.9", diff --git a/samples/ui-bundle-template-app-react-sample-b2e/.version b/samples/ui-bundle-template-app-react-sample-b2e/.version index 8c334ba..6df4291 100644 --- a/samples/ui-bundle-template-app-react-sample-b2e/.version +++ b/samples/ui-bundle-template-app-react-sample-b2e/.version @@ -1 +1 @@ -1.119.5 +1.120.2 diff --git a/samples/ui-bundle-template-app-react-sample-b2e/CHANGELOG.md b/samples/ui-bundle-template-app-react-sample-b2e/CHANGELOG.md index 9d46904..39e6f1d 100644 --- a/samples/ui-bundle-template-app-react-sample-b2e/CHANGELOG.md +++ b/samples/ui-bundle-template-app-react-sample-b2e/CHANGELOG.md @@ -3,6 +3,38 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.120.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.120.1...v1.120.2) (2026-04-01) + +**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project + + + + + +## [1.120.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.120.0...v1.120.1) (2026-04-01) + +**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project + + + + + +# [1.120.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.6...v1.120.0) (2026-04-01) + +**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project + + + + + +## [1.119.6](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.5...v1.119.6) (2026-04-01) + +**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project + + + + + ## [1.119.5](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.4...v1.119.5) (2026-03-31) **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project diff --git a/samples/ui-bundle-template-app-react-sample-b2e/force-app/main/default/uiBundles/propertymanagementapp/package.json b/samples/ui-bundle-template-app-react-sample-b2e/force-app/main/default/uiBundles/propertymanagementapp/package.json index 80e80ae..42e6175 100644 --- a/samples/ui-bundle-template-app-react-sample-b2e/force-app/main/default/uiBundles/propertymanagementapp/package.json +++ b/samples/ui-bundle-template-app-react-sample-b2e/force-app/main/default/uiBundles/propertymanagementapp/package.json @@ -3,6 +3,9 @@ "private": true, "version": "1.59.0", "type": "module", + "engines": { + "node": ">=22" + }, "scripts": { "dev": "vite", "dev:design": "vite --mode design", @@ -15,8 +18,8 @@ "graphql:schema": "node scripts/get-graphql-schema.mjs" }, "dependencies": { - "@salesforce/sdk-data": "^1.119.5", - "@salesforce/ui-bundle": "^1.119.5", + "@salesforce/sdk-data": "^1.120.2", + "@salesforce/ui-bundle": "^1.120.2", "@tailwindcss/vite": "^4.1.17", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", @@ -43,7 +46,7 @@ "@graphql-eslint/eslint-plugin": "^4.1.0", "@graphql-tools/utils": "^11.0.0", "@playwright/test": "^1.49.0", - "@salesforce/vite-plugin-ui-bundle": "^1.119.5", + "@salesforce/vite-plugin-ui-bundle": "^1.120.2", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.1.0", "@testing-library/user-event": "^14.5.2", diff --git a/samples/ui-bundle-template-app-react-sample-b2e/force-app/main/default/uiBundles/propertymanagementapp/src/components/AgentforceConversationClient.tsx b/samples/ui-bundle-template-app-react-sample-b2e/force-app/main/default/uiBundles/propertymanagementapp/src/components/AgentforceConversationClient.tsx index 55c0932..1275f75 100644 --- a/samples/ui-bundle-template-app-react-sample-b2e/force-app/main/default/uiBundles/propertymanagementapp/src/components/AgentforceConversationClient.tsx +++ b/samples/ui-bundle-template-app-react-sample-b2e/force-app/main/default/uiBundles/propertymanagementapp/src/components/AgentforceConversationClient.tsx @@ -43,6 +43,7 @@ const DEFAULT_STYLE_TOKENS: NonNullable = messageInputSendButtonIconColor: "#ffffff", messageInputSendButtonDisabledColor: "#e5e7eb", messageInputActionButtonFocusBorder: "#a855f7", + errorBlockBackground: "#fafafa", }; const SINGLETON_KEY = "__agentforceConversationClientSingleton"; @@ -109,7 +110,7 @@ export function AgentforceConversationClient({ return { ...(agentId !== undefined && { agentId }), - agentLabel: agentLabel ?? "Chat with us", + ...(agentLabel !== undefined && { agentLabel }), styleTokens: { ...DEFAULT_STYLE_TOKENS, ...styleTokens }, renderingConfig, }; diff --git a/samples/ui-bundle-template-app-react-sample-b2e/package-lock.json b/samples/ui-bundle-template-app-react-sample-b2e/package-lock.json index 6165530..4a4de32 100644 --- a/samples/ui-bundle-template-app-react-sample-b2e/package-lock.json +++ b/samples/ui-bundle-template-app-react-sample-b2e/package-lock.json @@ -1,12 +1,12 @@ { "name": "@salesforce/webapp-template-base-sfdx-project-experimental", - "version": "1.119.5", + "version": "1.120.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@salesforce/webapp-template-base-sfdx-project-experimental", - "version": "1.119.5", + "version": "1.120.2", "license": "SEE LICENSE IN LICENSE.txt", "devDependencies": { "@lwc/eslint-plugin-lwc": "^3.3.0", diff --git a/samples/ui-bundle-template-app-react-sample-b2e/package.json b/samples/ui-bundle-template-app-react-sample-b2e/package.json index 9e9e49c..7b4b028 100644 --- a/samples/ui-bundle-template-app-react-sample-b2e/package.json +++ b/samples/ui-bundle-template-app-react-sample-b2e/package.json @@ -1,6 +1,6 @@ { "name": "@salesforce/ui-bundle-template-base-sfdx-project", - "version": "1.119.5", + "version": "1.120.2", "description": "Base SFDX project template", "license": "SEE LICENSE IN LICENSE.txt", "publishConfig": { diff --git a/samples/ui-bundle-template-app-react-sample-b2x/.version b/samples/ui-bundle-template-app-react-sample-b2x/.version index 8c334ba..6df4291 100644 --- a/samples/ui-bundle-template-app-react-sample-b2x/.version +++ b/samples/ui-bundle-template-app-react-sample-b2x/.version @@ -1 +1 @@ -1.119.5 +1.120.2 diff --git a/samples/ui-bundle-template-app-react-sample-b2x/CHANGELOG.md b/samples/ui-bundle-template-app-react-sample-b2x/CHANGELOG.md index 9d46904..39e6f1d 100644 --- a/samples/ui-bundle-template-app-react-sample-b2x/CHANGELOG.md +++ b/samples/ui-bundle-template-app-react-sample-b2x/CHANGELOG.md @@ -3,6 +3,38 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.120.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.120.1...v1.120.2) (2026-04-01) + +**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project + + + + + +## [1.120.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.120.0...v1.120.1) (2026-04-01) + +**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project + + + + + +# [1.120.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.6...v1.120.0) (2026-04-01) + +**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project + + + + + +## [1.119.6](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.5...v1.119.6) (2026-04-01) + +**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project + + + + + ## [1.119.5](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.4...v1.119.5) (2026-03-31) **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project diff --git a/samples/ui-bundle-template-app-react-sample-b2x/force-app/main/default/uiBundles/propertyrentalapp/package.json b/samples/ui-bundle-template-app-react-sample-b2x/force-app/main/default/uiBundles/propertyrentalapp/package.json index c70f59b..42550c4 100644 --- a/samples/ui-bundle-template-app-react-sample-b2x/force-app/main/default/uiBundles/propertyrentalapp/package.json +++ b/samples/ui-bundle-template-app-react-sample-b2x/force-app/main/default/uiBundles/propertyrentalapp/package.json @@ -3,6 +3,9 @@ "private": true, "version": "1.59.0", "type": "module", + "engines": { + "node": ">=22" + }, "scripts": { "dev": "vite", "dev:design": "vite --mode design", @@ -15,8 +18,8 @@ "graphql:schema": "node scripts/get-graphql-schema.mjs" }, "dependencies": { - "@salesforce/sdk-data": "^1.119.5", - "@salesforce/ui-bundle": "^1.119.5", + "@salesforce/sdk-data": "^1.120.2", + "@salesforce/ui-bundle": "^1.120.2", "@tailwindcss/vite": "^4.1.17", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", @@ -47,7 +50,7 @@ "@graphql-eslint/eslint-plugin": "^4.1.0", "@graphql-tools/utils": "^11.0.0", "@playwright/test": "^1.49.0", - "@salesforce/vite-plugin-ui-bundle": "^1.119.5", + "@salesforce/vite-plugin-ui-bundle": "^1.120.2", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.1.0", "@testing-library/user-event": "^14.5.2", diff --git a/samples/ui-bundle-template-app-react-sample-b2x/package-lock.json b/samples/ui-bundle-template-app-react-sample-b2x/package-lock.json index 6165530..4a4de32 100644 --- a/samples/ui-bundle-template-app-react-sample-b2x/package-lock.json +++ b/samples/ui-bundle-template-app-react-sample-b2x/package-lock.json @@ -1,12 +1,12 @@ { "name": "@salesforce/webapp-template-base-sfdx-project-experimental", - "version": "1.119.5", + "version": "1.120.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@salesforce/webapp-template-base-sfdx-project-experimental", - "version": "1.119.5", + "version": "1.120.2", "license": "SEE LICENSE IN LICENSE.txt", "devDependencies": { "@lwc/eslint-plugin-lwc": "^3.3.0", diff --git a/samples/ui-bundle-template-app-react-sample-b2x/package.json b/samples/ui-bundle-template-app-react-sample-b2x/package.json index 9e9e49c..7b4b028 100644 --- a/samples/ui-bundle-template-app-react-sample-b2x/package.json +++ b/samples/ui-bundle-template-app-react-sample-b2x/package.json @@ -1,6 +1,6 @@ { "name": "@salesforce/ui-bundle-template-base-sfdx-project", - "version": "1.119.5", + "version": "1.120.2", "description": "Base SFDX project template", "license": "SEE LICENSE IN LICENSE.txt", "publishConfig": { diff --git a/skills/generating-experience-lwr-site/SKILL.md b/skills/generating-experience-lwr-site/SKILL.md index 086a5bf..b2e8bc9 100644 --- a/skills/generating-experience-lwr-site/SKILL.md +++ b/skills/generating-experience-lwr-site/SKILL.md @@ -102,6 +102,7 @@ Before doing anything, you **MUST ALWAYS** load them first if they match user in - [handle-component-and-region-ids.md](docs/handle-component-and-region-ids.md) - **UUID generation (CRITICAL)** for component and region ids used in views and themeLayout. - [handle-ui-components.md](docs/handle-ui-components.md) - Component discovery, schemas, insertion, configuration - [configure-guest-sharing-rules.md](docs/configure-guest-sharing-rules.md) - **Guest sharing rules** (`sharingGuestRules`) for public sites — use for any request involving "guest sharing rule", "Site Guest User", or sharing object records with unauthenticated visitors +- [update-site-urls.md](docs/update-site-urls.md) - **Updating site URLs** - URL architecture, workflow for updating `urlPathPrefix` in DigitalExperienceConfig, Network, and CustomSite ## Common Workflows @@ -211,6 +212,15 @@ The site developer name can be found in the CustomSite filename (e.g., `sites/My If the site is not found, an error message will be returned indicating that the site may not be deployed. Ensure the site has been successfully deployed before calling this action. +### Updating Experience Site URLs + +**Use when** user wants to update or change site URLs (urlPathPrefix). + +**Steps** (Follow the steps sequentially. Do not skip any step before proceeding): + +- [ ] MUST read [update-site-urls.md](docs/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) + ### Validation & Deployment Use `sf` CLI to validate and deploy. Access help docs by attaching `--help`, e.g.: @@ -230,4 +240,4 @@ sf project deploy validate --metadata DigitalExperienceBundle DigitalExperience ```bash sf project deploy start --metadata DigitalExperienceBundle DigitalExperience DigitalExperienceConfig Network CustomSite --target-org ${usernameOrAlias} -``` +``` \ No newline at end of file diff --git a/skills/generating-experience-lwr-site/docs/update-site-urls.md b/skills/generating-experience-lwr-site/docs/update-site-urls.md new file mode 100644 index 0000000..f669735 --- /dev/null +++ b/skills/generating-experience-lwr-site/docs/update-site-urls.md @@ -0,0 +1,100 @@ +# Updating Experience Site URLs + +Experience sites have a three-component architecture with two distinct URL patterns. Understanding this structure is critical when updating site URLs. + +## Architecture Overview + +Every Salesforce Experience Site consists of three components: + +1. **Network** (metadata: `Network`) - Network configuration +2. **ChatterNetwork Site** (metadata: `CustomSite`) - Authentication endpoints and core site services +3. **ChatterNetworkPicasso Site** (metadata: `DigitalExperienceConfig` + `DigitalExperienceBundle`) - Customer-facing pages and content + +## URL Pattern + +These three components use **two different URLs**: + +- **Primary URL** (ChatterNetworkPicasso): Used for customer-facing pages + - Defined in: `DigitalExperienceConfig` → `` + - Example: `mysite` + +- **Secondary URL** (Network + CustomSite): Used for authentication endpoints and other services + - Defined in: `Network` → `` AND `CustomSite` → `` + - Example: `mysitevforcesite` + - **Must be synchronized** - both files must have identical values + +By default, Salesforce differentiates these URLs by appending `vforcesite` suffix to the Network/CustomSite URL. + +## URL Update Workflow + +When updating site URLs, follow this workflow: + +### Step 1: Discover All URL References + +Search for all occurrences of `urlPathPrefix` across the project metadata files. + +**For agents**: Use the `search_files` tool with these parameters: +- path: `force-app/main/default` +- regex: `urlPathPrefix` +- file_pattern: `*.xml` + +**For humans**: Use your IDE's search functionality or command line tools: +```bash +# Using grep +grep -r "urlPathPrefix" force-app/main/default --include="*.xml" + +# Using VS Code: Ctrl+Shift+F (Windows/Linux) or Cmd+Shift+F (Mac) +# Search for: urlPathPrefix +# Files to include: *.xml +``` + +### Step 2: Identify URL Groups + +Determine which files belong to which URL group: + +- **Primary URL Group**: `DigitalExperienceConfig` +- **Secondary URL Group**: `Network` AND `CustomSite` + +### Step 3: Update URLs Consistently + +Update the `` value in each file: + +- **DigitalExperienceConfig**: Update to new primary URL +- **Network**: Update to new secondary URL (typically primary URL + `vforcesite`) +- **CustomSite**: Update to **same value as Network** (must be synchronized) + +### Step 4: Validate Naming Convention + +Ensure URL values follow best practices: +- Use lowercase letters only +- Avoid special characters except hyphens where appropriate +- Keep URLs concise and meaningful + +### Step 5: Verify Consistency + +Before deploying, confirm: +- [ ] Primary URL in `DigitalExperienceConfig` is set correctly +- [ ] Secondary URL in `Network` matches `CustomSite` exactly +- [ ] URLs are properly differentiated (typically via suffix) +- [ ] All URL values follow naming conventions + +## Example URL Configuration + +``` +ChatterNetworkPicasso Site (Primary): + DigitalExperienceConfig: bestsupport + +Network + ChatterNetwork Site (Secondary): + Network: bestsupportvforcesite + CustomSite: bestsupportvforcesite +``` + +## Common Pitfalls to Avoid + +❌ **Don't** update only one or two files - all three must be updated +❌ **Don't** use different values in Network and CustomSite +❌ **Don't** use the same URL for both Primary and Secondary groups +❌ **Don't** skip the discovery step with `search_files` +✅ **Do** use `search_files` to find all occurrences first +✅ **Do** maintain URL differentiation between the two groups +✅ **Do** follow lowercase naming conventions \ No newline at end of file diff --git a/skills/generating-ui-bundle-site/SKILL.md b/skills/generating-ui-bundle-site/SKILL.md index 75e2e43..f2d0a2a 100644 --- a/skills/generating-ui-bundle-site/SKILL.md +++ b/skills/generating-ui-bundle-site/SKILL.md @@ -51,6 +51,8 @@ Use the default templates in the docs below. Values in `{braces}` are resolved p | DigitalExperienceBundle | [configure-metadata-digital-experience-bundle.md](docs/configure-metadata-digital-experience-bundle.md) | | DigitalExperience (sfdc_cms__site) | [configure-metadata-digital-experience.md](docs/configure-metadata-digital-experience.md) | +For URL updates, see [update-site-urls.md](docs/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. @@ -63,7 +65,7 @@ Use the default templates in the docs below. Values in `{braces}` are resolved p - 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: Resolve Additional Configurations -Address any extra configurations the user requests. Use the metadata sections and field context identified in Step 2 to understand each field’s purpose and constraints, then update only the minimum necessary fields. +Address any extra configurations the user requests. Use the metadata sections and field context identified in Step 2 to understand each field's purpose and constraints, then update only the minimum necessary fields. ## Verification Checklist Before deploying, confirm: @@ -76,3 +78,13 @@ Before deploying, confirm: ```bash 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](docs/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) diff --git a/skills/generating-ui-bundle-site/docs/configure-metadata-digital-experience.md b/skills/generating-ui-bundle-site/docs/configure-metadata-digital-experience.md index b8258c9..3298d02 100644 --- a/skills/generating-ui-bundle-site/docs/configure-metadata-digital-experience.md +++ b/skills/generating-ui-bundle-site/docs/configure-metadata-digital-experience.md @@ -3,7 +3,7 @@ ## Purpose These configuration files create **net-new, default** DigitalExperience content records (`sfdc_cms__site` type) for a Digital Experience React Site. They are not intended to edit or modify existing DigitalExperience content. Use these templates only when provisioning a brand-new React site. -The `appContainer: true` and `appSpace` fields in `content.json` are what make this a React site rather than a standard LWR site. The `appSpace` value follows the format `{namespace}__{developerName}` and must match a deployed `UIBundle` metadata record. +The `appContainer: true` field in `content.json` is what makes this a React site rather than a standard LWR site. The `appSpace` field should **be left empty if the UIBundle metadata record does not already exist**. When the UIBundle exists, populate the `appSpace` value following the format `{namespace}__{developerName}` to match the deployed `UIBundle` metadata record. ## File Location The DigitalExperience directory contains only `_meta.json` and `content.json`. Do not create any directories other than `sfdc_cms__site` inside the bundle. @@ -32,7 +32,9 @@ digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/content.json "contentBody": { "authenticationType": "AUTHENTICATED_WITH_PUBLIC_ACCESS_ENABLED", "appContainer": true, - "appSpace": "{appNamespace}__{appDevName}" + "appSpace": "" } } ``` + +**Note:** Leave `appSpace` empty (`""`) if the UIBundle does not exist. If the UIBundle metadata record is already deployed, populate it with `"{appNamespace}__{appDevName}"`. diff --git a/skills/generating-ui-bundle-site/docs/update-site-urls.md b/skills/generating-ui-bundle-site/docs/update-site-urls.md new file mode 100644 index 0000000..8b055ac --- /dev/null +++ b/skills/generating-ui-bundle-site/docs/update-site-urls.md @@ -0,0 +1,100 @@ +# Updating Experience Site URLs + +Experience sites have a three-component architecture with two distinct URL patterns. Understanding this structure is critical when updating site URLs. + +## Architecture Overview + +Every Salesforce Experience Site consists of three components: + +1. **Network** (metadata: `Network`) - Network configuration +2. **ChatterNetwork Site** (metadata: `CustomSite`) - Legacy site and proxy core site services +3. **ChatterNetworkPicasso Site** (metadata: `DigitalExperienceConfig` + `DigitalExperienceBundle`) - Customer-facing pages and content + +## URL Pattern + +These three components use **two different URLs**: + +- **Primary URL** (ChatterNetworkPicasso): Used for customer-facing pages + - Defined in: `DigitalExperienceConfig` → `` + - Example: `mysite` + +- **Secondary URL** (Network + CustomSite): Used for legacy authentication endpoints and other services + - Defined in: `Network` → `` AND `CustomSite` → `` + - Example: `mysitevforcesite` + - **Must be synchronized** - both files must have identical values + +By default, Salesforce differentiates these URLs by appending `vforcesite` suffix to the Network/CustomSite URL. + +## URL Update Workflow + +When updating site URLs, follow this workflow: + +### Step 1: Discover All URL References + +Search for all occurrences of `urlPathPrefix` across the project metadata files. + +**For agents**: Use the `search_files` tool with these parameters: +- path: `force-app/main/default` +- regex: `urlPathPrefix` +- file_pattern: `*.xml` + +**For humans**: Use your IDE's search functionality or command line tools: +```bash +# Using grep +grep -r "urlPathPrefix" force-app/main/default --include="*.xml" + +# Using VS Code: Ctrl+Shift+F (Windows/Linux) or Cmd+Shift+F (Mac) +# Search for: urlPathPrefix +# Files to include: *.xml +``` + +### Step 2: Identify URL Groups + +Determine which files belong to which URL group: + +- **Primary URL Group**: `DigitalExperienceConfig` +- **Secondary URL Group**: `Network` AND `CustomSite` + +### Step 3: Update URLs Consistently + +Update the `` value in each file: + +- **DigitalExperienceConfig**: Update to new primary URL +- **Network**: Update to new secondary URL (typically primary URL + `vforcesite`) +- **CustomSite**: Update to **same value as Network** (must be synchronized) + +### Step 4: Validate Naming Convention + +Ensure URL values follow best practices: +- Use lowercase letters only +- Avoid special characters except hyphens where appropriate +- Keep URLs concise and meaningful + +### Step 5: Verify Consistency + +Before deploying, confirm: +- [ ] Primary URL in `DigitalExperienceConfig` is set correctly +- [ ] Secondary URL in `Network` matches `CustomSite` exactly +- [ ] URLs are properly differentiated (typically via suffix) +- [ ] All URL values follow naming conventions + +## Example URL Configuration + +``` +ChatterNetworkPicasso Site (Primary): + DigitalExperienceConfig: bestsupport + +Network + ChatterNetwork Site (Secondary): + Network: bestsupportvforcesite + CustomSite: bestsupportvforcesite +``` + +## Common Pitfalls to Avoid + +❌ **Don't** update only one or two files - all three must be updated +❌ **Don't** use different values in Network and CustomSite +❌ **Don't** use the same URL for both Primary and Secondary groups +❌ **Don't** skip the discovery step with `search_files` +✅ **Do** use `search_files` to find all occurrences first +✅ **Do** maintain URL differentiation between the two groups +✅ **Do** follow lowercase naming conventions \ No newline at end of file