@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,232 @@
|
|
|
1
|
+
# Content Type: sfdc_cms__route
|
|
2
|
+
|
|
3
|
+
**Use when** user explicitly requests creating a new page. Not for editing existing routes.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- Generation Guidelines
|
|
8
|
+
- Core Principles
|
|
9
|
+
- Directory Structure (All Routes)
|
|
10
|
+
- _meta.json Structure
|
|
11
|
+
- Part A: CUSTOM PAGES
|
|
12
|
+
- Part B: OBJECT PAGES
|
|
13
|
+
|
|
14
|
+
## Generation Guidelines
|
|
15
|
+
|
|
16
|
+
**PAGE TYPES**: These guidelines supports two types of pages:
|
|
17
|
+
|
|
18
|
+
1. **Custom Pages** - Single route pages for custom content (e.g., About Us). **Note**: Standard pages (e.g., Home, Login) come pre-built with the site and cannot be created.
|
|
19
|
+
2. **Object Pages** - Requires 3 routes: Detail, List, and Related List (e.g., Account, custom objects)
|
|
20
|
+
|
|
21
|
+
## Core Principles
|
|
22
|
+
|
|
23
|
+
1. **Purpose**: Generate new routes under the `sfdc_cms__route` directory.
|
|
24
|
+
2. **View Association**: Each route must reference a corresponding view in the `sfdc_cms__view` directory.
|
|
25
|
+
3. **CRITICAL**: The `routeType` in the route's `content.json` MUST exactly match the `viewType` in the corresponding view's `content.json`. This is a required validation rule.
|
|
26
|
+
|
|
27
|
+
## Directory Structure (All Routes)
|
|
28
|
+
|
|
29
|
+
1. **Location**: `digitalExperiences/site/[SITE_NAME]/sfdc_cms__route/[ROUTE_NAME]/`
|
|
30
|
+
2. **Required Files**:
|
|
31
|
+
- `_meta.json` - Metadata file defining the API name and type
|
|
32
|
+
- `content.json` - Content file defining the configuration and layout
|
|
33
|
+
3. **Naming Convention**: Underscore-separated names with "__c" suffix (About_Us__c, Account_Detail__c)
|
|
34
|
+
|
|
35
|
+
## _meta.json Structure (All Routes)
|
|
36
|
+
|
|
37
|
+
The `_meta.json` file must contain:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"apiName": "[ROUTE_NAME]",
|
|
42
|
+
"type": "sfdc_cms__route",
|
|
43
|
+
"path": "routes"
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Rules**:
|
|
48
|
+
|
|
49
|
+
- `apiName`: Must match the route directory name exactly
|
|
50
|
+
- `type`: Always `"sfdc_cms__route"`
|
|
51
|
+
- `path`: Always `"routes"`
|
|
52
|
+
|
|
53
|
+
## Part A: CUSTOM PAGES
|
|
54
|
+
|
|
55
|
+
Use this section when creating single-route custom content pages.
|
|
56
|
+
|
|
57
|
+
### A.1. content.json Structure
|
|
58
|
+
|
|
59
|
+
The `content.json` file must contain:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"type": "sfdc_cms__route",
|
|
64
|
+
"title": "[DISPLAY_TITLE]",
|
|
65
|
+
"contentBody": {},
|
|
66
|
+
"urlName": "[URL_NAME]"
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Field Definitions**:
|
|
71
|
+
|
|
72
|
+
- `type`: Always `"sfdc_cms__route"`
|
|
73
|
+
- `title`: Human-readable display title (e.g., About Us)
|
|
74
|
+
- `contentBody`: Include all `required` properties from `schemaDefinition`. Use `examplesOfContentType` for reference.
|
|
75
|
+
- `urlName`: URL identifier (lowercase with hyphens, e.g., `about-us`)
|
|
76
|
+
|
|
77
|
+
### A.2. Naming Conventions
|
|
78
|
+
|
|
79
|
+
For a page named "About Us":
|
|
80
|
+
|
|
81
|
+
| Field | Format | Example |
|
|
82
|
+
|-------|--------|--------|
|
|
83
|
+
| Directory Name | Underscore-separated + "__c" | `About_Us__c` |
|
|
84
|
+
| apiName | Same as directory | `About_Us__c` |
|
|
85
|
+
| title | Human-readable | `About Us` |
|
|
86
|
+
| contentBody.activeViewId | Underscore-separated (no __c) | `About_Us` |
|
|
87
|
+
| contentBody.routeType | "custom-" + lowercase hyphens | `custom-about-us` |
|
|
88
|
+
| contentBody.urlPrefix | Lowercase hyphens | `about-us` |
|
|
89
|
+
| urlName | Lowercase hyphens | `about-us` |
|
|
90
|
+
|
|
91
|
+
**CRITICAL**: `routeType` MUST exactly match `viewType` in the corresponding view's `content.json`.
|
|
92
|
+
|
|
93
|
+
### A.3. View Dependency
|
|
94
|
+
|
|
95
|
+
- Before creating a route, ensure the corresponding view exists in `sfdc_cms__view/[view_name]/`
|
|
96
|
+
- If the view doesn't exist, create it first following the view creation guidelines
|
|
97
|
+
|
|
98
|
+
### A.4. Generation Checklist
|
|
99
|
+
|
|
100
|
+
- [ ] Route directory and files created (see Directory Structure)
|
|
101
|
+
- [ ] `_meta.json` follows structure (see _meta.json Structure)
|
|
102
|
+
- [ ] `content.json` follows structure (see A.1)
|
|
103
|
+
- [ ] All naming conventions applied (see A.2)
|
|
104
|
+
- [ ] Corresponding view exists (see A.3)
|
|
105
|
+
|
|
106
|
+
## Part B: OBJECT PAGES
|
|
107
|
+
|
|
108
|
+
Use this section when creating object pages that require Detail, List, and Related List routes.
|
|
109
|
+
|
|
110
|
+
### B.1. Overview
|
|
111
|
+
|
|
112
|
+
Object pages require **three routes** to be created together:
|
|
113
|
+
|
|
114
|
+
1. **Detail Route** - Displays a single record
|
|
115
|
+
2. **List Route** - Displays a list of records
|
|
116
|
+
3. **Related List Route** - Displays related records for a parent record
|
|
117
|
+
|
|
118
|
+
**OBJECT TYPES**: Two types of Salesforce objects use different `routeType` formats:
|
|
119
|
+
|
|
120
|
+
| Object Type | routeType Format | Example |
|
|
121
|
+
|-------------|------------------|----------|
|
|
122
|
+
| **Standard** (Account, Contact) | `[type]-[keyPrefix]` | `detail-001`, `list-001`, `relatedlist-001` |
|
|
123
|
+
| **Custom** (Test_Object__c) | `[type]-[ObjectApiName]` | `detail-Test_Object__c`, `list-Test_Object__c` |
|
|
124
|
+
|
|
125
|
+
- **keyPrefix**: 3-character identifier unique to each standard object (Account=001, Contact=003)
|
|
126
|
+
- **ObjectApiName**: Custom object API name including the "__c" suffix
|
|
127
|
+
|
|
128
|
+
Obtain object information from the `objectList` MCP output:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
[
|
|
132
|
+
["Label", "ApiName", "KeyPrefix", "IsCustom"]
|
|
133
|
+
]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### B.2. Required Routes
|
|
137
|
+
|
|
138
|
+
Create three directories under `sfdc_cms__route/`:
|
|
139
|
+
|
|
140
|
+
- `[OBJECT_NAME]_Detail__c/`
|
|
141
|
+
- `[OBJECT_NAME]_List__c/`
|
|
142
|
+
- `[OBJECT_NAME]_Related_List__c/`
|
|
143
|
+
|
|
144
|
+
### B.3. content.json Structure
|
|
145
|
+
|
|
146
|
+
Each route's `content.json` file must contain:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"type": "sfdc_cms__route",
|
|
151
|
+
"title": "[OBJECT_NAME] [TYPE]",
|
|
152
|
+
"contentBody": {},
|
|
153
|
+
"urlName": "[object_name_lowercase]-[type]"
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Field Definitions**:
|
|
158
|
+
|
|
159
|
+
- `type`: Always `"sfdc_cms__route"`
|
|
160
|
+
- `title`: Human-readable title (Account Detail, Account List)
|
|
161
|
+
- `contentBody`: Include all `required` properties from `schemaDefinition`. Use `examplesOfContentType` for reference.
|
|
162
|
+
- `contentBody.urlPrefix`: **CRITICAL**: Must be identical across all three object page views (Detail, List, and Related List) for the same object.
|
|
163
|
+
- `urlName`: Lowercase with hyphens (account-detail, account-list)
|
|
164
|
+
|
|
165
|
+
### B.4. Object Page Examples
|
|
166
|
+
|
|
167
|
+
Use `[ObjectName]` as the object name (Account, Test_Object) and `[IDENTIFIER]` as:
|
|
168
|
+
|
|
169
|
+
- **Standard objects**: keyPrefix (001 for Account, 003 for Contact)
|
|
170
|
+
- **Custom objects**: ObjectApiName (Test_Object__c)
|
|
171
|
+
|
|
172
|
+
#### content.json Template
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"type": "sfdc_cms__route",
|
|
177
|
+
"title": "[ObjectName] [Detail|List|Related List]",
|
|
178
|
+
"contentBody": {
|
|
179
|
+
"activeViewId": "[ObjectName]_[Detail|List|Related_List]",
|
|
180
|
+
"configurationTags": [],
|
|
181
|
+
"pageAccess": "UseParent",
|
|
182
|
+
"routeType": "[detail|list|relatedlist]-[IDENTIFIER]",
|
|
183
|
+
"urlPrefix": "[object-name-lowercase]"
|
|
184
|
+
},
|
|
185
|
+
"urlName": "[object-name-lowercase]-[detail|list|related-list]"
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Rules**:
|
|
190
|
+
|
|
191
|
+
- Before any actions, *always* call `execute_metadata_action` to get the full schema and examples per the skill document.
|
|
192
|
+
|
|
193
|
+
#### routeType Examples
|
|
194
|
+
|
|
195
|
+
| Route Type | Standard (Account) | Custom (Test_Object__c) |
|
|
196
|
+
|------------|-------------------|------------------------|
|
|
197
|
+
| Detail | `detail-001` | `detail-Test_Object__c` |
|
|
198
|
+
| List | `list-001` | `list-Test_Object__c` |
|
|
199
|
+
| Related List | `relatedlist-001` | `relatedlist-Test_Object__c` |
|
|
200
|
+
|
|
201
|
+
### B.5. Naming Conventions
|
|
202
|
+
|
|
203
|
+
For an object named "Account":
|
|
204
|
+
|
|
205
|
+
| Field | Detail | List | Related List |
|
|
206
|
+
|-------|--------|------|---------------|
|
|
207
|
+
| Directory Name | `Account_Detail__c` | `Account_List__c` | `Account_Related_List__c` |
|
|
208
|
+
| apiName | `Account_Detail__c` | `Account_List__c` | `Account_Related_List__c` |
|
|
209
|
+
| title | `Account Detail` | `Account List` | `Account Related List` |
|
|
210
|
+
| activeViewId | `Account_Detail` | `Account_List` | `Account_Related_List` |
|
|
211
|
+
| routeType (Standard) | `detail-[keyPrefix]` | `list-[keyPrefix]` | `relatedlist-[keyPrefix]` |
|
|
212
|
+
| routeType (Custom) | `detail-[ObjectApiName]` | `list-[ObjectApiName]` | `relatedlist-[ObjectApiName]` |
|
|
213
|
+
| urlPrefix | `account` | `account` | `account` |
|
|
214
|
+
| urlName | `account-detail` | `account-list` | `account-related-list` |
|
|
215
|
+
|
|
216
|
+
**CRITICAL**: `routeType` MUST exactly match `viewType` in the corresponding view's `content.json`.
|
|
217
|
+
|
|
218
|
+
### B.6. View Dependency
|
|
219
|
+
|
|
220
|
+
- Before creating routes, ensure corresponding views exist in `sfdc_cms__view/`:
|
|
221
|
+
- `[ObjectName]_Detail/`, `[ObjectName]_List/`, `[ObjectName]_Related_List/`
|
|
222
|
+
- `activeViewId` must match the view directory name exactly
|
|
223
|
+
- `routeType` must exactly match `viewType` in the corresponding view
|
|
224
|
+
- If views don't exist, create them first following the view creation guidelines
|
|
225
|
+
|
|
226
|
+
### B.7. Generation Checklist
|
|
227
|
+
|
|
228
|
+
- [ ] Object type determined (Standard or Custom) and identifier obtained (keyPrefix or ObjectApiName)
|
|
229
|
+
- [ ] All three routes created: **Detail**, **List**, and **Related List**, each with `_meta.json` and `content.json`
|
|
230
|
+
- [ ] All naming conventions applied (see B.5)
|
|
231
|
+
- [ ] Corresponding views exist (see B.6)
|
|
232
|
+
- [ ] `routeType` matches `viewType` for all three routes
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Content Type: sfdc_cms__themeLayout
|
|
2
|
+
|
|
3
|
+
**Use when** user explicitly requests creating a new layout.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- Directory Structure
|
|
8
|
+
- Purpose A: Generate new theme layouts under the `sfdc_cms__themeLayout` directory.
|
|
9
|
+
|
|
10
|
+
- _meta.json Structure
|
|
11
|
+
- content.json Structure
|
|
12
|
+
- Naming Conventions
|
|
13
|
+
- Theme Sync After Creation
|
|
14
|
+
- Generation Checklist
|
|
15
|
+
- Purpose B: Editing existing theme layouts under the `sfdc_cms__themeLayout` directory.
|
|
16
|
+
|
|
17
|
+
## Directory Structure
|
|
18
|
+
|
|
19
|
+
1. **Location**: `digitalExperiences/site/[SITE_NAME]/sfdc_cms__themeLayout/[THEME_LAYOUT_NAME]/`
|
|
20
|
+
2. **Required Files**:
|
|
21
|
+
|
|
22
|
+
- `_meta.json` - Metadata file defining the API name and type
|
|
23
|
+
- `content.json` - Content file defining the configuration and layout
|
|
24
|
+
|
|
25
|
+
## Purpose A: Generate New Theme Layouts
|
|
26
|
+
|
|
27
|
+
**IMPORTANT**: These guidelines should ONLY be applied when the user explicitly requests creating a new layout for their site. Do not apply these guidelines automatically for other tasks or when editing existing layouts.
|
|
28
|
+
|
|
29
|
+
### _meta.json Structure
|
|
30
|
+
|
|
31
|
+
The `_meta.json` file must contain:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"apiName": "[THEME_LAYOUT_NAME]",
|
|
36
|
+
"type": "sfdc_cms__themeLayout",
|
|
37
|
+
"path": "themeLayouts"
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Rules**:
|
|
42
|
+
|
|
43
|
+
- `apiName`: Must match the themeLayout directory name exactly
|
|
44
|
+
- `type`: Always `"sfdc_cms__themeLayout"`
|
|
45
|
+
- `path`: Always `"themeLayouts"`
|
|
46
|
+
|
|
47
|
+
### content.json Structure
|
|
48
|
+
|
|
49
|
+
The `content.json` file must contain:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"type": "sfdc_cms__themeLayout",
|
|
54
|
+
"title": "[DISPLAY_TITLE]",
|
|
55
|
+
"contentBody": {
|
|
56
|
+
"component": {
|
|
57
|
+
"attributes": { },
|
|
58
|
+
"children": [ "[regions in the layout]" ],
|
|
59
|
+
"definition": "[FQN of root layout component]",
|
|
60
|
+
"id": "[root component id]",
|
|
61
|
+
"type": "component"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"urlName": "[url name]"
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Field Definitions**:
|
|
69
|
+
|
|
70
|
+
- `type`: Always `"sfdc_cms__themeLayout"`
|
|
71
|
+
- `title`: Human-readable display title, words separated by spaces (e.g. "Scoped Header and Footer")
|
|
72
|
+
- `contentBody`: Include all `required` properties from `schemaDefinition`. Use `examplesOfContentType` for reference.
|
|
73
|
+
- Do not add additional fields.
|
|
74
|
+
- `urlName`: URL identifier (lowercase, words separated by dashes e.g., "scoped-header-and-footer")
|
|
75
|
+
|
|
76
|
+
**Rules**:
|
|
77
|
+
|
|
78
|
+
- Before any actions, *always* call `execute_metadata_action` to get the full schema and examples per the skill document.
|
|
79
|
+
|
|
80
|
+
### Naming Conventions
|
|
81
|
+
|
|
82
|
+
1. **Directory Name**: Should be in camelCase
|
|
83
|
+
2. **apiName**: Must exactly match the directory name
|
|
84
|
+
3. **title**: Human-readable title with spaces (e.g., "Service Not Available Theme Layout")
|
|
85
|
+
4. **urlName**: Lowercase with hyphens for URL-friendly format (e.g., "new-layout")
|
|
86
|
+
|
|
87
|
+
### Theme Sync After Creation
|
|
88
|
+
|
|
89
|
+
After creating a new `sfdc_cms__themeLayout`, you MUST update:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
digitalExperiences/site/[SITE_NAME]/sfdc_cms__theme/[THEME_API_NAME]/content.json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Lookup**: To find the theme content.json for the current site:
|
|
96
|
+
|
|
97
|
+
1. Navigate up from the current theme layout directory to the site directory.
|
|
98
|
+
2. Look in sfdc_cms__theme/ (sibling directory to sfdc_cms__themeLayout/).
|
|
99
|
+
3. Find the theme directory (typically one per site).
|
|
100
|
+
4. Read the file: content.json.
|
|
101
|
+
|
|
102
|
+
**Action (append-only)**:
|
|
103
|
+
|
|
104
|
+
- ALWAYS append a new entry to `contentBody.layouts`.
|
|
105
|
+
- Do NOT replace or remove existing `layouts` entries.
|
|
106
|
+
- `layoutId` MUST exactly match the new theme layout `apiName`.
|
|
107
|
+
- `layoutType` MUST be chosen based on intended view usage.
|
|
108
|
+
- **Default**: Generate a random 30-character alphanumeric string (e.g., `xEGgPxY5j5TForZe3J7SBguOfQicEy`) for the `layoutType`. Ensure this string is unique and does not match any existing `layoutType` in the list.
|
|
109
|
+
|
|
110
|
+
**Example**:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"contentBody": {
|
|
115
|
+
"layouts": [
|
|
116
|
+
{ "layoutId": "existingLayoutA", "layoutType": "Inner" },
|
|
117
|
+
{ "layoutId": "existingLayoutB", "layoutType": "ServiceNotAvailable" },
|
|
118
|
+
{ "layoutId": "[NEW_THEME_LAYOUT_API_NAME]", "layoutType": "[30_CHAR_RANDOM_STRING]" }
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Generation Checklist
|
|
125
|
+
|
|
126
|
+
When generating a new theme layout, ensure:
|
|
127
|
+
|
|
128
|
+
- [ ] `_meta.json` created with correct `apiName`, `type`, and `path` (III)
|
|
129
|
+
- [ ] `content.json` created with all required fields (IV)
|
|
130
|
+
- [ ] `urlName` uses lowercase with hyphens (V)
|
|
131
|
+
- [ ] `title` is human-readable (V)
|
|
132
|
+
- [ ] `sfdc_cms__theme/[THEME_API_NAME]/content.json` updated by appending a new `contentBody.layouts` mapping (VI)
|
|
133
|
+
- [ ] **CRITICAL**: Complete all the UUID generation steps. See `docs/handle-component-and-region-ids.md`
|
|
134
|
+
|
|
135
|
+
## Purpose B: Editing Existing Theme Layouts
|
|
136
|
+
|
|
137
|
+
### Component Modifications
|
|
138
|
+
|
|
139
|
+
When adding, removing, or configuring components in existing theme layouts, **always** refer to [handle-ui-components.md](docs/handle-ui-components.md) for placement hierarchy, component structure, column layout, and property configuration.
|
|
140
|
+
|
|
141
|
+
**Note**: Theme layouts often define the overall structure (header/footer) surrounding the main content region. Ensure components are added to the correct region (e.g., `header`, `footer`).
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Content Type: sfdc_cms__view
|
|
2
|
+
|
|
3
|
+
**Use when** user explicitly requests creating a new page or editing an existing page.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- Purpose A: Generate New Views
|
|
8
|
+
- Purpose B: Editing Existing Views
|
|
9
|
+
|
|
10
|
+
## Purpose A: Generate New Views
|
|
11
|
+
|
|
12
|
+
### Generation Guidelines
|
|
13
|
+
|
|
14
|
+
**PAGE TYPES**: These guidelines supports two types of pages:
|
|
15
|
+
|
|
16
|
+
1. **Custom Pages** - Single view pages for custom content (e.g., About Us). **Note**: Standard pages (e.g., Home, Login) come pre-built with the site and cannot be created.
|
|
17
|
+
2. **Object Pages** - Requires 3 views: Detail, List, and Related List (e.g., Account, custom objects)
|
|
18
|
+
|
|
19
|
+
### Core Principles
|
|
20
|
+
|
|
21
|
+
1. **Route Association**: Views are referenced by routes via the `activeViewId` field.
|
|
22
|
+
2. **CRITICAL**: The `viewType` MUST exactly match the `routeType` in the corresponding route.
|
|
23
|
+
|
|
24
|
+
### Directory Structure (All Views)
|
|
25
|
+
|
|
26
|
+
1. **Location**: Views must be created under: `digitalExperiences/site/[SITE_NAME]/sfdc_cms__view/[VIEW_NAME]/`
|
|
27
|
+
2. **Required Files**:
|
|
28
|
+
- `_meta.json` - Metadata file defining the API name and type
|
|
29
|
+
- `content.json` - Content file defining the configuration and layout
|
|
30
|
+
3. **Naming Convention**: Underscore-separated names, no "__c" suffix (About_Us, Account_Detail)
|
|
31
|
+
|
|
32
|
+
### _meta.json Structure (All Views)
|
|
33
|
+
|
|
34
|
+
The `_meta.json` file must contain:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"apiName": "[VIEW_NAME]",
|
|
39
|
+
"type": "sfdc_cms__view",
|
|
40
|
+
"path": "views"
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Rules**:
|
|
45
|
+
|
|
46
|
+
- `apiName`: Must match directory name exactly. **No "__c" suffix**.
|
|
47
|
+
- `type`: Always `"sfdc_cms__view"`
|
|
48
|
+
- `path`: Always `"views"`
|
|
49
|
+
|
|
50
|
+
### Theme Layout Type (All Views)
|
|
51
|
+
|
|
52
|
+
The `contentBody.themeLayoutType` field specifies which theme layout to use for the view.
|
|
53
|
+
|
|
54
|
+
- **Default**: `"Inner"` - Use this default if the user does not specify a layout OR if the lookup fails to find a matching layoutType
|
|
55
|
+
- **Lookup**: To find valid values:
|
|
56
|
+
1. Navigate up from the current view directory to the site directory
|
|
57
|
+
2. Look in `sfdc_cms__theme/` (sibling directory to `sfdc_cms__view/`)
|
|
58
|
+
3. Find the theme directory (typically one per site)
|
|
59
|
+
4. Check `content.json` → `contentBody.layouts[]` for the layouts array
|
|
60
|
+
|
|
61
|
+
- **Layout Name/ID Resolution**: If the user provides only a layout name or ID (e.g., "scopedHeaderAndFooter"), you must look up the corresponding `layoutType`:
|
|
62
|
+
1. Find the theme's `content.json` as described above
|
|
63
|
+
2. Locate the `contentBody.layouts` array containing `layoutId`/`layoutType` pairs
|
|
64
|
+
3. Match the user-provided name/ID against `layoutId` values
|
|
65
|
+
4. Use the corresponding `layoutType` value for `contentBody.themeLayoutType`
|
|
66
|
+
5. **Use ONLY the `layoutType` value** for `contentBody.themeLayoutType` - do NOT use the layoutId or user's provided name
|
|
67
|
+
6. **If no match is found, use the default `"Inner"`**
|
|
68
|
+
|
|
69
|
+
### PART A: CUSTOM PAGES
|
|
70
|
+
|
|
71
|
+
Use this section when creating single-view custom content pages.
|
|
72
|
+
|
|
73
|
+
#### A.1. content.json Structure
|
|
74
|
+
|
|
75
|
+
The `content.json` file must contain:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"type": "sfdc_cms__view",
|
|
80
|
+
"title": "[DISPLAY_TITLE]",
|
|
81
|
+
"contentBody": {},
|
|
82
|
+
"urlName": "[URL_NAME]"
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Field Definitions**:
|
|
87
|
+
|
|
88
|
+
- `type`: Always `"sfdc_cms__view"`
|
|
89
|
+
- `title`: Human-readable display title (e.g., About Us)
|
|
90
|
+
- `contentBody`: Include all `required` properties from `schemaDefinition`. Use `examplesOfContentType` for reference.
|
|
91
|
+
- `urlName`: Lowercase with hyphens (e.g., `about-us`)
|
|
92
|
+
|
|
93
|
+
#### A.2. Component Structure
|
|
94
|
+
|
|
95
|
+
**MUST** use `community_layout:sldsFlexibleLayout` as the root with exactly 2 regions (`content` and `sfdcHiddenRegion`), even if no components exist:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
community_layout:sldsFlexibleLayout (root)
|
|
99
|
+
├── content (region) — main page content
|
|
100
|
+
└── sfdcHiddenRegion (region) — hidden region for SEO and metadata
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**CRITICAL REQUIREMENTS**:
|
|
104
|
+
|
|
105
|
+
- **Region names are fixed**: The region `name` field MUST be exactly `content` or `sfdcHiddenRegion`. Do NOT invent custom region names.
|
|
106
|
+
- **sfdcHiddenRegion MUST contain seoAssistant**: The `sfdcHiddenRegion` region MUST ALWAYS include a `community_builder:seoAssistant` component in its `children` array.
|
|
107
|
+
- **Components live in children**: All components are placed inside the `children` array of a region. Use an empty `children: []` array for `content` if no components exist.
|
|
108
|
+
|
|
109
|
+
Each region requires: `id` (unique UUID), `name`, `title`, `type: "region"`, `children`. Do not add any other fields.
|
|
110
|
+
|
|
111
|
+
#### A.3. Naming Conventions Summary
|
|
112
|
+
|
|
113
|
+
| Field | Format | Example |
|
|
114
|
+
|-|-|-|
|
|
115
|
+
| Directory/apiName | Underscore-separated, no "__c" | `About_Us` |
|
|
116
|
+
| title | Human-readable | `About Us` |
|
|
117
|
+
| viewType | `custom-` + lowercase-hyphens | `custom-about-us` |
|
|
118
|
+
| urlName | Lowercase-hyphens | `about-us` |
|
|
119
|
+
|
|
120
|
+
#### A.4. Route Dependency
|
|
121
|
+
|
|
122
|
+
The route's `activeViewId` must match the view's directory name exactly.
|
|
123
|
+
|
|
124
|
+
#### A.5. Generation Checklist
|
|
125
|
+
|
|
126
|
+
- [ ] Directory and `_meta.json` follow structure (see Directory Structure, _meta.json Structure)
|
|
127
|
+
- [ ] `content.json` has all required fields (A.1)
|
|
128
|
+
- [ ] Component structure correct with both regions (A.1)
|
|
129
|
+
- [ ] **CRITICAL**: Complete all the UUID generation steps. see `docs/handle-component-and-region-ids.md`
|
|
130
|
+
- [ ] `viewType` matches route's `routeType` (CRITICAL)
|
|
131
|
+
|
|
132
|
+
### PART B: OBJECT PAGES
|
|
133
|
+
|
|
134
|
+
Use this section when creating object pages that require Detail, List, and Related List views.
|
|
135
|
+
|
|
136
|
+
#### B.1. Overview
|
|
137
|
+
|
|
138
|
+
Object pages require **three views**: Detail, List, and Related List. All share the same object name.
|
|
139
|
+
|
|
140
|
+
**Object Types & viewType Format**:
|
|
141
|
+
|
|
142
|
+
| Object Type | Identifier | viewType Example |
|
|
143
|
+
|-|-|-|
|
|
144
|
+
| Standard (Account, Contact) | `keyPrefix` (3-char) | `detail-001`, `list-001`, `relatedlist-001` |
|
|
145
|
+
| Custom (Test_Object__c) | API name with `__c` | `detail-Test_Object__c`, `list-Test_Object__c` |
|
|
146
|
+
|
|
147
|
+
Obtain object information from the `objectList` MCP output from `sfdc_cms__route`:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
[
|
|
151
|
+
["Label", "ApiName", "KeyPrefix", "IsCustom"]
|
|
152
|
+
]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### B.2. Required Views
|
|
156
|
+
|
|
157
|
+
Create three directories under `sfdc_cms__view/`:
|
|
158
|
+
|
|
159
|
+
- `[OBJECT_NAME]_Detail/`
|
|
160
|
+
- `[OBJECT_NAME]_List/`
|
|
161
|
+
- `[OBJECT_NAME]_Related_List/`
|
|
162
|
+
|
|
163
|
+
#### B.3. content.json Structure
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"type": "sfdc_cms__view",
|
|
168
|
+
"title": "[OBJECT_NAME] [TYPE]",
|
|
169
|
+
"contentBody": {
|
|
170
|
+
"component": {},
|
|
171
|
+
"dataProviders": [],
|
|
172
|
+
"themeLayoutType": "[THEME_LAYOUT_TYPE]",
|
|
173
|
+
"viewType": "[PREFIX]-[IDENTIFIER]"
|
|
174
|
+
},
|
|
175
|
+
"urlName": "[OBJECT_NAME_LOWERCASE]-[TYPE]"
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Field Definitions**:
|
|
180
|
+
|
|
181
|
+
- `type`: Always `"sfdc_cms__view"`
|
|
182
|
+
- `title`: Human-readable (e.g., "Account Detail")
|
|
183
|
+
- `contentBody`: Include all `required` properties from `schemaDefinition`. Use `examplesOfContentType` for reference.
|
|
184
|
+
- `contentBody.viewType`: **CRITICAL**: Must exactly match route's `routeType`
|
|
185
|
+
- `urlName`: Lowercase with hyphens (e.g., `account-detail`)
|
|
186
|
+
|
|
187
|
+
**Rules**:
|
|
188
|
+
|
|
189
|
+
- Before any actions, *always* call `execute_metadata_action` to get the full schema and examples per the skill document.
|
|
190
|
+
|
|
191
|
+
#### B.4. Component Structure
|
|
192
|
+
|
|
193
|
+
Uses same structure as Part A.1 (Component Structure) with these SEO assistant differences:
|
|
194
|
+
|
|
195
|
+
- **Detail View**: `pageTitle: "{!Record._Object}: {!Record._Title}"`
|
|
196
|
+
- **List/Related List Views**: `recordId: "{!recordId}"` (no pageTitle)
|
|
197
|
+
|
|
198
|
+
Default template includes one section with one empty column. `seedComponents` must be `[]` (not `null`).
|
|
199
|
+
|
|
200
|
+
#### B.5. Naming Conventions Summary
|
|
201
|
+
|
|
202
|
+
| Field | Detail | List | Related List |
|
|
203
|
+
|-|-|-|-|
|
|
204
|
+
| Directory/apiName | `[Object]_Detail` | `[Object]_List` | `[Object]_Related_List` |
|
|
205
|
+
| title | `[Object] Detail` | `[Object] List` | `[Object] Related List` |
|
|
206
|
+
| viewType (Standard) | `detail-[keyPrefix]` | `list-[keyPrefix]` | `relatedlist-[keyPrefix]` |
|
|
207
|
+
| viewType (Custom) | `detail-[ApiName__c]` | `list-[ApiName__c]` | `relatedlist-[ApiName__c]` |
|
|
208
|
+
| urlName | `[object]-detail` | `[object]-list` | `[object]-related-list` |
|
|
209
|
+
|
|
210
|
+
#### B.6. Route Dependency
|
|
211
|
+
|
|
212
|
+
The route's `activeViewId` must match the view's directory name exactly. The `viewType` must exactly match the route's `routeType`.
|
|
213
|
+
|
|
214
|
+
#### B.7. Generation Checklist
|
|
215
|
+
|
|
216
|
+
- [ ] Object type determined; identifier obtained (`keyPrefix` or API name with `__c`)
|
|
217
|
+
- [ ] All three views created: **Detail**, **List**, and **Related List**, each with `_meta.json` and `content.json`
|
|
218
|
+
- [ ] `viewType` matches route's `routeType` for all three views (CRITICAL)
|
|
219
|
+
- [ ] Component structure correct with both regions (see A.1)
|
|
220
|
+
- [ ] SEO assistant configured correctly per view type (B.4)
|
|
221
|
+
- [ ] **CRITICAL**: Complete both UUID generation steps. see `docs/handle-component-and-region-ids.md`
|
|
222
|
+
|
|
223
|
+
## Purpose B: Editing Existing Views
|
|
224
|
+
|
|
225
|
+
Use this section when modifying existing views under the `sfdc_cms__view` directory.
|
|
226
|
+
|
|
227
|
+
### Component Modifications
|
|
228
|
+
|
|
229
|
+
When adding, removing, or configuring components in existing views, **always** refer to [handle-ui-components.md](docs/handle-ui-components.md) for placement hierarchy, component structure, column layout, and property configuration.
|
|
230
|
+
|
|
231
|
+
### Theme Layout Type
|
|
232
|
+
|
|
233
|
+
To change a view's theme layout, update `contentBody.themeLayoutType` in the view's `content.json`. See **Theme Layout Type (All Views)** for default and lookup details
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Guest User Sharing Rules (Public Sites Only)
|
|
2
|
+
|
|
3
|
+
**Use when** the user explicitly wants to make the site **public** (accessible to unauthenticated visitors). If the site is private/login-required, guest sharing rules are not needed.
|
|
4
|
+
If sharingRules metadata is not available locally in force-app/main/default/sharingRules, retrieve it from the org before creating new rules.
|
|
5
|
+
|
|
6
|
+
## Retrieve Full SharingRules Schema
|
|
7
|
+
|
|
8
|
+
Use the metadata MCP tool with metadataType "SharingRules" to retrieve schema.
|
|
9
|
+
|
|
10
|
+
## XML Example
|
|
11
|
+
|
|
12
|
+
```xml
|
|
13
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
14
|
+
<SharingRules xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
15
|
+
<sharingGuestRules>
|
|
16
|
+
<fullName>ShareAccountsWithSiteGuest</fullName>
|
|
17
|
+
<accessLevel>Read</accessLevel>
|
|
18
|
+
<includeHVUOwnedRecords>false</includeHVUOwnedRecords>
|
|
19
|
+
<label>Share Accounts With Site Guest</label>
|
|
20
|
+
<sharedTo>
|
|
21
|
+
<guestUser>[site Guest User's CommunityNickanme]</guestUser>
|
|
22
|
+
</sharedTo>
|
|
23
|
+
<criteriaItems>
|
|
24
|
+
<field>Name</field>
|
|
25
|
+
<operation>notEqual</operation>
|
|
26
|
+
<value>null</value>
|
|
27
|
+
</criteriaItems>
|
|
28
|
+
</sharingGuestRules>
|
|
29
|
+
</SharingRules>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Critical Requirements
|
|
33
|
+
|
|
34
|
+
1. **SharedTo Element**: Must use `<guestUser>{site Guest User's CommunityNickanme}</guestUser>` (not URL path prefix).
|
|
35
|
+
2. **includeHVUOwnedRecords**: Required field. Set to `false` unless records owned by high-volume site users should be included.
|
|
36
|
+
3. **One XML file per object**: Put all rules for a given object in one file. Do not create additional.
|
|
37
|
+
|
|
38
|
+
## Common Mistakes
|
|
39
|
+
|
|
40
|
+
- Using `<role>` or `<group>` instead of `<guestUser>` in sharedTo
|
|
41
|
+
- Omitting the required `includeHVUOwnedRecords` field
|
|
42
|
+
- Using `includeRecordsOwnedByAll` (that's for `sharingCriteriaRules`, not guest rules)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# UUID Generation
|
|
2
|
+
|
|
3
|
+
**Use when** handling IDs for components and regions of views. All component and region IDs in Experience Site content must be unique UUIDs.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
1. **Format**: Lowercase UUID v4 (e.g., `5d56a22f-c1e8-40d3-92ec-6e10e71e36de`)
|
|
8
|
+
2. **Uniqueness**: Must be unique across ALL `content.json` files in site (under `digitalExperiences/site/<SITE_NAME>/`)
|
|
9
|
+
|
|
10
|
+
## For New content.json Files Only
|
|
11
|
+
|
|
12
|
+
**Multistep Process (REQUIRED)**:
|
|
13
|
+
|
|
14
|
+
- **CRITICAL**: Each step must be performed separately - do NOT combine steps into a single automated command or script
|
|
15
|
+
- **Step 1**: Create files with descriptive placeholders for UUIDs (e.g., `UUID_CONTENT_REGION`, `UUID_HIDDEN_REGION`, `UUID_SEO_COMPONENT`)
|
|
16
|
+
- **Step 2**: Count the total number of UUID placeholder occurrences in the generated file, then generate exactly that many UUIDs using:
|
|
17
|
+
- `node -e "console.log(Array.from({length: N}, () => require('crypto').randomUUID()).join('\n'))"` where N is the total count of placeholder occurrences. Present this command to the user for execution.
|
|
18
|
+
- **Step 3**: Replace each placeholder occurrence sequentially with the generated UUIDs from the list, ensuring each occurrence gets a unique UUID from the list. Perform replacements one at a time or in small batches - do NOT automate this with scripts.
|
|
19
|
+
- **Step 4**: Validate that all placeholders have been replaced - read the file and search for any remaining placeholder patterns (e.g., `UUID_`). The file is NOT valid until all placeholders are replaced with actual UUIDs.
|
|
20
|
+
- **CRITICAL**: Every single placeholder occurrence must be replaced with a DIFFERENT UUID from the generated list, even if the placeholder name is repeated. For example, if you have 5 total placeholder occurrences, generate 5 UUIDs and replace each occurrence with the next UUID from the list.
|
|
21
|
+
- **NEVER** write UUIDs inline during file creation - always use the multistep placeholder approach
|
|
22
|
+
|
|
23
|
+
## For Editing Existing content.json Files
|
|
24
|
+
|
|
25
|
+
- **CRITICAL**: Read file first and preserve all existing UUIDs exactly as-is
|
|
26
|
+
- NEVER replace existing UUIDs with placeholders
|
|
27
|
+
- For newly added components/regions only, follow the multistep placeholder process from step 3
|