@salesforce/afv-skills 1.5.3 → 1.6.1
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 +1 -1
- package/skills/generating-experience-lwr-site/SKILL.md +10 -5
- package/skills/generating-experience-lwr-site/docs/bootstrap-template-byo-lwr.md +57 -2
- package/skills/generating-experience-lwr-site/docs/configure-content-themeLayout.md +8 -5
- package/skills/generating-permission-set/SKILL.md +15 -0
package/package.json
CHANGED
|
@@ -145,8 +145,7 @@ Before doing anything, you **MUST ALWAYS** load them first if they match user in
|
|
|
145
145
|
|
|
146
146
|
**Steps** (Follow the steps sequentially. Do not skip any step before proceeding):
|
|
147
147
|
|
|
148
|
-
- [ ] Check with user whether this new theme layout reuses an existing theme layout component or requires a new one.
|
|
149
|
-
- [ ] MUST read [handle-ui-components.md](docs/handle-ui-components.md) if creating a new theme layout component.
|
|
148
|
+
- [ ] **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](docs/handle-ui-components.md) to create the new theme layout component before proceeding. DO NOT skip this step even if doing so would be faster or more efficient.
|
|
150
149
|
- [ ] MUST read [configure-content-themeLayout.md](docs/configure-content-themeLayout.md).
|
|
151
150
|
- [ ] MUST read [configure-content-view.md](docs/configure-content-view.md) if need to apply theme layout to pages
|
|
152
151
|
|
|
@@ -213,10 +212,16 @@ Use `sf` CLI to validate and deploy. Access help docs by attaching `--help`, e.g
|
|
|
213
212
|
- `sf project deploy --help`
|
|
214
213
|
- `sf project deploy validate --help`
|
|
215
214
|
|
|
216
|
-
Note that metadata types are space-delimited.
|
|
215
|
+
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`.
|
|
217
216
|
|
|
218
217
|
**Validate**:
|
|
219
|
-
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
sf project deploy validate --metadata DigitalExperienceBundle DigitalExperience DigitalExperienceConfig Network CustomSite --target-org ${usernameOrAlias}
|
|
221
|
+
```
|
|
220
222
|
|
|
221
223
|
**Deploy**:
|
|
222
|
-
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
sf project deploy start --metadata DigitalExperienceBundle DigitalExperience DigitalExperienceConfig Network CustomSite --target-org ${usernameOrAlias}
|
|
227
|
+
```
|
|
@@ -18,11 +18,66 @@ Ask user to choose:
|
|
|
18
18
|
|
|
19
19
|
### Option 1: Create in Org
|
|
20
20
|
|
|
21
|
+
**Step 1:** Run the create command:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
sf community create --name "{siteName}" --template-name 'Build Your Own (LWR)' --url-path-prefix "{prefix}" --target-org {usernameOrAlias} --json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Site creation is an async job. As soon as the terminal returns output, capture the `jobId` and move on — do not wait for the shell command to fully exit.
|
|
28
|
+
|
|
29
|
+
**Step 2:** Ask the user: *"Would you like me to wait for the site creation to complete and then retrieve the metadata for you, or would you prefer to retrieve it yourself once it's ready?"*
|
|
30
|
+
|
|
31
|
+
**Stop here and wait for the user's response before proceeding.**
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
**If the user wants to wait and retrieve:**
|
|
36
|
+
|
|
37
|
+
Poll the `BackgroundOperation` object using the following command, replacing `{jobId}` with the ID returned from the create command:
|
|
38
|
+
|
|
39
|
+
```soql
|
|
40
|
+
SELECT Status FROM BackgroundOperation WHERE Id = '{jobId}'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Use the MCP tool `run_soql_query` to run this query on the given target org. If the MCP tool is not available, run the following command instead, replacing `{jobId}` and `{usernameOrAlias}` with the appropriate values:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
sf data query --query "SELECT Status FROM BackgroundOperation WHERE Id = '{jobId}'" --target-org {usernameOrAlias} --json
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Repeat until `Status` is `Complete`. If the query does not return `Complete` after several attempts, ask the user to manually check their target org to confirm whether site creation has completed. **Stop here and do not proceed until the user confirms the site is ready.**
|
|
50
|
+
|
|
51
|
+
Once complete, run each of the following retrieval commands **one at a time**. Do not chain them together (e.g. do not use `&&`). Wait for each command to return output before running the next. Metadata types are space-delimited — **never** wrap them in quotes or use commas:
|
|
52
|
+
|
|
21
53
|
```bash
|
|
22
|
-
sf
|
|
54
|
+
sf project retrieve start --metadata DigitalExperienceBundle --target-org {usernameOrAlias} --json
|
|
23
55
|
```
|
|
24
56
|
|
|
25
|
-
|
|
57
|
+
```bash
|
|
58
|
+
sf project retrieve start --metadata DigitalExperienceConfig --target-org {usernameOrAlias} --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
sf project retrieve start --metadata Network --target-org {usernameOrAlias} --json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
sf project retrieve start --metadata CustomSite --target-org {usernameOrAlias} --json
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
**If the user wants to retrieve themselves:**
|
|
72
|
+
|
|
73
|
+
Provide them with the retrieval command to run once the site is ready. Metadata types are space-delimited — **never** wrap them in quotes or use commas:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
sf project retrieve start --metadata DigitalExperienceBundle DigitalExperienceConfig Network CustomSite --target-org {usernameOrAlias} --json
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
26
81
|
|
|
27
82
|
### Option 2: Scaffold Locally
|
|
28
83
|
|
|
@@ -26,6 +26,9 @@
|
|
|
26
26
|
|
|
27
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
28
|
|
|
29
|
+
### Order of operations
|
|
30
|
+
If the user decides to create a new LWC, create the LWC first THEN the theme layout metadata.
|
|
31
|
+
|
|
29
32
|
### _meta.json Structure
|
|
30
33
|
|
|
31
34
|
The `_meta.json` file must contain:
|
|
@@ -126,11 +129,11 @@ digitalExperiences/site/[SITE_NAME]/sfdc_cms__theme/[THEME_API_NAME]/content.jso
|
|
|
126
129
|
|
|
127
130
|
When generating a new theme layout, ensure:
|
|
128
131
|
|
|
129
|
-
- [ ] `_meta.json` created with correct `apiName`, `type`, and `path`
|
|
130
|
-
- [ ] `content.json` created with all required fields
|
|
131
|
-
- [ ] `urlName` uses lowercase with hyphens
|
|
132
|
-
- [ ] `title` is human-readable
|
|
133
|
-
- [ ] `sfdc_cms__theme/[THEME_API_NAME]/content.json` updated by appending a new `contentBody.layouts` mapping
|
|
132
|
+
- [ ] `_meta.json` created with correct `apiName`, `type`, and `path`
|
|
133
|
+
- [ ] `content.json` created with all required fields
|
|
134
|
+
- [ ] `urlName` uses lowercase with hyphens
|
|
135
|
+
- [ ] `title` is human-readable
|
|
136
|
+
- [ ] `sfdc_cms__theme/[THEME_API_NAME]/content.json` updated by appending a new `contentBody.layouts` mapping
|
|
134
137
|
- [ ] **CRITICAL**: Complete all the UUID generation steps. See [handle-component-and-region-ids.md](docs/handle-component-and-region-ids.md)
|
|
135
138
|
|
|
136
139
|
## Purpose B: Editing Existing Theme Layouts
|
|
@@ -154,6 +154,21 @@ Specify license requirements and record type visibility:
|
|
|
154
154
|
<default>true</default>
|
|
155
155
|
</recordTypeVisibilities>
|
|
156
156
|
```
|
|
157
|
+
## Step 8: Set Agent Access (Optional)
|
|
158
|
+
|
|
159
|
+
Enable access to Agentforce Employee Agents for users assigned to this permission set:
|
|
160
|
+
|
|
161
|
+
<agentAccesses>
|
|
162
|
+
<agentName>Sales_Assistant_Agent</agentName>
|
|
163
|
+
<enabled>true</enabled>
|
|
164
|
+
</agentAccesses>
|
|
165
|
+
|
|
166
|
+
Field requirements:
|
|
167
|
+
- agentName (Required): The developer name of the employee agent
|
|
168
|
+
- enabled (Required): Set to true to grant access, false to deny
|
|
169
|
+
|
|
170
|
+
Important:
|
|
171
|
+
- Agent names must match existing Agentforce Employee Agent developer names
|
|
157
172
|
|
|
158
173
|
## Validation Checklist
|
|
159
174
|
|