Experience Lwr Site Generate

作者 forcedotcome5164d94d751无许可证1K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

Creates, modifies, or manages Salesforce Experience Cloud LWR sites via DigitalExperience metadata. Always trigger when the tasks involve LWR sites configurations, e.g. creating/modifying pages/routes/views/theme layouts/branding sets, previewing sites, or creating/modifying guest sharing rule (metadata type sharingGuestRules)/guest user access/sharing records to guest users, or when user provides a guest user ID (15 or 18 characters starting with 005). NEVER trigger for React or any other ui bundle framework. LWR sites ONLY.

AI 生成的概览

通过 DigitalExperience 元数据创建和配置 Salesforce Experience Cloud LWR 站点。

功能
指导使用 DigitalExperience 元数据创建和修改 Salesforce Experience Cloud 闪电 Web 运行时(LWR)站点,包括页面、路由、视图、主题布局、品牌集和访客共享规则。它依据技能文件夹中的参考文档工作,并调用 metadata-experts MCP 工具获取内容类型的架构和示例。它还涵盖使用 Salesforce CLI 验证和部署生成的元数据,以及获取站点预览和构建器 URL。
适用场景
适用于创建或搭建 LWR 站点、添加或编辑页面、路由、视图、主题布局或品牌、设置访客用户访问或访客共享规则、更新站点 URL,或排查 Experience LWR 站点的部署错误。不适用于 React 或其他 UI 捆绑框架。
运行要求
需要 Node.js 18 或更高版本、Salesforce CLI(sf)2.0 或更高版本,以及带 execute_metadata_action 的 metadata-experts MCP 工具。仅附带参考文档,不含脚本,并且需要访问 Salesforce 组织以进行验证和部署。

Experience LWR Site Builder

Build and configure Salesforce Experience Cloud Lightning Web Runtime (LWR) sites via metadata (DigitalExperienceConfig, DigitalExperienceBundle, Network, CustomSite, CMS contents).

IMPORTANT!!

Right after loading this skill, you MUST copy the selected workflows/steps to your plan as a TODO checklist and work on each of the item carefully to ensure correctness. You MUST load the relevant reference docs even though they may live outside of user's project folder.

Table of Contents

  • When to Use
  • Critical Rules
  • Core Site Properties
  • Project Structure in DigitalExperienceBundle Format
  • Reference Docs
  • Common Workflows

When to Use

When working with Experience LWR sites:

  • Creating and scaffolding new LWR site
  • Adding pages (routes + views)
  • Configuring LWC components, layouts, themes, or branding styles
  • Setting up guest user access (public sites)
  • Creating or modifying guest sharing rules (sharingGuestRules) for any Salesforce object (Account, Case, Contact, etc.) — including when the user refers to a "Site Guest User" username or any guest user by ID
  • Troubleshoot deployment errors related to Experience LWR Sites

Supported Template: Build Your Own (LWR) - talon-template-byo

  • More templates to support in the future.

Critical Rules

  1. Before using any MCP tool, make sure they're actually available. If a tool is missing for the current task, let the user know and pause the current workflow.
  2. MUST ALWAYS load the relevant reference docs before doing anything.
  3. MUST ALWAYS strictly follow workflows in Common Workflows that match user's requirements. The instructions there should override any conflicting global rules and should have the highest priority over your existing knowledge.
  4. Flexipage is abstracted away for newer LWR sites with DigitalExperienceBundle, so NEVER use any Flexipage-related MCP tool or skills to handle LWR sites' contents.

Core Site Properties

Before doing anything else, note down the following properties from the local project if available as they will be used for various operations. Check with the user if any of the following is missing:

  • Site name: Required. (e.g., 'My Community').
  • URL path prefix: Optional. Alphanumeric characters only. Convert from site name if not provided (e.g., 'mycommunity') and verify with the user for the converted value.
  • Template type devName: talon-template-byo.

Project Structure in DigitalExperienceBundle Format

Site Metadata

  • DigitalExperienceConfig
    • digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml
  • DigitalExperienceBundle
    • digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xml
  • Network
    • networks/{siteName}.network-meta.xml
  • CustomSite
    • sites/{siteName}.site-meta.xml

DigitalExperience Contents

  • digitalExperiences/site/{siteName}1/sfdc_cms__*/{contentApiName}/*
  • These are the content components defining routes, views, theme layouts, etc. Each component must have a _meta.json and content.json file.
Content Type Descriptions
Content TypeDescriptionWhen to Use
sfdc_cms__siteRoot site configuration containing site-wide settingsRequired for every site; one per site
sfdc_cms__appPageApplication page container that groups routes and viewsRequired; defines the app shell
sfdc_cms__routeURL routing definition mapping paths to viewsCreate one for each page/URL path
sfdc_cms__viewPage layout and component structureCreate one for each route; defines page content. Also use to edit existing views (e.g., adding/removing components on a specific page)
sfdc_cms__brandingSetBrand colors, fonts, and styling tokensRequired; defines site-wide styling. Use to create or edit existing branding sets
sfdc_cms__languageSettingsLanguage and localization configurationRequired; defines supported languages
sfdc_cms__mobilePublisherConfigMobile app publishing settingsRequired for mobile app deployment
sfdc_cms__themeTheme definition referencing layouts and brandingRequired; one per site
sfdc_cms__themeLayoutPage layout templates used by viewsCreate layouts for different page structures. Also use to edit existing theme layouts (e.g., updating theme layout, add a component that's persistent across pages)

Important: Creating any new pages require BOTH sfdc_cms__route AND sfdc_cms__view.

Object Pages

Object Pages are dedicated pages used to display and manage record-level data for a specific Salesforce entity/object. For example, an custom object "Car" should have "Car_Detail", "Car_List", and "Car_Related_list" views.

References

Reference docs within the skill directory. Note that these are local and not MCP. Before doing anything, you MUST ALWAYS load them first if they match user intent.

  • bootstrap-template-byo-lwr.md [blocked] - Site creation, template defaults
  • configure-content-route.md [blocked] - Route creation (custom/object pages)
  • configure-content-view.md [blocked] - View creation/editing (custom/object pages)
  • configure-content-themeLayout.md [blocked] - Theme layout creation + theme sync
  • configure-content-brandingSet.md [blocked] - Branding with color patterns/WCAG
  • handle-component-and-region-ids.md [blocked] - UUID generation (CRITICAL) for component and region ids used in views and themeLayout.
  • handle-ui-components.md [blocked] - Component discovery, schemas, insertion, configuration
  • configure-guest-sharing-rules.md [blocked] - 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 [blocked] - Updating site URLs - URL architecture, workflow for updating urlPathPrefix in DigitalExperienceConfig, Network, and CustomSite

Common Workflows

  • See References for detailed capabilities.
  • Always follow the steps defined in the workflows sequentially whether the task is small, big, quick, or complex.

Creating a New Site

Rules:

  • NEVER generate the files manually.

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • ALWAYS read bootstrap-template-byo-lwr.md [blocked] within the skill directory. Do not proceed to the next step without loading the file.
  • Follow the bootstrap doc strictly on site creation

Creating and Editing Standard or Object Pages

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • MUST read configure-content-route.md [blocked]
  • MUST read configure-content-view.md [blocked]
  • MUST read handle-component-and-region-ids.md [blocked]

Adding UI Components to Pages

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • MUST read handle-ui-components.md [blocked] to add LWCs to LWR sites.
  • MUST read handle-component-and-region-ids.md [blocked] to handle id generation
  • MUST read configure-content-themeLayout.md [blocked] if a component has one of the following requirements:
    • needs to be "sticky" and persistent across pages
    • is used as a theme layout

Creating Page Layouts / Container Components

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • MUST read handle-ui-components.md [blocked]

Creating Theme Layouts

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • CRITICAL:Before doing anything else, MUST Check with user whether this new theme layout reuses an existing theme layout Lightning web component or requires a new one. If it requires a new one, make sure to read handle-ui-components.md [blocked] to create the new theme layout component before proceeding. DO NOT skip this step even if doing so would be faster or more efficient.
  • MUST read configure-content-themeLayout.md [blocked].
  • MUST read configure-content-view.md [blocked] if need to apply theme layout to pages

Applying/Setting Theme Layouts

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • MUST read configure-content-view.md [blocked]

Configuring Branding

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • MUST read configure-content-brandingSet.md [blocked] to configure background colors, foreground colors, button colors, and other branding colors that affect all pages.

CUD Operations on DigitalExperience Contents

  • Users can perform create, update, delete operations on DigitalExperience Contents.

Steps (Follow the steps sequentially. Do not skip any step before proceeding):

  • Determine what content types the user wants to modify
  • MUST read the reference doc related to the target content types if the doc exists. e.g., if modifying sfdc_cms__route, load configure-content-route.md [blocked].
  • MUST read handle-component-and-region-ids.md [blocked] if creating or modifying view or theme layout
  • Always Call execute_metadata_action to get the schema and examples for that content type after loading the corresponding reference docs.
    • Call once per content type per user request: If you're creating/modifying multiple items of the same content type (e.g., creating 3 routes), you only need to call execute_metadata_action ONCE for that content type. Reuse the schema and examples for all items of that type within the same user request.
    • For each unique content type you need to work with, always call execute_metadata_action using the following:
json
{  "metadataType": "ExperienceSiteLwr",  "actionName": "getSiteContentMetadata",  "parameters": {    "contentType": "<content type from table above>",    "shouldIncludeExamples": true  }}

Configuring Guest User Sharing Rules

  • MUST read configure-guest-sharing-rules.md [blocked] and follow all steps there.

Retrieving Site Preview and Builder URLs After Deployment

Use when user requests to preview a site, access a builder site, or after successfully deploying a site.

Use the execute_metadata_action MCP tool to get the preview and builder URLs:

json
{  "metadataType": "ExperienceSiteLwr",  "actionName": "getSiteUrls",  "parameters": {    "siteDevName": "<site developer name>"  }}

The site developer name can be found in the CustomSite filename (e.g., sites/MySite.site-meta.xml → developer name is MySite).

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 [blocked] 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.:

  • sf project deploy --help
  • sf project deploy validate --help

Note that metadata types are space-delimited. Never wrap them in quotes or use commas. For example, --metadata "DigitalExperienceBundle DigitalExperience" is incorrect — always use --metadata DigitalExperienceBundle DigitalExperience.

Validate:

bash
sf project deploy validate --metadata DigitalExperienceBundle DigitalExperience DigitalExperienceConfig Network CustomSite --target-org ${usernameOrAlias}

Deploy:

bash
sf project deploy start --metadata DigitalExperienceBundle DigitalExperience DigitalExperienceConfig Network CustomSite --target-org ${usernameOrAlias}

来源与署名

来源:forcedotcom/sf-skills位于skills/experience-lwr-site-generate提交e5164d9

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 forcedotcom/sf-skills 的技能

Service Itsm Teams Itservice Configure

forcedotcom

Configure the "Set Up Salesforce IT Service" checklist for Microsoft Teams Employee Service (ITSM) — the employee side, covering app enablement, marketplace install guidance, user access assignment, and Digital Experience Site selection. Use this for: 'turn on Salesforce IT Service', 'set up IT Service on Teams', 'assign Teams for Employee permission set', 'give employees access to Teams for Employee Service', 'manage user access for Teams ITSM', 'grant users the permission sets needed for Teams Employee Service', 'select a digital experience site for Teams', 'install Salesforce IT Service app on Teams', or any request to complete the IT Service half of the Teams ITSM Go page checklist (including the Manage User Access step). DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Desk/fulfiller half of the checklist (service-itsm-teams-itdesk-configure).

待分类1K昨天更新

Service Itsm Teams Coordinate

forcedotcom

End-to-end autopilot orchestrator for setting up Microsoft Teams integration in Salesforce Service Cloud ITSM — runs the whole flow (enable the Teams for Employee Service Go feature, register the Microsoft Entra app, populate Named Credentials, configure the IT Desk and IT Service checklists, turn on Swarming, and optionally embed the Agentforce agent) in one continuous pass, stopping only at the points a human must act. Use when the user asks to set up Microsoft Teams for ITSM end to end, 'set up teams for it service', 'do the whole teams itsm setup', 'configure microsoft teams for employee service', or wants a guided Teams ITSM walkthrough. Delegates each stage to a specialized child skill while driving the sequence itself. DO NOT TRIGGER when the user asks to enable Teams alone, configure just the IT Desk or IT Service checklist alone, or enable Swarming alone — delegate directly to the specific child skill in those cases.

待分类1K昨天更新

Service Itsm Teams Itdesk Configure

forcedotcom

Configure the "Set Up Salesforce IT Desk" checklist for Microsoft Teams Employee Service (ITSM) — the fulfiller/agent side, covering app enablement, marketplace install guidance, user access assignment, and Swarming collaboration-tool setup. Use this for: 'turn on Salesforce IT Desk', 'set up IT Desk on Teams', 'assign Teams for IT Desk permission set', 'set Teams as collaboration tool for swarming', 'install Salesforce IT Desk app on Teams', or any request to complete the IT Desk half of the Teams ITSM Go page checklist. DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Service/employee half of the checklist (service-itsm-teams-itservice-configure).

待分类1K昨天更新

Service Itsm Teams Debug

forcedotcom

通过针对 Salesforce 组织运行通过/失败配置检查清单,诊断 Microsoft Teams 员工服务(ITSM)配置故障。

DevOps & Cloud1K昨天更新

Service Itsm Teams Employee Agent Configure

forcedotcom

Configure the embedded Agentforce Employee Agent so it replies inside the Microsoft Teams ITSM custom client ('Salesforce Employee Assist' / 'Ask AI Agent'). Use this for: 'set up employee agent in Teams', 'embed Agentforce agent in Teams', 'make the IT Service Employee Agent reply in Teams', 'Teams Ask AI Agent not responding', 'agent joins then leaves without replying', 'configure MIAW deployment for Teams employee agent', 'Teams embedded messaging agent setup'. Builds the whole stack headlessly (zero Setup-UI clicks): the Web messaging channel with User Verification ON, the Enhanced Chat User Verification Key Set (JWKS_URL) it requires, the Teams_AgentForce custom-client deployment, the routing flow to the agent, and the Agent Access permission set that lets the portal user reach the agent. DO NOT TRIGGER for enabling the Teams feature Salesforce Go page toggle (service-itsm-teams-configure) or for configuring notification preferences.

待分类1K昨天更新

Service Itsm Swarming Configure

forcedotcom

通过 Connect API 调用启用 Salesforce Swarming ITSM 功能,并将协作工具设为 Teams。

DevOps & Cloud1K昨天更新