@salesforce/afv-skills 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -5
- package/skills/accessing-webapp-data/SKILL.md +178 -0
- package/skills/agentforce-development/SKILL.md +427 -0
- package/skills/agentforce-development/assets/README-legacy.md +89 -0
- package/skills/agentforce-development/assets/agent-spec-template.md +90 -0
- package/skills/agentforce-development/assets/agents/README.md +45 -0
- package/skills/agentforce-development/assets/agents/hello-world.agent +60 -0
- package/skills/agentforce-development/assets/agents/multi-topic.agent +105 -0
- package/skills/agentforce-development/assets/agents/production-faq.agent +101 -0
- package/skills/agentforce-development/assets/agents/production-faq.bundle-meta.xml +4 -0
- package/skills/agentforce-development/assets/agents/simple-qa.agent +72 -0
- package/skills/agentforce-development/assets/apex/models-api-queueable.cls +225 -0
- package/skills/agentforce-development/assets/bundle-meta.xml +23 -0
- package/skills/agentforce-development/assets/components/apex-action.agent +52 -0
- package/skills/agentforce-development/assets/components/error-handling.agent +58 -0
- package/skills/agentforce-development/assets/components/escalation-setup.agent +169 -0
- package/skills/agentforce-development/assets/components/flow-action.agent +66 -0
- package/skills/agentforce-development/assets/components/n-ary-conditions.agent +110 -0
- package/skills/agentforce-development/assets/components/topic-with-actions.agent +40 -0
- package/skills/agentforce-development/assets/deterministic-routing.agent +166 -0
- package/skills/agentforce-development/assets/escalation-pattern.agent +209 -0
- package/skills/agentforce-development/assets/flow-action-lookup.agent +115 -0
- package/skills/agentforce-development/assets/hub-and-spoke.agent +104 -0
- package/skills/agentforce-development/assets/invocable-apex-template.cls +187 -0
- package/skills/agentforce-development/assets/local-info-agent-annotated.agent +355 -0
- package/skills/agentforce-development/assets/metadata/basic-prompt-template.promptTemplate-meta.xml +109 -0
- package/skills/agentforce-development/assets/metadata/genai-function-apex.xml +92 -0
- package/skills/agentforce-development/assets/metadata/genai-function-flow.xml +57 -0
- package/skills/agentforce-development/assets/metadata/genai-plugin.xml +72 -0
- package/skills/agentforce-development/assets/metadata/http-callout-flow.flow-meta.xml +348 -0
- package/skills/agentforce-development/assets/metadata/record-grounded-prompt.promptTemplate-meta.xml +136 -0
- package/skills/agentforce-development/assets/minimal-starter.agent +42 -0
- package/skills/agentforce-development/assets/patterns/README.md +254 -0
- package/skills/agentforce-development/assets/patterns/action-callbacks.agent +178 -0
- package/skills/agentforce-development/assets/patterns/advanced-input-bindings.agent +141 -0
- package/skills/agentforce-development/assets/patterns/bidirectional-routing.agent +156 -0
- package/skills/agentforce-development/assets/patterns/critical-input-collection.agent +244 -0
- package/skills/agentforce-development/assets/patterns/delegation-routing.agent +89 -0
- package/skills/agentforce-development/assets/patterns/lifecycle-events.agent +127 -0
- package/skills/agentforce-development/assets/patterns/llm-controlled-actions.agent +184 -0
- package/skills/agentforce-development/assets/patterns/multi-step-workflow.agent +282 -0
- package/skills/agentforce-development/assets/patterns/open-gate-routing.agent +286 -0
- package/skills/agentforce-development/assets/patterns/procedural-instructions.agent +273 -0
- package/skills/agentforce-development/assets/patterns/prompt-template-action.agent +188 -0
- package/skills/agentforce-development/assets/patterns/system-instruction-overrides.agent +293 -0
- package/skills/agentforce-development/assets/prompt-rag-search.agent +131 -0
- package/skills/agentforce-development/assets/template-multi-topic.agent +160 -0
- package/skills/agentforce-development/assets/template-single-topic.agent +81 -0
- package/skills/agentforce-development/assets/verification-gate.agent +208 -0
- package/skills/agentforce-development/references/action-prompt-templates.md +164 -0
- package/skills/agentforce-development/references/actions-reference.md +592 -0
- package/skills/agentforce-development/references/agent-access-guide.md +72 -0
- package/skills/agentforce-development/references/agent-design-and-spec-creation.md +1010 -0
- package/skills/agentforce-development/references/agent-metadata-and-lifecycle.md +575 -0
- package/skills/agentforce-development/references/agent-script-core-language.md +1218 -0
- package/skills/agentforce-development/references/agent-topic-map-diagrams.md +323 -0
- package/skills/agentforce-development/references/agent-user-setup.md +526 -0
- package/skills/agentforce-development/references/agent-validation-and-debugging.md +803 -0
- package/skills/agentforce-development/references/known-issues.md +353 -0
- package/skills/agentforce-development/references/minimal-examples.md +67 -0
- package/skills/agentforce-development/references/production-gotchas.md +279 -0
- package/skills/agentforce-development/references/salesforce-cli-for-agents.md +393 -0
- package/skills/agentforce-development/references/version-history.md +23 -0
- package/skills/building-webapp-data-visualization/SKILL.md +72 -0
- package/skills/building-webapp-data-visualization/implementation/bar-line-chart.md +316 -0
- package/skills/building-webapp-data-visualization/implementation/dashboard-layout.md +189 -0
- package/skills/building-webapp-data-visualization/implementation/donut-chart.md +181 -0
- package/skills/building-webapp-data-visualization/implementation/stat-card.md +150 -0
- package/skills/building-webapp-react-components/SKILL.md +96 -0
- package/skills/building-webapp-react-components/implementation/component.md +78 -0
- package/skills/building-webapp-react-components/implementation/header-footer.md +132 -0
- package/skills/building-webapp-react-components/implementation/page.md +93 -0
- package/skills/configuring-webapp-csp-trusted-sites/SKILL.md +90 -0
- package/skills/configuring-webapp-csp-trusted-sites/implementation/metadata-format.md +281 -0
- package/skills/configuring-webapp-metadata/SKILL.md +158 -0
- package/skills/creating-webapp/SKILL.md +141 -0
- package/skills/deploying-webapp-to-salesforce/SKILL.md +229 -0
- package/skills/exploring-webapp-graphql-schema/SKILL.md +149 -0
- package/skills/fetching-webapp-rest-api/SKILL.md +167 -0
- package/skills/{salesforce-custom-application → generating-custom-application}/SKILL.md +2 -4
- package/skills/{salesforce-custom-field → generating-custom-field}/SKILL.md +1 -5
- package/skills/{salesforce-custom-lightning-type → generating-custom-lightning-type}/SKILL.md +36 -2
- package/skills/{salesforce-custom-object → generating-custom-object}/SKILL.md +1 -1
- package/skills/generating-custom-tab/SKILL.md +154 -0
- package/skills/generating-experience-lwr-site/SKILL.md +196 -0
- package/skills/generating-experience-lwr-site/docs/bootstrap-template-byo-lwr.md +224 -0
- package/skills/generating-experience-lwr-site/docs/configure-content-brandingSet.md +131 -0
- package/skills/generating-experience-lwr-site/docs/configure-content-route.md +232 -0
- package/skills/generating-experience-lwr-site/docs/configure-content-themeLayout.md +141 -0
- package/skills/generating-experience-lwr-site/docs/configure-content-view.md +233 -0
- package/skills/generating-experience-lwr-site/docs/configure-guest-sharing-rules.md +42 -0
- package/skills/generating-experience-lwr-site/docs/handle-component-and-region-ids.md +27 -0
- package/skills/generating-experience-lwr-site/docs/handle-ui-components.md +215 -0
- package/skills/generating-experience-react-site/SKILL.md +67 -0
- package/skills/generating-experience-react-site/docs/configure-metadata-custom-site.md +41 -0
- package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience-bundle.md +17 -0
- package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience-config.md +21 -0
- package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience.md +38 -0
- package/skills/generating-experience-react-site/docs/configure-metadata-network.md +72 -0
- package/skills/{salesforce-flexipage → generating-flexipage}/SKILL.md +86 -9
- package/skills/{salesforce-flow → generating-flow}/SKILL.md +3 -3
- package/skills/generating-fragment/SKILL.md +117 -0
- package/skills/generating-lightning-app/SKILL.md +423 -0
- package/skills/{salesforce-list-view → generating-list-view}/SKILL.md +1 -1
- package/skills/generating-permission-set/SKILL.md +174 -0
- package/skills/{salesforce-validation-rule → generating-validation-rule}/SKILL.md +1 -1
- package/skills/generating-webapp-graphql-mutation-query/SKILL.md +258 -0
- package/skills/generating-webapp-graphql-read-query/SKILL.md +253 -0
- package/skills/implementing-webapp-file-upload/SKILL.md +396 -0
- package/skills/installing-webapp-features/SKILL.md +210 -0
- package/skills/managing-webapp-agentforce-conversation-client/SKILL.md +186 -0
- package/skills/managing-webapp-agentforce-conversation-client/references/constraints.md +134 -0
- package/skills/managing-webapp-agentforce-conversation-client/references/examples.md +132 -0
- package/skills/managing-webapp-agentforce-conversation-client/references/style-tokens.md +101 -0
- package/skills/managing-webapp-agentforce-conversation-client/references/troubleshooting.md +57 -0
- package/skills/switching-org/SKILL.md +28 -0
- package/skills/using-webapp-graphql/SKILL.md +324 -0
- package/skills/using-webapp-graphql/shared-schema.graphqls +1150 -0
- package/skills/apex-class/SKILL.md +0 -253
- package/skills/apex-class/examples/AccountDeduplicationBatch.cls +0 -148
- package/skills/apex-class/examples/AccountSelector.cls +0 -193
- package/skills/apex-class/examples/AccountService.cls +0 -201
- package/skills/apex-class/templates/abstract.cls +0 -128
- package/skills/apex-class/templates/batch.cls +0 -125
- package/skills/apex-class/templates/domain.cls +0 -102
- package/skills/apex-class/templates/dto.cls +0 -108
- package/skills/apex-class/templates/exception.cls +0 -51
- package/skills/apex-class/templates/interface.cls +0 -25
- package/skills/apex-class/templates/queueable.cls +0 -92
- package/skills/apex-class/templates/schedulable.cls +0 -75
- package/skills/apex-class/templates/selector.cls +0 -92
- package/skills/apex-class/templates/service.cls +0 -69
- package/skills/apex-class/templates/utility.cls +0 -97
- package/skills/apex-test-class/SKILL.md +0 -101
- package/skills/apex-test-class/references/assertion-patterns.md +0 -209
- package/skills/apex-test-class/references/async-testing.md +0 -276
- package/skills/apex-test-class/references/mocking-patterns.md +0 -219
- package/skills/apex-test-class/references/test-data-factory.md +0 -176
- package/skills/deployment-readiness-check/SKILL.md +0 -257
- package/skills/deployment-readiness-check/assets/deployment_checklist.md +0 -286
- package/skills/deployment-readiness-check/references/rollback_procedures.md +0 -308
- package/skills/deployment-readiness-check/scripts/check_metadata.sh +0 -207
- package/skills/salesforce-custom-tab/SKILL.md +0 -78
- package/skills/salesforce-experience-site/SKILL.md +0 -178
- package/skills/salesforce-fragment/SKILL.md +0 -42
- package/skills/salesforce-lightning-app-build/SKILL.md +0 -254
- package/skills/salesforce-web-app-creating-records/SKILL.md +0 -84
- package/skills/salesforce-web-app-feature/SKILL.md +0 -70
- package/skills/salesforce-web-app-list-and-create-records/SKILL.md +0 -36
- package/skills/salesforce-web-application/SKILL.md +0 -34
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generating-experience-lwr-site
|
|
3
|
+
description: Creates, modifies, or manages Salesforce Experience Cloud LWR sites via DigitalExperience metadata. Always trigger when users mention Experience sites, LWR sites, DigitalExperience, Experience Cloud, community sites, portals, creating pages, adding routes, views, theme layouts, branding sets, previewing sites, or any DigitalExperience bundle work. Also use when users mention specific content types like sfdc_cms__route, sfdc_cms__themeLayout, etc. or when troubleshooting site deployment.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Experience LWR Site Builder
|
|
7
|
+
|
|
8
|
+
Build and configure Salesforce Experience Cloud Lightning Web Runtime (LWR) sites via metadata (DigitalExperienceConfig, DigitalExperienceBundle, Network, CustomSite, CMS contents).
|
|
9
|
+
|
|
10
|
+
## Table of Contents
|
|
11
|
+
|
|
12
|
+
- When to Use
|
|
13
|
+
- Critical Rules
|
|
14
|
+
- Core Site Properties
|
|
15
|
+
- Project Structure in DigitalExperienceBundle Format
|
|
16
|
+
- Reference Docs
|
|
17
|
+
- Common Workflows
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
When working with Experience LWR sites:
|
|
22
|
+
|
|
23
|
+
- Creating and scaffolding new LWR site
|
|
24
|
+
- Adding pages (routes + views)
|
|
25
|
+
- Configuring LWC components, layouts, themes, or branding styles
|
|
26
|
+
- Setting up guest user access (public sites)
|
|
27
|
+
- Troubleshoot deployment errors related to Experience LWR Sites
|
|
28
|
+
|
|
29
|
+
**Supported Template**: Build Your Own (LWR) - `talon-template-byo`
|
|
30
|
+
|
|
31
|
+
- More templates to support in the future.
|
|
32
|
+
|
|
33
|
+
## Critical Rules
|
|
34
|
+
|
|
35
|
+
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.
|
|
36
|
+
2. **ALWAYS** load the relevant reference docs before doing anything.
|
|
37
|
+
3. **ALWAYS** strictly follow workflows in [Common Workflows](#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.
|
|
38
|
+
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.
|
|
39
|
+
|
|
40
|
+
## Core Site Properties
|
|
41
|
+
|
|
42
|
+
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:
|
|
43
|
+
|
|
44
|
+
- **Site name**: Required. (e.g., `'My Community'`).
|
|
45
|
+
- **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.
|
|
46
|
+
- **Template type devName**: `talon-template-byo`.
|
|
47
|
+
|
|
48
|
+
## Project Structure in DigitalExperienceBundle Format
|
|
49
|
+
|
|
50
|
+
### Site Metadata
|
|
51
|
+
|
|
52
|
+
- DigitalExperienceConfig
|
|
53
|
+
- `digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml`
|
|
54
|
+
- DigitalExperienceBundle
|
|
55
|
+
- `digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xml`
|
|
56
|
+
- Network
|
|
57
|
+
- `networks/{siteName}.network-meta.xml`
|
|
58
|
+
- CustomSite
|
|
59
|
+
- `sites/{siteName}.site-meta.xml`
|
|
60
|
+
|
|
61
|
+
### DigitalExperience Contents
|
|
62
|
+
|
|
63
|
+
- `digitalExperiences/site/{siteName}1/sfdc_cms__*/{contentApiName}/*`
|
|
64
|
+
- These are the content components defining routes, views, theme layouts, etc. Each component must have a `_meta.json` and `content.json` file.
|
|
65
|
+
|
|
66
|
+
#### Content Type Descriptions
|
|
67
|
+
|
|
68
|
+
| Content Type | Description | When to Use |
|
|
69
|
+
|-|-|-|
|
|
70
|
+
| `sfdc_cms__site` | Root site configuration containing site-wide settings | Required for every site; one per site |
|
|
71
|
+
| `sfdc_cms__appPage` | Application page container that groups routes and views | Required; defines the app shell |
|
|
72
|
+
| `sfdc_cms__route` | URL routing definition mapping paths to views | Create one for each page/URL path |
|
|
73
|
+
| `sfdc_cms__view` | Page layout and component structure | Create one for each route; defines page content. Also use to edit existing views (e.g., adding/removing components on a specific page) |
|
|
74
|
+
| `sfdc_cms__brandingSet` | Brand colors, fonts, and styling tokens | Required; defines site-wide styling |
|
|
75
|
+
| `sfdc_cms__languageSettings` | Language and localization configuration | Required; defines supported languages |
|
|
76
|
+
| `sfdc_cms__mobilePublisherConfig` | Mobile app publishing settings | Required for mobile app deployment |
|
|
77
|
+
| `sfdc_cms__theme` | Theme definition referencing layouts and branding | Required; one per site |
|
|
78
|
+
| `sfdc_cms__themeLayout` | Page layout templates used by views | Create 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) |
|
|
79
|
+
|
|
80
|
+
**Important:** Creating any new pages require BOTH `sfdc_cms__route` AND `sfdc_cms__view`.
|
|
81
|
+
|
|
82
|
+
## References
|
|
83
|
+
|
|
84
|
+
Reference docs within the skill directory. Note that these are **local** and not MCP.
|
|
85
|
+
|
|
86
|
+
- [bootstrap-template-byo-lwr.md](docs/bootstrap-template-byo-lwr.md) - Site creation, template defaults
|
|
87
|
+
- [configure-content-route.md](docs/configure-content-route.md) - Route creation (custom/object pages)
|
|
88
|
+
- [configure-content-view.md](docs/configure-content-view.md) - View creation/editing (custom/object pages)
|
|
89
|
+
- [configure-content-themeLayout.md](docs/configure-content-themeLayout.md) - Theme layout creation + theme sync
|
|
90
|
+
- [configure-content-brandingSet.md](docs/configure-content-brandingSet.md) - Branding with color patterns/WCAG
|
|
91
|
+
- [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.
|
|
92
|
+
- [handle-ui-components.md](docs/handle-ui-components.md) - Component discovery, schemas, insertion, configuration
|
|
93
|
+
|
|
94
|
+
## Common Workflows
|
|
95
|
+
|
|
96
|
+
- See [References](#references) for detailed capabilities.
|
|
97
|
+
- **Always** follow the steps defined in the workflows sequentially whether the task is small, big, quick, or complex.
|
|
98
|
+
|
|
99
|
+
### Creating a New Site
|
|
100
|
+
|
|
101
|
+
**Rules**:
|
|
102
|
+
|
|
103
|
+
- **NEVER** generate the files manually.
|
|
104
|
+
|
|
105
|
+
**Steps** (Follow the steps sequentially. Do not skip any step before proceeding):
|
|
106
|
+
|
|
107
|
+
- [ ] **ALWAYS** read [bootstrap-template-byo-lwr.md](docs/bootstrap-template-byo-lwr.md) within the skill directory. Do not proceed to the next step without loading the file.
|
|
108
|
+
- [ ] Follow the bootstrap doc strictly on site creation
|
|
109
|
+
|
|
110
|
+
### Creating and Editing Standard or Object Pages
|
|
111
|
+
|
|
112
|
+
**Steps** (Follow the steps sequentially. Do not skip any step before proceeding):
|
|
113
|
+
|
|
114
|
+
- [ ] Load [configure-content-route.md](docs/configure-content-route.md)
|
|
115
|
+
- [ ] Load [configure-content-view.md](docs/configure-content-view.md)
|
|
116
|
+
- [ ] Load [handle-component-and-region-ids.md](docs/handle-component-and-region-ids.md)
|
|
117
|
+
- [ ] Follow the instructions of the above docs strictly to accomplish user's goal
|
|
118
|
+
|
|
119
|
+
### Adding UI Components to Pages
|
|
120
|
+
|
|
121
|
+
**Steps** (Follow the steps sequentially. Do not skip any step before proceeding):
|
|
122
|
+
|
|
123
|
+
- [ ] Read and follow [handle-ui-components.md](docs/handle-ui-components.md) to add LWCs to LWR sites.
|
|
124
|
+
- [ ] Load and follow [handle-component-and-region-ids.md](docs/handle-component-and-region-ids.md) to handle id generation
|
|
125
|
+
- [ ] Read and follow [configure-content-themeLayout.md](docs/configure-content-themeLayout.md) if a component has one of the following requirements:
|
|
126
|
+
- needs to be "sticky" and persistent across pages
|
|
127
|
+
- is used as a theme layout
|
|
128
|
+
|
|
129
|
+
### Creating Theme Layouts
|
|
130
|
+
|
|
131
|
+
**Steps** (Follow the steps sequentially. Do not skip any step before proceeding):
|
|
132
|
+
|
|
133
|
+
- [ ] Read and follow strictly [configure-content-themeLayout.md](docs/configure-content-themeLayout.md).
|
|
134
|
+
|
|
135
|
+
### Configuring Branding
|
|
136
|
+
|
|
137
|
+
**Steps** (Follow the steps sequentially. Do not skip any step before proceeding):
|
|
138
|
+
|
|
139
|
+
- [ ] Read and follow strictly [configure-content-brandingSet.md](docs/configure-content-brandingSet.md) to configure background colors, foreground colors, button colors, and other branding colors that affect all pages.
|
|
140
|
+
|
|
141
|
+
### CUD Operations on DigitalExperience Contents
|
|
142
|
+
|
|
143
|
+
- Users can perform create, update, delete operations on DigitalExperience Contents.
|
|
144
|
+
|
|
145
|
+
**Steps** (Follow the steps sequentially. Do not skip any step before proceeding):
|
|
146
|
+
|
|
147
|
+
- [ ] Determine what content types the user wants to modify
|
|
148
|
+
- [ ] Read and follow strictly 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](docs/configure-content-route.md).
|
|
149
|
+
- [ ] **Always** Read [handle-component-and-region-ids.md](docs/handle-component-and-region-ids.md) if creating or modifying view or theme layout
|
|
150
|
+
- [ ] **Always** Call `execute_metadata_action` to get the schema and examples for that content type **after** loading the corresponding reference docs.
|
|
151
|
+
- **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.
|
|
152
|
+
- For each unique content type you need to work with, **always** call `execute_metadata_action` using the following:
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"metadataType": "ExperienceSiteLwr",
|
|
157
|
+
"actionName": "getSiteContentMetadata",
|
|
158
|
+
"parameters": {
|
|
159
|
+
"contentType": "<content type from table above>",
|
|
160
|
+
"shouldIncludeExamples": true
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Retrieving Site URLs After Deployment
|
|
166
|
+
|
|
167
|
+
After successfully deploying the site using `sf project deploy`, use the `execute_metadata_action` MCP tool to get the preview and builder URLs:
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"metadataType": "ExperienceSiteLwr",
|
|
172
|
+
"actionName": "getSiteUrls",
|
|
173
|
+
"parameters": {
|
|
174
|
+
"siteDevName": "<site developer name>"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
The site developer name can be found in the CustomSite filename (e.g., `sites/MySite.site-meta.xml` → developer name is `MySite`).
|
|
180
|
+
|
|
181
|
+
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.
|
|
182
|
+
|
|
183
|
+
### Validation & Deployment
|
|
184
|
+
|
|
185
|
+
Use `sf` CLI to validate and deploy. Access help docs by attaching `--help`, e.g.:
|
|
186
|
+
|
|
187
|
+
- `sf project deploy --help`
|
|
188
|
+
- `sf project deploy validate --help`
|
|
189
|
+
|
|
190
|
+
Note that metadata types are space-delimited.
|
|
191
|
+
|
|
192
|
+
**Validate**:
|
|
193
|
+
`sf project deploy validate --metadata DigitalExperienceBundle DigitalExperience DigitalExperienceConfig Network CustomSite --target-org ${usernameOrAlias}`
|
|
194
|
+
|
|
195
|
+
**Deploy**:
|
|
196
|
+
`sf project deploy start --metadata DigitalExperienceBundle DigitalExperience DigitalExperienceConfig Network CustomSite --target-org ${usernameOrAlias}`
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# Build Your Own (LWR) Template
|
|
2
|
+
|
|
3
|
+
**Use when** creating a new site or retrieving default values for site metadata.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- Bootstrap Options
|
|
8
|
+
- Default Values Reference
|
|
9
|
+
|
|
10
|
+
## Bootstrap Options
|
|
11
|
+
|
|
12
|
+
**IMPORTANT**: First site setup initializes services. Warn user - recommend Option 1 for first site.
|
|
13
|
+
|
|
14
|
+
Ask user to choose:
|
|
15
|
+
|
|
16
|
+
1. Create in org, then download metadata
|
|
17
|
+
2. Scaffold locally before deploying
|
|
18
|
+
|
|
19
|
+
### Option 1: Create in Org
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
sf community create --name "{siteName}" --template-name 'Build Your Own (LWR)' --url-path-prefix "{prefix}"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
After creation, retrieve metadata using sf CLI.
|
|
26
|
+
|
|
27
|
+
### Option 2: Scaffold Locally
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
sf template generate digital-experience site --name "{siteName}" --template-name 'Build Your Own (LWR)' --url-path-prefix "{prefix}"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Generates metadata with defaults: DigitalExperienceConfig, DigitalExperiences, Network, CustomSite, and content (route, view, themeLayout, etc.).
|
|
34
|
+
|
|
35
|
+
#### Post-Creation Config
|
|
36
|
+
|
|
37
|
+
After site metadata is generated, use MCP tool `execute_metadata_action` to fetch additional information about the template:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"metadataType": "ExperienceSiteLwr",
|
|
42
|
+
"actionName": "getSiteTemplateMetadata",
|
|
43
|
+
"parameters": { "templateDevName": "talon-template-byo" }
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If result provides `disabledViews`, delete both view and route directories.
|
|
48
|
+
|
|
49
|
+
**Example**: If `disabledViews` includes "tooManyRequests":
|
|
50
|
+
|
|
51
|
+
- Delete: `digitalExperiences/site/{siteDevName}/sfdc_cms__view/tooManyRequests/`
|
|
52
|
+
- Delete: `digitalExperiences/site/{siteDevName}/sfdc_cms__route/Too_Many_Requests/`
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Default Values Reference
|
|
57
|
+
|
|
58
|
+
**Note**: CLI generates these. Listed for reference only - use CLI first.
|
|
59
|
+
|
|
60
|
+
### Metadata Defaults
|
|
61
|
+
|
|
62
|
+
**DigitalExperienceConfig**:
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
label: {siteName}
|
|
66
|
+
urlPathPrefix: {siteUrlPathPrefix}
|
|
67
|
+
space: site/{siteName}1
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**DigitalExperienceBundle**:
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
label: {siteName}1
|
|
74
|
+
modules: [sfdc_cms__collection, sfdc_cms__mobilePublisherConfig]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Network**:
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
allowInternalUserLogin: false
|
|
81
|
+
allowMembersToFlag: false
|
|
82
|
+
changePasswordTemplate: unfiled$public/CommunityChangePasswordEmailTemplate
|
|
83
|
+
disableReputationRecordConversations: true
|
|
84
|
+
emailSenderAddress: {adminEmailAddress}
|
|
85
|
+
emailSenderName: {siteName}
|
|
86
|
+
embeddedLoginEnabled: false
|
|
87
|
+
enableApexCDNCaching: true
|
|
88
|
+
enableCustomVFErrorPageOverrides: false
|
|
89
|
+
enableDirectMessages: true
|
|
90
|
+
enableExpFriendlyUrlsAsDefault: false
|
|
91
|
+
enableExperienceBundleBasedSnaOverrideEnabled: true
|
|
92
|
+
enableGuestChatter: false
|
|
93
|
+
enableGuestFileAccess: false
|
|
94
|
+
enableGuestMemberVisibility: false
|
|
95
|
+
enableImageOptimizationCDN: true
|
|
96
|
+
enableInvitation: false
|
|
97
|
+
enableKnowledgeable: false
|
|
98
|
+
enableLWRExperienceConnectedApp: true
|
|
99
|
+
enableMemberVisibility: false
|
|
100
|
+
enableNicknameDisplay: true
|
|
101
|
+
enablePrivateMessages: false
|
|
102
|
+
enableReputation: false
|
|
103
|
+
enableShowAllNetworkSettings: false
|
|
104
|
+
enableSiteAsContainer: true
|
|
105
|
+
enableTalkingAboutStats: true
|
|
106
|
+
enableTopicAssignmentRules: true
|
|
107
|
+
enableTopicSuggestions: false
|
|
108
|
+
enableUpDownVote: false
|
|
109
|
+
forgotPasswordTemplate: unfiled$public/CommunityForgotPasswordEmailTemplate
|
|
110
|
+
gatherCustomerSentimentData: false
|
|
111
|
+
headlessForgotPasswordTemplate: unfiled$public/CommunityHeadlessForgotPasswordTemplate
|
|
112
|
+
headlessRegistrationTemplate: unfiled$public/CommunityHeadlessRegistrationTemplate
|
|
113
|
+
networkMemberGroups:
|
|
114
|
+
- profile: admin
|
|
115
|
+
networkPageOverrides:
|
|
116
|
+
- changePasswordPageOverrideSetting: Standard
|
|
117
|
+
- forgotPasswordPageOverrideSetting: Designer
|
|
118
|
+
- homePageOverrideSetting: Designer
|
|
119
|
+
- loginPageOverrideSetting: Designer
|
|
120
|
+
- selfRegProfilePageOverrideSetting: Designer
|
|
121
|
+
newSenderAddress: admin@company.com
|
|
122
|
+
picassoSite: {siteName}1
|
|
123
|
+
selfRegistration: false
|
|
124
|
+
sendWelcomeEmail: true
|
|
125
|
+
site: {siteName}
|
|
126
|
+
siteArchiveStatus: NotArchived
|
|
127
|
+
status: UnderConstruction
|
|
128
|
+
tabs:
|
|
129
|
+
- defaultTab: home
|
|
130
|
+
- standardTab: Chatter
|
|
131
|
+
urlPathPrefix: {siteUrlPathPrefix}vforcesite
|
|
132
|
+
welcomeTemplate: unfiled$public/CommunityWelcomeEmailTemplate
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**CustomSite**:
|
|
136
|
+
|
|
137
|
+
```yaml
|
|
138
|
+
active: true
|
|
139
|
+
allowGuestPaymentsApi: false
|
|
140
|
+
allowHomePage: false
|
|
141
|
+
allowStandardAnswersPages: false
|
|
142
|
+
allowStandardIdeasPages: false
|
|
143
|
+
allowStandardLookups: false
|
|
144
|
+
allowStandardPortalPages: true
|
|
145
|
+
allowStandardSearch: false
|
|
146
|
+
authorizationRequiredPage: CommunitiesLogin
|
|
147
|
+
bandwidthExceededPage: BandwidthExceeded
|
|
148
|
+
browserXssProtection: true
|
|
149
|
+
cachePublicVisualforcePagesInProxyServers: true
|
|
150
|
+
clickjackProtectionLevel: SameOriginOnly
|
|
151
|
+
contentSniffingProtection: true
|
|
152
|
+
enableAuraRequests: true
|
|
153
|
+
fileNotFoundPage: FileNotFound
|
|
154
|
+
genericErrorPage: Exception
|
|
155
|
+
inMaintenancePage: InMaintenance
|
|
156
|
+
indexPage: CommunitiesLanding
|
|
157
|
+
masterLabel: {siteName}
|
|
158
|
+
redirectToCustomDomain: false
|
|
159
|
+
referrerPolicyOriginWhenCrossOrigin: true
|
|
160
|
+
selfRegPage: CommunitiesSelfReg
|
|
161
|
+
siteType: ChatterNetwork
|
|
162
|
+
urlPathPrefix: {siteUrlPathPrefix}vforcesite
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Content Defaults
|
|
166
|
+
|
|
167
|
+
apiNames and other metadata of site contents:
|
|
168
|
+
|
|
169
|
+
**sfdc_cms__appPage**:
|
|
170
|
+
|
|
171
|
+
- mainAppPage
|
|
172
|
+
|
|
173
|
+
**sfdc_cms__brandingSet**:
|
|
174
|
+
|
|
175
|
+
- Build_Your_Own_LWR
|
|
176
|
+
|
|
177
|
+
**sfdc_cms__languageSettings**:
|
|
178
|
+
|
|
179
|
+
- languages
|
|
180
|
+
|
|
181
|
+
**sfdc_cms__mobilePublisherConfig**:
|
|
182
|
+
|
|
183
|
+
- mobilePublisherConfig
|
|
184
|
+
|
|
185
|
+
**sfdc_cms__theme**:
|
|
186
|
+
|
|
187
|
+
- Build_Your_Own_LWR
|
|
188
|
+
|
|
189
|
+
**sfdc_cms__route**:
|
|
190
|
+
|
|
191
|
+
| Route | apiName | routeType | urlPrefix | urlName | viewId | configurationTags |
|
|
192
|
+
|-------|---------|-----------|-----------|---------|--------|-------------------|
|
|
193
|
+
| Home | Home | home | "" | home | home | |
|
|
194
|
+
| Login | Login | login-main | login | login | login | |
|
|
195
|
+
| Register | Register | self-register | SelfRegister | register | register | |
|
|
196
|
+
| Forgot_Password | Forgot_Password | forgot-password | ForgotPassword | forgot-password | forgotPassword | |
|
|
197
|
+
| Check_Password | Check_Password | check-password | CheckPasswordResetEmail | check-password | checkPasswordResetEmail | |
|
|
198
|
+
| Error | Error | error | error | error | error | |
|
|
199
|
+
| Service_Not_Available | Service_Not_Available | service-not-available | service-not-available | service-not-available | serviceNotAvailable | allow-in-static-site |
|
|
200
|
+
| Too_Many_Requests | Too_Many_Requests | too-many-requests | too-many-requests | too-many-requests | tooManyRequests | too-many-requests, allow-in-static-site |
|
|
201
|
+
| News_Detail__c | News_Detail__c | managed-content-sfdc_cms__news | news | news-detail | newsDetail | |
|
|
202
|
+
|
|
203
|
+
**sfdc_cms__view**:
|
|
204
|
+
|
|
205
|
+
| View | apiName | viewType | urlName | themeLayoutType |
|
|
206
|
+
|------|---------|----------|---------|-----------------|
|
|
207
|
+
| home | home | home | home | Inner |
|
|
208
|
+
| login | login | login-main | login | Inner |
|
|
209
|
+
| register | register | self-register | register | Inner |
|
|
210
|
+
| forgotPassword | forgotPassword | forgot-password | forgot-password | Inner |
|
|
211
|
+
| checkPasswordResetEmail | checkPasswordResetEmail | check-password | check-password | Inner |
|
|
212
|
+
| error | error | error | error | Inner |
|
|
213
|
+
| serviceNotAvailable | serviceNotAvailable | service-not-available | service-not-available | ServiceNotAvailable |
|
|
214
|
+
| tooManyRequests | tooManyRequests | too-many-requests | too-many-requests | ServiceNotAvailable |
|
|
215
|
+
| newsDetail | newsDetail | managed-content-sfdc_cms__news | news-detail | Inner |
|
|
216
|
+
|
|
217
|
+
**sfdc_cms__site**:
|
|
218
|
+
|
|
219
|
+
- {siteName}1
|
|
220
|
+
|
|
221
|
+
**sfdc_cms__themeLayout**:
|
|
222
|
+
|
|
223
|
+
- scopedHeaderAndFooter
|
|
224
|
+
- snaThemeLayout
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Content Type: sfdc_cms__brandingSet
|
|
2
|
+
|
|
3
|
+
**Use when** user explicitly requests creating/updating branding set.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- Core Principles
|
|
8
|
+
- Generation Guidelines
|
|
9
|
+
- Branding Property Patterns
|
|
10
|
+
|
|
11
|
+
## Core Principles
|
|
12
|
+
|
|
13
|
+
1. **Purpose**: Manage site-wide branding properties (colors, fonts, etc.).
|
|
14
|
+
2. **Site Association**: Branding sets are linked to the site configuration.
|
|
15
|
+
|
|
16
|
+
## Generation Guidelines
|
|
17
|
+
|
|
18
|
+
### 1. Directory Structure
|
|
19
|
+
|
|
20
|
+
1. **Location**: `digitalExperiences/site/[SITE_NAME]/sfdc_cms__brandingSet/[BRANDING_SET_NAME]/`
|
|
21
|
+
2. **Required Files**:
|
|
22
|
+
- `_meta.json` - Metadata file defining the API name and type
|
|
23
|
+
- `content.json` - Content file defining the configuration and layout
|
|
24
|
+
3. **Naming Convention**: Underscore-separated names (e.g., `Branding_Set`).
|
|
25
|
+
|
|
26
|
+
### 2. _meta.json Structure
|
|
27
|
+
|
|
28
|
+
The `_meta.json` file must contain:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"apiName": "[BRANDING_SET_NAME]",
|
|
33
|
+
"type": "sfdc_cms__brandingSet",
|
|
34
|
+
"path": "brandingSets"
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Rules**:
|
|
39
|
+
|
|
40
|
+
- `apiName`: Must match the directory name exactly (e.g., `Branding_Set`)
|
|
41
|
+
|
|
42
|
+
### 3. content.json Structure
|
|
43
|
+
|
|
44
|
+
The `content.json` file must contain:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"type": "sfdc_cms__brandingSet",
|
|
49
|
+
"title": "[DISPLAY_TITLE]",
|
|
50
|
+
"contentBody": {},
|
|
51
|
+
"urlName": "[URL_NAME]"
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Field Definitions**:
|
|
56
|
+
|
|
57
|
+
- `type`: **Required**. Represents the content type. The only supported value is `"sfdc_cms__brandingSet"`.
|
|
58
|
+
- `title`: **Required**. Human-readable display title (e.g., Branding Set).
|
|
59
|
+
- Maximum length is **100 characters**.
|
|
60
|
+
- Must be **unique** within the space's brandingSet content items.
|
|
61
|
+
- `contentBody`: Include all `required` properties from `schemaDefinition`. Use `examplesOfContentType` for reference.
|
|
62
|
+
- `brandingSetType`: Represents whether the color palette is for the entire site or a specific section.
|
|
63
|
+
- `APP`: The branding set applies to the entire site. There can be only one branding set of this type.
|
|
64
|
+
- `SCOPED`: A `SCOPED` branding set can be applied only to a section component for granular overrides.
|
|
65
|
+
- `definitionName`: **Required**. Represents the name for the branding set used in the site or template’s theme.
|
|
66
|
+
- **Build Your Own (LWR)**: uses `talon-template-byo:branding`
|
|
67
|
+
- **Microsite**: uses `microsite-template-marketing:branding`
|
|
68
|
+
- `values`: **Required**. Represents a map (object) of branding values (colors, fonts, etc.) that can be applied to a site.
|
|
69
|
+
- **Format**: An object containing key-value pairs that represent branding-set values.
|
|
70
|
+
- **Patterns**: See the "Branding Property Patterns" section for details on value relationships.
|
|
71
|
+
- `urlName`: Lowercase with hyphens (e.g., `branding-set`)
|
|
72
|
+
|
|
73
|
+
**Rules**:
|
|
74
|
+
|
|
75
|
+
- Before any actions, *always* call `execute_metadata_action` to get the full schema and examples per the skill document.
|
|
76
|
+
|
|
77
|
+
### 4. Naming Conventions Summary
|
|
78
|
+
|
|
79
|
+
| Field | Format | Example |
|
|
80
|
+
|-------|--------|--------|
|
|
81
|
+
| Directory/apiName | Underscore-separated | `Branding_Set` |
|
|
82
|
+
| title | Human-readable | `Branding Set` |
|
|
83
|
+
| urlName | Lowercase-hyphens | `build-your-own-lwr` |
|
|
84
|
+
|
|
85
|
+
### 5. Generation Checklist
|
|
86
|
+
|
|
87
|
+
- [ ] Directory and `_meta.json` follow naming conventions (1, 2)
|
|
88
|
+
- [ ] `content.json` has all required fields (3)
|
|
89
|
+
- [ ] `contentBody` follows the schema provided by `execute_metadata_action`
|
|
90
|
+
|
|
91
|
+
## Branding Property Patterns
|
|
92
|
+
|
|
93
|
+
When generating or validating `contentBody.values`, follow these established patterns for consistency:
|
|
94
|
+
|
|
95
|
+
### 1. Color Scaling Patterns (The "Rule of 3")
|
|
96
|
+
|
|
97
|
+
Salesforce uses a numeric suffix system (`Color`, `Color1`, `Color2`, `Color3`) to create a tonal palette.
|
|
98
|
+
|
|
99
|
+
- **Darkening Trend**: As the suffix number increases, the color becomes progressively darker.
|
|
100
|
+
- Example: `BackgroundColor` (#ffffff) → `_BackgroundColor1` (#ebebeb) → `_BackgroundColor2` (#c2c2c2) → `_BackgroundColor3` (#858585).
|
|
101
|
+
- **Contrast/Foreground Colors**: Every base color has a corresponding `ForegroundColor` to ensure accessibility.
|
|
102
|
+
- **WCAG Compliance**: Ensure a color contrast ratio of at least **4.5:1** between the background and foreground colors for standard text.
|
|
103
|
+
- Dark base colors usually have white (#ffffff) foregrounds.
|
|
104
|
+
- Light base colors (like `_NeutralColor`) usually have black (#000000) foregrounds.
|
|
105
|
+
|
|
106
|
+
### 2. Font Size Hierarchy
|
|
107
|
+
|
|
108
|
+
- **Base vs. Small**: The `Small` variant is typically **75%** of the base size.
|
|
109
|
+
- Example: `BodyFontSize` (1rem) → `BodySmallFontSize` (0.75rem).
|
|
110
|
+
- **Heading Scale**: Headings follow a standard typographic scale:
|
|
111
|
+
- `HeadingExtraLarge`: 2.5rem
|
|
112
|
+
- `HeadingLarge`: 1.75rem (~70% of XL)
|
|
113
|
+
- `HeadingMedium`: 1.25rem (~50% of XL)
|
|
114
|
+
- `HeadingSmall`: 1.125rem
|
|
115
|
+
|
|
116
|
+
### 3. Design Token Mapping
|
|
117
|
+
|
|
118
|
+
Prefer using **DXP Design Tokens** over hardcoded values where possible:
|
|
119
|
+
|
|
120
|
+
- **Fonts**: Use `var(--dxp-s-html-font-family)` for base, body, and button fonts.
|
|
121
|
+
- **Brand Alignment**: Use `var(--dxp-g-brand)` for primary brand colors and links.
|
|
122
|
+
|
|
123
|
+
### 4. Component Consistency
|
|
124
|
+
|
|
125
|
+
- **Buttons**: Maintain consistent `BorderRadius` (e.g., 4px) across all button sizes (Small, Medium, Large).
|
|
126
|
+
- **Form Elements**: `FormElementLabelFontSize` and `FormElementTextFontSize` should match.
|
|
127
|
+
|
|
128
|
+
### 5. Spacing and Ratios
|
|
129
|
+
|
|
130
|
+
- **Device Ratios**: Desktop spacing (padding/spacers) is typically **1.33x** larger than mobile spacing.
|
|
131
|
+
- Example: `ColumnSpacerSizeDesktop` (1rem) vs `ColumnSpacerSizeMobile` (0.75rem).
|