@salesforce/afv-skills 1.1.0 → 1.2.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 +4 -4
- 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/generate-permission-set/SKILL.md +174 -0
- package/skills/salesforce-custom-application/SKILL.md +1 -2
- package/skills/salesforce-custom-field/SKILL.md +0 -4
- package/skills/salesforce-custom-tab/SKILL.md +84 -8
- package/skills/salesforce-experience-lwr-site/SKILL.md +196 -0
- package/skills/salesforce-experience-lwr-site/docs/bootstrap-template-byo-lwr.md +224 -0
- package/skills/salesforce-experience-lwr-site/docs/configure-content-brandingSet.md +131 -0
- package/skills/salesforce-experience-lwr-site/docs/configure-content-route.md +232 -0
- package/skills/salesforce-experience-lwr-site/docs/configure-content-themeLayout.md +141 -0
- package/skills/salesforce-experience-lwr-site/docs/configure-content-view.md +233 -0
- package/skills/salesforce-experience-lwr-site/docs/configure-guest-sharing-rules.md +42 -0
- package/skills/salesforce-experience-lwr-site/docs/handle-component-and-region-ids.md +27 -0
- package/skills/salesforce-experience-lwr-site/docs/handle-ui-components.md +215 -0
- package/skills/salesforce-flow/SKILL.md +2 -2
- package/skills/salesforce-fragment/SKILL.md +85 -10
- package/skills/salesforce-lightning-app-build/SKILL.md +102 -10
- 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-experience-site/SKILL.md +0 -178
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Metadata validation script for Salesforce deployments
|
|
3
|
-
# Checks for common issues before deployment
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
# Colors for output
|
|
8
|
-
RED='\033[0;31m'
|
|
9
|
-
YELLOW='\033[1;33m'
|
|
10
|
-
GREEN='\033[0;32m'
|
|
11
|
-
NC='\033[0m' # No Color
|
|
12
|
-
|
|
13
|
-
ERRORS=0
|
|
14
|
-
WARNINGS=0
|
|
15
|
-
|
|
16
|
-
echo "=========================================="
|
|
17
|
-
echo "Salesforce Metadata Validation"
|
|
18
|
-
echo "=========================================="
|
|
19
|
-
echo ""
|
|
20
|
-
|
|
21
|
-
# Check if we're in an SFDX project
|
|
22
|
-
if [ ! -f "sfdx-project.json" ]; then
|
|
23
|
-
echo -e "${RED}ERROR: Not in an SFDX project directory${NC}"
|
|
24
|
-
echo "Please run this script from your project root"
|
|
25
|
-
exit 1
|
|
26
|
-
fi
|
|
27
|
-
|
|
28
|
-
echo "✓ Found SFDX project"
|
|
29
|
-
echo ""
|
|
30
|
-
|
|
31
|
-
# 1. Check XML format
|
|
32
|
-
echo "Checking XML format..."
|
|
33
|
-
XML_ERRORS=0
|
|
34
|
-
|
|
35
|
-
find force-app -name "*.xml" -o -name "*.object" -o -name "*.layout" | while read file; do
|
|
36
|
-
if ! xmllint --noout "$file" 2>/dev/null; then
|
|
37
|
-
echo -e "${RED}✗ Invalid XML: $file${NC}"
|
|
38
|
-
XML_ERRORS=$((XML_ERRORS + 1))
|
|
39
|
-
fi
|
|
40
|
-
done
|
|
41
|
-
|
|
42
|
-
if [ $XML_ERRORS -eq 0 ]; then
|
|
43
|
-
echo -e "${GREEN}✓ All XML files are well-formed${NC}"
|
|
44
|
-
else
|
|
45
|
-
echo -e "${RED}✗ Found $XML_ERRORS XML errors${NC}"
|
|
46
|
-
ERRORS=$((ERRORS + XML_ERRORS))
|
|
47
|
-
fi
|
|
48
|
-
echo ""
|
|
49
|
-
|
|
50
|
-
# 2. Check API versions
|
|
51
|
-
echo "Checking API versions..."
|
|
52
|
-
MIN_API_VERSION=56.0
|
|
53
|
-
|
|
54
|
-
find force-app -name "*.cls-meta.xml" -o -name "*.trigger-meta.xml" | while read file; do
|
|
55
|
-
VERSION=$(grep -o '<apiVersion>[0-9.]*</apiVersion>' "$file" | grep -o '[0-9.]*')
|
|
56
|
-
if [ -n "$VERSION" ] && (( $(echo "$VERSION < $MIN_API_VERSION" | bc -l) )); then
|
|
57
|
-
echo -e "${YELLOW}⚠ Old API version $VERSION in: $file${NC}"
|
|
58
|
-
WARNINGS=$((WARNINGS + 1))
|
|
59
|
-
fi
|
|
60
|
-
done
|
|
61
|
-
|
|
62
|
-
echo -e "${GREEN}✓ API version check complete${NC}"
|
|
63
|
-
echo ""
|
|
64
|
-
|
|
65
|
-
# 3. Check for deprecated features
|
|
66
|
-
echo "Checking for deprecated features..."
|
|
67
|
-
|
|
68
|
-
# Check for old-style custom settings
|
|
69
|
-
DEPRECATED_SETTINGS=$(find force-app -name "*.object-meta.xml" -exec grep -l "customSettingsType>List" {} \; | wc -l)
|
|
70
|
-
if [ $DEPRECATED_SETTINGS -gt 0 ]; then
|
|
71
|
-
echo -e "${YELLOW}⚠ Found $DEPRECATED_SETTINGS list custom settings (consider Custom Metadata Types)${NC}"
|
|
72
|
-
WARNINGS=$((WARNINGS + 1))
|
|
73
|
-
fi
|
|
74
|
-
|
|
75
|
-
# Check for old Aura components (should migrate to LWC)
|
|
76
|
-
AURA_COMPONENTS=$(find force-app -name "*.cmp" | wc -l)
|
|
77
|
-
if [ $AURA_COMPONENTS -gt 5 ]; then
|
|
78
|
-
echo -e "${YELLOW}⚠ Found $AURA_COMPONENTS Aura components (consider migrating to LWC)${NC}"
|
|
79
|
-
WARNINGS=$((WARNINGS + 1))
|
|
80
|
-
fi
|
|
81
|
-
|
|
82
|
-
echo -e "${GREEN}✓ Deprecation check complete${NC}"
|
|
83
|
-
echo ""
|
|
84
|
-
|
|
85
|
-
# 4. Check naming conventions
|
|
86
|
-
echo "Checking naming conventions..."
|
|
87
|
-
|
|
88
|
-
# Check for spaces in API names (not allowed)
|
|
89
|
-
SPACE_ERRORS=$(find force-app -name "*.xml" -exec grep -l "fullName>.*\s.*<" {} \; | wc -l)
|
|
90
|
-
if [ $SPACE_ERRORS -gt 0 ]; then
|
|
91
|
-
echo -e "${RED}✗ Found $SPACE_ERRORS files with spaces in API names${NC}"
|
|
92
|
-
ERRORS=$((ERRORS + SPACE_ERRORS))
|
|
93
|
-
fi
|
|
94
|
-
|
|
95
|
-
# Check for lowercase custom object names (should be PascalCase)
|
|
96
|
-
LOWERCASE_OBJECTS=$(find force-app/main/default/objects -name "*.object-meta.xml" -exec basename {} \; | grep -E "^[a-z]" | wc -l)
|
|
97
|
-
if [ $LOWERCASE_OBJECTS -gt 0 ]; then
|
|
98
|
-
echo -e "${YELLOW}⚠ Found $LOWERCASE_OBJECTS custom objects with lowercase names${NC}"
|
|
99
|
-
WARNINGS=$((WARNINGS + 1))
|
|
100
|
-
fi
|
|
101
|
-
|
|
102
|
-
echo -e "${GREEN}✓ Naming convention check complete${NC}"
|
|
103
|
-
echo ""
|
|
104
|
-
|
|
105
|
-
# 5. Check for hardcoded IDs or URLs
|
|
106
|
-
echo "Checking for hardcoded values..."
|
|
107
|
-
|
|
108
|
-
# Check for record IDs (15 or 18 character Salesforce IDs)
|
|
109
|
-
HARDCODED_IDS=$(grep -r -E "'[a-zA-Z0-9]{15,18}'" force-app/main/default/classes force-app/main/default/triggers 2>/dev/null | wc -l)
|
|
110
|
-
if [ $HARDCODED_IDS -gt 0 ]; then
|
|
111
|
-
echo -e "${YELLOW}⚠ Found $HARDCODED_IDS potential hardcoded record IDs in Apex${NC}"
|
|
112
|
-
echo " Review and replace with custom settings or custom metadata"
|
|
113
|
-
WARNINGS=$((WARNINGS + 1))
|
|
114
|
-
fi
|
|
115
|
-
|
|
116
|
-
# Check for hardcoded URLs
|
|
117
|
-
HARDCODED_URLS=$(grep -r "https://.*\.salesforce\.com" force-app/main/default/ 2>/dev/null | wc -l)
|
|
118
|
-
if [ $HARDCODED_URLS -gt 0 ]; then
|
|
119
|
-
echo -e "${YELLOW}⚠ Found $HARDCODED_URLS hardcoded Salesforce URLs${NC}"
|
|
120
|
-
echo " Consider using Named Credentials or Custom Settings"
|
|
121
|
-
WARNINGS=$((WARNINGS + 1))
|
|
122
|
-
fi
|
|
123
|
-
|
|
124
|
-
echo -e "${GREEN}✓ Hardcoded value check complete${NC}"
|
|
125
|
-
echo ""
|
|
126
|
-
|
|
127
|
-
# 6. Check meta.xml files
|
|
128
|
-
echo "Checking for missing meta.xml files..."
|
|
129
|
-
|
|
130
|
-
MISSING_META=0
|
|
131
|
-
find force-app -name "*.cls" | while read file; do
|
|
132
|
-
if [ ! -f "${file}-meta.xml" ]; then
|
|
133
|
-
echo -e "${RED}✗ Missing meta.xml for: $file${NC}"
|
|
134
|
-
MISSING_META=$((MISSING_META + 1))
|
|
135
|
-
fi
|
|
136
|
-
done
|
|
137
|
-
|
|
138
|
-
if [ $MISSING_META -eq 0 ]; then
|
|
139
|
-
echo -e "${GREEN}✓ All source files have meta.xml files${NC}"
|
|
140
|
-
else
|
|
141
|
-
echo -e "${RED}✗ Found $MISSING_META missing meta.xml files${NC}"
|
|
142
|
-
ERRORS=$((ERRORS + MISSING_META))
|
|
143
|
-
fi
|
|
144
|
-
echo ""
|
|
145
|
-
|
|
146
|
-
# 7. Check for test classes
|
|
147
|
-
echo "Checking test coverage..."
|
|
148
|
-
|
|
149
|
-
TOTAL_CLASSES=$(find force-app -name "*.cls" | wc -l)
|
|
150
|
-
TEST_CLASSES=$(find force-app -name "*Test.cls" -o -name "*_Test.cls" | wc -l)
|
|
151
|
-
|
|
152
|
-
if [ $TOTAL_CLASSES -gt 0 ]; then
|
|
153
|
-
TEST_RATIO=$(echo "scale=2; $TEST_CLASSES / $TOTAL_CLASSES * 100" | bc)
|
|
154
|
-
echo "Test class ratio: $TEST_CLASSES/$TOTAL_CLASSES (${TEST_RATIO}%)"
|
|
155
|
-
|
|
156
|
-
if (( $(echo "$TEST_RATIO < 50" | bc -l) )); then
|
|
157
|
-
echo -e "${YELLOW}⚠ Low test class coverage (${TEST_RATIO}%)${NC}"
|
|
158
|
-
echo " Consider adding more test classes"
|
|
159
|
-
WARNINGS=$((WARNINGS + 1))
|
|
160
|
-
else
|
|
161
|
-
echo -e "${GREEN}✓ Good test class coverage (${TEST_RATIO}%)${NC}"
|
|
162
|
-
fi
|
|
163
|
-
else
|
|
164
|
-
echo "No Apex classes found"
|
|
165
|
-
fi
|
|
166
|
-
echo ""
|
|
167
|
-
|
|
168
|
-
# 8. Check package.xml
|
|
169
|
-
echo "Checking package.xml..."
|
|
170
|
-
|
|
171
|
-
if [ -f "manifest/package.xml" ]; then
|
|
172
|
-
echo -e "${GREEN}✓ Found package.xml${NC}"
|
|
173
|
-
|
|
174
|
-
# Validate it's well-formed XML
|
|
175
|
-
if xmllint --noout manifest/package.xml 2>/dev/null; then
|
|
176
|
-
echo -e "${GREEN}✓ package.xml is valid XML${NC}"
|
|
177
|
-
else
|
|
178
|
-
echo -e "${RED}✗ package.xml is invalid XML${NC}"
|
|
179
|
-
ERRORS=$((ERRORS + 1))
|
|
180
|
-
fi
|
|
181
|
-
else
|
|
182
|
-
echo -e "${YELLOW}⚠ No package.xml found in manifest/ directory${NC}"
|
|
183
|
-
WARNINGS=$((WARNINGS + 1))
|
|
184
|
-
fi
|
|
185
|
-
echo ""
|
|
186
|
-
|
|
187
|
-
# Summary
|
|
188
|
-
echo "=========================================="
|
|
189
|
-
echo "Validation Summary"
|
|
190
|
-
echo "=========================================="
|
|
191
|
-
echo -e "Errors: ${RED}$ERRORS${NC}"
|
|
192
|
-
echo -e "Warnings: ${YELLOW}$WARNINGS${NC}"
|
|
193
|
-
echo ""
|
|
194
|
-
|
|
195
|
-
if [ $ERRORS -eq 0 ] && [ $WARNINGS -eq 0 ]; then
|
|
196
|
-
echo -e "${GREEN}✓ Metadata validation passed!${NC}"
|
|
197
|
-
echo "Your metadata is ready for deployment."
|
|
198
|
-
exit 0
|
|
199
|
-
elif [ $ERRORS -eq 0 ]; then
|
|
200
|
-
echo -e "${YELLOW}⚠ Validation passed with warnings${NC}"
|
|
201
|
-
echo "Review warnings before deploying."
|
|
202
|
-
exit 0
|
|
203
|
-
else
|
|
204
|
-
echo -e "${RED}✗ Validation failed${NC}"
|
|
205
|
-
echo "Fix errors before deploying."
|
|
206
|
-
exit 1
|
|
207
|
-
fi
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: salesforce-experience-site
|
|
3
|
-
description: Use this skill when users need to create, modify, or manage Salesforce Experience Cloud sites (LWR sites). Trigger when users mention Experience sites, LWR sites, DigitalExperience, Experience Cloud, community sites, portals, creating pages, adding routes, views, theme layouts, branding sets, or any DigitalExperience bundle work. Also use when users mention specific content types like sfdc_cms__route, sfdc_cms__view, sfdc_cms__themeLayout, or when troubleshooting site deployment. Always use this skill for any Experience Cloud or LWR site work.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## When to Use This Skill
|
|
7
|
-
|
|
8
|
-
Use this skill when you need to:
|
|
9
|
-
- Create Experience Cloud sites or communities
|
|
10
|
-
- Build LWR (Lightning Web Runtime) sites
|
|
11
|
-
- Set up site configuration and settings
|
|
12
|
-
- Generate Experience Site metadata
|
|
13
|
-
- Troubleshoot deployment errors related to Experience Sites
|
|
14
|
-
|
|
15
|
-
## Specification
|
|
16
|
-
|
|
17
|
-
# Experience LWR Site Metadata Specification
|
|
18
|
-
An LWR site can be represented by metadata DigitalExperienceConfig, DigitalExperienceBundle, Network, CustomSite, and CMS contents. Your purpose is to assist developers in creating and editing these metadata.
|
|
19
|
-
|
|
20
|
-
## Supported Template Types
|
|
21
|
-
|
|
22
|
-
Template name - Template DevName
|
|
23
|
-
- Build Your Own (LWR) - talon-template-byo
|
|
24
|
-
|
|
25
|
-
## Core Properties
|
|
26
|
-
|
|
27
|
-
Before doing anything else, identify the following properties from the local project if available. Check with the user if any of the following is missing:
|
|
28
|
-
- Site name: Required. (e.g., `'My Community'`).
|
|
29
|
-
- 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.
|
|
30
|
-
- Template type devName: Optional. Defaults to `talon-template-byo`.
|
|
31
|
-
|
|
32
|
-
## General Tips
|
|
33
|
-
|
|
34
|
-
TIP 1. When available, the site developer name can be found in the CustomSite filename (e.g., `sites/MySite.site-meta.xml` → developer name is `MySite`).
|
|
35
|
-
|
|
36
|
-
## Project Structure in DigitalExperienceBundle Format
|
|
37
|
-
|
|
38
|
-
### Site Metadata
|
|
39
|
-
- DigitalExperienceConfig
|
|
40
|
-
- Path: `digitalExperienceConfigs/{siteName}1.digitalExperienceConfig-meta.xml`
|
|
41
|
-
- DigitalExperienceBundle
|
|
42
|
-
- Path: `digitalExperiences/site/{siteName}1/{siteName}1.digitalExperience-meta.xml`
|
|
43
|
-
- Network
|
|
44
|
-
- Path: `networks/{siteName}.network-meta.xml`
|
|
45
|
-
- CustomSite
|
|
46
|
-
- Path: `sites/{siteName}.site-meta.xml`
|
|
47
|
-
|
|
48
|
-
### DigitalExperience Contents
|
|
49
|
-
- Path: `digitalExperiences/site/{siteName}1/sfdc_cms__*/{contentApiName}/*`
|
|
50
|
-
- Description: These are the content components defining routes, views, theme layouts, etc. Each component must have a `_meta.json` and `content.json` file.
|
|
51
|
-
|
|
52
|
-
#### Content Type Descriptions
|
|
53
|
-
| Content Type | Description | When to Use |
|
|
54
|
-
|-|-|-|
|
|
55
|
-
| `sfdc_cms__site` | Root site configuration containing site-wide settings | Required for every site; one per site |
|
|
56
|
-
| `sfdc_cms__appPage` | Application page container that groups routes and views | Required; defines the app shell |
|
|
57
|
-
| `sfdc_cms__route` | URL routing definition mapping paths to views | Create one for each page/URL path |
|
|
58
|
-
| `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, updating theme layout) |
|
|
59
|
-
| `sfdc_cms__brandingSet` | Brand colors, fonts, and styling tokens | Required; defines site-wide styling |
|
|
60
|
-
| `sfdc_cms__languageSettings` | Language and localization configuration | Required; defines supported languages |
|
|
61
|
-
| `sfdc_cms__mobilePublisherConfig` | Mobile app publishing settings | Required for mobile app deployment |
|
|
62
|
-
| `sfdc_cms__theme` | Theme definition referencing layouts and branding | Required; one per site |
|
|
63
|
-
| `sfdc_cms__themeLayout` | Page layout templates used by views | Create layouts for different page structures |
|
|
64
|
-
|
|
65
|
-
**Important:** Creating any new pages require BOTH `sfdc_cms__route` AND `sfdc_cms__view`.
|
|
66
|
-
|
|
67
|
-
## CUD Operations on DigitalExperience Contents
|
|
68
|
-
- Users can perform create, update, delete operations on DigitalExperience Contents.
|
|
69
|
-
- **IMPORTANT:** Before ANY modification (create, update, or delete) to content, ALWAYS call `execute_metadata_action` first to get the schema, examples, and instructions for that content type.
|
|
70
|
-
- **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.
|
|
71
|
-
- For each unique content type you need to work with, call `execute_metadata_action` using the following:
|
|
72
|
-
```json
|
|
73
|
-
{
|
|
74
|
-
"metadataType": "ExperienceSite",
|
|
75
|
-
"actionName": "getSiteContentMetadata",
|
|
76
|
-
"parameters": {
|
|
77
|
-
"contentType": "<content type from table above>",
|
|
78
|
-
"shouldIncludeExamples": true
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
- Do not call the `execute_metadata_action` MCP tool with any other site actionName unless specified in this knowledge doc/instructions.
|
|
83
|
-
|
|
84
|
-
## Retrieving Site URLs After Deployment
|
|
85
|
-
|
|
86
|
-
After successfully deploying the site using `sf project deploy`, use the `execute_metadata_action` MCP tool to get the preview and builder URLs:
|
|
87
|
-
```json
|
|
88
|
-
{
|
|
89
|
-
"metadataType": "ExperienceSite",
|
|
90
|
-
"actionName": "getSiteUrls",
|
|
91
|
-
"parameters": {
|
|
92
|
-
"siteDevName": "<site developer name>"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Refer to TIP 1 to get the site developer name.
|
|
98
|
-
|
|
99
|
-
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.
|
|
100
|
-
|
|
101
|
-
## Enhancement Rules
|
|
102
|
-
|
|
103
|
-
- If need to understand how site metadata should be configured, use the `get_metadata_api_context` MCP tool to get the schemas.
|
|
104
|
-
|
|
105
|
-
- Use MCP tool `execute_metadata_action` with `getSiteTemplateMetadata` to get the knowledge document about the template and its default configurations if needed. **IMPORTANT:** This MUST be used for new site:
|
|
106
|
-
```json
|
|
107
|
-
{
|
|
108
|
-
"metadataType": "ExperienceSite",
|
|
109
|
-
"actionName": "getSiteTemplateMetadata",
|
|
110
|
-
"parameters": {
|
|
111
|
-
"templateDevName": "<template DevName, e.g. talon-template-byo>"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
- To validate Experience Site metadata, run CLI command `sf project deploy validate --metadata DigitalExperienceBundle DigitalExperience DigitalExperienceConfig Network CustomSite --target-org ${usernameOrAlias}`
|
|
117
|
-
|
|
118
|
-
## Guest User Sharing Rules (Public Sites Only)
|
|
119
|
-
|
|
120
|
-
**When to use**: Only create guest sharing rules 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.
|
|
121
|
-
If sharingRules metadata is not available locally in force-app/main/default/sharingRules, retrieve it from the org before creating new rules.
|
|
122
|
-
|
|
123
|
-
To get the full SharingRules schema, use the `get_metadata_api_context` MCP tool:
|
|
124
|
-
```json
|
|
125
|
-
{
|
|
126
|
-
"metadataType": "SharingRules"
|
|
127
|
-
}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### XML Example
|
|
131
|
-
|
|
132
|
-
```xml
|
|
133
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
134
|
-
<SharingRules xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
135
|
-
<sharingGuestRules>
|
|
136
|
-
<fullName>ShareAccountsWithSiteGuest</fullName>
|
|
137
|
-
<accessLevel>Read</accessLevel>
|
|
138
|
-
<includeHVUOwnedRecords>false</includeHVUOwnedRecords>
|
|
139
|
-
<label>Share Accounts With Site Guest</label>
|
|
140
|
-
<sharedTo>
|
|
141
|
-
<guestUser>[site developer name]</guestUser>
|
|
142
|
-
</sharedTo>
|
|
143
|
-
<criteriaItems>
|
|
144
|
-
<field>Name</field>
|
|
145
|
-
<operation>notEqual</operation>
|
|
146
|
-
<value>null</value>
|
|
147
|
-
</criteriaItems>
|
|
148
|
-
</sharingGuestRules>
|
|
149
|
-
</SharingRules>
|
|
150
|
-
```
|
|
151
|
-
Refer to TIP 1 to get the site developer name.
|
|
152
|
-
|
|
153
|
-
### Critical Requirements
|
|
154
|
-
|
|
155
|
-
1. **SharedTo Element**: Must use `<guestUser>{siteName}</guestUser>` where `{siteName}` is the Network name (not URL path prefix).
|
|
156
|
-
2. **includeHVUOwnedRecords**: Required field. Set to `false` unless records owned by high-volume site users should be included.
|
|
157
|
-
3. **One XML file per object**: Put all rules for a given object in one file. Do not create additional.
|
|
158
|
-
|
|
159
|
-
### Common Mistakes
|
|
160
|
-
|
|
161
|
-
- Using `<role>` or `<group>` instead of `<guestUser>` in sharedTo
|
|
162
|
-
- Omitting the required `includeHVUOwnedRecords` field
|
|
163
|
-
- Using `includeRecordsOwnedByAll` (that's for `sharingCriteriaRules`, not guest rules)
|
|
164
|
-
|
|
165
|
-
## Workflows
|
|
166
|
-
|
|
167
|
-
### Creating a new site
|
|
168
|
-
|
|
169
|
-
- Verify with user on the value of site name, url path prefix, and site template type.
|
|
170
|
-
- Retrieve template information from `getSiteTemplateMetadata` and strictly follow the rules of its knowledge document.
|
|
171
|
-
- Proceed to the workflow of editing an existing site.
|
|
172
|
-
|
|
173
|
-
### Editing an existing site
|
|
174
|
-
|
|
175
|
-
- Identify the intent of the user and break it down into steps.
|
|
176
|
-
- Make use of `get_metadata_api_context` if user wants to edit site metadata.
|
|
177
|
-
- Use `getSiteContentMetadata` to understand how to edit site contents.
|
|
178
|
-
- Once the tasks are done, perform site metadata validation.
|