@salesforce/afv-skills 1.71.0 → 1.72.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 +1 -1
- package/skills/agentforce-generate/SKILL.md +8 -0
- package/skills/agentforce-generate/assets/agents/README.md +1 -1
- package/skills/agentforce-generate/references/actions-reference.md +4 -0
- package/skills/agentforce-generate/references/mcp-actions-in-agent-script.md +233 -0
- package/skills/agentforce-generate/references/reference-map.md +1 -0
- package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +9 -7
- package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +78 -4
- package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +17 -13
- package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +110 -9
- package/skills/experience-app-mcp-generate/references/troubleshooting.md +1 -1
- package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +49 -18
- package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +1 -1
- package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +1 -1
- package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +3 -1
- package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +32 -26
- package/skills/experience-ui-bundle-custom-app-generate/references/configure-metadata-custom-application.md +6 -24
- package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +4 -6
- package/skills/platform-apex-generate/SKILL.md +2 -1
- package/skills/platform-apex-generate/assets/abstract.cls +0 -4
- package/skills/platform-apex-generate/assets/invocable-action-extension.invocableactionextension-meta.xml +28 -0
- package/skills/platform-apex-generate/assets/invocable.cls +2 -0
- package/skills/platform-apex-generate/references/dml-declarations.md +69 -0
- package/skills/platform-metadata-discovery-get/SKILL.md +15 -10
- package/skills/platform-metadata-grounding-get/SKILL.md +5 -3
- package/skills/service-add-agents-to-contact-center-create/SKILL.md +138 -0
- package/skills/service-agentforce-contact-center-coordinate/SKILL.md +5 -5
- package/skills/service-agentforce-contact-center-coordinate/references/omni-flow-routing.md +3 -3
- package/skills/service-agentforce-contact-center-coordinate/scripts/create-routing-flows.sh +8 -3
- package/skills/service-agentforce-contact-center-coordinate/scripts/create-voice-agent.sh +5 -5
- package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-acc-queue.sh +10 -1
- package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-channel-line.sh +4 -0
- package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-flow-definition.sh +5 -0
- package/skills/service-agentforce-contact-center-coordinate/scripts/verify-number-live.sh +6 -1
- package/skills/service-concierge-portal-generate/SKILL.md +1 -1
- package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +21 -8
- package/skills/service-digital-engagement-channel-configure/SKILL.md +45 -32
- package/skills/service-digital-engagement-channel-configure/assets/public_key_certificate_set_jwks_template.xml +20 -0
- package/skills/service-digital-engagement-channel-configure/assets/public_key_certificate_set_jwks_url_template.xml +23 -0
- package/skills/service-digital-engagement-channel-configure/assets/public_key_certificate_template.xml +15 -0
- package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +1 -1
- package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/examples/jwks_upload_key.xml +11 -0
- package/skills/service-digital-engagement-channel-configure/examples/jwks_upload_keyset.xml +13 -0
- package/skills/service-digital-engagement-channel-configure/examples/jwks_url_keyset.xml +17 -0
- package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/examples/user_channel.xml +1 -1
- package/skills/service-digital-engagement-channel-configure/references/_vendored/service-onboarding-delegation-guidelines.md +43 -0
- package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +1 -1
- package/skills/service-digital-engagement-channel-configure/references/keyset_settings.md +46 -0
- package/skills/service-digital-engagement-channel-configure/references/keyset_setup.md +42 -0
- package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +28 -27
- package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +2 -5
- package/skills/service-digital-engagement-channel-configure/references/routing_transitions.md +2 -2
- package/skills/service-digital-engagement-channel-configure/references/user_verification.md +3 -4
- package/skills/service-digital-engagement-channel-configure/references/user_verification_client.md +51 -0
- package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +7 -0
- package/skills/service-digital-engagement-deployment-configure/SKILL.md +28 -10
- package/skills/service-digital-engagement-deployment-configure/references/_vendored/service-onboarding-delegation-guidelines.md +43 -0
- package/skills/service-digital-engagement-deployment-configure/references/branding_and_tooling.md +2 -2
- package/skills/service-digital-engagement-deployment-configure/references/code_snippet.md +2 -2
- package/skills/service-digital-engagement-deployment-configure/references/connect_api_creation.md +13 -7
- package/skills/service-digital-engagement-deployment-configure/references/custom_labels.md +127 -0
- package/skills/service-digital-engagement-deployment-configure/references/deployment_settings.md +2 -1
- package/skills/service-digital-engagement-deployment-configure/references/onboarding_contract.md +24 -25
- package/skills/service-digital-engagement-deployment-configure/references/prechat_forms.md +1 -1
- package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +7 -0
- package/skills/service-email-to-case-configure/SKILL.md +89 -80
- package/skills/service-email-to-case-configure/assets/CaseSettings.settings-meta.xml +1 -1
- package/skills/service-email-to-case-configure/examples/CaseSettings-two-addresses.settings-meta.xml +6 -3
- package/skills/service-email-to-case-configure/references/_vendored/service-onboarding-delegation-guidelines.md +43 -0
- package/skills/service-email-to-case-configure/references/agent-delegation.md +22 -0
- package/skills/service-email-to-case-configure/references/apply-mechanics.md +15 -12
- package/skills/service-email-to-case-configure/references/end-to-end-proof.md +14 -0
- package/skills/service-email-to-case-configure/references/onboarding-delegated-run.md +66 -0
- package/skills/service-email-to-case-configure/references/routing_address_reference.md +6 -2
- package/skills/service-email-to-case-configure/references/troubleshooting.md +17 -9
- package/skills/service-email-to-case-configure/scripts/apply-casesettings.py +863 -925
- package/skills/service-email-to-case-configure/scripts/tests/_agent.py +162 -0
- package/skills/service-email-to-case-configure/scripts/tests/_fakeorg.py +119 -155
- package/skills/service-email-to-case-configure/scripts/tests/_run.py +10 -17
- package/skills/service-email-to-case-configure/scripts/tests/test_apply_org_scenarios.py +14 -14
- package/skills/service-email-to-case-configure/scripts/tests/test_dispatch_contract.py +316 -0
- package/skills/service-email-to-case-configure/scripts/tests/test_new_capabilities.py +12 -43
- package/skills/service-email-to-case-configure/scripts/tests/test_validate_casesettings.py +13 -0
- package/skills/service-email-to-case-configure/scripts/validate-casesettings.py +17 -5
- package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +11 -11
- package/skills/service-remove-agents-from-contact-center-assign/SKILL.md +145 -0
- package/skills/service-voice-configuration-manage/SKILL.md +206 -0
- package/skills/service-voice-configuration-manage/assets/regions.json +23 -0
- package/skills/service-voice-configuration-manage/references/lookups.md +91 -0
- package/skills/service-voice-configuration-manage/references/voice_config_api.md +169 -0
- package/skills/service-voice-configuration-manage/scripts/create-configuration.sh +20 -0
- package/skills/service-voice-configuration-manage/scripts/delete-configuration.sh +31 -0
- package/skills/service-voice-configuration-manage/scripts/get-configuration.sh +18 -0
- package/skills/service-voice-configuration-manage/scripts/lib.sh +22 -0
- package/skills/service-voice-configuration-manage/scripts/list-configurations.sh +18 -0
- package/skills/service-voice-configuration-manage/scripts/lookup-caller-lines.sh +30 -0
- package/skills/service-voice-configuration-manage/scripts/lookup-flows.sh +29 -0
- package/skills/service-voice-configuration-manage/scripts/lookup-profiles.sh +29 -0
- package/skills/service-voice-configuration-manage/scripts/lookup-users.sh +29 -0
- package/skills/service-voice-configuration-manage/scripts/update-configuration.sh +20 -0
- package/skills/tableau-next-asset-create/SKILL.md +10 -4
- package/skills/tableau-next-asset-create/references/dashboard-design-principles.md +133 -0
- package/skills/tableau-next-asset-create/references/data-transform-gotchas.md +284 -128
- package/skills/tableau-next-asset-create/references/deep-reference-index.md +3 -3
- package/skills/tableau-next-asset-create/references/edit-dashboard.md +1 -1
- package/skills/tableau-next-asset-create/references/edit-visualization.md +678 -468
- package/skills/tableau-next-asset-create/references/shared-gates.md +1 -1
- package/skills/tableau-next-asset-create/references/tasks/create-data-transform.md +120 -42
- package/skills/tableau-next-asset-create/references/tasks/create-viz.md +8 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-viz.md +7 -4
- package/skills/tableau-next-asset-create/references/tasks/promote-or-reuse.md +9 -4
- package/skills/tableau-next-asset-create/references/viz-authoring.md +1 -1
- package/skills/service-email-to-case-configure/scripts/tests/test_get_session.py +0 -134
|
@@ -4,23 +4,22 @@ description: "MUST activate when the project contains a uiBundles/*/src/ directo
|
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.0"
|
|
6
6
|
domains: ["Experience", "Platform"]
|
|
7
|
-
minApiVersion: "
|
|
7
|
+
minApiVersion: "67.0"
|
|
8
8
|
relatedSkills:
|
|
9
9
|
- "platform-custom-application-generate"
|
|
10
|
+
- "platform-metadata-api-context-get"
|
|
10
11
|
cliTools:
|
|
11
12
|
- tool: ["node"]
|
|
12
13
|
semver: ">=18.0.0"
|
|
13
14
|
- tool: ["sf"]
|
|
14
15
|
semver: ">=2.0.0"
|
|
15
|
-
mcpTools:
|
|
16
|
-
salesforce-api-context:
|
|
17
|
-
tools: ["get_metadata_type_fields"]
|
|
18
|
-
semver: ">=1.0.0"
|
|
19
16
|
---
|
|
20
17
|
|
|
21
18
|
# Custom Application for React UI Bundles
|
|
22
19
|
Create and configure a Salesforce Custom Application that hosts a React UI bundle in Lightning Experience. This skill generates the CustomApplication metadata so the app appears in the Lightning App Launcher and can be accessed by internal users.
|
|
23
20
|
|
|
21
|
+
**Before opening the XML template or writing metadata, invoke `platform-metadata-api-context-get` and attempt Step 2's section-specific lookups for `CustomApplication.uiBundle` and `UIBundle.target`.** A template, missing `sfdx-project.json`, or missing org connection does not substitute for that lookup. Resolve the skill through the available runtime catalog as well as local directories. The existing fallback below applies only after a real context invocation/lookup attempt fails; it is not permission to skip the attempt.
|
|
22
|
+
|
|
24
23
|
Custom Applications differ from Experience Sites: they don't need Networks, CustomSite, DigitalExperienceConfig, or DigitalExperienceBundle metadata. The Custom Application acts as a thin launcher entry that delegates rendering to the React UI bundle referenced by `uiBundle`.
|
|
25
24
|
|
|
26
25
|
## Required Properties
|
|
@@ -32,27 +31,35 @@ Resolve all properties before generating any metadata. Each has a fallback chain
|
|
|
32
31
|
| **appNamespace** | String | `namespace` in `sfdx-project.json` → `sf data query -q "SELECT NamespacePrefix FROM Organization" --target-org ${usernameOrAlias}` → default `c` |
|
|
33
32
|
| **appLabel** | Human-readable string | User-provided, or derive from appName by converting camelCase to Title Case |
|
|
34
33
|
|
|
35
|
-
The `appNamespace` and `appName` connect the Custom Application to the correct React UI bundle
|
|
34
|
+
The `appNamespace` and `appName` connect the Custom Application to the correct React UI bundle through `<uiBundle>{appNamespace}__{appName}</uiBundle>`. Getting this wrong means the app launcher entry exists but shows a blank page.
|
|
36
35
|
|
|
37
36
|
## Generation Workflow
|
|
38
37
|
### Step 1: Resolve All Required Properties
|
|
39
38
|
Determine values for all properties before constructing anything. Use the resolution strategies in the table above.
|
|
40
39
|
|
|
41
|
-
### Step 2:
|
|
42
|
-
|
|
40
|
+
### Step 2: Load API Context (Version-Aware Field Reference)
|
|
41
|
+
Invoke `platform-metadata-api-context-get` before generating metadata. Resolve `CustomApplication` and `UIBundle` using that skill's documented asset lookup and consume only the relevant `fields` entries and any needed enum or version-availability sections with `jq` or programmatic parsing. Do not read entire schema files or shards.
|
|
42
|
+
|
|
43
|
+
Bundled schema is an authoring reference, not live-org discovery. Cross-check documented field availability against the project's deployment API version; do not silently change that version. A missing schema entry is unavailable context, not proof that the target version lacks the field.
|
|
44
|
+
|
|
45
|
+
Resolve the effective deployment API version from the explicit deployment configuration or `sfdx-project.json` (`sourceApiVersion`). If it is unknown, ask the user before writing metadata. If it is below 67.0, stop: `CustomApplication.uiBundle` and the `UIBundle.target` value `CustomApplication` are available from API 67.0. Do not substitute undocumented legacy fields or silently upgrade the deployment version.
|
|
46
|
+
|
|
47
|
+
The metadata-context companion's schema snapshot and runtime serving minimum are separate from the deployment API version. A newer snapshot does not make these fields newer-version-only. If the runtime withholds the companion for the org version, record that failed invocation attempt and use the disclosed unavailable-context fallback below; do not claim the companion was loaded. An org eligible for a newer companion can still use this workflow with an explicitly resolved deployment API version of 67.0 or later.
|
|
48
|
+
|
|
49
|
+
**Required lookups:**
|
|
50
|
+
1. `CustomApplication.uiBundle` — check the field definition and documented version availability.
|
|
51
|
+
2. `UIBundle.target` — check the field definition, the `CustomApplication` value, and documented version availability.
|
|
43
52
|
|
|
44
|
-
**
|
|
45
|
-
1. `get_metadata_type_fields({ "metadataType": "CustomApplication" })` — check whether the `uiBundle` field exists in the response's field list
|
|
46
|
-
2. `get_metadata_type_fields({ "metadataType": "UIBundle" })` — check whether the `target` field exists in the response's field list
|
|
53
|
+
**Field resolution based on version-specific evidence:**
|
|
47
54
|
|
|
48
|
-
|
|
55
|
+
| Field Check | XML for supported deployment versions |
|
|
56
|
+
|-------------|---------------------------------------|
|
|
57
|
+
| `CustomApplication.uiBundle` | Use `<uiBundle>{appNamespace}__{appName}</uiBundle>` |
|
|
58
|
+
| `UIBundle.target` and its `CustomApplication` value | Use `<target>CustomApplication</target>` |
|
|
49
59
|
|
|
50
|
-
|
|
51
|
-
|-------------|-----------|-------------------------------|
|
|
52
|
-
| `CustomApplication.uiBundle` | Use `<uiBundle>{appNamespace}__{appName}</uiBundle>` | Use `<webApplication>{appName}</webApplication>` (no namespace) |
|
|
53
|
-
| `UIBundle.target` | Use `<target>CustomApplication</target>` | Omit the `<target>` element entirely |
|
|
60
|
+
If the context skill or required schema entries are unavailable after a real lookup attempt, retain the existing fallback to the documented field names (`uiBundle` + `target`) only after resolving a deployment version of 67.0 or later. State that bundled schema compatibility was not confirmed; deployment validation remains required. Field availability is documented in the official [CustomApplication](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_customapplication.htm) and [UIBundle](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_uibundle.htm) references.
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
A validation rejection alone is not version-availability evidence: diagnose it rather than substituting legacy fields or omitting `target`; until validation succeeds, report the output as unvalidated rather than promising App Launcher availability. A bundled target description listing only older values, or omitting `CustomApplication`, is unavailable context, not permission to infer AppLauncher/default equivalence. Apply the disclosed fallback only within the supported deployment-version range.
|
|
56
63
|
|
|
57
64
|
### Step 3: Create the Project Structure
|
|
58
65
|
Create any files and directories that don't already exist:
|
|
@@ -73,21 +80,20 @@ Use the default template in the doc below. Values in `{braces}` are resolved pro
|
|
|
73
80
|
### Execution Note for Step 4: Load and use the doc
|
|
74
81
|
- Agents MUST read the full contents of the references/*.md file referenced in Step 4 before attempting to populate metadata fields.
|
|
75
82
|
- Read the file in full, replace placeholders (e.g. `{appName}`) with the resolved values, then use the expanded template to populate the metadata XML content.
|
|
76
|
-
- If Step 2 determined the older field names apply, substitute `<uiBundle>` with `<webApplication>` in the generated output.
|
|
77
83
|
|
|
78
84
|
### Step 5: Update UI Bundle Meta XML
|
|
79
85
|
This step edits an **existing** file — it never creates a new one. `UIBundle` is a bundle-style metadata type: its meta XML normally lives inside its own folder at `uiBundles/{appName}/{appName}.uibundle-meta.xml`, alongside the bundle's other source files (e.g. `index.html`, `src/`). Some older or hand-authored projects may instead have it at the flat path `uiBundles/{appName}.uibundle-meta.xml` (no subfolder).
|
|
80
86
|
|
|
81
|
-
|
|
87
|
+
From the resolved `<sourceDir>` containing `uiBundles`, run `node "<absolute-skill-dir>/scripts/resolve-uibundle-path.mjs" "{appName}"` — it prints the path of the existing meta XML (preferring the nested layout, falling back to the flat layout). Resolve `<absolute-skill-dir>` to this skill's installed directory; do not change into that directory to run the resolver, because it searches relative to the current working directory. Always invoke via `node` (never as a bare executable) so this works on Windows as well as macOS/Linux. Edit that exact file in place; do not create a second file at the other path or migrate it to a different layout as part of this skill. If resolution fails despite an already-read descriptor, check the source-root working directory and existing path; do not treat that discrepancy as permission to create another descriptor.
|
|
82
88
|
|
|
83
|
-
|
|
89
|
+
After Step 2's deployment-version check, add `<target>CustomApplication</target>` inside the existing `<UIBundle>` element of that file, preserving every other existing element and value untouched.
|
|
84
90
|
|
|
85
91
|
**Do NOT:**
|
|
86
92
|
- Create a new `.uibundle-meta.xml` file
|
|
87
93
|
- Create a second `.uibundle-meta.xml` file at a different path when one already exists (nested or flat) — edit the existing one in place, wherever it is
|
|
88
94
|
- Leave the original `uiBundles/{appName}/{appName}.uibundle-meta.xml` (or `uiBundles/{appName}.uibundle-meta.xml`, if that's the existing layout) unmodified while adding `<target>` somewhere else
|
|
89
95
|
|
|
90
|
-
The only files this skill produces or modifies are `applications/{appName}.app-meta.xml` (new) and the existing `{appName}.uibundle-meta.xml` (edited in place
|
|
96
|
+
The only files this skill produces or modifies are `applications/{appName}.app-meta.xml` (new) and the existing `{appName}.uibundle-meta.xml` (edited in place). Any other UI-bundle-related file appearing in the output is a bug.
|
|
91
97
|
|
|
92
98
|
Example of the fully updated file (at `uiBundles/{appName}/{appName}.uibundle-meta.xml`, or the flat path if that's the existing layout) — this illustrates the end state of the existing file, not a new file to create:
|
|
93
99
|
|
|
@@ -109,12 +115,12 @@ Do not modify any default property values for `CustomApplication` metadata that
|
|
|
109
115
|
Before deploying, confirm:
|
|
110
116
|
|
|
111
117
|
- [ ] All required properties are resolved
|
|
112
|
-
- [ ] API context was
|
|
118
|
+
- [ ] API context skill was loaded and relevant schema sections were consumed, or the existing unavailable-context fallback was recorded (Step 2)
|
|
113
119
|
- [ ] `applications/{appName}.app-meta.xml` exists with correct content
|
|
114
|
-
- [ ] The
|
|
115
|
-
- [ ]
|
|
120
|
+
- [ ] The resolved deployment API version is 67.0 or later; it was not silently upgraded, and the bundle reference uses `<uiBundle>`
|
|
121
|
+
- [ ] The **existing** `{appName}.uibundle-meta.xml` (nested at `uiBundles/{appName}/`, or flat at `uiBundles/`, whichever already existed) has `<target>CustomApplication</target>`
|
|
116
122
|
- [ ] No extra `.uibundle-meta.xml` file was created — exactly one `{appName}.uibundle-meta.xml` exists, at whichever path it already lived at
|
|
117
|
-
- [ ] Deployment validates successfully:
|
|
123
|
+
- [ ] Deployment validates successfully at the resolved version (set `deploymentApiVersion` to that value; do not let the CLI choose a newer default):
|
|
118
124
|
```bash
|
|
119
|
-
sf project deploy validate --metadata CustomApplication UIBundle --target-org ${usernameOrAlias}
|
|
125
|
+
sf project deploy validate --metadata CustomApplication UIBundle --target-org ${usernameOrAlias} --api-version ${deploymentApiVersion}
|
|
120
126
|
```
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Configure Metadata: CustomApplication
|
|
2
2
|
|
|
3
|
+
## Context prerequisite
|
|
4
|
+
|
|
5
|
+
Before expanding the template, invoke `platform-metadata-api-context-get` and attempt the generator's Step 2 lookups. Resolve a deployment API version of 67.0 or later; stop if it is lower, and ask the user if it is unknown. This reference is a template, not schema or deployment-version evidence. Preserve Step 2's existing unavailable-context fallback only after an actual lookup attempt and within that supported version range. The companion's snapshot version and org-version serving gate do not determine the introduction version of individual fields.
|
|
6
|
+
|
|
3
7
|
## Purpose
|
|
4
8
|
This configuration file creates a **net-new, default** CustomApplication metadata record for a Lightning Experience app that hosts a React UI bundle. It is not intended to edit or modify an existing CustomApplication record. Use this template only when provisioning a brand-new Custom Application for a UI bundle.
|
|
5
9
|
|
|
@@ -10,7 +14,7 @@ This configuration file creates a **net-new, default** CustomApplication metadat
|
|
|
10
14
|
|
|
11
15
|
**Note:** Determine `<sourceDir>` from `sfdx-project.json` → `packageDirectories[]` → find the entry with `"default": true` → use its `path` value + `/main/default`. Commonly `force-app/main/default`, but this is configurable.
|
|
12
16
|
|
|
13
|
-
## Default Template (
|
|
17
|
+
## Default Template (supported workflow: API 67.0 and later)
|
|
14
18
|
```xml
|
|
15
19
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
16
20
|
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
@@ -31,27 +35,6 @@ This configuration file creates a **net-new, default** CustomApplication metadat
|
|
|
31
35
|
</CustomApplication>
|
|
32
36
|
```
|
|
33
37
|
|
|
34
|
-
## Fallback Template (older API versions — `uiBundle` field NOT available)
|
|
35
|
-
```xml
|
|
36
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
37
|
-
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
38
|
-
<brand>
|
|
39
|
-
<headerColor>#0070D2</headerColor>
|
|
40
|
-
<shouldOverrideOrgTheme>false</shouldOverrideOrgTheme>
|
|
41
|
-
</brand>
|
|
42
|
-
<formFactors>Small</formFactors>
|
|
43
|
-
<formFactors>Large</formFactors>
|
|
44
|
-
<isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
|
|
45
|
-
<isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
|
|
46
|
-
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
|
|
47
|
-
<isOmniPinnedViewEnabled>false</isOmniPinnedViewEnabled>
|
|
48
|
-
<label>{appLabel}</label>
|
|
49
|
-
<navType>Standard</navType>
|
|
50
|
-
<webApplication>{appName}</webApplication>
|
|
51
|
-
<uiType>Lightning</uiType>
|
|
52
|
-
</CustomApplication>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
38
|
## Field Reference
|
|
56
39
|
|
|
57
40
|
| Field | Required | Version | Description |
|
|
@@ -65,6 +48,5 @@ This configuration file creates a **net-new, default** CustomApplication metadat
|
|
|
65
48
|
| `isOmniPinnedViewEnabled` | Yes | All | Enable Omni-channel pinned view. Default: `false`. |
|
|
66
49
|
| `label` | Yes | All | Human-readable label shown in the App Launcher and app switcher. |
|
|
67
50
|
| `navType` | Yes | All | Navigation type. Use `Standard` for standard Lightning navigation. |
|
|
68
|
-
| `uiBundle` |
|
|
69
|
-
| `webApplication` | Conditional | Older | Developer name of the UI bundle (`{appName}`, no namespace). Use when `uiBundle` field is not available. |
|
|
51
|
+
| `uiBundle` | Required for this workflow | 67.0+ | Namespace-qualified developer name of the UI bundle (`{appNamespace}__{appName}`). Follow Step 2's context lookup, deployment-version check, and disclosed unavailable-context fallback. |
|
|
70
52
|
| `uiType` | Yes | All | UI framework type. Must be `Lightning` for UI bundle apps. |
|
|
@@ -226,8 +226,7 @@ does.
|
|
|
226
226
|
- **Generic Setup org-preference operation**: `enableGiftPlanning` → `GiftPlanningEnabled`;
|
|
227
227
|
`enableGiftAgreement` → `GiftAgreementEnabled`; `enablePhilResearchAgent` →
|
|
228
228
|
`PhilResearchAgentEnabled`; `enableInteractionSummaryPref` → `InteractionSummaryPref`. Write via
|
|
229
|
-
`platform.setup.setup-metadata.setOrgPreference` (`
|
|
230
|
-
/headless/invoke/platform/setup/setup-metadata/set-org-preference`, body `{"orgPreferences":
|
|
229
|
+
`platform.setup.setup-metadata.setOrgPreference` (`platform.setup.setup-metadata.setOrgPreference`, body `{"orgPreferences":
|
|
231
230
|
{"<Name>": <bool>}}`). Do **not** use this operation's read side (`isOrgPreferenceEnabled`) for
|
|
232
231
|
verification: it takes a list-valued parameter that the dispatch path cannot carry, so
|
|
233
232
|
the call fails `400 REQUEST_ERROR "Invalid request"` however it is encoded — not a usage mistake. Verify instead with the best-effort Tooling read described under "Verifying a toggle" below.
|
|
@@ -383,7 +382,7 @@ below, directly by path, and nothing else. This is an allowlist, not a skip-list
|
|
|
383
382
|
steps that SOR contains today, adds, or renames later, this skill is unaffected as long as these
|
|
384
383
|
four paths keep working, because it never calls the SOR by id in the first place.
|
|
385
384
|
|
|
386
|
-
1. `
|
|
385
|
+
1. `setup.platform.person-account-settings.checkPersonAccountReadiness_PersonAccountEnablementController` — returns
|
|
387
386
|
`personAccountsEnabled`, `termsConditionsAccepted`, `accountRecordTypeCreated`, `profilePermsSet`,
|
|
388
387
|
`orgWideSharingSet`, `allStepsComplete`. If `personAccountsEnabled` is already `true`, skip the
|
|
389
388
|
rest of this chain. `accountRecordTypeCreated` and the profile-visibility gate are already
|
|
@@ -391,14 +390,13 @@ four paths keep working, because it never calls the SOR by id in the first place
|
|
|
391
390
|
below — run those first if either gate is still false. If `profilePermsSet`/`orgWideSharingSet`
|
|
392
391
|
are false for a reason not covered by those sub-checks, fall back to the manual Setup UI gate for
|
|
393
392
|
just the unmet gate rather than blocking the whole chain on it.
|
|
394
|
-
2. `
|
|
393
|
+
2. `setup.platform.person-account-settings.acceptTermsAndConditions` once
|
|
395
394
|
`accountRecordTypeCreated` is true. Re-read step 1 and assert `termsConditionsAccepted = true`
|
|
396
395
|
before continuing — never trust the `PATCH` response alone.
|
|
397
396
|
3. **Explicit confirmation, then the irreversible write.** `enable-person-accounts` is documented
|
|
398
397
|
IRREVERSIBLE by the operation itself ("Do NOT call without explicit user confirmation") — gate it
|
|
399
398
|
exactly like Fundraising's own dedicated enablement confirmation below: warn that it's irreversible
|
|
400
|
-
and org-wide, get an explicit `AskUserQuestion` confirmation, then `
|
|
401
|
-
/headless/invoke/platform/person-account-settings/enable-person-accounts`. On decline, stop, zero
|
|
399
|
+
and org-wide, get an explicit `AskUserQuestion` confirmation, then `setup.platform.person-account-settings.enablePersonAccounts`. On decline, stop, zero
|
|
402
400
|
further writes, `STOPPED_PERSON_ACCOUNTS_MISSING`.
|
|
403
401
|
4. Re-verify via step 1's `GET` again (`personAccountsEnabled = true`) and the existing
|
|
404
402
|
`FieldDefinition` check Layer 0 already runs (`IsPersonAccount` on `Account`, `totalSize > 0`) —
|
|
@@ -346,7 +346,8 @@ Method-level format:
|
|
|
346
346
|
- `@InvocableVariable` parameters: `label` (required), `description`, `required=true/false`
|
|
347
347
|
- `@InvocableVariable` supports: primitives, `Id`, `SObject`, `List<T>` only (no `Map`/`Set`/`Blob`); use `List<Id>` or `List<SObject>` fields for Flow collection I/O
|
|
348
348
|
- Always include `isSuccess`, `errorMessage`, and `errorType` (`e.getTypeName()`) in Response
|
|
349
|
-
- Return errors in Response
|
|
349
|
+
- Return errors in Response; throwing triggers the Flow Fault path — reserve for unrecoverable failures
|
|
350
|
+
- Always does DML? Add a sidecar: `references/dml-declarations.md`
|
|
350
351
|
|
|
351
352
|
### REST Resource (`@RestResource`)
|
|
352
353
|
- Template: `assets/rest-resource.cls`
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
<<<<<<< Updated upstream
|
|
3
|
-
* @description Abstract base class for {describe the family of classes this serves}.
|
|
4
|
-
=======
|
|
5
2
|
* Abstract base class for {describe the family of classes this serves}.
|
|
6
|
-
>>>>>>> Stashed changes
|
|
7
3
|
* Provides common behavior and defines extension points for subclasses.
|
|
8
4
|
* Subclasses must implement the abstract methods to provide specific behavior.
|
|
9
5
|
*
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
InvocableActionExtension sidecar declaring the DML that {ClassName}'s @InvocableMethod ALWAYS performs.
|
|
4
|
+
Lets Flow's Validation Exception Checker treat the action like a Record Insert/Update/Delete element.
|
|
5
|
+
|
|
6
|
+
Path (source format): force-app/main/default/invocableactionextensions/{ClassName}.invocableactionextension-meta.xml
|
|
7
|
+
Path (MDAPI format): invocableactionextensions/{ClassName}.invocableactionextension
|
|
8
|
+
File name and <targetName> must both equal the Apex class name.
|
|
9
|
+
Versions: the class apiVersion doesn't matter. Deploy at API 64.0+ (InvocableActionExtension type minimum).
|
|
10
|
+
The DmlDeclarations key needs an org release that supports it; older orgs reject it as an invalid attribute key.
|
|
11
|
+
|
|
12
|
+
value = JSON list; one entry per operation + object:
|
|
13
|
+
operation INSERT | UPDATE | DELETE (no UPSERT)
|
|
14
|
+
exactly one of: "object":"Case" | "dynamicTypeRef":"T__records" | "isDynamicTarget":true
|
|
15
|
+
fields optional list of written field API names; omit/empty = "any field may be written"
|
|
16
|
+
Declare ONLY unconditional DML. Omit this file entirely if the action has no DML or only conditional DML.
|
|
17
|
+
-->
|
|
18
|
+
<InvocableActionExtension xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
19
|
+
<targets>
|
|
20
|
+
<attributes>
|
|
21
|
+
<key>DmlDeclarations</key>
|
|
22
|
+
<value>[{"operation":"INSERT","object":"{SObject}","fields":["{Field1}","{Field2}"]}]</value>
|
|
23
|
+
<dataType>String</dataType>
|
|
24
|
+
</attributes>
|
|
25
|
+
<targetName>{ClassName}</targetName>
|
|
26
|
+
<targetType>ActionDefinition</targetType>
|
|
27
|
+
</targets>
|
|
28
|
+
</InvocableActionExtension>
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Invocable Apex action for {describe the action}.
|
|
3
3
|
* Callable from Flows, Process Builder, and Agentforce.
|
|
4
4
|
* Accepts bulkified List<Request>, returns List<Response>.
|
|
5
|
+
* If execute() ALWAYS performs DML, also generate {ClassName}.invocableactionextension-meta.xml
|
|
6
|
+
* (assets/invocable-action-extension.invocableactionextension-meta.xml) declaring it; omit for conditional/no DML.
|
|
5
7
|
*/
|
|
6
8
|
public with sharing class {ClassName} {
|
|
7
9
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# DML declarations (`InvocableActionExtension` sidecar)
|
|
2
|
+
|
|
3
|
+
If every successful invoke **always** inserts, updates or deletes records,
|
|
4
|
+
also generate an `InvocableActionExtension` sidecar declaring that DML.
|
|
5
|
+
Flow's Validation Exception Checker then treats the action like a Record
|
|
6
|
+
Insert/Update/Delete element and can warn about likely validation-rule
|
|
7
|
+
failures. The file is optional, and nothing checks it (honor system), so it
|
|
8
|
+
must be accurate.
|
|
9
|
+
|
|
10
|
+
- **Template:** `../assets/invocable-action-extension.invocableactionextension-meta.xml`
|
|
11
|
+
- **Path:** `force-app/main/default/invocableactionextensions/{ClassName}.invocableactionextension-meta.xml`.
|
|
12
|
+
The file name and `<targetName>` must both equal the class name.
|
|
13
|
+
`<targetType>ActionDefinition</targetType>`.
|
|
14
|
+
- **Versions:** the class's own `apiVersion` doesn't matter. The deploy
|
|
15
|
+
(package/`sourceApiVersion`) must be 64.0+, because that's when
|
|
16
|
+
`InvocableActionExtension` was added. The `DmlDeclarations` key also needs
|
|
17
|
+
an org on a release that supports it. Older orgs reject it with *"The
|
|
18
|
+
"DmlDeclarations" attribute key is invalid…"*. If that happens, drop the
|
|
19
|
+
sidecar rather than renaming the key to `__c`.
|
|
20
|
+
- **Attribute:** `<key>DmlDeclarations</key>`, `<dataType>String</dataType>`,
|
|
21
|
+
and a `<value>` holding a **JSON list** with one entry per operation and
|
|
22
|
+
object.
|
|
23
|
+
|
|
24
|
+
**When to declare**
|
|
25
|
+
|
|
26
|
+
| The method… | Sidecar entry? |
|
|
27
|
+
|---|---|
|
|
28
|
+
| Always inserts/updates/deletes on every successful request | **Yes** |
|
|
29
|
+
| Does DML only on some branch (input flag, "if not found", "only if changed") | **No**, leave that operation out |
|
|
30
|
+
| Does no DML, or only does callouts or sends email | **No**. Don't generate the file. |
|
|
31
|
+
| Uses `Database.upsert` | Declare the operation it always resolves to. If it can be either insert or update, declare neither (there's no `UPSERT`). |
|
|
32
|
+
|
|
33
|
+
**Entry rules**
|
|
34
|
+
|
|
35
|
+
- Each entry has `operation` (`INSERT`, `UPDATE` or `DELETE`) and **exactly
|
|
36
|
+
one** target:
|
|
37
|
+
- `"object":"Case"` for a fixed object.
|
|
38
|
+
- `"dynamicTypeRef":"T__records"` when the `@InvocableVariable` is a generic
|
|
39
|
+
`SObject`/`List<SObject>`. The placeholder is `T__` plus the variable name.
|
|
40
|
+
- `"isDynamicTarget":true` when the object comes from a runtime input,
|
|
41
|
+
such as a String `objectApiName`.
|
|
42
|
+
- Add `"fields":[...]` with the field API names you write. If you leave it
|
|
43
|
+
out, Flow assumes every field may be written.
|
|
44
|
+
- Deploy rejects an invalid value with *"The DML declarations value is
|
|
45
|
+
invalid: …"*. For example, an entry that sets both `object` and
|
|
46
|
+
`isDynamicTarget` fails with *"…must set exactly one of object,
|
|
47
|
+
dynamicTypeRef or isDynamicTarget"*.
|
|
48
|
+
|
|
49
|
+
**Worked example: single object.** A method that always inserts one Case
|
|
50
|
+
per request:
|
|
51
|
+
|
|
52
|
+
```xml
|
|
53
|
+
<value>[{"operation":"INSERT","object":"Case","fields":["Subject","Description","Origin","ContactId"]}]</value>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Multi-object example: Convert Lead.** A method that always converts with
|
|
57
|
+
`Database.convertLead` and always creates a new Account, Contact and
|
|
58
|
+
Opportunity:
|
|
59
|
+
|
|
60
|
+
```xml
|
|
61
|
+
<value>[{"operation":"INSERT","object":"Account","fields":["Name"]},{"operation":"INSERT","object":"Contact","fields":["FirstName","LastName","AccountId"]},{"operation":"INSERT","object":"Opportunity","fields":["Name","AccountId","StageName","CloseDate"]},{"operation":"UPDATE","object":"Lead","fields":["IsConverted","Status","ConvertedAccountId","ConvertedContactId","ConvertedOpportunityId"]}]</value>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If the request can pass an existing `accountId`, or sets
|
|
65
|
+
`setDoNotCreateOpportunity(true)`, those INSERT entries become conditional
|
|
66
|
+
and **must** be removed. The Lead UPDATE always stays.
|
|
67
|
+
|
|
68
|
+
Add the sidecar to `package.xml` / the deploy manifest as type
|
|
69
|
+
`InvocableActionExtension`, with member `{ClassName}`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: platform-metadata-discovery-get
|
|
3
|
-
description: "
|
|
3
|
+
description: "Find existing Salesforce metadata and explain org configuration. Use for questions about objects, fields, picklist values, relationships, permissions, and automation, and before creating metadata or writing code against it. Chooses a verified org and a suitable discovery, query, inventory, or retrieval route. DO NOT TRIGGER for whole-org overviews, org comparison, or drift (use dx-org-analyze), metadata file structure or XML shape (platform-metadata-api-context-get), or Data Cloud DLO and DMO schema (data360-code-extension-generate)."
|
|
4
4
|
metadata:
|
|
5
5
|
relatedSkills:
|
|
6
6
|
- data360-code-extension-generate
|
|
@@ -35,23 +35,26 @@ id: "platform-metadata-discovery-get"
|
|
|
35
35
|
|
|
36
36
|
Before you create metadata, change it, or write code that references it, know what already exists in the org. This skill picks the tool for each question. Metadata grounding finds metadata by meaning when you do not know its name. It needs Salesforce Catalog and a connected grounding server, and many orgs and setups have neither. Every other route works with the `sf` CLI alone.
|
|
37
37
|
|
|
38
|
+
Before calling any metadata grounding operation, load `platform-metadata-grounding-get` if it has not already been loaded in this conversation. This applies to exact-name lookups, configuration queries, semantic searches, and fallback to grounding after another route fails. Choosing grounding is a separate decision from choosing this discovery skill; do not call its tools using only the routing table below. If the skill cannot be loaded, explain that and choose another supported route.
|
|
39
|
+
|
|
38
40
|
Skip discovery when the request only changes local files and adds no new references to org metadata.
|
|
39
41
|
|
|
40
42
|
## Check What You Have
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
Establish the target and available routes once per session; revisit them when the target changes.
|
|
43
45
|
|
|
44
|
-
1. **
|
|
45
|
-
2. **
|
|
46
|
-
3. **
|
|
46
|
+
1. **Target org.** Use the org explicitly selected by the user or supplied by the host, workspace, or authenticated tool connection. An explicit user target takes precedence over defaults and other connections. A CLI default alone does not establish which org the user intends. Do not run an unqualified `sf org display` or ask for CLI login as a prerequisite to using an already connected MCP.
|
|
47
|
+
2. **Available tools.** A working authenticated Metadata Grounding MCP or Salesforce MCP can answer supported questions without local CLI authorization. Discover the tools actually available. Before the first grounding operation on either server, load `platform-metadata-grounding-get` if it is available, including when discovery was entered through another skill. Its related-skill listing alone does not load its instructions. If loading fails, report the limitation and use another supported route; do not pretend the skill loaded.
|
|
48
|
+
3. **CLI when needed.** Use an explicit target with each CLI command: `--target-org <confirmed-alias-or-username>`. Confirm that target's identity before combining its results with another connection. If the host has not provided a target, or connections disagree, ask which org to use before making CLI calls. Do not choose a default org or log into a different org to make a lookup work.
|
|
49
|
+
4. **One org.** Grounding identifiers begin with the org id; use returned identifiers unchanged. If combining tools, compare the authenticated org identities, rather than comparing an MCP connection against an unrelated CLI default. A local authentication failure says nothing about whether grounding is available. Use another connected route only when it is known to target the intended org.
|
|
47
50
|
|
|
48
51
|
## Route by Intent
|
|
49
52
|
|
|
50
53
|
| Intent | Use | If that is not available |
|
|
51
54
|
|---|---|---|
|
|
52
55
|
| Find metadata by meaning, check a name you are guessing, or check for something to reuse | Metadata grounding search. Load `platform-metadata-grounding-get`, which picks the server. | Name and label fallback, below. Notify. |
|
|
53
|
-
| Explain how something is configured, or who can access it | Metadata grounding query | Scoped SOQL on `EntityParticle`, `FieldPermissions`, `ObjectPermissions`, or Tooling `ValidationRule`. Notify. |
|
|
54
|
-
| Check names, types, or picklist values you know. Every field on one object. Data records | Scoped SOQL
|
|
56
|
+
| Explain how something is configured, or who can access it | Metadata grounding query after loading `platform-metadata-grounding-get` | Scoped SOQL on `EntityParticle`, `FieldPermissions`, `ObjectPermissions`, or Tooling `ValidationRule`. Notify. |
|
|
57
|
+
| Check names, types, or picklist values you know. Every field on one object. Data records | Scoped SOQL on a confirmed, authenticated CLI target. If CLI access is unavailable, use a connected same-org grounding query or the Salesforce MCP; load the grounding skill before grounding calls. If a scoped lookup returns nothing, search by meaning. | See the note below the table. |
|
|
55
58
|
| Full shape of one object, including relationships | `sf sobject describe --sobject <Type>`, only when you need all of it. It is very large. | Same |
|
|
56
59
|
| Every object in the org | `sf sobject list --sobject all` or `--sobject custom` | Same |
|
|
57
60
|
| Every member of a type, or a count ("all flows", "how many flows") | `sf org list metadata --metadata-type <Type>` | Same |
|
|
@@ -60,9 +63,9 @@ Do this once per session, before the first lookup.
|
|
|
60
63
|
| Compare orgs, find drift, or an overview of a whole org when the user asks for one | `dx-org-analyze`. It takes minutes and returns names and counts. | Tell the user this needs the `sf` CLI. |
|
|
61
64
|
| Where is this used, what depends on it, what breaks if I change it, or is it safe to delete | Comprehensive analysis is not available yet. State that boundary before offering explicitly labeled partial checks. | |
|
|
62
65
|
|
|
63
|
-
**Without the CLI.**
|
|
66
|
+
**Without the CLI.** A connected same-org grounding server can still answer the search and query questions it supports. For inventory and other routes, read `references/h360-routes.md` when the Salesforce MCP is connected. If no available route can supply the requested information or completeness, explain that limit.
|
|
64
67
|
|
|
65
|
-
|
|
68
|
+
Choose a route based on the information needed and the connections that are actually usable for the intended org. Do not force a CLI route merely because a shell exists. Ranked grounding results cannot replace a complete enumeration or source retrieval; when no suitable route is available, state that limit.
|
|
66
69
|
|
|
67
70
|
A question about a topic or purpose ("what do we have for loyalty") is discovery, not an overview. Do not run an org analysis for it, even when grounding is not available.
|
|
68
71
|
|
|
@@ -72,6 +75,8 @@ When a request mixes intents, use the right tool for each part. "Add a tier disc
|
|
|
72
75
|
|
|
73
76
|
## Scoped SOQL
|
|
74
77
|
|
|
78
|
+
In all examples below, add `--target-org <confirmed-alias-or-username>` to CLI commands. Never substitute an unconfirmed CLI default.
|
|
79
|
+
|
|
75
80
|
Scoped SOQL is a targeted query on setup objects, filtered to what you need. It is exact, real time, and far smaller than a describe. It never returns source.
|
|
76
81
|
|
|
77
82
|
```text
|
|
@@ -163,7 +168,7 @@ Before you write Apex, LWC, SOQL, or Flow logic, confirm every object, field, an
|
|
|
163
168
|
|
|
164
169
|
- This skill decides what already exists. Build skills decide how to create it. Run discovery before any skill writes files.
|
|
165
170
|
- If a loaded skill has its own equivalent semantic reuse check, use it instead of the matching step here. Do not run both. An exact-name or exact-label collision check is not equivalent and does not replace semantic reuse discovery.
|
|
166
|
-
-
|
|
171
|
+
- Always look up picklist values. Prefer a scoped query for exact facts when an authenticated, confirmed route is available; avoid a full object describe unless its full shape is needed. Load the grounding skill whenever the chosen route is grounding.
|
|
167
172
|
- If a skill's discovery step fails or its tool is not available, use the routes in this skill and tell the user once.
|
|
168
173
|
|
|
169
174
|
## Freshness and Local Files
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: platform-metadata-grounding-get
|
|
3
|
-
description: "Find
|
|
3
|
+
description: "Find Salesforce metadata by meaning and read how an org's fields, picklists, objects, permissions, or automation are configured. Use for Catalog-backed discovery and configuration inspection, including known API names. Read before using search_metadata, query_metadata, describe_metadata, or Salesforce MCP grounding operations. DO NOT TRIGGER for choosing between grounding, SOQL, and the CLI (use platform-metadata-discovery-get), retrieving source (platform-metadata-retrieve), or Data Cloud DLO and DMO schema (data360-code-extension-generate)."
|
|
4
4
|
metadata:
|
|
5
5
|
relatedSkills:
|
|
6
6
|
- data360-code-extension-generate
|
|
@@ -36,10 +36,12 @@ Metadata grounding searches the org's Salesforce Catalog, an index of the org's
|
|
|
36
36
|
|
|
37
37
|
Results are ranked and capped. They are never a complete list, and grounding never returns source.
|
|
38
38
|
|
|
39
|
+
Use the org bound to the connected tool or explicitly selected by the user. Do not infer that connection from an unrelated CLI default, and do not require local CLI authentication before using a working MCP. When combining tools, establish that they target the same org; otherwise ask before combining results.
|
|
40
|
+
|
|
39
41
|
## When Not to Use Grounding
|
|
40
42
|
|
|
41
43
|
- Questions about standard Salesforce features or product behavior that do not depend on this org.
|
|
42
|
-
-
|
|
44
|
+
- For a name you know, prefer a scoped query when a confirmed, authenticated route is available. A same-org grounding query remains useful when CLI access is unavailable; do not require CLI login to use a working grounding connection.
|
|
43
45
|
- A complete list, a count, or proof that something does not exist. Use scoped SOQL or `sf org list metadata`.
|
|
44
46
|
- Source to edit or deploy. Retrieve it with `platform-metadata-retrieve`.
|
|
45
47
|
- Where something is used, or what breaks if it changes. Grounding has no reference data.
|
|
@@ -149,7 +151,7 @@ Identifiers have three parts separated by `::`: the 18-character org id, the nam
|
|
|
149
151
|
|
|
150
152
|
## Grounding Discipline
|
|
151
153
|
|
|
152
|
-
- Cite the API names, labels, and properties the tools returned. Say which statements are observed and which are inferred.
|
|
154
|
+
- Cite the API names, labels, and properties the tools returned. Say which statements are observed and which are inferred. Answer the question asked; omit unrelated configuration details unless they help. A missing property is unknown, not false or a default value. For example, a generic reference type alone does not distinguish lookup from master-detail.
|
|
153
155
|
- Say "no match found in the org catalog." Never say the metadata does not exist.
|
|
154
156
|
- Never treat results as a complete list.
|
|
155
157
|
- Never write or deploy files built from query output. It returns properties, not source.
|