@salesforce/afv-skills 1.24.0 → 1.25.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.
Files changed (54) hide show
  1. package/package.json +1 -1
  2. package/skills/commerce-b2b-open-code-components-replace/SKILL.md +244 -0
  3. package/skills/commerce-b2b-open-code-components-replace/assets/ootb-to-open-code-mapping.json +66 -0
  4. package/skills/dx-org-manage/SKILL.md +192 -0
  5. package/skills/dx-org-manage/examples/README.md +45 -0
  6. package/skills/dx-org-manage/examples/scratch-orgs/error_no_devhub.json +9 -0
  7. package/skills/dx-org-manage/examples/scratch-orgs/error_timeout.json +13 -0
  8. package/skills/dx-org-manage/examples/scratch-orgs/success_definition_file.json +28 -0
  9. package/skills/dx-org-manage/examples/scratch-orgs/success_edition.json +26 -0
  10. package/skills/dx-org-manage/examples/scratch-orgs/success_snapshot.json +27 -0
  11. package/skills/dx-org-manage/examples/snapshots/error_output.json +9 -0
  12. package/skills/dx-org-manage/examples/snapshots/success_output.json +15 -0
  13. package/skills/dx-org-manage/references/cli_flags.md +67 -0
  14. package/skills/dx-org-manage/references/creating-scratch-org.md +164 -0
  15. package/skills/dx-org-manage/references/creating-snapshot.md +103 -0
  16. package/skills/dx-org-manage/references/definition_file_options.md +224 -0
  17. package/skills/dx-org-manage/references/edition_types.md +78 -0
  18. package/skills/dx-org-manage/references/opening-org.md +160 -0
  19. package/skills/dx-org-manage/references/snapshot_usage.md +74 -0
  20. package/skills/dx-org-permission-set-assign/SKILL.md +98 -0
  21. package/skills/dx-org-permission-set-assign/examples/error_output.json +19 -0
  22. package/skills/dx-org-permission-set-assign/examples/success_output.json +16 -0
  23. package/skills/dx-org-permission-set-assign/references/cli_flags.md +68 -0
  24. package/skills/experience-cms-brand-apply/SKILL.md +1 -1
  25. package/skills/experience-ui-bundle-app-coordinate/SKILL.md +31 -19
  26. package/skills/experience-ui-bundle-file-upload-generate/SKILL.md +1 -1
  27. package/skills/experience-ui-bundle-frontend-generate/implementation/header-footer.md +1 -1
  28. package/skills/experience-ui-bundle-salesforce-data-access/SKILL.md +336 -581
  29. package/skills/experience-ui-bundle-salesforce-data-access/references/caching.md +172 -0
  30. package/skills/experience-ui-bundle-salesforce-data-access/references/graphiti-cli.md +373 -0
  31. package/skills/experience-ui-bundle-salesforce-data-access/references/graphql-hand-authoring.md +376 -0
  32. package/skills/experience-ui-bundle-salesforce-data-access/references/migration.md +119 -0
  33. package/skills/experience-ui-bundle-salesforce-data-access/references/rest-and-integration.md +152 -0
  34. package/skills/experience-ui-bundle-salesforce-data-access/references/sdk-api.md +217 -0
  35. package/skills/experience-ui-bundle-salesforce-data-access/scripts/graphql-search.sh +36 -9
  36. package/skills/platform-agentsetup-categories-fetch/SKILL.md +109 -0
  37. package/skills/platform-agentsetup-categories-fetch/references/api-response-schema.md +121 -0
  38. package/skills/platform-custom-object-generate/SKILL.md +62 -7
  39. package/skills/platform-custom-object-generate/references/description-enrichment.md +125 -0
  40. package/skills/platform-metadata-retrieve/SKILL.md +121 -0
  41. package/skills/platform-metadata-retrieve/examples/error_output.json +10 -0
  42. package/skills/platform-metadata-retrieve/examples/success_output.json +27 -0
  43. package/skills/platform-metadata-retrieve/references/cli_flags.md +138 -0
  44. package/skills/platform-metadata-retrieve/references/retrieval_modes.md +181 -0
  45. package/skills/platform-sharing-rules-generate/SKILL.md +165 -0
  46. package/skills/platform-sharing-rules-generate/references/rule-types.md +199 -0
  47. package/skills/platform-tracing-agentforce-configure/SKILL.md +118 -0
  48. package/skills/platform-tracing-agentforce-configure/assets/AgentforcePlatformTracing-template.xml +4 -0
  49. package/skills/platform-tracing-configure/SKILL.md +118 -0
  50. package/skills/platform-tracing-configure/assets/EventSettings-template.xml +4 -0
  51. package/skills/platform-trust-archive-manage/SKILL.md +25 -11
  52. package/skills/platform-trust-archive-manage/examples/monitor-failed-jobs.md +2 -2
  53. package/skills/platform-trust-archive-manage/references/archive-activity-entity.md +1 -1
  54. package/skills/platform-trust-archive-manage/references/connect-api-operations.md +51 -12
@@ -0,0 +1,160 @@
1
+ # Opening Orgs
2
+
3
+ Opens a Salesforce org or specific metadata artifact in a browser using `sf org open`. Handles all variants: default org, alias or username, browser selection, incognito mode, path navigation, metadata file → Builder, and URL-only output.
4
+
5
+ ---
6
+
7
+ ## Required Inputs
8
+
9
+ Infer from the user's request:
10
+
11
+ - **Target org**: Use default org unless a specific alias/username is mentioned
12
+ - **What to open**: Path, file, or org home
13
+ - **Browser**: Only include if explicitly requested (chrome, firefox, edge)
14
+ - **Incognito**: Only if user says "private" or "incognito"
15
+ - **URL only**: If user says "URL", "link", or "don't open browser"
16
+
17
+ Do not ask for clarification - infer and execute immediately.
18
+
19
+ ---
20
+
21
+ ## Workflow
22
+
23
+ 1. **Match user request** to command in table below
24
+ 2. **Execute via Bash tool**: `sf org open` with appropriate flags
25
+ 3. **Return result**
26
+
27
+ If error occurs:
28
+ - "no target org" → advise: `sf config set target-org <alias>`
29
+ - auth error → advise: `sf org login web --alias <alias>`
30
+
31
+ ### Command Decision Table
32
+
33
+ | User intent | Execute via Bash tool |
34
+ |-------------|---------|
35
+ | Open default org | `sf org open` |
36
+ | Open specific org | `sf org open --target-org <alias>` |
37
+ | Open in specific browser | `sf org open --browser chrome` (or firefox, edge) |
38
+ | Private/incognito mode | `sf org open --private` |
39
+ | Navigate to path | `sf org open --path '<path>'` |
40
+ | Get URL only | `sf org open --url-only` |
41
+ | Path + URL only | `sf org open --path '<path>' --url-only` |
42
+ | Open local file | `sf org open --source-file <file-path>` |
43
+ | File + URL only | `sf org open --source-file <file-path> --url-only` |
44
+
45
+ **Note:** Flags `--private`, `--url-only`, `--browser` are mutually exclusive.
46
+
47
+ ---
48
+
49
+ ## Common Paths
50
+
51
+ ### Setup Pages
52
+ ```bash
53
+ # Setup home
54
+ sf org open --path '/lightning/setup/SetupOneHome/home'
55
+
56
+ # Object Manager
57
+ sf org open --path '/lightning/setup/ObjectManager/home'
58
+
59
+ # Users
60
+ sf org open --path '/lightning/setup/ManageUsers/home'
61
+
62
+ # Permission Sets
63
+ sf org open --path '/lightning/setup/PermSets/home'
64
+
65
+ # Flows
66
+ sf org open --path '/lightning/setup/Flows/home'
67
+
68
+ # Custom Metadata Types
69
+ sf org open --path '/lightning/setup/CustomMetadata/home'
70
+ ```
71
+
72
+ ### App Pages
73
+ ```bash
74
+ # App Launcher
75
+ sf org open --path '/lightning/setup/NavigationMenus/home'
76
+
77
+ # Reports
78
+ sf org open --path '/lightning/o/Report/home'
79
+
80
+ # Dashboards
81
+ sf org open --path '/lightning/o/Dashboard/home'
82
+ ```
83
+
84
+ ---
85
+
86
+ ## Opening Metadata Files
87
+
88
+ ### Supported Metadata Types
89
+
90
+ `--source-file` works with these metadata types:
91
+ - **FlexiPage** (Lightning pages) → Lightning App Builder
92
+ - **Flow** → Flow Builder
93
+ - **ApexPage** (Visualforce) → Visualforce Page Editor
94
+ - **ApexClass** → Apex Class detail page
95
+ - **CustomObject** → Object Manager
96
+
97
+ ### Important Constraints
98
+
99
+ | Constraint | Behavior |
100
+ |-----------|----------|
101
+ | Metadata must be deployed in the org | CLI queries org for record ID; undeployed metadata causes error or fallback |
102
+ | FlexiPage fallback | Silently falls back to `/lightning/setup/FlexiPageList/home` if not found |
103
+ | Flow error | Throws `FlowIdNotFound` if Flow not deployed |
104
+ | ApexClass error | Throws `ApexClassIdNotFound` if class not deployed |
105
+ | CustomObject error | Throws `CustomObjectIdNotFound` if object not deployed |
106
+
107
+ ### Example Commands
108
+
109
+ ```bash
110
+ # Open Lightning page in App Builder
111
+ sf org open --source-file force-app/main/default/flexipages/Account_Record_Page.flexipage-meta.xml
112
+
113
+ # Open Flow in Flow Builder
114
+ sf org open --source-file force-app/main/default/flows/MyFlow.flow-meta.xml
115
+
116
+ # Open Apex class
117
+ sf org open --source-file force-app/main/default/classes/MyController.cls
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Rules / Constraints
123
+
124
+ | Constraint | Rationale |
125
+ |-----------|-----------|
126
+ | `--path` and `--source-file` are mutually exclusive | Both control navigation destination; choose one |
127
+ | `--source-file` supported types: FlexiPage, Flow, ApexPage, ApexClass, CustomObject | CLI queries the org for the record ID; unsupported types or undeployed metadata fall back silently (FlexiPage) or throw a named error (Flow/ApexClass/CustomObject) |
128
+ | Do not hardcode `force-app/main/default/` for `--source-file` | Project package paths vary; use the path the user provides or read `sfdx-project.json` |
129
+ | Must use Bash tool, not MCP tools | MCP tools like `list_all_orgs` cannot open orgs in browser |
130
+
131
+ ---
132
+
133
+ ## Troubleshooting
134
+
135
+ | Issue | Resolution |
136
+ |-------|------------|
137
+ | No target org found | Set default: `sf config set target-org <alias>` or specify `--target-org <alias>` |
138
+ | Auth error | Re-authenticate: `sf org login web --alias <alias>` |
139
+ | `--source-file` opens wrong page or throws `FlowIdNotFound` / `ApexClassIdNotFound` / `CustomObjectIdNotFound` | Metadata is not deployed in the org. Run `sf project deploy start --source-file <path> --target-org <alias>` first. FlexiPage silently falls back to org home; Flow/ApexClass/CustomObject throw an error. |
140
+ | Metadata file opens wrong Builder | Verify the file extension matches the metadata type (e.g. `.flow-meta.xml` for Flow Builder) |
141
+ | URL-only flag but user expects browser to open | `--url-only` prints the URL without launching — remove the flag to open the browser |
142
+ | Path not found / 404 | Verify the path is correct; some paths require specific permissions or licenses |
143
+
144
+ ---
145
+
146
+ ## Output Expectations
147
+
148
+ ### Default behavior
149
+ - Opens the specified org/path in the system's default browser
150
+ - No console output on success
151
+
152
+ ### With `--url-only`
153
+ Returns the login URL without opening browser:
154
+ ```text
155
+ https://...-dev-ed.develop.my.salesforce.com/secur/frontdoor.jsp?sid=...
156
+ ```
157
+
158
+ ### With `--source-file`
159
+ - Opens the metadata in its appropriate Builder/Editor
160
+ - Example: FlexiPage → Lightning App Builder, Flow → Flow Builder
@@ -0,0 +1,74 @@
1
+ # Using Snapshots in Scratch Org Definition Files
2
+
3
+ After creating a snapshot, reference it in scratch org definition files to create new scratch orgs from the saved state.
4
+
5
+ ## Scratch Org Definition File Format
6
+
7
+ Use the `snapshot` field instead of `edition` in your `project-scratch-def.json`:
8
+
9
+ ```json
10
+ {
11
+ "orgName": "My Company",
12
+ "snapshot": "MySnapshot",
13
+ "features": ["EnableSetPasswordInApi"],
14
+ "settings": {
15
+ "lightningExperienceSettings": {
16
+ "enableS1DesktopEnabled": true
17
+ }
18
+ }
19
+ }
20
+ ```
21
+
22
+ ## Key Differences from Edition-Based Definitions
23
+
24
+ | Field | Edition-based | Snapshot-based |
25
+ |-------|--------------|----------------|
26
+ | Primary field | `"edition": "Developer"` | `"snapshot": "MySnapshot"` |
27
+ | Contents | Empty org with edition defaults | Pre-configured org state from snapshot |
28
+
29
+ ## Creating a Scratch Org from Snapshot
30
+
31
+ ```bash
32
+ sf org create scratch --definition-file config/project-scratch-def.json --alias from-snapshot
33
+ ```
34
+
35
+ The scratch org will be created with all the metadata, data, and configuration from the snapshot.
36
+
37
+ ## Common Use Cases
38
+
39
+ ### 1. Package Development
40
+
41
+ ```json
42
+ {
43
+ "orgName": "Package Dev Org",
44
+ "snapshot": "Dependencies_v1.2.0",
45
+ "description": "Org with all dependencies installed"
46
+ }
47
+ ```
48
+
49
+ ### 2. Testing Baseline
50
+
51
+ ```json
52
+ {
53
+ "orgName": "Test Baseline",
54
+ "snapshot": "TestData_Populated",
55
+ "description": "Org with sample data for testing"
56
+ }
57
+ ```
58
+
59
+ ### 3. CI/CD Pipeline
60
+
61
+ ```json
62
+ {
63
+ "orgName": "CI Scratch Org",
64
+ "snapshot": "Nightly_Build_Baseline",
65
+ "description": "Latest nightly build dependencies"
66
+ }
67
+ ```
68
+
69
+ ## Workflow Summary
70
+
71
+ 1. **Create snapshot**: `sf org create snapshot --source-org <scratch> --name MySnapshot`
72
+ 2. **Check status**: `sf org get snapshot --snapshot MySnapshot`
73
+ 3. **Reference in definition file**: `"snapshot": "MySnapshot"`
74
+ 4. **Create new scratch org**: `sf org create scratch --definition-file config/project-scratch-def.json`
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: dx-org-permission-set-assign
3
+ description: "ALWAYS USE THIS SKILL to assign permission sets to org users. Assign one or more permission sets to org users using the sf org assign permset command. TRIGGER when the user asks to assign, grant, give, add, or apply permission sets to users, admins, specific orgs, or specific users. Supports granting permissions, giving access, and adding permission sets to default admin or specific users via --on-behalf-of. DO NOT TRIGGER for listing permission sets or checking user permissions."
4
+ compatibility: Salesforce CLI (sf) v2+
5
+ metadata:
6
+ version: "1.0"
7
+ ---
8
+
9
+ # dx-org-permission-set-assign
10
+
11
+ Assigns one or more permission sets to org users using `sf org assign permset`. Handles all variants: default admin user, specific org targets, multiple permission sets, and assignment to specific users.
12
+
13
+ ---
14
+
15
+ ## ⚠️ Tool Restrictions
16
+
17
+ **Use ONLY the Bash tool** to execute `sf org assign permset`. Do NOT use MCP tools like `assign_permission_set` — ignore them completely.
18
+
19
+ ---
20
+
21
+ ## Scope
22
+
23
+ - **In scope**: Assigning permission sets to users via `sf org assign permset`
24
+ - **Out of scope**: Creating permission sets (use `platform-permission-set-generate`), listing permission sets, checking user permissions
25
+
26
+ ---
27
+
28
+ ## Required Inputs
29
+
30
+ Infer from the user's request:
31
+
32
+ - **Permission set name(s)**: Extract from user message (can be multiple)
33
+ - **Target org**: Use default unless specific alias/username mentioned
34
+ - **Target user(s)**: Default is org's default admin user; use `--on-behalf-of` if specific users mentioned
35
+
36
+ ---
37
+
38
+ ## Workflow
39
+
40
+ 1. Match user request to command in table below
41
+ 2. Execute via Bash tool: `sf org assign permset` with appropriate flags and `--json` flag
42
+ 3. Return result
43
+
44
+ If error occurs, check the `failures` array in JSON output for details.
45
+
46
+ ### Command Decision Table
47
+
48
+ | User intent | Execute via Bash tool |
49
+ |-------------|---------|
50
+ | Assign one permission set to default admin | `sf org assign permset --name <PermSetName> --json` |
51
+ | Assign multiple permission sets to default admin | `sf org assign permset --name <PermSet1> --name <PermSet2> --json` |
52
+ | Assign to specific org | `sf org assign permset --name <PermSetName> --target-org <alias> --json` |
53
+ | Assign to specific user(s) | `sf org assign permset --name <PermSetName> --on-behalf-of <username1> --on-behalf-of <username2> --json` |
54
+ | Assign multiple sets to specific users | `sf org assign permset --name <PermSet1> --name <PermSet2> --on-behalf-of <username1> --on-behalf-of <username2> --json` |
55
+
56
+ ---
57
+
58
+ ## Rules / Constraints
59
+
60
+ | Constraint | Rationale |
61
+ |-----------|-----------|
62
+ | Always use `--json` flag | Provides structured output for reliable parsing and error handling |
63
+ | Permission set names are case-sensitive | Use exact API names as they appear in the org |
64
+ | Multiple `--name` flags can be combined in one command | More efficient than separate commands per permission set |
65
+ | Multiple `--on-behalf-of` flags assign to multiple users | Batch assignment in single command; processed sequentially to avoid auth file collisions |
66
+ | Use CLI username aliases, not Salesforce User.Alias field | The `--target-org` and `--on-behalf-of` flags expect CLI aliases set via `sf alias set`, not the User object's Alias field |
67
+ | Duplicate assignments are idempotent | Re-assigning an already-assigned permission set succeeds silently |
68
+ | Partial success is possible | Command can return both successes and failures in one run; non-zero exit code if any failures |
69
+
70
+ ---
71
+
72
+ ## Gotchas
73
+
74
+ | Issue | Resolution |
75
+ |-------|------------|
76
+ | Permission set name with spaces | Enclose in double quotes: `--name "Permission Set Name"` |
77
+ | "PermissionSet not found" error | Verify permission set exists in target org; check for typos in name |
78
+ | Assignment succeeds but user doesn't see permissions | Check `<hasActivationRequired>` in permission set metadata — may need manual activation in Setup |
79
+ | "User not found" error | Username/alias doesn't exist in target org — verify with `sf org display user --target-org <alias>` |
80
+ | Partial success (some users succeed, others fail) | Check JSON output — command returns both `successes` and `failures` arrays; exit code will be non-zero if any failures occurred |
81
+
82
+ ---
83
+
84
+ ## Output Expectations
85
+
86
+ The command returns JSON output with status code and result details.
87
+
88
+ See `examples/success_output.json` and `examples/error_output.json` for response structures.
89
+
90
+ ---
91
+
92
+ ## Reference File Index
93
+
94
+ | File | When to read |
95
+ |------|-------------|
96
+ | `examples/success_output.json` | To understand successful assignment response structure |
97
+ | `examples/error_output.json` | To handle common error scenarios |
98
+ | `references/cli_flags.md` | For detailed explanation of all available flags |
@@ -0,0 +1,19 @@
1
+ {
2
+ "status": 1,
3
+ "result": {
4
+ "successes": [],
5
+ "failures": [
6
+ {
7
+ "name": "user1@my.org",
8
+ "message": "No PermissionSet named DreamHoue found",
9
+ "details": [
10
+ {
11
+ "message": "No PermissionSet named DreamHoue found",
12
+ "errorCode": "INVALID_CROSS_REFERENCE_KEY",
13
+ "fields": []
14
+ }
15
+ ]
16
+ }
17
+ ]
18
+ }
19
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "status": 0,
3
+ "result": {
4
+ "successes": [
5
+ {
6
+ "name": "admin@example.com",
7
+ "value": "PermSet1"
8
+ },
9
+ {
10
+ "name": "admin@example.com",
11
+ "value": "PermSet2"
12
+ }
13
+ ],
14
+ "failures": []
15
+ }
16
+ }
@@ -0,0 +1,68 @@
1
+ # CLI Flags Reference
2
+
3
+ Complete reference for `sf org assign permset` command flags.
4
+
5
+ ## Required Flags
6
+
7
+ | Flag | Alias | Description | Example |
8
+ |------|-------|-------------|---------|
9
+ | `--name` | `-n` | Permission set to assign (can be repeated) | `--name MyPermSet` |
10
+ | `--target-org` | `-o` | Username or alias of the target org (required unless default is set) | `--target-org my-scratch` |
11
+
12
+ ## Optional Flags
13
+
14
+ | Flag | Alias | Description | Example |
15
+ |------|-------|-------------|---------|
16
+ | `--on-behalf-of` | `-b` | Username or alias to assign the permission set to (can be repeated) | `--on-behalf-of user1@my.org` |
17
+ | `--api-version` | | Override the API version used for API requests | `--api-version 66.0` |
18
+
19
+ ## Global Flags
20
+
21
+ | Flag | Description |
22
+ |------|-------------|
23
+ | `--json` | Format output as JSON (ALWAYS use this) |
24
+
25
+ ## Usage Patterns
26
+
27
+ ### Single Permission Set to Default Admin
28
+
29
+ ```bash
30
+ sf org assign permset --name MyPermSet --json
31
+ ```
32
+
33
+ ### Multiple Permission Sets to Default Admin
34
+
35
+ ```bash
36
+ sf org assign permset --name PermSet1 --name PermSet2 --json
37
+ ```
38
+
39
+ ### Assign to Specific Org
40
+
41
+ ```bash
42
+ sf org assign permset --name MyPermSet --target-org my-scratch --json
43
+ ```
44
+
45
+ ### Assign to Specific Users
46
+
47
+ ```bash
48
+ sf org assign permset --name MyPermSet --on-behalf-of user1@my.org --on-behalf-of user2@my.org --json
49
+ ```
50
+
51
+ ### Combined: Multiple Sets, Multiple Users, Specific Org
52
+
53
+ ```bash
54
+ sf org assign permset \
55
+ --name PermSet1 \
56
+ --name PermSet2 \
57
+ --on-behalf-of user1@my.org \
58
+ --on-behalf-of user2@my.org \
59
+ --target-org my-scratch \
60
+ --json
61
+ ```
62
+
63
+ ## Important Notes
64
+
65
+ - **Multiple Values**: Use multiple `--name` or `--on-behalf-of` flags rather than comma-separated values
66
+ - **Spaces in Names**: Enclose permission set names with spaces in double quotes: `--name "Permission Set Name"`
67
+ - **Default Behavior**: Without `--on-behalf-of`, assigns to the org's default admin user
68
+ - **Processing**: Multiple users are processed sequentially to avoid auth file collisions
@@ -30,7 +30,7 @@ Universal skill for searching, extracting, and applying CMS brand guidelines to
30
30
 
31
31
  ## Before You Start
32
32
 
33
- **CRITICAL: You must retrieve brand instructions BEFORE generating or modifying any brand.**
33
+ **CRITICAL: You must retrieve brand instructions BEFORE applying any brand.**
34
34
 
35
35
  When a user requests branded content:
36
36
 
@@ -3,7 +3,7 @@ name: experience-ui-bundle-app-coordinate
3
3
  description: "MUST activate when the user wants to build, create, or generate a React application, React app, web application, single-page application (SPA), or frontend application — even if no project files exist yet. MUST also activate when the project contains a uiBundles/*/src/ directory or sfdx-project.json and the prompt says create, build, construct, or generate a new app, site, or page from scratch — even if the prompt also describes visual styling. MUST also activate when the task spans more than one ui-bundle skill. Use this skill when building a complete app end-to-end. Do NOT use for Lightning Experience apps with custom objects (use platform-lightning-app-coordinate). Do NOT use for single-concern edits to an existing page (use experience-ui-bundle-frontend-generate)."
4
4
  metadata:
5
5
  version: "1.0"
6
- related-skills: experience-ui-bundle-metadata-generate, experience-ui-bundle-features-generate, experience-ui-bundle-salesforce-data-access, experience-ui-bundle-frontend-generate, experience-ui-bundle-agentforce-client-generate, experience-ui-bundle-file-upload-generate, experience-ui-bundle-deploy, experience-ui-bundle-site-generate, experience-ui-bundle-custom-app-generate
6
+ relatedSkills: experience-ui-bundle-metadata-generate, experience-ui-bundle-features-generate, experience-ui-bundle-salesforce-data-access, experience-ui-bundle-frontend-generate, experience-ui-bundle-agentforce-client-generate, experience-ui-bundle-file-upload-generate, experience-ui-bundle-deploy, experience-ui-bundle-site-generate, experience-ui-bundle-custom-app-generate
7
7
  ---
8
8
 
9
9
  # Building a UI Bundle App
@@ -42,7 +42,7 @@ Build a complete, deployable Salesforce React UI bundle application from a natur
42
42
 
43
43
  ### Phase 1: Scaffolding (Foundation)
44
44
 
45
- ```
45
+ ```text
46
46
  UI Bundle scaffold (sf template generate ui-bundle)
47
47
  v
48
48
  Install dependencies (npm install)
@@ -56,7 +56,7 @@ Creates the UI bundle directory structure, meta XML, and optional routing/header
56
56
 
57
57
  ### Phase 2: Features (Optional)
58
58
 
59
- ```
59
+ ```text
60
60
  Search project code (src/) for existing implementations
61
61
  v
62
62
  Install dependencies (npm install)
@@ -72,21 +72,25 @@ Installs pre-built, tested feature packages. Skip if the app requires no pre-bui
72
72
 
73
73
  ### Phase 3: Data Access (Backend Wiring)
74
74
 
75
- ```
76
- Acquire schema (npm run graphql:schema)
75
+ ```text
76
+ Ground every entity/field against the org (per experience-ui-bundle-salesforce-data-access)
77
77
  v
78
- Look up entity schema (graphql-search.sh, max 2 runs)
78
+ Generate queries/mutations FROM the verified names (never from guessed fields)
79
79
  v
80
- Generate queries/mutations (use verified field names, @optional on all record fields)
80
+ Generate types (npm run graphql:codegen) and wire into components
81
81
  v
82
82
  Validate and test (npx eslint, ask user before testing mutations)
83
83
  ```
84
84
 
85
- Sets up the data layer using `@salesforce/sdk-data`. GraphQL is preferred for record operations; REST for Connect, Apex, or UI API endpoints.
85
+ Sets up the data layer using the **`@salesforce/platform-sdk`** Data SDK (`createDataSDK().graphql`).
86
+ GraphQL is preferred for record operations; REST for Connect, Apex, or UI API endpoints. **The
87
+ `experience-ui-bundle-salesforce-data-access` skill owns the grounding + authoring workflow — load it and follow
88
+ it; do not substitute a local-schema grep or guessed field names.** Grounding happens against the
89
+ **live org**, so it does not require a local `schema.graphql` to be present.
86
90
 
87
91
  ### Phase 4: UI (Frontend)
88
92
 
89
- ```
93
+ ```text
90
94
  Layout, navigation, header, and footer (appLayout.tsx)
91
95
  v
92
96
  Pages (routed views)
@@ -98,7 +102,7 @@ Builds the React UI. References the data layer from Phase 3 and the features fro
98
102
 
99
103
  ### Phase 5: Integrations (Optional)
100
104
 
101
- ```
105
+ ```text
102
106
  Agentforce chat widget (if requested)
103
107
  File upload API (if requested)
104
108
  ```
@@ -107,7 +111,7 @@ These are independent and can be executed in parallel if both are needed.
107
111
 
108
112
  ### Phase 6: Deployment
109
113
 
110
- ```
114
+ ```text
111
115
  Org authentication
112
116
  v
113
117
  Pre-deploy UI bundle build (npm install + npm run build)
@@ -132,7 +136,7 @@ Choose **one** of the following based on the app's audience:
132
136
 
133
137
  #### Phase 7a: Experience Site (External)
134
138
 
135
- ```
139
+ ```text
136
140
  Resolve site properties (siteName, appDevName, etc.)
137
141
  v
138
142
  Generate site metadata (Network, CustomSite, DigitalExperience)
@@ -144,7 +148,7 @@ Creates the Digital Experience site that hosts the UI bundle. Use when the user
144
148
 
145
149
  #### Phase 7b: Custom Application (Internal)
146
150
 
147
- ```
151
+ ```text
148
152
  Resolve app properties (appName, appNamespace, appLabel)
149
153
  v
150
154
  Generate CustomApplication metadata (applications/*.app-meta.xml)
@@ -172,9 +176,16 @@ Creates a Custom Application entry in the Lightning App Launcher. Use when the a
172
176
  6. Determine if an Experience Site is needed
173
177
  7. Identify external domains for CSP registration
174
178
 
179
+ > **The plan MUST contain an explicit grounding step before any query authoring.** Do not list
180
+ > guessed object/field names as settled facts and defer verification to codegen. The data-access
181
+ > portion of the plan must read: "verify these entities/fields against the org (via
182
+ > `experience-ui-bundle-salesforce-data-access`), then author queries from the verified names." A plan that
183
+ > authors queries first and codegens later is the failure mode that produces guessed fields and
184
+ > hand-stubbed types — do not emit it.
185
+
175
186
  **Output: Build Plan**
176
187
 
177
- ```
188
+ ```text
178
189
  UI Bundle App Build Plan: [App Name]
179
190
 
180
191
  SCAFFOLDING:
@@ -187,8 +198,9 @@ FEATURES:
187
198
 
188
199
  DATA ACCESS:
189
200
  - Objects: [Salesforce objects to query/mutate]
190
- - Queries: [list of GraphQL queries needed]
191
- - REST endpoints: [Apex REST or Connect API calls, if any]
201
+ - Grounding: [verify each object + its fields against the org via experience-ui-bundle-salesforce-data-access BEFORE authoring — list the objects/fields to confirm, not assumed-correct names]
202
+ - Queries: [GraphQL queries to author FROM the verified names]
203
+ - REST endpoints: [only where GraphQL/uiapi genuinely cannot cover it — not as a fallback for fields that were hard to verify]
192
204
 
193
205
  UI:
194
206
  - Layout: [description of app shell/navigation]
@@ -245,7 +257,7 @@ Execute each phase sequentially. Complete all steps within a phase before moving
245
257
 
246
258
  **Phase 3 -- Data Access** (skip if no Salesforce data needed)
247
259
  - 1. Load skill: Invoke `experience-ui-bundle-salesforce-data-access`
248
- - 2. Execute: Fetch schema, look up entities, generate queries/mutations, wire into components
260
+ - 2. Execute: **Ground entities/fields against the org first** (per the skill), then author queries/mutations **from the verified names**, run codegen, wire into components. Never guess fields or hand-edit generated types.
249
261
  - 3. Verify: Run `npx eslint` on files with GraphQL queries
250
262
  - 4. Checkpoint: Data layer ready -- proceed to Phase 4
251
263
 
@@ -283,7 +295,7 @@ Execute each phase sequentially. Complete all steps within a phase before moving
283
295
 
284
296
  After all phases complete, present a build summary:
285
297
 
286
- ```
298
+ ```text
287
299
  UI Bundle App Build Complete: [App Name]
288
300
 
289
301
  PHASES COMPLETED:
@@ -314,7 +326,7 @@ Before presenting the build as complete, verify:
314
326
  - [ ] **Lint passes**: `npx eslint src/` reports 0 errors
315
327
  - [ ] **No boilerplate**: All placeholder text, default titles, and template content has been replaced
316
328
  - [ ] **Navigation works**: `appLayout.tsx` has real nav items matching created pages
317
- - [ ] **Data layer wired**: Components use `@salesforce/sdk-data` (if data access phase was executed)
329
+ - [ ] **Data layer wired**: Components use the `@salesforce/platform-sdk` Data SDK (`createDataSDK().graphql`), with all entities/fields grounded against the org — not guessed (if data access phase was executed)
318
330
  - [ ] **CSP registered**: All external domains have CSP Trusted Site metadata (if applicable)
319
331
 
320
332
  ---
@@ -34,7 +34,7 @@ npm install @salesforce/ui-bundle-template-feature-react-file-upload
34
34
  Dependencies are automatically installed:
35
35
 
36
36
  - `@salesforce/ui-bundle` (API client)
37
- - `@salesforce/sdk-data` (data SDK)
37
+ - `@salesforce/platform-sdk` (data SDK; the old `@salesforce/sdk-data` name is dead — see the `experience-ui-bundle-salesforce-data-access` skill)
38
38
 
39
39
  ## 2. Understand the three upload patterns
40
40
 
@@ -100,7 +100,7 @@ export default function AppLayout() {
100
100
 
101
101
  `AppLayout` is the single shell rendered at the root route. Every page is a child rendered via `<Outlet />`. Placing the header and footer here ensures they appear on every page without touching individual pages or the route registry.
102
102
 
103
- ```
103
+ ```text
104
104
  AppLayout (appLayout.tsx)
105
105
  ├── AppHeader ← renders on every page
106
106
  ├── NavigationMenu ← keep if already present