@salesforce/afv-skills 1.68.0 → 1.69.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/afcc-setup-coordinate/SKILL.md +348 -0
- package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
- package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
- package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
- package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
- package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
- package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
- package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
- package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
- package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
- package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
- package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
- package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
- package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
- package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
- package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
- package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
- package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
- package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
- package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
- package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
- package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
- package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
- package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
- package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
- package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
- package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
- package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +23 -31
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +2 -1
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +118 -2
- package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +2 -2
- package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +9 -2
- package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +12 -1
- package/skills/commerce-react-storefront-create/SKILL.md +54 -21
- package/skills/dx-lifecycle-center/SKILL.md +24 -18
- package/skills/dx-lifecycle-center/examples/workflows.md +57 -34
- package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
- package/skills/dx-lifecycle-center/references/connect-org.md +59 -28
- package/skills/dx-lifecycle-center/references/deploy.md +3 -3
- package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
- package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
- package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
- package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
- package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
- package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
- package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
- package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +2 -3
- package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +10 -7
- package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
- package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
- package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
- package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
- package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
- package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
- package/skills/experience-afv-analytics-query/SKILL.md +239 -0
- package/skills/experience-afv-analytics-query/references/references.md +176 -0
- package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
- package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
- package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
- package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
- package/skills/experience-app-mcp-generate/SKILL.md +174 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
- package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
- package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
- package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
- package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
- package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
- package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
- package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
- package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
- package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
- package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
- package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
- package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
- package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
- package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
- package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
- package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
- package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
- package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
- package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
- package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
- package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
- package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
- package/skills/experience-cms-content-type-generate/SKILL.md +1 -1
- package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
- package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
- package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
- package/skills/platform-custom-field-generate/SKILL.md +24 -16
- package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
- package/skills/platform-custom-setting-generate/SKILL.md +1 -0
- package/skills/platform-dataspace-access-configure/SKILL.md +25 -10
- package/skills/platform-flexipage-generate/SKILL.md +7 -10
- package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
- package/skills/platform-policy-rule-generate/SKILL.md +9 -7
- package/skills/platform-policy-rule-generate/references/condition-model.md +3 -3
- package/skills/platform-policy-rule-generate/references/conjunction-expression.md +9 -1
- package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +9 -1
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +1 -0
- package/skills/platform-policy-rule-generate/references/headless-transport.md +2 -2
- package/skills/platform-policy-rule-generate/references/policy-schema-full.md +1 -1
- package/skills/platform-policy-rule-generate/references/policy-shapes.md +33 -0
- package/skills/platform-policy-rule-generate/references/templates-advanced.md +1 -1
- package/skills/platform-policy-rule-generate/references/ui-compatibility.md +5 -5
- package/skills/platform-report-generate/SKILL.md +20 -1
- package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
- package/skills/platform-report-generate/references/verification-checklist.md +12 -0
- package/skills/service-digital-engagement-channel-configure/SKILL.md +44 -107
- package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +2 -0
- package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
- package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
- package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
- package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +18 -14
- package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +16 -20
- package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
- package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
- package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
- package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
- package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
- package/skills/service-e911-configure/SKILL.md +242 -0
- package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
- package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
- package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
- package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
- package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
- package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
- package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
- package/skills/dx-lifecycle-center/assets/widgets/connect-connected/connect-connected.json +0 -65
- package/skills/dx-lifecycle-center/assets/widgets/connect-connected/schema.json +0 -32
- package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/connect-sign-in.json +0 -57
- package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/schema.json +0 -21
- package/skills/dx-lifecycle-center/scripts/card-policy.jq +0 -71
- package/skills/dx-lifecycle-center/scripts/fill-widget.jq +0 -29
- package/skills/dx-lifecycle-center/scripts/widget.sh +0 -28
- package/skills/experience-content-media-image-generate/SKILL.md +0 -83
- package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
- package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
- package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
|
@@ -5,14 +5,31 @@
|
|
|
5
5
|
This skill provisions every active human user on the org, not just the invoking user. Query:
|
|
6
6
|
|
|
7
7
|
```sql
|
|
8
|
-
SELECT Id, Username, Name, UserType, IsActive, ProfileId, Profile.Name
|
|
8
|
+
SELECT Id, Username, Name, UserType, IsActive, ProfileId, Profile.Name,
|
|
9
|
+
Profile.UserLicense.LicenseDefinitionKey, CreatedBy.Name
|
|
9
10
|
FROM User
|
|
10
11
|
WHERE IsActive = true AND UserType = 'Standard'
|
|
12
|
+
AND Profile.UserLicense.LicenseDefinitionKey = 'SFDC'
|
|
11
13
|
```
|
|
12
14
|
|
|
13
15
|
`UserType = 'Standard'` alone is not sufficient — built-in integration/bot accounts (seen live:
|
|
14
16
|
"SalesforceIQ Integration", "Insights Integration", "Bot User", "DigitalAgent.*") also carry
|
|
15
|
-
`UserType = 'Standard'`.
|
|
17
|
+
`UserType = 'Standard'`. The `LicenseDefinitionKey = 'SFDC'` clause keeps only full Salesforce
|
|
18
|
+
licenses, which drops service accounts on Salesforce Integration or other non-full licenses. It is
|
|
19
|
+
not enough on its own, because some integration users hold a full license, so also exclude:
|
|
20
|
+
|
|
21
|
+
- rows whose `Name` matches the patterns above; and
|
|
22
|
+
- rows whose `CreatedBy.Name` is an automation identity ("Automated Process", "Integration User",
|
|
23
|
+
"Platform Integration", or a name matching the patterns above) **and** whose `Username` or `Name`
|
|
24
|
+
also looks like a service account (contains the whole word `integration`, `bot`, `service`,
|
|
25
|
+
`svc` or `noreply`; not a substring, and not generic words like `system` or `api`, which appear in real
|
|
26
|
+
names). `CreatedBy.Name` alone is not enough: trial, dev and SCIM-provisioned orgs create
|
|
27
|
+
real admins through those same identities, so a real person must not be dropped on creator alone.
|
|
28
|
+
|
|
29
|
+
Users on a non-full license (e.g. Salesforce Platform) are skipped by the query, not misclassified.
|
|
30
|
+
Run the same query once more without the license clause to find them, and list them separately in the plan confirmation as "not provisioned — non-full license" so the admin
|
|
31
|
+
can request them explicitly. Show the included users and the excluded accounts to the admin before
|
|
32
|
+
any assignment is written, and never add an excluded account back without the admin's explicit say-so.
|
|
16
33
|
|
|
17
34
|
Classify each remaining user by `Profile.Name`:
|
|
18
35
|
|
|
@@ -73,7 +73,7 @@ Mandatory for Long/Rich text and Multi-select picklists to control UI height.
|
|
|
73
73
|
| Type | `<type>` Value | Required Attributes |
|
|
74
74
|
|------|----------------|---------------------|
|
|
75
75
|
| Auto Number | `AutoNumber` | `displayFormat` (must include `{0}`), `startingNumber` |
|
|
76
|
-
| Checkbox | `Checkbox` | Default `defaultValue` to `false` |
|
|
76
|
+
| Checkbox | `Checkbox` | Default `defaultValue` to `false` for non-formulas only |
|
|
77
77
|
| Date | `Date` | No precision/length required |
|
|
78
78
|
| Date/Time | `DateTime` | No precision/length required |
|
|
79
79
|
| Email | `Email` | Built-in format validation |
|
|
@@ -95,7 +95,7 @@ Mandatory for Long/Rich text and Multi-select picklists to control UI height.
|
|
|
95
95
|
|
|
96
96
|
| Type | `<type>` Value | Required Attributes |
|
|
97
97
|
|------|----------------|---------------------|
|
|
98
|
-
| Formula | Result type (e.g., `Number`) | `formula
|
|
98
|
+
| Formula | Result type (e.g., `Number`) | `formula` (see Section 6), `formulaTreatBlanksAs` |
|
|
99
99
|
| Roll-Up Summary | `Summary` | See Section 5 for complete requirements |
|
|
100
100
|
| Multi-Select Picklist | `MultiselectPicklist` | `valueSet`, `visibleLines` (default 4) |
|
|
101
101
|
|
|
@@ -343,23 +343,26 @@ ChildObjectAPIName__c.FieldAPIName__c
|
|
|
343
343
|
|
|
344
344
|
## 6. Formula Field Rules
|
|
345
345
|
|
|
346
|
-
|
|
346
|
+
1. **Before delegating/writing XML, recursively list/read the user's `**/*.field-meta.xml` files for API names/types; or retrieve SObject schema, not metadata-type docs.**
|
|
347
|
+
2. Use `formula-management`'s returned expression; otherwise call its **Create** if available: original request verbatim; no guessed names/types,
|
|
348
|
+
`entityName`=object API, `formulaType=CustomField`, `returnType`=`<type>`
|
|
349
|
+
(`Checkbox`→`Boolean`; input, not XML). Use expression in field XML; **Modify** updates.
|
|
350
|
+
If unavailable, author here.
|
|
347
351
|
|
|
348
|
-
|
|
352
|
+
`<type>`: `Checkbox`, `Currency`, `Date`, `DateTime`, `Number`, `Percent`, or `Text` — never `Formula`.
|
|
349
353
|
|
|
350
|
-
-
|
|
354
|
+
- No `<length>`/`<defaultValue>`; numeric: `<precision>` + `<scale>`.
|
|
351
355
|
|
|
352
|
-
###
|
|
356
|
+
### XML
|
|
353
357
|
|
|
354
|
-
-
|
|
355
|
-
-
|
|
356
|
-
-
|
|
358
|
+
- `<formula>` uses `<![CDATA[ ... ]]>` for `&`, `<`, `>`.
|
|
359
|
+
- Escape `]]>`: `<![CDATA[Text_Field__c & "]]]]><![CDATA[>"]]>`.
|
|
360
|
+
- No XML `returnType`; use `<type>`.
|
|
357
361
|
|
|
358
|
-
###
|
|
362
|
+
### Blanks
|
|
359
363
|
|
|
360
|
-
|
|
361
|
-
-
|
|
362
|
-
- IF formula result type = `Text`, `Date`, or `DateTime` → set `<formulaTreatBlanksAs>BlankAsBlank</formulaTreatBlanksAs>`
|
|
364
|
+
- `Number`, `Currency`, `Percent` → `<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>`
|
|
365
|
+
- `Text`, `Date`, `DateTime` → `<formulaTreatBlanksAs>BlankAsBlank</formulaTreatBlanksAs>`
|
|
363
366
|
|
|
364
367
|
### INCORRECT — Using Formula as type:
|
|
365
368
|
|
|
@@ -387,11 +390,15 @@ A Formula is not a type itself. The `<formula>` tag is added to a field whose `<
|
|
|
387
390
|
</CustomField>
|
|
388
391
|
```
|
|
389
392
|
|
|
390
|
-
###
|
|
393
|
+
### References
|
|
391
394
|
|
|
392
|
-
-
|
|
395
|
+
- Deploy referenced fields first; missing references fail deployment.
|
|
393
396
|
- Use `ISPICKVAL()` (not `==`) for picklist comparisons.
|
|
394
|
-
-
|
|
397
|
+
- Use `VALUE()` for Text/AutoNumber in numeric functions like `MOD()`.
|
|
398
|
+
- Percent: 5% = 0.05.
|
|
399
|
+
- Subtract like types: `TODAY()-DateField`, `NOW()-DateTimeField`. Use `DATEVALUE(DateTimeField)` with `YEAR()`/`MONTH()`/`DAY()`, never wrap a Date.
|
|
400
|
+
- No `URLENCODE()`.
|
|
401
|
+
- Full formula-function reference: `platform-validation-rule-generate`.
|
|
395
402
|
|
|
396
403
|
---
|
|
397
404
|
|
|
@@ -450,6 +457,7 @@ Before generating CustomField XML, verify:
|
|
|
450
457
|
- [ ] Does the child object have a Master-Detail field to this parent?
|
|
451
458
|
|
|
452
459
|
### Formula Field Checks
|
|
460
|
+
- [ ] Was the expression delegated when available, or authored using Section 6's fallback?
|
|
453
461
|
- [ ] Is `<type>` set to result type (NOT "Formula")?
|
|
454
462
|
- [ ] Is `<formula>` content wrapped in `<![CDATA[ ... ]]>`?
|
|
455
463
|
- [ ] Is `<returnType>` attribute ABSENT? (does not exist in Metadata API)
|
|
@@ -3,6 +3,7 @@ name: platform-custom-metadata-type-generate
|
|
|
3
3
|
description: "Use to create, generate, or validate Salesforce Custom Metadata Type metadata — the __mdt object, fields, and deployable records. Trigger on custom metadata types, CMDT, __mdt objects, .md-meta.xml files, or cross-org reference/config data; also admin-maintained mapping/lookup/crosswalk tables (config that changes without a deploy belongs in a CMDT, never hardcoded in Apex/Flow), and CMDT deploy errors. DO NOT TRIGGER for Custom Settings (use platform-custom-setting-generate), business-record objects (use platform-custom-object-generate), or secrets/API keys (use a Named Credential)."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.0"
|
|
6
|
+
tags: ["setup"]
|
|
6
7
|
minApiVersion: "60.0"
|
|
7
8
|
domains: ["Platform"]
|
|
8
9
|
relatedSkills:
|
|
@@ -3,6 +3,7 @@ name: platform-custom-setting-generate
|
|
|
3
3
|
description: "Use to create, generate, or validate Salesforce Custom Setting metadata. Trigger on custom settings (hierarchy/list), customSettingsType, SetupOwnerId, per-profile/per-user config overrides, feature flags/toggles, kill switches, or admin on/off switches (e.g. bypass triggers during a data load); also \"create a custom setting\" or a setting that silently deployed as a regular object. A kill switch is just a checkbox on a hierarchy setting — generate ONLY the setting, never an Apex trigger/handler. DO NOT TRIGGER for Custom Metadata Types (use platform-custom-metadata-type-generate), business-record objects (use platform-custom-object-generate), or secrets/tokens (use a Named Credential)."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.0"
|
|
6
|
+
tags: ["setup"]
|
|
6
7
|
minApiVersion: "60.0"
|
|
7
8
|
domains: ["Platform"]
|
|
8
9
|
relatedSkills:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: platform-dataspace-access-configure
|
|
3
|
-
description: "
|
|
3
|
+
description: "Grant a permission set Data Cloud access two ways: (1) data-space (dataspace) access via dataspaceScopes in PermissionSet XML (MDAPI) — create, change, or remove it; (2) object-level access to a DMO/DLO/CIO object (e.g. Account__dlm) via the Object Access Grants Connect API (ssot/data-governance/object-access-grants) — grant, list, revoke; plus read-only scope inspection. TRIGGER on: dataspace scope / data space access for a permission set, dataAccessLevel / objectAccessLevel, 'use the Connect API to grant a permission set access to an <object>__dlm', RBAC object grants. DO NOT TRIGGER for creating the dataspace itself (the Data 360 data-space skill), a generic permission set with no dataspace access (platform-permission-set-generate), or an access policy / policy rule / tag-based access (platform-policy-rule-generate). For a vague object-access ask, ask permission-set way vs policy way."
|
|
4
4
|
metadata:
|
|
5
5
|
relatedSkills:
|
|
6
6
|
- "platform-permission-set-generate"
|
|
@@ -47,29 +47,44 @@ Object access has a second, separate path — a **data-governance access policy*
|
|
|
47
47
|
|
|
48
48
|
## Decide the Case First
|
|
49
49
|
|
|
50
|
+
> **Case B — preserve existing content.** Do not delete content you did not intend to change without the user's confirmation. Fix deploy or validation errors that trace to your own `<dataspaceScopes>` block (wrong element or enum names). For errors that originate in pre-existing content you were told to preserve (e.g. a `<tabSettings>` or `<fieldPermissions>` entry), make no further edits to that content and report the error message and the offending element in your reply. A request to fix validation errors does not authorize removing content the user told you to preserve; deleting it needs the user's explicit confirmation.
|
|
51
|
+
|
|
50
52
|
Pick exactly one case from the table below before writing any files. Each case has a different output shape.
|
|
51
53
|
|
|
52
54
|
| Case | User intent | Permission set state | Files to emit |
|
|
53
55
|
|---|---|---|---|
|
|
54
|
-
| **A. Create new permset with DS access** | "create a permission set called X with dataspace scope Y" | does NOT exist yet | `permissionsets/<Name>.permissionset-meta.xml` **and** `package.xml` |
|
|
55
|
-
| **B. Add DS access to existing permset** | "grant existing permission set X access to dataspace Y" | already deployed (may contain other permissions) | patched `permissionsets/<Name>.permissionset-meta.xml` **and** `package.xml` — see Case B workflow below |
|
|
56
|
+
| **A. Create new permset with DS access** | "create a permission set called X with dataspace scope Y" | does NOT exist yet | `permissionsets/<Name>.permissionset-meta.xml` **and** `package.xml` (create `package.xml` only if absent) |
|
|
57
|
+
| **B. Add DS access to existing permset** | "grant existing permission set X access to dataspace Y" | already deployed (may contain other permissions) | patched `permissionsets/<Name>.permissionset-meta.xml` **and** `package.xml` (keep the existing one if present; create only if absent) — see Case B workflow below |
|
|
56
58
|
| **C. Object-level grant only** | "grant permset X access to object Z (in dataspace Y)" — permset + scope already configured | already deployed with `dataspaceScopes` | `api-request.json` (Connect API body). NO permission set XML, NO `package.xml` |
|
|
57
59
|
| **D. Inspect existing DS access** | "which permission sets have access to dataspace Y?" | any | chat/report only. NO deployable files, NO runtime API mutation |
|
|
58
60
|
|
|
59
61
|
Only emit the files listed for the case you picked. Emitting Case A/B files for a Case C prompt (or vice versa) is a correctness failure — extra files change the deployment shape.
|
|
60
62
|
|
|
61
|
-
> **Case B — critical:** PermissionSet MDAPI deploy is a **full metadata replace**. Every `<objectPermissions>`, `<fieldPermissions>`, `<userPermissions>`, `<tabSettings>`, `<applicationVisibilities>`, `<recordTypeVisibilities>`, `<customPermissions>`, `<pageAccesses>`, `<classAccesses>`, `<customMetadataTypeAccesses>`, `<customSettingAccesses>`, `<externalDataSourceAccesses>` element you omit from the redeploy is **deleted from the org**. Before adding `<dataspaceScopes>`
|
|
63
|
+
> **Case B — critical:** PermissionSet MDAPI deploy is a **full metadata replace**. Every `<objectPermissions>`, `<fieldPermissions>`, `<userPermissions>`, `<tabSettings>`, `<applicationVisibilities>`, `<recordTypeVisibilities>`, `<customPermissions>`, `<pageAccesses>`, `<classAccesses>`, `<customMetadataTypeAccesses>`, `<customSettingAccesses>`, `<externalDataSourceAccesses>` element you omit from the redeploy is **deleted from the org**. Before adding, changing, or removing `<dataspaceScopes>` on an existing permset, start from its current XML and patch it — never author a permission set from scratch or write placeholder comments such as "replace with actual permissions", and never invent permissions that are not in the file.
|
|
62
64
|
|
|
63
65
|
### Case B workflow
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
0. **Local project first.** If the workspace already contains `permissionsets/<Name>.permissionset-meta.xml` (e.g. under `force-app/main/default/`), READ that file first and edit it in place — it is the current XML; no org or retrieve is needed. Also reuse an existing `package.xml` as-is (add the permset to `<members>` only if missing). If no org is connected, do not stop to ask; use the workspace files.
|
|
68
|
+
1. Only when the file is not in the workspace and an org is available, retrieve the existing permission set:
|
|
66
69
|
```bash
|
|
67
70
|
sf project retrieve start --metadata PermissionSet:<Name> --target-org <alias>
|
|
68
71
|
```
|
|
69
|
-
2. Open
|
|
70
|
-
3. Insert the `<dataspaceScopes>` block for the target DataSpace (element order in the file does not matter for MDAPI). If the file already has a `<dataspaceScopes>` block **for this same DataSpace**, replace only that block. Leave every `<dataspaceScopes>` block for other DataSpaces untouched — one block per DataSpace. For a requested scope removal,
|
|
71
|
-
4.
|
|
72
|
+
2. Open `permissionsets/<Name>.permissionset-meta.xml` (workspace copy or retrieved). Keep every element already there, byte-for-byte except the intended `<dataspaceScopes>` change.
|
|
73
|
+
3. Insert the `<dataspaceScopes>` block for the target DataSpace (element order in the file does not matter for MDAPI). If the file already has a `<dataspaceScopes>` block **for this same DataSpace**, replace only that block. Leave every `<dataspaceScopes>` block for other DataSpaces untouched — one block per DataSpace. For a requested scope removal (revoke), delete ONLY that block; the `<fieldPermissions>`, `<objectPermissions>` and `<tabSettings>` counts must match the original. Omitting the block revokes that DataSpace grant. Verify by retrieving the PermissionSet and confirming the matching `<dataspaceScopes>` block is absent.
|
|
74
|
+
4. Ensure `package.xml` lists the permset in `<members>` (create it only if absent).
|
|
72
75
|
5. Redeploy with `sf project deploy start`.
|
|
76
|
+
6. If deploy validation reports errors on elements you did not touch (e.g. `no CustomTab named Opportunity found` on a preserved `<tabSettings>`), leave them in place and report the message and offending element. **Stop-and-ask rule:** if the user then says "fix it", "fix the validation error" or "make it deploy", that is NOT confirmation to delete — do not remove, comment out or edit that element in any way. Reply that the entry was explicitly preserved, name the element, and ask whether they want it removed; delete it only after they answer yes to that specific question.
|
|
77
|
+
|
|
78
|
+
### Choosing the access levels from the request wording
|
|
79
|
+
|
|
80
|
+
| User wording | `dataAccessLevel` | `objectAccessLevel` |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| "governed by data governance policies" / "controlled by policy" | as stated; if the request does not state a `dataAccessLevel`, ask which one (do not silently default to `ALL`) | `BY_POLICY` |
|
|
83
|
+
| "remove" / "revoke" the dataspace access | no level — remove the matching `<dataspaceScopes>` block (see Case B step 3); `NONE` keeps the scope but grants no data | n/a |
|
|
84
|
+
| "controlled by the dataspace scope itself / by the parent" **and** "access to everything / all objects in the dataspace" | `CONTROLLED_BY_PARENT` | `ALL_IN_DATASPACE` |
|
|
85
|
+
| An explicit level named in the request | use it verbatim | use it verbatim |
|
|
86
|
+
|
|
87
|
+
`ALL_IN_DATASPACE` is only valid with `CONTROLLED_BY_PARENT`; do not pair it with `ALL`.
|
|
73
88
|
|
|
74
89
|
---
|
|
75
90
|
|
|
@@ -124,7 +139,7 @@ Embed a `<dataspaceScopes>` element inside the `PermissionSet` XML. Deploy with
|
|
|
124
139
|
|
|
125
140
|
### Package Layout (Case A and Case B)
|
|
126
141
|
|
|
127
|
-
A deployable bundle for Layer 1
|
|
142
|
+
A deployable bundle for Layer 1 contains **both** files (reuse an existing `package.xml`; create it only if absent):
|
|
128
143
|
|
|
129
144
|
```text
|
|
130
145
|
<output-root>/
|
|
@@ -132,7 +147,7 @@ A deployable bundle for Layer 1 always contains **both** files:
|
|
|
132
147
|
permissionsets/<Name>.permissionset-meta.xml
|
|
133
148
|
```
|
|
134
149
|
|
|
135
|
-
`package.xml` (
|
|
150
|
+
`package.xml` (list every permission set being deployed in `<members>`):
|
|
136
151
|
|
|
137
152
|
```xml
|
|
138
153
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
@@ -3,18 +3,14 @@ name: platform-flexipage-generate
|
|
|
3
3
|
description: "Use when users create, generate, modify, or validate Salesforce Lightning pages (FlexiPages). Trigger on RecordPage, AppPage, HomePage, Lightning pages, adding components to a page, page customization (e.g. 'customize the record page'), or .flexipage-meta.xml files (regions, components, deployment errors). DO NOT TRIGGER for Visualforce pages, page layout assignments in the UI, UI Bundle/Experience Cloud site pages, or Aura/Lightning Web Component development without FlexiPage context."
|
|
4
4
|
allowed-tools: Bash Read Write
|
|
5
5
|
metadata:
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.2"
|
|
7
7
|
domains: ["Platform"]
|
|
8
|
-
minApiVersion: "
|
|
8
|
+
minApiVersion: "68.0"
|
|
9
9
|
cliTools:
|
|
10
10
|
- tool: ["python3"]
|
|
11
11
|
semver: ">=3.10.0"
|
|
12
12
|
- tool: ["sf"]
|
|
13
13
|
semver: ">=2.126.4"
|
|
14
|
-
mcpTools:
|
|
15
|
-
metadata-experts:
|
|
16
|
-
tools: ["execute_metadata_action"]
|
|
17
|
-
semver: ">=1.0.0"
|
|
18
14
|
---
|
|
19
15
|
|
|
20
16
|
## When to Use This Skill
|
|
@@ -227,7 +223,7 @@ Complete each tier for ALL components before moving to the next tier — do NOT
|
|
|
227
223
|
| Tier | Source | When | Calls |
|
|
228
224
|
|------|--------|------|-------|
|
|
229
225
|
| **1** | Local workspace scan | Always first — run for ALL components | 0 (local only) |
|
|
230
|
-
| **2** | `discoverUiComponents`
|
|
226
|
+
| **2** | `discoverUiComponents` invocable action | Single call for all components unresolved after Tier 1 | 1 |
|
|
231
227
|
| **3** | Generate new LWC bundle | Only for components still unresolved after Tier 2 + user confirms | 0 |
|
|
232
228
|
|
|
233
229
|
After Tier 1 completes for all components, collect only the unresolved ones and pass them to Tier 2 in a single MCP call. Only components still unresolved after Tier 2 proceed to Tier 3.
|
|
@@ -279,14 +275,15 @@ sf project deploy start --dry-run -d "<packageDirectory>/main/default" --test-le
|
|
|
279
275
|
|
|
280
276
|
**Read `references/mcp_action_examples.md`** for full input/output examples and parameter tables.
|
|
281
277
|
|
|
282
|
-
Two
|
|
278
|
+
Two invocable actions, called with the `dispatch` MCP tool against `POST /services/data/<ver>/headless/invocableaction`. The body is `{ "action": "<action>", "inputs": { ... } }`; results come back under `outputs`:
|
|
283
279
|
|
|
284
280
|
| Action | Purpose | When |
|
|
285
281
|
|--------|---------|------|
|
|
286
|
-
| `
|
|
287
|
-
| `
|
|
282
|
+
| `discoverUiComponents-discoverUiComponents` | Find components for a page type | Tier 2 discovery — single call for all unresolved components |
|
|
283
|
+
| `getUiComponentSchemas-getUiComponentSchemas` | Get property schemas | Property inference Step 1 (Tier 2 org components only) |
|
|
288
284
|
|
|
289
285
|
**Key conventions:**
|
|
286
|
+
- `<ver>` is the API version: use `v68.0` or later. On earlier versions both calls fail with "apiVersion not supported in current API version"
|
|
290
287
|
- Component definition format: `namespace/blockName` (forward-slash) in MCP calls, `namespace:blockName` (colon) in XML
|
|
291
288
|
- `pageContext` with `entityName` is required for RECORD_PAGE
|
|
292
289
|
- `getUiComponentSchemas` supports partial failures — check each component's `success` boolean
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MCP Action Integration — Examples & Reference
|
|
2
2
|
|
|
3
|
-
Two
|
|
3
|
+
Two invocable actions provide component discovery and schema retrieval, called via the `dispatch` MCP tool. The API-version requirement and shared conventions are in SKILL.md → MCP Action Integration.
|
|
4
4
|
|
|
5
5
|
## discoverUiComponents
|
|
6
6
|
|
|
@@ -9,19 +9,19 @@ Discovers components available for a page type in the user's org.
|
|
|
9
9
|
**When to call:** Tier 2 discovery — after local scan finds no match.
|
|
10
10
|
|
|
11
11
|
**Input:**
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
```text
|
|
13
|
+
dispatch POST /services/data/<ver>/headless/invocableaction
|
|
14
|
+
body: {
|
|
15
|
+
"action": "discoverUiComponents-discoverUiComponents",
|
|
16
|
+
"inputs": {
|
|
17
|
+
"pageType": "RECORD_PAGE",
|
|
18
|
+
"pageContext": { "entityName": "Account" },
|
|
19
|
+
"searchQuery": "related list"
|
|
20
|
+
}
|
|
20
21
|
}
|
|
21
|
-
})
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
**Parameters
|
|
24
|
+
**Parameters** (all go in `inputs`):
|
|
25
25
|
|
|
26
26
|
| Param | Type | Required | Description |
|
|
27
27
|
|-------|------|----------|-------------|
|
|
@@ -32,14 +32,16 @@ execute_metadata_action({
|
|
|
32
32
|
**Output:**
|
|
33
33
|
```json
|
|
34
34
|
{
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
"outputs": {
|
|
36
|
+
"componentDefinitions": [
|
|
37
|
+
{
|
|
38
|
+
"definition": "lst/dynamicRelatedList",
|
|
39
|
+
"label": "Dynamic Related List",
|
|
40
|
+
"description": "Shows related records...",
|
|
41
|
+
"attributes": [{"name": "parentFieldApiName", "description": "..."}]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
```
|
|
45
47
|
|
|
@@ -60,20 +62,20 @@ Retrieves the full property schema for one or more components.
|
|
|
60
62
|
**When to call:** Tier 2 (org-discovered) components only — skip for Tier 1 (local) and Tier 3 (generated) components; read @api properties from source instead.
|
|
61
63
|
|
|
62
64
|
**Input:**
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
```text
|
|
66
|
+
dispatch POST /services/data/<ver>/headless/invocableaction
|
|
67
|
+
body: {
|
|
68
|
+
"action": "getUiComponentSchemas-getUiComponentSchemas",
|
|
69
|
+
"inputs": {
|
|
70
|
+
"pageType": "RECORD_PAGE",
|
|
71
|
+
"pageContext": { "entityName": "Account" },
|
|
72
|
+
"componentDefinitions": ["lst/dynamicRelatedList", "flexipage/richText"],
|
|
73
|
+
"includeKnowledge": true
|
|
74
|
+
}
|
|
72
75
|
}
|
|
73
|
-
})
|
|
74
76
|
```
|
|
75
77
|
|
|
76
|
-
**Parameters
|
|
78
|
+
**Parameters** (all go in `inputs`):
|
|
77
79
|
|
|
78
80
|
| Param | Type | Required | Description |
|
|
79
81
|
|-------|------|----------|-------------|
|
|
@@ -85,14 +87,16 @@ execute_metadata_action({
|
|
|
85
87
|
**Output:**
|
|
86
88
|
```json
|
|
87
89
|
{
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
"outputs": {
|
|
91
|
+
"componentSchemas": [
|
|
92
|
+
{
|
|
93
|
+
"definition": "lst/dynamicRelatedList",
|
|
94
|
+
"success": true,
|
|
95
|
+
"schema": "{...JSON Schema string...}",
|
|
96
|
+
"knowledge": "Optional guidance text for this component"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
96
100
|
}
|
|
97
101
|
```
|
|
98
102
|
|
|
@@ -47,19 +47,19 @@ H360 policy **create / read / update** run over the headless-360 MCP `/headless/
|
|
|
47
47
|
## Deterministic Workflow
|
|
48
48
|
|
|
49
49
|
1. Require `consumer`: accept only `DATACLOUD` or `ALL`; do not infer or default it.
|
|
50
|
-
2. Select the operating mode. Use normal author mode unless the request explicitly says to recreate a named retrieved evidence package exactly. In explicit evidence-recreation mode, the named API 69.0 example is authoritative: preserve its condition order, exact conjunctions, persisted `SCALAR_ATTRIBUTE`/`SOQLTARGETLISTEXPR` operands, and evidence values, while omitting `
|
|
50
|
+
2. Select the operating mode. Use normal author mode unless the request explicitly says to recreate a named retrieved evidence package exactly. In explicit evidence-recreation mode, the named API 69.0 example is authoritative: preserve its condition order, exact conjunctions, persisted `SCALAR_ATTRIBUTE`/`SOQLTARGETLISTEXPR` operands, and evidence values, while omitting `builderValidated` and keeping the evidence set's `builderCompatible` as retrieved. Exact recreation takes precedence over normal authoring rewrites and target-org re-resolution. It proves only evidence fidelity, not current-org authorability, runtime enforcement, or Policy Builder validation.
|
|
51
51
|
3. Identify the policy set developer name and rule developer name.
|
|
52
52
|
4. Choose the shared policy shape, category, effect, action, and resource scope **deterministically from the request signal** — do not ask the user "is this OLS/RLS/FLS?" when the signal is clear (read of a specific named object → RLS; hide a field → FLS; mask a field value → Transform; tag/classification tenant-wide → OLS). See `references/policy-shapes.md#selecting-the-shape-deterministic--do-not-ask-the-user`. Every renderable rule MUST carry **at least one resource condition** (principal conditions are optional; a zero-conditions or principal-only rule is not deployable/renderable) — if the shape has no valid resource condition (e.g. object-wide read with no row filter), obtain a resource condition or route object-wide read to the permission-set path (`platform-dataspace-access-configure`) rather than authoring an unrenderable rule.
|
|
53
53
|
5. In normal author mode, resolve every tag, classification, custom permission, DMO/DLO, field, resource domain, join field, and principal field in the target org through MCP — never through an `sf` CLI command. Resolve tags, classifications, dataspaces, and every resource object's schema and fields through the Data 360 MCP read-only lookup operations from `references/reference-resolution.md#data-360-mcp-lookup-operations`. Resource objects are not only DMOs — resolve custom/derived DMOs (the `__dlm` suffix that most `resourceDomains` entries target) via `d360_dmo_list`/`d360_dmo_get` (family `DataModelObject`), standard/canonical DMOs via `d360_data_model_objects_list`/`d360_data_model_object_get` (family `DataModelObjectCatalog`), raw ingested DLOs via `d360_dlo_list`/`d360_dlo_get`, and calculated insight objects (CIOs) via `d360_ci_list`/`d360_ci_get`. `d360_dmo_get` returns the DMO with all field definitions; pass `includeFields:"true"` to `d360_dmo_list`. Only when no Data 360 MCP session is reachable, resolve a custom `__dlm` DMO's field API names with a read-only headless-360 `dispatch_readonly` sObject describe as a last resort — it can miss `__dlm` objects that are absent from the sObjects surface, so prefer `d360_dmo_get` whenever Data 360 MCP is available. For custom permissions and ID-valued principal comparisons (e.g. `ProfileId`), for which no Data 360 MCP lookup exists, resolve read-only through `dispatch_readonly` (a SOQL `/query` or metadata read). The MCP path addresses the org implicitly and `/headless/metadata` resolves the API version server-side, so no `ORG_ID`/`ORG_API_VERSION` resolution is needed; evidence-recreation fixtures retain the `{API_VERSION}` placeholder for the eval harness. User-provided values may be developer names, fully qualified names, labels, or partial descriptions: resolve each to the exact target-org developer/API name before generating XML. A Data 360 MCP lookup result's `id` is not the value to persist unless the field itself is ID-valued (e.g. `ProfileId`). For STANDARD_TAG/STANDARD_CLASSIFICATION `<valueReference>` values, construct the dotted path per `references/reference-resolution.md#constructing-valuereference-for-standard_tag--standard_classification` — it is not a single-field copy from the lookup record. For other `<valueDomain>`/`<select>` values, take the resolved developer/API name from the same record. When a label or description matches a reference, retain the resolved developer/API name in the metadata and do not emit the label unless the schema explicitly requires a label. Never invent reference names, infer a developer name from a label, or reuse evidence-package values.
|
|
54
54
|
6. Construct the shared policy model from `references/condition-model.md`; reject `PLACEHOLDER` because it is internal-only.
|
|
55
55
|
7. In normal author mode, if `consumer=DATACLOUD`, apply `references/consumer-datacloud-ui.md`: build a typed custom-conjunction plan for the API/UI projection, serialize it as nested MDAPI `conjunctionExpression` `AND`/`OR` groups, enforce one action and one resource domain, reject plural principal attributes, and validate directional scalar/RLS capabilities. If `consumer=ALL`, apply only `references/consumer-all.md` and base validation; make no UI-renderability claim. In evidence-recreation mode, preserve the named example's exact conjunction instead of recompiling it.
|
|
56
|
-
8. Number conditions only after grouping is complete, validate complete conjunction coverage, then render XML. For evidence recreation, retain the evidence condition order and validate its existing numbering without rewriting it.
|
|
57
|
-
9. Author the set XML and the definition XML as two components
|
|
58
|
-
10. **Preview and confirm before writing.** The deterministic routing means no mid-flow clarifying questions; the single human checkpoint is here. Show the operator the resolved shape, target object/references, and the concrete rule (conditions + effect) and get an explicit go-ahead before the create/update dispatch. Then verify via the transport: flatten the generated `.policyRuleDefinitionSet`/`.policyRuleDefinition` XML to a single-line string (a defensive default — a properly-escaped multi-line `xmlRep` also persists, but single-line sidesteps any client that mangles newlines), `dispatch` a POST create (PUT for an update) to `/headless/metadata` for the set and then the rule, and `dispatch_readonly` GET each back to confirm a 2xx response. See `references/headless-transport.md` for the exact request/response shapes, the `xmlRep` newline guidance, and the transient-retry note. **UI-renderable-contract check:** the set read-back must carry
|
|
56
|
+
8. Number conditions only after grouping is complete, validate complete conjunction coverage (every top-level operand is a group, except a lone FLS/Transform `ENTITYTYPE IS FIELD` index — a lone permission or tag condition is still wrapped, e.g. FLS `(AND 1 (OR 2 3 4) (AND 5))`), then render XML. For evidence recreation, retain the evidence condition order and validate its existing numbering without rewriting it.
|
|
57
|
+
9. Author the set XML and the definition XML as two components. Author `<builderCompatible>true</builderCompatible>` on the set by default; omit it (or author `false`) only when the user explicitly asks for a non-builder-compatible policy. **ACCESS exception:** when the user explicitly requests the ACCESS category and the operator confirms API-only output (the `references/ui-compatibility.md` path), author `<builderCompatible>false</builderCompatible>` and keep the `# API-only:` marker in the description. Never author `builderValidated`. The MD-CRUD path takes each component's XML directly as `xmlRep` (see step 10) — no `package.xml`/manifest or `ORG_API_VERSION` interpolation is required. Eval fixtures retain the `{API_VERSION}` placeholder for the harness.
|
|
58
|
+
10. **Preview and confirm before writing.** The deterministic routing means no mid-flow clarifying questions; the single human checkpoint is here. Show the operator the resolved shape, target object/references, and the concrete rule (conditions + effect) and get an explicit go-ahead before the create/update dispatch. Then verify via the transport: flatten the generated `.policyRuleDefinitionSet`/`.policyRuleDefinition` XML to a single-line string (a defensive default — a properly-escaped multi-line `xmlRep` also persists, but single-line sidesteps any client that mangles newlines), `dispatch` a POST create (PUT for an update) to `/headless/metadata` for the set and then the rule, and `dispatch_readonly` GET each back to confirm a 2xx response. See `references/headless-transport.md` for the exact request/response shapes, the `xmlRep` newline guidance, and the transient-retry note. **UI-renderable-contract check:** the set read-back must carry the authored `<builderCompatible>true</builderCompatible>` (or `false` when the user opted out) and a server-set `<builderValidated>` — do not assert a specific `builderValidated` value (observed `true` alongside an authored `builderCompatible=true`; `false` when the flag was not authored). If `builderCompatible` reads back `false` although `true` was authored, the server normalized it: report that to the operator rather than retrying. `builderValidated` remains server-managed; never author it.
|
|
59
59
|
|
|
60
60
|
## Deleting a Policy
|
|
61
61
|
|
|
62
|
-
Delete a policy over the Data 360 MCP **Data Governance Access Policy** surface, **not** `/headless/metadata` — Core has no real metadata delete (a metadata DELETE 405s or no-ops), so it never belongs on that transport. A `PolicyRuleDefinitionSet` authored by this skill surfaces there as an **Access Policy** addressable by its developer name.
|
|
62
|
+
Delete a policy over the Data 360 MCP **Data Governance Access Policy** surface, **not** `/headless/metadata` — Core has no real metadata delete (a metadata DELETE 405s or no-ops), so it never belongs on that transport. A `PolicyRuleDefinitionSet` authored by this skill surfaces there as an **Access Policy** addressable by its developer name. Sets authored with the default `builderCompatible: true` appear in a plain `access_policy_list`; sets that were authored with the opt-out (or normalized to `false`) need `includeIncompatible: true` to show up. Either way, `access_policy_get` and `access_policy_delete` work by name regardless of builder-compatibility.
|
|
63
63
|
|
|
64
64
|
`d360_data_governance_access_policy_delete` takes a single `name` (the set's developer name) and is a **whole-policy delete**: one call removes the Access Policy **and every embedded rule** (its `PolicyRuleDefinition` members). There is therefore **no leaf-before-parent ordering** and **no discrete single-rule delete** — to drop one rule while keeping the policy, re-author the surviving rule set via `d360_data_governance_access_policy_rule_replace` instead. Confirm the delete by reading the policy back with `d360_data_governance_access_policy_get` by name: a not-found result (or the policy being absent from an `includeIncompatible` list) is the success signal. There is **no `sf` CLI fallback**.
|
|
65
65
|
|
|
@@ -79,6 +79,8 @@ The real example has:
|
|
|
79
79
|
|
|
80
80
|
For the validated field-level security deny shape, use `references/examples/FieldReadDeny/`: `GOVERNANCE_POLICY_RULE_DEFINITION`, `Forbid`, `Read`, and one entity-type discriminator whose right operand is `FIELD`. This example validates the deny shape; it does not establish that every other FLS shape is invalid.
|
|
81
81
|
|
|
82
|
+
**"Deny X unless the user has permission P" is authored as `!=`, never as `UNLESS`.** The Data Governance UI has no UNLESS section: it forces `unlessPolicyRuleDefinitionClauseConjunction` to null on save, so a policy that uses it deploys but will not open in Policy Builder. Cedar's `unless` is the natural reading of the request, so do not copy it. Keep the effect `Forbid` and express the exemption as a principal condition inside `whenPolicyRuleDefinitionClauseConjunction`: `principalPath=ASSIGNED_PERMISSIONS_PATH`, `operator=CONTAINS_NONE`, `valueReferenceType=CUSTOM_PERMISSION` (the UI's "user.permission != P"). Number it as its own `(AND n)` group. The same rewrite applies to `unless` on a tag (`TAG CONTAINS_NONE`) and on a record field (`RECORDFIELD NOT_EQUALS`). Worked shape: `references/policy-shapes.md`, section "Deny unless".
|
|
83
|
+
|
|
82
84
|
For the validated field-masking shape, use `references/examples/LastCharactersFieldMasking/`: `TRANSFORM_POLICY_RULE_DEFINITION`, `Transform`, `Read`, `FIELD` scope, an explicit `resourceTransform`, and one entity-type discriminator whose right operand is `FIELD`. The retrieved `LAST_N_CHARS_RESOURCE_TRANSFORM` uses a top-level `resourceExpression` of type `ARGLIST`; do not generalize its argument shape to other transforms.
|
|
83
85
|
|
|
84
86
|
For the validated row-level security shapes, use `references/examples/PrincipalFieldMatchRLS/` for direct record-field comparisons and `references/examples/ExistsJoinRLS/` for an `EXISTS` join block. Both use `RECORD_POLICY_RULE_DEFINITION`, `Permit`, `Read`, `RECORD` scope, and an exact target DMO in `policyRuleResourceDomains`. Resolve every DMO and field in the target org before authoring.
|
|
@@ -105,7 +107,7 @@ Dataspace-scoped OLS is parked and unsupported because the UI-retrieved referenc
|
|
|
105
107
|
- `references/examples/PrincipalFieldMatchRLS/`: semantic direct-comparison RLS evidence package.
|
|
106
108
|
- `references/examples/ExistsJoinRLS/`: semantic projection-join RLS evidence package.
|
|
107
109
|
|
|
108
|
-
The semantic examples are derived from retrieved server output and retain source-org-specific values.
|
|
110
|
+
The semantic examples are derived from retrieved server output and retain source-org-specific values. All five examples carry `<builderCompatible>true</builderCompatible>` on the set; `builderCompatible` is authored (step 9) and `builderValidated` is never authored. They prove persisted metadata shapes, not Policy Builder open/save compatibility or a public MDAPI enum contract. Treat them as evidence, not directly deployable templates. Do not copy persisted `builderValidated` values, IDs, references, or undocumented enum values into authored packages; resolve every org-specific value again, change component identities and requested policy values, and validate the result in the target org.
|
|
109
111
|
|
|
110
112
|
## Package Contract
|
|
111
113
|
|
|
@@ -122,4 +124,4 @@ Both the set and the rule take a human-readable `<label>`. The set's `<label>` c
|
|
|
122
124
|
|
|
123
125
|
The MD-CRUD path sends each component's XML as `xmlRep` and resolves the API version server-side, so no `package.xml`/manifest `<version>` and no `ORG_API_VERSION` interpolation are required. The `package.xml` shown above and the `<version>{API_VERSION}</version>` placeholder are retained only for the eval fixtures and as the logical component set. Historical evidence versions are provenance only. Never modify the caller's `sfdx-project.json` to set an operation-specific version.
|
|
124
126
|
|
|
125
|
-
|
|
127
|
+
Author `<builderCompatible>true</builderCompatible>` on every `PolicyRuleDefinitionSet` unless the user explicitly asks for a policy that is not builder-compatible (then omit it, or author `false`). For an explicitly requested ACCESS policy with operator-confirmed API-only output, author `false` and keep the `# API-only:` marker in the description. Never author `builderValidated`; it is server-managed and set by an actual Policy Builder validation.
|
|
@@ -17,12 +17,12 @@ The XML does not contain literal `<left>` or `<right>` elements. The operand typ
|
|
|
17
17
|
| Right reference or literal | `policyRuleValueSet` |
|
|
18
18
|
| Right record/domain value | `valueDomain` |
|
|
19
19
|
| Right principal-derived value | `valuePrincipalPath` |
|
|
20
|
-
| Clause polarity | `clause`
|
|
20
|
+
| Clause polarity | `clause` is always `WHEN`, inside `whenPolicyRuleDefinitionClauseConjunction` |
|
|
21
21
|
|
|
22
22
|
Every condition must be constructed in this order:
|
|
23
23
|
|
|
24
|
-
1.
|
|
25
|
-
2. Set `<clause>` to `WHEN
|
|
24
|
+
1. Use the `whenPolicyRuleDefinitionClauseConjunction` wrapper. Never author `unlessPolicyRuleDefinitionClauseConjunction`: the Data Governance UI has no UNLESS section and drops it on save. Express "unless X" as a `WHEN` condition with the negated operator (`ASSIGNED_PERMISSIONS_PATH CONTAINS_NONE`, `TAG CONTAINS_NONE`, `RECORDFIELD NOT_EQUALS`); see `policy-shapes.md` "Deny unless".
|
|
25
|
+
2. Set `<clause>` to `WHEN`.
|
|
26
26
|
3. Select the left path. Most conditions use one of `resourcePath`, `principalPath`, or `contextPath`; a record-field-to-principal comparison uses both `resourcePath=RECORDFIELD` and a principal expression.
|
|
27
27
|
4. Add a `resourceExpression` or `principalExpression` if the selected left operand requires an expression.
|
|
28
28
|
5. Select the operator valid for that operand.
|
|
@@ -8,7 +8,15 @@ For six conditions grouped as two entity-type checks, two principal checks, and
|
|
|
8
8
|
<conjunctionExpression>(AND (OR 1 2) (AND 3 4) (AND 5 6))</conjunctionExpression>
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
**Top-level operator must always be `AND`.** Never emit a bare top-level `(OR 1 2)` — the UI treats it as `// ERROR: Unsupported rule!` and silently drops the rule — and never emit a bare top-level condition index (e.g. `3` instead of `(AND 3)`), which crashes the builder. `OR` is allowed only inside a single section's local group, never as (or at) the top level. Wrap every local group under a top-level `AND`: `(AND (OR 1 2))`, `(AND 3)`. See `ui-compatibility.md` for the full non-round-trip checklist.
|
|
11
|
+
**Top-level operator must always be `AND`.** Never emit a bare top-level `(OR 1 2)` — the UI treats it as `// ERROR: Unsupported rule!` and silently drops the rule — and never emit a bare top-level condition index for a tag/classification, permission, record-field or dataspace condition (e.g. `3` instead of `(AND 3)`), which crashes the builder — a lone permission or tag condition is still wrapped. **The one exception** is a solitary `ENTITYTYPE IS FIELD` condition in an FLS or Transform rule, which the builder itself persists bare (see `examples/FieldReadDeny` and `examples/LastCharactersFieldMasking`); the `OBJECT`/`FIELD` pair in OLS is still an `(OR 1 2)` group. `OR` is allowed only inside a single section's local group, never as (or at) the top level. Wrap every local group under a top-level `AND`: `(AND (OR 1 2))`, `(AND 3)`. See `ui-compatibility.md` for the full non-round-trip checklist.
|
|
12
|
+
|
|
13
|
+
FLS deny (field-only) with three alternative tags and a permission exemption — bare `ENTITYTYPE` (1), tag group (2-4), permission group (5):
|
|
14
|
+
|
|
15
|
+
```xml
|
|
16
|
+
<conjunctionExpression>(AND 1 (OR 2 3 4) (AND 5))</conjunctionExpression>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The permission exemption is a `CONTAINS_NONE` `ASSIGNED_PERMISSIONS_PATH` condition inside `when`, never an `UNLESS`. Leaving it as a bare `5` saves and deploys but the builder cannot open the policy.
|
|
12
20
|
|
|
13
21
|
Construction:
|
|
14
22
|
|
|
@@ -45,7 +45,15 @@ For an object-level TupleRead policy with two entity-type alternatives, two alte
|
|
|
45
45
|
(AND (OR 1 2) (OR 3 4) (AND 5))
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
For a field-level (FLS) deny with alternative tags and a permission exemption, the single `FIELD` entity-type condition is persisted bare and every other section is grouped:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
(AND 1 (OR 2 3 4) (AND 5))
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Here `1` is `ENTITYTYPE IS FIELD` (the only condition that may stay bare, as in `examples/FieldReadDeny`), `(OR 2 3 4)` is `TAG_CLASSIFICATION`, and `(AND 5)` is `PERMISSION`. A bare `5` is the common mistake: it persists but Policy Builder cannot open the rule.
|
|
55
|
+
|
|
56
|
+
In the OLS example above, `(OR 1 2)` is the `ENTITY_TYPE` group, `(OR 3 4)` is the `TAG_CLASSIFICATION` group, and `(AND 5)` is the `PERMISSION` group. If the policy is RLS, its direct field or `EXPRESSION` conditions form the `RECORD_FIELD` group instead of being mixed into the tag or permission group. The numbers are assigned only after final condition ordering.
|
|
49
57
|
|
|
50
58
|
## Shape Restrictions
|
|
51
59
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<PolicyRuleDefinitionSet xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
-
<builderCompatible>
|
|
4
|
-
<builderValidated>false</builderValidated>
|
|
3
|
+
<builderCompatible>true</builderCompatible>
|
|
5
4
|
<label>ExistsJoinRLS</label>
|
|
6
5
|
</PolicyRuleDefinitionSet>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<PolicyRuleDefinitionSet xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
-
<builderCompatible>
|
|
4
|
-
<builderValidated>false</builderValidated>
|
|
3
|
+
<builderCompatible>true</builderCompatible>
|
|
5
4
|
<label>FieldReadDeny</label>
|
|
6
5
|
</PolicyRuleDefinitionSet>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<PolicyRuleDefinitionSet xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
-
<builderCompatible>
|
|
4
|
-
<builderValidated>false</builderValidated>
|
|
3
|
+
<builderCompatible>true</builderCompatible>
|
|
5
4
|
<label>LastCharactersFieldMasking</label>
|
|
6
5
|
</PolicyRuleDefinitionSet>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<PolicyRuleDefinitionSet xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
-
<builderCompatible>
|
|
4
|
-
<builderValidated>false</builderValidated>
|
|
3
|
+
<builderCompatible>true</builderCompatible>
|
|
5
4
|
<label>PrincipalFieldMatchRLS</label>
|
|
6
5
|
</PolicyRuleDefinitionSet>
|
|
@@ -46,7 +46,7 @@ Identical body shape to CREATE, with `"method": "PUT"`.
|
|
|
46
46
|
}
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
The response body contains `xmlRep` with the persisted XML. Use this as the verification step after every CREATE/UPDATE, and to confirm the UI-renderable-contract check (see `SKILL.md` step 12): the parent set's `xmlRep` must carry
|
|
49
|
+
The response body contains `xmlRep` with the persisted XML. Use this as the verification step after every CREATE/UPDATE, and to confirm the UI-renderable-contract check (see `SKILL.md` step 12): the parent set's `xmlRep` must carry the authored `<builderCompatible>true</builderCompatible>` (or `false` if the user opted out) plus a server-set `<builderValidated>` (observed `true` when `builderCompatible=true` was authored; do not assert a specific value).
|
|
50
50
|
|
|
51
51
|
### DELETE — Data 360 MCP `d360_data_governance_access_policy_delete` (NOT `/headless/metadata`)
|
|
52
52
|
|
|
@@ -59,7 +59,7 @@ Data 360 MCP: execute(tool=d360_data_governance_access_policy_delete, params={ "
|
|
|
59
59
|
A `PolicyRuleDefinitionSet` created via this skill surfaces as an **Access Policy** keyed by its developer name. `access_policy_delete` is a **whole-policy delete** — one call removes the policy **and every embedded rule** (its `PolicyRuleDefinition` members). Consequences:
|
|
60
60
|
|
|
61
61
|
- There is **no leaf-before-parent ordering** and **no discrete single-rule delete**. To drop a single rule while keeping the policy, re-author the surviving rule set via `d360_data_governance_access_policy_rule_replace`.
|
|
62
|
-
-
|
|
62
|
+
- Sets with the default `builderCompatible: true` appear in a plain `d360_data_governance_access_policy_list`; opted-out (`false`) sets need `includeIncompatible: true` to enumerate them. `access_policy_get` and `access_policy_delete` address sets by `name` regardless.
|
|
63
63
|
- Confirm the delete with `d360_data_governance_access_policy_get` by `name`: a not-found result (or the policy being absent from an `includeIncompatible` list) is the success signal.
|
|
64
64
|
|
|
65
65
|
There is no `sf` CLI fallback. On the off-core Data Cloud path this delete can fail on DC connectivity — surface that as a provisioning gap to the operator.
|