@salesforce/afv-skills 1.28.0 → 1.30.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/README.md +2 -0
- package/package.json +1 -1
- package/skills/agentforce-architecture-analyze/README.md +2 -8
- package/skills/agentforce-architecture-analyze/SKILL.md +2 -2
- package/skills/agentforce-architecture-analyze/references/contract.json +4 -4
- package/skills/agentforce-architecture-analyze/references/soql_fields.md +1 -1
- package/skills/data360-activate/README.md +0 -1
- package/skills/data360-activate/SKILL.md +0 -2
- package/skills/data360-connect/README.md +0 -2
- package/skills/data360-connect/SKILL.md +0 -2
- package/skills/data360-harmonize/SKILL.md +0 -1
- package/skills/data360-orchestrate/README.md +0 -7
- package/skills/data360-orchestrate/SKILL.md +0 -2
- package/skills/data360-prepare/README.md +0 -1
- package/skills/data360-prepare/SKILL.md +0 -1
- package/skills/data360-query/README.md +0 -1
- package/skills/data360-query/SKILL.md +0 -1
- package/skills/data360-segment/README.md +0 -1
- package/skills/data360-segment/SKILL.md +0 -2
- package/skills/dx-code-analyzer-configure/SKILL.md +31 -13
- package/skills/dx-code-analyzer-custom-rule-create/SKILL.md +484 -0
- package/skills/dx-code-analyzer-custom-rule-create/assets/pmd-ruleset-template.xml +31 -0
- package/skills/dx-code-analyzer-custom-rule-create/examples/metadata-xml-example-fields-api.md +87 -0
- package/skills/dx-code-analyzer-custom-rule-create/examples/metadata-xml-example-flows.md +105 -0
- package/skills/dx-code-analyzer-custom-rule-create/examples/metadata-xml-example-permissions.md +95 -0
- package/skills/dx-code-analyzer-custom-rule-create/examples/metadata-xml-examples.md +84 -0
- package/skills/dx-code-analyzer-custom-rule-create/examples/regex-examples.md +127 -0
- package/skills/dx-code-analyzer-custom-rule-create/examples/xpath-examples.md +227 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/advanced-pmd-patterns.md +288 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/apex-ast-reference.md +127 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/eslint-custom-plugins.md +247 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/eslint-rules-discovery.md +188 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/eslint-tier2-configurable.md +114 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/eslint-tier3-custom-plugins.md +113 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/metadata-xml-rules.md +285 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/regex-rule-schema.md +174 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/troubleshooting.md +141 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/xpath-patterns-governor-limits.md +83 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/xpath-patterns-method-calls.md +108 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/xpath-patterns-security.md +45 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/xpath-patterns-structure.md +127 -0
- package/skills/dx-code-analyzer-custom-rule-create/references/xpath-patterns.md +131 -0
- package/skills/dx-code-analyzer-custom-rule-create/scripts/create-pmd-rule.js +209 -0
- package/skills/dx-code-analyzer-custom-rule-create/scripts/create-regex-rule.js +220 -0
- package/skills/dx-code-analyzer-run/SKILL.md +41 -8
- package/skills/experience-cms-brand-apply/SKILL.md +47 -16
- package/skills/experience-lwc-generate/README.md +3 -2
- package/skills/experience-lwc-generate/references/async-notification-patterns.md +1 -1
- package/skills/experience-lwc-generate/references/component-patterns.md +3 -3
- package/skills/experience-lwc-generate/references/flow-integration-guide.md +1 -1
- package/skills/experience-lwc-generate/references/lwc-best-practices.md +4 -4
- package/skills/experience-lwc-generate/references/scoring-and-testing.md +1 -1
- package/skills/experience-lwc-generate/references/state-management.md +2 -2
- package/skills/experience-lwc-generate/references/triangle-pattern.md +3 -3
- package/skills/experience-lwc-generate/scripts/post-tool-validate.py +2 -2
- package/skills/experience-lwc-generate/scripts/template_validator.py +1 -1
- package/skills/external-diagram-mermaid-generate/README.md +2 -2
- package/skills/external-diagram-mermaid-generate/SKILL.md +1 -3
- package/skills/external-diagram-mermaid-generate/assets/agentforce/agent-flow.md +4 -4
- package/skills/external-diagram-mermaid-generate/assets/architecture/system-landscape.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/datamodel/b2b-commerce-erd.md +3 -3
- package/skills/external-diagram-mermaid-generate/assets/datamodel/campaigns-erd.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/datamodel/consent-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/files-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/forecasting-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/fsl-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/party-model-erd.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/datamodel/quote-order-erd.md +3 -3
- package/skills/external-diagram-mermaid-generate/assets/datamodel/revenue-cloud-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/sales-cloud-erd.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/datamodel/salesforce-erd.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/datamodel/scheduler-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/service-cloud-erd.md +3 -3
- package/skills/external-diagram-mermaid-generate/assets/datamodel/territory-management-erd.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/integration/api-sequence.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/oauth/authorization-code-pkce.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/oauth/authorization-code.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/oauth/client-credentials.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/oauth/device-authorization.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/oauth/jwt-bearer.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/oauth/refresh-token.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/oauth/user-agent-social-sign-on.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/role-hierarchy/user-hierarchy.md +1 -1
- package/skills/external-diagram-mermaid-generate/references/color-palette.md +13 -13
- package/skills/external-diagram-mermaid-generate/references/diagram-conventions.md +5 -5
- package/skills/external-diagram-mermaid-generate/references/erd-conventions.md +1 -1
- package/skills/external-diagram-mermaid-generate/references/mermaid-styling.md +2 -2
- package/skills/external-diagram-mermaid-generate/references/preview-guide.md +1 -1
- package/skills/external-diagram-mermaid-generate/references/usage-examples.md +9 -9
- package/skills/external-diagram-mermaid-generate/scripts/README.md +1 -1
- package/skills/integration-connectivity-connected-app-configure/README.md +4 -5
- package/skills/integration-connectivity-connected-app-configure/SKILL.md +2 -2
- package/skills/integration-connectivity-connected-app-configure/references/example-usage.md +7 -7
- package/skills/integration-connectivity-connected-app-configure/references/migration-guide.md +1 -1
- package/skills/integration-connectivity-connected-app-configure/references/oauth-flows-reference.md +1 -1
- package/skills/integration-connectivity-connected-app-configure/references/testing-validation-guide.md +3 -3
- package/skills/integration-connectivity-generate/README.md +1 -1
- package/skills/integration-connectivity-generate/SKILL.md +6 -0
- package/skills/integration-connectivity-generate/assets/callouts/rest-queueable-callout.cls +1 -1
- package/skills/integration-connectivity-generate/assets/external-services/external-service-operations.md +1 -1
- package/skills/integration-connectivity-generate/assets/soap/wsdl2apex-guide.md +1 -1
- package/skills/integration-connectivity-generate/references/callout-patterns.md +4 -0
- package/skills/integration-connectivity-generate/references/cdc-guide.md +2 -2
- package/skills/integration-connectivity-generate/references/event-driven-architecture-guide.md +5 -5
- package/skills/integration-connectivity-generate/references/event-patterns.md +3 -2
- package/skills/integration-connectivity-generate/references/external-services-guide.md +4 -1
- package/skills/integration-connectivity-generate/references/messaging-api-v2.md +2 -2
- package/skills/integration-connectivity-generate/references/named-credentials-automation.md +1 -1
- package/skills/integration-connectivity-generate/references/named-credentials-guide.md +12 -2
- package/skills/integration-connectivity-generate/references/platform-events-guide.md +3 -3
- package/skills/integration-connectivity-generate/references/rest-callout-patterns.md +1 -1
- package/skills/integration-connectivity-generate/references/scoring-rubric.md +1 -1
- package/skills/integration-connectivity-generate/references/security-best-practices.md +5 -2
- package/skills/integration-connectivity-generate/scripts/configure-named-credential.sh +16 -5
- package/skills/integration-connectivity-generate/scripts/set-api-credential.sh +11 -2
- package/skills/integration-connectivity-generate/scripts/suggest_credential_setup.py +4 -3
- package/skills/integration-connectivity-generate/scripts/validate_integration.py +1 -1
- package/skills/mobile-platform-native-capabilities-integrate/SKILL.md +3 -3
- package/skills/omnistudio-callable-apex-generate/README.md +1 -5
- package/skills/omnistudio-callable-apex-generate/SKILL.md +14 -4
- package/skills/omnistudio-callable-apex-generate/assets/pattern_callable_vanilla.cls +8 -1
- package/skills/omnistudio-callable-apex-generate/examples/Test_VlocityOpenInterface2Conversion/TRANSCRIPT.md +1 -1
- package/skills/omnistudio-callable-apex-generate/examples/Test_VlocityOpenInterfaceConversion/TRANSCRIPT.md +1 -1
- package/skills/omnistudio-datamapper-generate/SKILL.md +1 -1
- package/skills/omnistudio-datamapper-generate/assets/completion-summary-template.md +2 -2
- package/skills/omnistudio-datamapper-generate/references/best-practices.md +9 -9
- package/skills/omnistudio-datamapper-generate/references/naming-conventions.md +6 -6
- package/skills/omnistudio-datapacks-deploy/README.md +1 -1
- package/skills/omnistudio-datapacks-deploy/examples/business-internet-plus-bundle/deploy-business-internet-plus-bundle.yaml +1 -1
- package/skills/omnistudio-dependencies-analyze/SKILL.md +12 -5
- package/skills/omnistudio-dependencies-analyze/references/dependency-patterns.md +9 -9
- package/skills/omnistudio-dependencies-analyze/references/namespace-guide.md +1 -1
- package/skills/omnistudio-epc-catalog-generate/README.md +1 -1
- package/skills/omnistudio-flexcard-generate/SKILL.md +11 -4
- package/skills/omnistudio-flexcard-generate/references/best-practices.md +6 -6
- package/skills/omnistudio-flexcard-generate/references/data-binding-guide.md +9 -9
- package/skills/omnistudio-integration-procedure-generate/SKILL.md +9 -1
- package/skills/omnistudio-integration-procedure-generate/references/element-types.md +3 -3
- package/skills/omnistudio-omniscript-generate/SKILL.md +2 -2
- package/skills/omnistudio-omniscript-generate/references/best-practices.md +1 -1
- package/skills/omnistudio-omniscript-generate/scripts/check-duplicate-omniscript.sh +8 -0
- package/skills/omnistudio-omniscript-generate/scripts/deploy-omniscript.sh +8 -0
- package/skills/platform-apex-logs-debug/README.md +2 -2
- package/skills/platform-apex-logs-debug/references/cli-commands.md +2 -2
- package/skills/platform-apex-logs-debug/references/debug-log-reference.md +16 -16
- package/skills/platform-apex-logs-debug/references/log-analysis-tools.md +2 -2
- package/skills/platform-apex-test-run/README.md +1 -1
- package/skills/platform-apex-test-run/references/test-fix-loop.md +2 -2
- package/skills/platform-apex-test-run/references/testing-best-practices.md +3 -3
- package/skills/platform-custom-field-generate/SKILL.md +86 -126
- package/skills/platform-custom-field-generate/references/advanced-picklists.md +590 -0
- package/skills/platform-data-manage/README.md +4 -4
- package/skills/platform-data-manage/references/bulk-testing-example.md +1 -1
- package/skills/platform-data-manage/references/crud-workflow-example.md +2 -2
- package/skills/platform-data-manage/references/orchestration.md +6 -6
- package/skills/platform-flexipage-generate/SKILL.md +281 -346
- package/skills/platform-flexipage-generate/references/cli_commands.md +39 -0
- package/skills/platform-flexipage-generate/references/flexipage_fieldSection.md +162 -0
- package/skills/platform-flexipage-generate/references/flexipage_richText.md +84 -0
- package/skills/platform-flexipage-generate/references/identifiers_and_regions.md +167 -0
- package/skills/platform-flexipage-generate/references/mcp_action_examples.md +104 -0
- package/skills/platform-flexipage-generate/references/record_flexipage_dynamicHighlights.md +119 -0
- package/skills/platform-flexipage-generate/references/xml_rules.md +335 -0
- package/skills/platform-flexipage-generate/scripts/resolve-component-instructions.sh +42 -0
- package/skills/platform-flexipage-generate/scripts/scan-lwc-components.sh +113 -0
- package/skills/platform-metadata-deploy/README.md +2 -2
- package/skills/platform-metadata-deploy/references/agent-deployment-guide.md +2 -2
- package/skills/platform-metadata-deploy/references/deployment-workflows.md +16 -16
- package/skills/platform-metadata-deploy/references/orchestration.md +3 -3
- package/skills/platform-metadata-deploy/references/trigger-deployment-safety.md +2 -2
- package/skills/platform-models-api-configure/SKILL.md +140 -0
- package/skills/platform-models-api-configure/scripts/get-orgjwt.sh +48 -0
- package/skills/platform-policy-rule-generate/SKILL.md +260 -0
- package/skills/platform-policy-rule-generate/references/deploy-errors.md +54 -0
- package/skills/platform-policy-rule-generate/references/fixtures-index.md +29 -0
- package/skills/platform-policy-rule-generate/references/policy-schema-full.md +250 -0
- package/skills/platform-policy-rule-generate/references/templates-access.md +132 -0
- package/skills/platform-policy-rule-generate/references/templates-advanced.md +58 -0
- package/skills/platform-policy-rule-generate/references/templates-record.md +75 -0
- package/skills/platform-policy-rule-generate/references/templates-transform.md +70 -0
- package/skills/platform-policy-rule-generate/references/templates.md +10 -0
- package/skills/platform-policy-rule-generate/references/ui-compatibility.md +142 -0
- package/skills/platform-soql-query/README.md +1 -1
- package/skills/platform-soql-query/SKILL.md +1 -1
- package/skills/platform-soql-query/references/anti-patterns.md +1 -1
- package/skills/platform-soql-query/references/field-coverage-rules.md +1 -1
- package/skills/platform-soql-query/references/query-optimization.md +1 -1
- package/skills/platform-soql-query/scripts/post-tool-validate.py +3 -3
- package/skills/platform-value-set-generate/SKILL.md +305 -0
- package/skills/data360-activate/CREDITS.md +0 -5
- package/skills/data360-connect/CREDITS.md +0 -5
- package/skills/data360-harmonize/CREDITS.md +0 -3
- package/skills/data360-orchestrate/CREDITS.md +0 -15
- package/skills/data360-orchestrate/UPSTREAM.md +0 -45
- package/skills/data360-prepare/CREDITS.md +0 -7
- package/skills/data360-query/CREDITS.md +0 -7
- package/skills/data360-segment/CREDITS.md +0 -3
- package/skills/experience-lwc-generate/CREDITS.md +0 -5
- package/skills/external-diagram-mermaid-generate/CREDITS.md +0 -46
- package/skills/external-diagram-visual-generate/CREDITS.md +0 -80
- package/skills/external-diagram-visual-generate/README.md +0 -83
- package/skills/external-diagram-visual-generate/SKILL.md +0 -207
- package/skills/external-diagram-visual-generate/assets/architecture/integration-flow.md +0 -55
- package/skills/external-diagram-visual-generate/assets/erd/core-objects.md +0 -131
- package/skills/external-diagram-visual-generate/assets/erd/custom-objects.md +0 -60
- package/skills/external-diagram-visual-generate/assets/lwc/dashboard-card.md +0 -45
- package/skills/external-diagram-visual-generate/assets/lwc/data-table.md +0 -57
- package/skills/external-diagram-visual-generate/assets/lwc/record-form.md +0 -60
- package/skills/external-diagram-visual-generate/assets/review/apex-review.md +0 -57
- package/skills/external-diagram-visual-generate/assets/review/lwc-review.md +0 -48
- package/skills/external-diagram-visual-generate/references/architect-aesthetic-guide.md +0 -257
- package/skills/external-diagram-visual-generate/references/examples-index.md +0 -35
- package/skills/external-diagram-visual-generate/references/gemini-cli-setup.md +0 -65
- package/skills/external-diagram-visual-generate/references/interview-questions.md +0 -529
- package/skills/external-diagram-visual-generate/references/iteration-workflow.md +0 -173
- package/skills/external-diagram-visual-generate/scripts/check-prerequisites.sh +0 -101
- package/skills/external-diagram-visual-generate/scripts/generate_image.py +0 -243
- package/skills/integration-connectivity-connected-app-configure/CREDITS.md +0 -3
- package/skills/integration-connectivity-generate/CREDITS.md +0 -5
- package/skills/omnistudio-callable-apex-generate/CREDITS.md +0 -9
- package/skills/omnistudio-datamapper-generate/CREDITS.md +0 -5
- package/skills/omnistudio-datapacks-deploy/CREDITS.md +0 -5
- package/skills/omnistudio-dependencies-analyze/CREDITS.md +0 -5
- package/skills/omnistudio-epc-catalog-generate/CREDITS.md +0 -14
- package/skills/omnistudio-flexcard-generate/CREDITS.md +0 -5
- package/skills/omnistudio-integration-procedure-generate/CREDITS.md +0 -5
- package/skills/omnistudio-omniscript-generate/CREDITS.md +0 -5
- package/skills/platform-apex-generate/CREDITS.md +0 -5
- package/skills/platform-apex-logs-debug/CREDITS.md +0 -22
- package/skills/platform-apex-test-generate/CREDITS.md +0 -5
- package/skills/platform-apex-test-run/CREDITS.md +0 -22
- package/skills/platform-data-manage/CREDITS.md +0 -5
- package/skills/platform-metadata-deploy/CREDITS.md +0 -25
- package/skills/platform-soql-query/CREDITS.md +0 -21
- /package/skills/omnistudio-callable-apex-generate/examples/Test_VlocityOpenInterfaceConversion/{MyCustomVlocityOpenInterface2.cls → MyCustomClass.cls} +0 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# UI Compatibility — Data Governance Policy Builder
|
|
2
|
+
|
|
3
|
+
The Data Governance Policy Builder edits a **strict subset** of the MDAPI. Anything outside that subset must be maintained via MDAPI/Tooling for the policy's lifetime — admins cannot open it in the builder without silent data loss or a hard crash.
|
|
4
|
+
|
|
5
|
+
> **Default goal**: produce UI-compatible policies. Only fall back to API-only after asking the operator and getting explicit confirmation.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What the UI Can Render
|
|
10
|
+
|
|
11
|
+
**Categories** : `GOVERNANCE_POLICY_RULE_DEFINITION`, `RECORD_POLICY_RULE_DEFINITION`, `TRANSFORM_POLICY_RULE_DEFINITION`
|
|
12
|
+
**Categories NOT handled** : `ACCESS_POLICY_RULE_DEFINITION` (UI forces to GOVERNANCE on save), `IDENTIFIED_RECORD_POLICY_RULE_DEFINITION`
|
|
13
|
+
|
|
14
|
+
**Effects** : `Permit`, `Forbid` (UI label "Deny"), `Transform`
|
|
15
|
+
|
|
16
|
+
**Actions** : `Read`, `TupleRead` — two real choices for OLS/FLS rules.
|
|
17
|
+
- `Read`: evaluates conditions against the resource itself
|
|
18
|
+
- `TupleRead`: cascade rewriter — expands object-level condition to also cover `resource.object.*` for fields. Use when the intent is "objects matching X AND all their fields"
|
|
19
|
+
- Multiple `<action>` entries: only the first is kept on save
|
|
20
|
+
|
|
21
|
+
**`<ruleConsumer>`** : only `DATACLOUD` (hardcoded on save)
|
|
22
|
+
**`<principalScopeType>`** : only `ANY` (hardcoded on save)
|
|
23
|
+
**`<resourceScopeType>`** : `ANY`, `RECORD`, `FIELD`, `DATASPACE`, `SPAN`
|
|
24
|
+
**`<principalAuthenticationLevel>`** : `INTERNAL`, `AUTHENTICATED`, `UNIDENTIFIED`. `IDENTIFIED` not exposed.
|
|
25
|
+
**`<replicated>`** : read but NOT editable. Once `true`, UI forces read-only mode.
|
|
26
|
+
**`<transformPrecedence>`** : not exposed; non-zero values dropped.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Conditions — Supported Shapes
|
|
31
|
+
|
|
32
|
+
**Top-level conjunction**: only `<whenPolicyRuleDefinitionClauseConjunction>`. The UI forces `<unlessPolicyRuleDefinitionClauseConjunction>` to `null` on save.
|
|
33
|
+
|
|
34
|
+
**Conjunction expression**: the UI builds `(AND …)` of up to four sections dispatched by path type. A pure flat `(OR 1 2)` at the top level triggers `// ERROR: Unsupported rule!` — rule silently dropped. `OR` only round-trips inside a single section's group.
|
|
35
|
+
|
|
36
|
+
**Path types per UI section:**
|
|
37
|
+
|
|
38
|
+
| UI Section | Recognized path |
|
|
39
|
+
|------------|-----------------|
|
|
40
|
+
| Users (Permission) | `principalPath = ASSIGNED_PERMISSIONS_PATH` |
|
|
41
|
+
| Resource entity-type | `resourcePath = ENTITYTYPE` with `IS` operator |
|
|
42
|
+
| Data space | `resourcePath = DATASPACE` or `contextPath = SESSION_DATASPACE` |
|
|
43
|
+
| Tag / Classification | `resourcePath = TAG` or `CLASSIFICATION` |
|
|
44
|
+
| RLS rule criteria | `resourcePath = RECORDFIELD` or `EXPRESSION` |
|
|
45
|
+
|
|
46
|
+
Any other path type → condition silently ignored when UI rebuilds the rule.
|
|
47
|
+
|
|
48
|
+
**Operators per path**:
|
|
49
|
+
- Tag/Classification: `CONTAINS_ANY`, `CONTAINS_NONE`. (`CONTAINS_ALL` exists in schema but not offered in dropdowns)
|
|
50
|
+
- Permission: `CONTAINS_ANY` (Permit) / `CONTAINS_NONE` (Forbid/Transform)
|
|
51
|
+
- RLS `RECORDFIELD`: `EQUALS`, `NOT_EQUALS`, `LIKE`, `LESS_THAN(_OR_EQUALS)`, `GREATER_THAN(_OR_EQUAL)`, `HIERARCHICALLY_ABOVE` (DLO/DMO only). **Not editable**: `HIERARCHICALLY_BELOW`, `IN`, `CONTAINS_ALL`
|
|
52
|
+
- RLS join (`EXPRESSION`): `EXISTS` only
|
|
53
|
+
|
|
54
|
+
**`<policyRuleValueSet>` reference types** : `CUSTOM_TAG`, `STANDARD_TAG`, `CUSTOM_CLASSIFICATION`, `STANDARD_CLASSIFICATION`, `CUSTOM_PERMISSION`. **Not editable**: `HIERARCHY`, `DATASPACE`.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Implicit Defaults Injected by the UI on Save
|
|
59
|
+
|
|
60
|
+
When the UI saves, it auto-injects these — if your hand-authored XML omits them or uses different values, the first UI save rewrites them:
|
|
61
|
+
|
|
62
|
+
| Field | UI default |
|
|
63
|
+
|-------|-----------|
|
|
64
|
+
| `principalAuthenticationLevel` | `INTERNAL` |
|
|
65
|
+
| `principalScopeType` | `ANY` |
|
|
66
|
+
| `ruleConsumer` | `DATACLOUD` |
|
|
67
|
+
| `unlessPolicyRuleDefinitionClauseConjunction` | `null` (always) |
|
|
68
|
+
| `actions` | only first action kept |
|
|
69
|
+
| `policyRuleResourceDomains` | only first `<resourceDomain>` kept |
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## The Non-Round-Trip Checklist
|
|
74
|
+
|
|
75
|
+
The policy will **not** round-trip through the UI without data loss or silent failure if **any** of the following is true:
|
|
76
|
+
|
|
77
|
+
- [ ] `category` is `ACCESS_POLICY_RULE_DEFINITION` or `IDENTIFIED_RECORD_POLICY_RULE_DEFINITION`
|
|
78
|
+
- [ ] `ruleConsumer` ≠ `DATACLOUD`
|
|
79
|
+
- [ ] More than one `<action>`, or action is not `Read` / `TupleRead`
|
|
80
|
+
- [ ] **No top-level `resourcePath=ENTITYTYPE` discriminator group** for ACCESS/GOVERNANCE rules — this causes a **hard crash** (`Cannot use 'in' operator to search for 'Permit' in undefined`), not a graceful degradation. A `TupleRead` rule without the OR-of-ENTITYTYPE clause still deploys and works at runtime — the crash is UI-only.
|
|
81
|
+
- [ ] **Bare top-level condition index** in `<conjunctionExpression>` (e.g. `3` instead of `(AND 3)`) — causes crash in `buildCriteria` (`param.params.map(...)` = `undefined.map()`)
|
|
82
|
+
- [ ] More than one `<resourceDomain>`
|
|
83
|
+
- [ ] An `<unlessPolicyRuleDefinitionClauseConjunction>` block present
|
|
84
|
+
- [ ] Any `<conditions>` uses `<clause>UNLESS</clause>`
|
|
85
|
+
- [ ] `<conjunctionExpression>` uses top-level `OR` (e.g. `(OR 1 2)`)
|
|
86
|
+
- [ ] `<principalPath>` other than `ASSIGNED_PERMISSIONS_PATH` (user ID etc. may appear only inside SOQL `${User.X}` substitutions)
|
|
87
|
+
- [ ] `<resourcePath>` other than `TAG`, `CLASSIFICATION`, `DATASPACE`, `RECORDFIELD`, `EXPRESSION`, `ENTITYTYPE`
|
|
88
|
+
- [ ] `<valuePrincipalPath>` is not one of `USER_ID`, `USER_ROLE_ID`, `ORGANIZATION_ID`, `SCALAR_ATTRIBUTE`, `PLURAL_ATTRIBUTE` (with `${User.X}` expression)
|
|
89
|
+
- [ ] `<contextPath>` other than `SESSION_DATASPACE`
|
|
90
|
+
- [ ] Operator is `HIERARCHICALLY_BELOW`, `IN`, or `CONTAINS_ALL`
|
|
91
|
+
- [ ] `<valueReferenceType>` is `HIERARCHY` or `DATASPACE`
|
|
92
|
+
- [ ] `<valueString>` is typed JSON other than `{"t":"Text","v":"FIELD"|"RECORD"|"OBJECT"}` or `{"t":"Boolean","v":…}` with a UI-recognized boolean field
|
|
93
|
+
- [ ] `<resourceTransform>` not in the masking-category mapped set
|
|
94
|
+
- [ ] `<resourceExpression>` ARGLIST has multiple arguments
|
|
95
|
+
- [ ] `<replicated>true</replicated>` in an org with replication frozen
|
|
96
|
+
|
|
97
|
+
If **none** of the above is true, the policy is **UI-compatible**.
|
|
98
|
+
|
|
99
|
+
> **Important**: The UI shows NO banner when it drops unsupported pieces on save (`// ERROR: Unsupported rule!` comment, no surfaced message). Operator-confirmation is the only line of defense.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Operator-Confirmation Protocol
|
|
104
|
+
|
|
105
|
+
Whenever a request would produce a UI-incompatible policy:
|
|
106
|
+
|
|
107
|
+
1. **Try to make it UI-compatible first.** Mechanical rewrites:
|
|
108
|
+
- `unless` → `when` with negated operator:
|
|
109
|
+
| Intent | UI-compatible rewrite |
|
|
110
|
+
|--------|----------------------|
|
|
111
|
+
| `unless principal has permission X` | `WHEN ASSIGNED_PERMISSIONS_PATH CONTAINS_NONE X` |
|
|
112
|
+
| `unless resource has tag X` | `WHEN TAG CONTAINS_NONE X` |
|
|
113
|
+
| `unless record field = value` | `WHEN RECORDFIELD NOT_EQUALS value` |
|
|
114
|
+
- Top-level `OR` between two tags → nest inside a tag/classification section group
|
|
115
|
+
- Multiple `<action>` → split into multiple rules
|
|
116
|
+
|
|
117
|
+
2. **If a UI-compatible rewrite is not possible**, tell the operator:
|
|
118
|
+
- Which traits make it incompatible (cite items from the checklist above)
|
|
119
|
+
- That the Data Governance Policy Builder will silently drop unsupported pieces on save with no warning
|
|
120
|
+
- That maintenance must happen through MDAPI/Tooling for the policy's lifetime
|
|
121
|
+
|
|
122
|
+
3. **Wait for explicit confirmation.** Do not write the file until confirmed.
|
|
123
|
+
|
|
124
|
+
4. **On confirmation**, add an in-source marker to `<description>` (or a comment above the rule): `# API-only: not editable in Data Governance Policy Builder. Reasons: <bullets>`. Also set `<builderCompatible>false</builderCompatible>` on the parent set.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## UI-Compatibility Matrix for Templates
|
|
129
|
+
|
|
130
|
+
| Template | UI-compatible? | Notes |
|
|
131
|
+
|----------|----------------|-------|
|
|
132
|
+
| Bare permit, no conditions | Partial | Single `<action>Read</action>` only; `ruleConsumer=DATACLOUD`. UI maps ACCESS → Governance on load. |
|
|
133
|
+
| Tag / Classification / Permission gate | Yes | `CONTAINS_ANY` / `CONTAINS_NONE` only. Tag refs must resolve in org. |
|
|
134
|
+
| Basic RLS (RECORDFIELD = user attribute) | Yes | `USER_ID` / `ORGANIZATION_ID` / `USER_ROLE_ID` round-trips. |
|
|
135
|
+
| TupleRead with OR-of-ENTITYTYPE | Yes | The canonical UI-compatible OLS/FLS shape. |
|
|
136
|
+
| IDENTIFIED_RECORD | Not MDAPI-authorable | Must be a runtime RuleProvider. |
|
|
137
|
+
| RLS via PROJECTION join | Yes | Single PROJECTION editable. |
|
|
138
|
+
| Scalar/plural SOQL principal | Out of MDAPI contract | `SCALAR_ATTRIBUTE`/`PLURAL_ATTRIBUTE` not in `RulePrincipalPathType`. Fixture-only. |
|
|
139
|
+
| TRANSFORM with permission + classification | Yes | Use masking-category-mapped transforms only. |
|
|
140
|
+
| `(AND 1 2)` multi-condition | Yes (if each section is one of the four UI buckets) | |
|
|
141
|
+
| Top-level `(OR 1 2)` | No | Triggers unsupported-rule path; silently dropped. |
|
|
142
|
+
| Hierarchy traversal | No | `HIERARCHICALLY_BELOW` and `HIERARCHY` not in UI dropdowns. Always API-only. |
|
|
@@ -21,7 +21,7 @@ This guide documents field coverage validation rules for SOQL queries — ensuri
|
|
|
21
21
|
|
|
22
22
|
When you query an sObject, only the fields in the SELECT clause are populated. Accessing any other field results in a runtime error:
|
|
23
23
|
|
|
24
|
-
```
|
|
24
|
+
```text
|
|
25
25
|
System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Account.Industry
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
Post-Tool Validation Hook for
|
|
3
|
+
Post-Tool Validation Hook for platform-soql-query skill.
|
|
4
4
|
|
|
5
5
|
This hook runs AFTER Write or Edit tool completes and provides validation
|
|
6
6
|
feedback for SOQL files (*.soql).
|
|
@@ -23,8 +23,8 @@ import json
|
|
|
23
23
|
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
24
24
|
sys.path.insert(0, SCRIPT_DIR)
|
|
25
25
|
|
|
26
|
-
# Find shared modules (../../shared relative to
|
|
27
|
-
PLUGIN_ROOT = os.path.dirname(os.path.dirname(SCRIPT_DIR)) #
|
|
26
|
+
# Find shared modules (../../shared relative to platform-soql-query)
|
|
27
|
+
PLUGIN_ROOT = os.path.dirname(os.path.dirname(SCRIPT_DIR)) # platform-soql-query/
|
|
28
28
|
SKILLS_ROOT = os.path.dirname(PLUGIN_ROOT) # sf-skills/
|
|
29
29
|
SHARED_DIR = os.path.join(SKILLS_ROOT, "shared")
|
|
30
30
|
sys.path.insert(0, SHARED_DIR)
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: platform-value-set-generate
|
|
3
|
+
description: "Use this skill when users need to create, generate, or validate a Salesforce global value set or customize a standard value set. Trigger when users mention a global value set, GlobalValueSet, standard value set, StandardValueSet, a reusable picklist, a picklist value set shared across fields, or customizing standard picklists like Industry, Lead Source, or Opportunity Stage. Also use when users hit deployment errors adding values to a standard picklist, referencing a value set from a custom field, or working with .globalValueSet-meta.xml or .standardValueSet-meta.xml files. DO NOT TRIGGER for an inline one-off picklist on a single field with no reuse, or for general custom field metadata work that does not involve a GlobalValueSet or StandardValueSet — use platform-custom-field-generate instead."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "1.0"
|
|
6
|
+
minApiVersion: "60.0"
|
|
7
|
+
cliTools:
|
|
8
|
+
- tool: ["sf"]
|
|
9
|
+
semver: ">=2.0.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
Generates and validates the two reusable picklist value-set metadata types — **GlobalValueSet** (a new reusable set shared across fields) and **StandardValueSet** (customizing a built-in catalog picklist like Industry or Lead Source) — and wires a CustomField to one via `<valueSetName>`.
|
|
15
|
+
|
|
16
|
+
### Scope
|
|
17
|
+
|
|
18
|
+
- **In scope:** creating a GlobalValueSet, customizing a StandardValueSet, referencing either from a field, and the related deployment errors.
|
|
19
|
+
- **Out of scope:** a one-off inline picklist on a single field with no reuse → use **`platform-custom-field-generate`** (inline `<valueSetDefinition>`). Generating the *field* that references a value set is also `platform-custom-field-generate`'s job; this skill produces the value set itself.
|
|
20
|
+
|
|
21
|
+
**Two different metadata types — do not confuse them:**
|
|
22
|
+
|
|
23
|
+
| Concern | GlobalValueSet | StandardValueSet |
|
|
24
|
+
|---------|----------------|------------------|
|
|
25
|
+
| Folder | `globalValueSets/` | `standardValueSets/` |
|
|
26
|
+
| File suffix | `.globalValueSet-meta.xml` | `.standardValueSet-meta.xml` |
|
|
27
|
+
| Root element | `<GlobalValueSet>` | `<StandardValueSet>` |
|
|
28
|
+
| Name source | filename (dev name) | `<fullName>` = fixed catalog name |
|
|
29
|
+
| Value element | `<customValue>` | `<standardValue>` |
|
|
30
|
+
| Can add NEW values? | Yes | No — modify existing only |
|
|
31
|
+
| Can create a new NAME? | Yes | No — only the fixed catalog |
|
|
32
|
+
| `*` wildcard in package.xml | Supported | Not supported |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Specification
|
|
37
|
+
|
|
38
|
+
### 1. Purpose
|
|
39
|
+
|
|
40
|
+
This document defines the mandatory constraints for generating value-set metadata XML. The agent must verify these constraints before outputting XML to prevent Metadata API deployment errors.
|
|
41
|
+
|
|
42
|
+
- **GlobalValueSet** — a reusable, named set of picklist values defined once and referenced by any number of picklist/multi-select fields. Use when the same value list is shared across multiple fields.
|
|
43
|
+
- **StandardValueSet** — the value list behind a Salesforce-defined standard picklist (Industry, Lead Source, etc.). You can only **modify** the values in a fixed catalog of named sets; you cannot invent a new set or add brand-new values.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### 2. GlobalValueSet — Syntactic Essentials
|
|
48
|
+
|
|
49
|
+
**File:** `globalValueSets/<DeveloperName>.globalValueSet-meta.xml`
|
|
50
|
+
|
|
51
|
+
The developer name comes from the **filename**, not a `<fullName>` tag.
|
|
52
|
+
|
|
53
|
+
#### Required Elements
|
|
54
|
+
|
|
55
|
+
| Element | Requirement | Notes |
|
|
56
|
+
|---------|-------------|-------|
|
|
57
|
+
| `<masterLabel>` | Required | UI label for the value set |
|
|
58
|
+
| `<sorted>` | Required | `true` = alphabetize values in the UI; `false` = preserve listed order |
|
|
59
|
+
| `<customValue>` | Required (≥1) | One per value (see below) |
|
|
60
|
+
|
|
61
|
+
#### `<customValue>` Sub-Elements
|
|
62
|
+
|
|
63
|
+
| Sub-element | Requirement | Notes |
|
|
64
|
+
|-------------|-------------|-------|
|
|
65
|
+
| `<fullName>` | Required | The value's API name. Use the value text **as the user spelled it** — spaces are allowed and must be preserved (e.g. `Closed Won`, not `Closed_Won`). Must start with a letter. This is a value name, NOT a field API name, so do not append `__c` or replace spaces with underscores. |
|
|
66
|
+
| `<default>` | Optional | At most one value `true`. Omit it (or use `false`) on the rest — it is not required on every value. |
|
|
67
|
+
| `<label>` | Required | UI label for the value |
|
|
68
|
+
| `<color>` | Optional | Hex color, e.g. `#FF0000` |
|
|
69
|
+
| `<isActive>` | Optional | Omit (active) or `false` to deactivate |
|
|
70
|
+
| `<description>` | Optional | Per-value description |
|
|
71
|
+
|
|
72
|
+
#### The `__gvs` Suffix — do NOT use it in metadata
|
|
73
|
+
|
|
74
|
+
**Rule: reference a GlobalValueSet by its bare developer name. Never add `__gvs`.**
|
|
75
|
+
|
|
76
|
+
In API 57.0+ orgs the platform *stores/displays* a GlobalValueSet's developer name with a `__gvs` suffix internally, but the **Metadata API (deploy and retrieve) always uses the bare name** — `<valueSetName>Priority_Levels</valueSetName>`, not `Priority_Levels__gvs`. The suffix was briefly emitted by a Winter '23 change that caused deploy failures and was patched out. So:
|
|
77
|
+
|
|
78
|
+
- The file is `globalValueSets/Priority_Levels.globalValueSet-meta.xml` — **no `__gvs`** in the filename.
|
|
79
|
+
- A field references it as `<valueSetName>Priority_Levels</valueSetName>` — **no `__gvs`**.
|
|
80
|
+
- If a retrieve shows `Priority_Levels__gvs` in the org or you see a "returned from org but not found in local project" warning, that's the expected org-storage display — keep your local metadata on the bare name.
|
|
81
|
+
|
|
82
|
+
#### CORRECT — GlobalValueSet
|
|
83
|
+
|
|
84
|
+
```xml
|
|
85
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
86
|
+
<GlobalValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
87
|
+
<masterLabel>Priority Levels</masterLabel>
|
|
88
|
+
<sorted>false</sorted>
|
|
89
|
+
<customValue>
|
|
90
|
+
<fullName>Critical</fullName>
|
|
91
|
+
<default>false</default>
|
|
92
|
+
<label>Critical</label>
|
|
93
|
+
</customValue>
|
|
94
|
+
<customValue>
|
|
95
|
+
<fullName>High</fullName>
|
|
96
|
+
<default>false</default>
|
|
97
|
+
<label>High</label>
|
|
98
|
+
</customValue>
|
|
99
|
+
<customValue>
|
|
100
|
+
<fullName>Medium</fullName>
|
|
101
|
+
<default>true</default>
|
|
102
|
+
<label>Medium</label>
|
|
103
|
+
</customValue>
|
|
104
|
+
<customValue>
|
|
105
|
+
<fullName>Low</fullName>
|
|
106
|
+
<default>false</default>
|
|
107
|
+
<label>Low</label>
|
|
108
|
+
</customValue>
|
|
109
|
+
</GlobalValueSet>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### INCORRECT — GlobalValueSet
|
|
113
|
+
|
|
114
|
+
```xml
|
|
115
|
+
<GlobalValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
116
|
+
<fullName>Priority_Levels</fullName> <!-- WRONG: name comes from the filename -->
|
|
117
|
+
<masterLabel>Priority Levels</masterLabel>
|
|
118
|
+
<!-- WRONG: <sorted> is required and missing -->
|
|
119
|
+
<standardValue> <!-- WRONG: GVS uses <customValue>, not <standardValue> -->
|
|
120
|
+
<fullName>Critical</fullName>
|
|
121
|
+
</standardValue>
|
|
122
|
+
</GlobalValueSet>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Errors:** missing required `sorted`; unknown element `standardValue`; root `fullName` is rejected because the name is derived from the filename.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### 3. StandardValueSet — Syntactic Essentials CRITICAL
|
|
130
|
+
|
|
131
|
+
**File:** `standardValueSets/<Name>.standardValueSet-meta.xml`
|
|
132
|
+
|
|
133
|
+
#### HARD CONSTRAINTS — read before generating
|
|
134
|
+
|
|
135
|
+
1. **You can ONLY modify values inside the fixed catalog of named standard value sets.** You **cannot** add a brand-new value, and you **cannot** create a new StandardValueSet name. The Metadata API will reject both.
|
|
136
|
+
2. The root carries a `<fullName>` whose value is the **fixed enum name** (e.g. `Industry`), NOT a `masterLabel`. The filename must match this name.
|
|
137
|
+
3. Values are `<standardValue>` entries — **not** `<customValue>`.
|
|
138
|
+
4. **Emit ONLY the values the request explicitly names — a surgical, minimal change.** Include a `<standardValue>` block for each value the user asks you to activate, deactivate, relabel, or reorder, and **nothing else**. Do **not** enumerate the full picklist or emit `<standardValue>` entries for values the request did not mention. A StandardValueSet deployment is a partial update: unlisted values keep their current org state untouched. Reproducing every value (e.g. all 30+ Industry entries) is noise and risks clobbering org state — it is wrong even when the request says "keep *only* X active," which means "set the named ones; leave the rest as-is," not "enumerate and deactivate everything else." If you use the grounding MCP to discover existing values, use it only to confirm the named values exist and to get their exact `<fullName>`/`<label>` — not as a list to reproduce in full.
|
|
139
|
+
|
|
140
|
+
#### `<standardValue>` — Modifiable Sub-Elements
|
|
141
|
+
|
|
142
|
+
| Sub-element | Modifiable? | Notes |
|
|
143
|
+
|-------------|-------------|-------|
|
|
144
|
+
| `<fullName>` | Identifies the value (must already exist) | Cannot introduce a new one |
|
|
145
|
+
| `<label>` | Yes | Relabel the value's UI text |
|
|
146
|
+
| `<isActive>` | Yes | `false` deactivates; omit or `true` keeps active |
|
|
147
|
+
| `<default>` | Yes | At most one value `true` |
|
|
148
|
+
| `<groupingString>` | Yes | Category grouping (used by some standard picklists) |
|
|
149
|
+
|
|
150
|
+
#### Canonical StandardValueSet Names (partial)
|
|
151
|
+
|
|
152
|
+
`Industry`, `LeadSource`, `OpportunityStage`, `OpportunityType`, `AccountType`, `AccountRating`, `LeadStatus`, `CaseStatus`, `CaseOrigin`, `CasePriority`, `CaseReason`, `TaskStatus`, `TaskPriority`, `QuoteStatus`, `Product2Family`, `Salutation`, `AccountOwnership`, `ContractStatus`, `OrderStatus`, `PartnerRole`.
|
|
153
|
+
|
|
154
|
+
> Full appendix: the complete list of valid standard value set names is at
|
|
155
|
+
> `https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/standardvalueset_names.htm`.
|
|
156
|
+
> If the name is not in that appendix, it is **not** a StandardValueSet — it is either a GlobalValueSet or an inline CustomField picklist.
|
|
157
|
+
|
|
158
|
+
#### CORRECT — StandardValueSet (modify existing values only)
|
|
159
|
+
|
|
160
|
+
```xml
|
|
161
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
162
|
+
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
163
|
+
<fullName>Industry</fullName>
|
|
164
|
+
<standardValue>
|
|
165
|
+
<fullName>Technology</fullName>
|
|
166
|
+
<default>false</default>
|
|
167
|
+
<label>Technology</label>
|
|
168
|
+
<isActive>true</isActive>
|
|
169
|
+
</standardValue>
|
|
170
|
+
<standardValue>
|
|
171
|
+
<fullName>Agriculture</fullName>
|
|
172
|
+
<default>false</default>
|
|
173
|
+
<label>Agriculture</label>
|
|
174
|
+
<isActive>false</isActive> <!-- deactivated, but kept in the set -->
|
|
175
|
+
</standardValue>
|
|
176
|
+
</StandardValueSet>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### INCORRECT — StandardValueSet
|
|
180
|
+
|
|
181
|
+
```xml
|
|
182
|
+
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
183
|
+
<masterLabel>Industry</masterLabel> <!-- WRONG: StandardValueSet uses <fullName>, not masterLabel -->
|
|
184
|
+
<customValue> <!-- WRONG: uses <standardValue>, not customValue -->
|
|
185
|
+
<fullName>Renewable Energy</fullName> <!-- WRONG: cannot ADD a new value to a standard set -->
|
|
186
|
+
<label>Renewable Energy</label>
|
|
187
|
+
</customValue>
|
|
188
|
+
</StandardValueSet>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Errors:** unknown element `masterLabel`/`customValue`; adding a value not already in the standard catalog fails deployment.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
### 4. Never Invent Values — Verify, Don't Hallucinate CRITICAL
|
|
196
|
+
|
|
197
|
+
When customizing a **StandardValueSet** (or extending a shared GlobalValueSet), **only modify values that already exist** — never invent the value list of a standard picklist. The hard rule is about what you EMIT: a `<standardValue>` whose `<fullName>` is not a real catalog value will fail deployment.
|
|
198
|
+
|
|
199
|
+
For well-known standard picklists you already know the canonical values (e.g. `Industry`, `LeadSource`, `OpportunityStage`). When you are unsure a named value exists, you can confirm it against the live org — but treat lookup as a *confirmation* step, not a required first call:
|
|
200
|
+
|
|
201
|
+
- **Grounding MCP** (if available) exposes `search_metadata` and `query-metadata` to look up live metadata. Use them only to confirm a named value's exact `<fullName>`/`<label>` — not to pull the full list to reproduce.
|
|
202
|
+
- **CLI fallback** — query the Tooling API directly:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
sf data query --use-tooling-api \
|
|
206
|
+
--query "SELECT MasterLabel, Metadata FROM StandardValueSet WHERE MasterLabel = '<name>'"
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
> **The point is the output, not the lookup:** emit modifications ONLY to values you know exist. A generated StandardValueSet that introduces unseen values is a hallucination and will fail deployment. (This pairs with the minimal-scope rule in §3: confirm the *named* values; don't enumerate the whole set.)
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
### 5. Referencing a Value Set from a CustomField
|
|
214
|
+
|
|
215
|
+
A picklist/multi-select CustomField references a value set via `<valueSetName>` inside `<valueSet>` (instead of an inline `<valueSetDefinition>`).
|
|
216
|
+
|
|
217
|
+
```xml
|
|
218
|
+
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
219
|
+
<fullName>Priority__c</fullName>
|
|
220
|
+
<label>Priority</label>
|
|
221
|
+
<type>Picklist</type>
|
|
222
|
+
<valueSet>
|
|
223
|
+
<restricted>true</restricted>
|
|
224
|
+
<valueSetName>Priority_Levels</valueSetName> <!-- bare developer name, NO __gvs; see §2 -->
|
|
225
|
+
</valueSet>
|
|
226
|
+
</CustomField>
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
- For a **GlobalValueSet**, `<valueSetName>` is the **bare developer name** (e.g. `Priority_Levels`) — **never** add `__gvs`. The suffix is an org-storage display artifact; the Metadata API uses the bare name for both deploy and retrieve (see §2).
|
|
230
|
+
- A field bound to a value set must **not** also declare an inline `<valueSetDefinition>` — choose one or the other.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
### 6. Validation Rules
|
|
235
|
+
|
|
236
|
+
The agent must **reject** and explain — not silently "fix" by inventing metadata — the following:
|
|
237
|
+
|
|
238
|
+
| Violation | Action / Message |
|
|
239
|
+
|-----------|------------------|
|
|
240
|
+
| Add a NEW value to a **StandardValueSet** | Reject. "Standard value sets cannot accept new values. Create a **GlobalValueSet** (reusable) or an inline picklist on a **CustomField** instead." |
|
|
241
|
+
| Create a NEW StandardValueSet name | Reject. The name must be in the standard catalog appendix. Otherwise it is a GlobalValueSet. |
|
|
242
|
+
| **Value set developer name** with spaces / invalid chars | Convert spaces to underscores; must start with a letter; alphanumeric + underscore only. `Priority Levels` → `Priority_Levels`. (This applies to the value SET name and the field API name — NOT to individual `<customValue><fullName>` values, which keep spaces as written.) |
|
|
243
|
+
| Duplicate value `fullName` within one set | Reject. Each `fullName` must be unique within the value set. |
|
|
244
|
+
| More than one `<default>true</default>` | Reject. At most one default value per set. |
|
|
245
|
+
|
|
246
|
+
#### INCORRECT — adding a value to a standard set
|
|
247
|
+
|
|
248
|
+
> "Add a `Cryptocurrency` value to the Industry picklist."
|
|
249
|
+
|
|
250
|
+
Do not emit a `<standardValue>` with `fullName` `Cryptocurrency`. Respond that standard value sets are a fixed catalog and propose a GlobalValueSet (if reused across fields) or an inline restricted picklist on a single CustomField.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
### 7. Deployment Ordering
|
|
255
|
+
|
|
256
|
+
A value set must deploy **before** any CustomField that references it.
|
|
257
|
+
|
|
258
|
+
- Deploy the `GlobalValueSet` / `StandardValueSet` first, then the CustomField whose `<valueSetName>` points at it.
|
|
259
|
+
- A field referencing a value set that does not yet exist fails with `valueSetName ... does not exist` (or a "not found" error).
|
|
260
|
+
- In `package.xml`: `GlobalValueSet` **supports** the `*` wildcard; `StandardValueSet` does **not** — list each standard set member explicitly.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
### 8. Common Deployment Errors
|
|
265
|
+
|
|
266
|
+
| Error / Symptom | Cause | Fix |
|
|
267
|
+
|-----------------|-------|-----|
|
|
268
|
+
| Value not added to standard picklist | Tried to ADD a value to a `StandardValueSet` | Standard sets are fixed; use GlobalValueSet or inline CustomField picklist |
|
|
269
|
+
| `Required field missing: sorted` | GlobalValueSet missing `<sorted>` | Add `<sorted>true</sorted>` or `<sorted>false</sorted>` |
|
|
270
|
+
| Unknown element `masterLabel` (StandardValueSet) | Used `masterLabel` instead of `fullName` | StandardValueSet root uses `<fullName>` = catalog name |
|
|
271
|
+
| Unknown element `customValue` (StandardValueSet) | Used `customValue` instead of `standardValue` | Use `<standardValue>` in standard sets |
|
|
272
|
+
| `valueSetName ... does not exist` | Field deployed before its value set, or `__gvs` wrongly added to the reference | Deploy the value set first; reference it by the **bare** developer name with NO `__gvs` (§2) |
|
|
273
|
+
| Duplicate value name | Two `<customValue>` entries share a `fullName` | Make each `fullName` unique within the set (spaces in a value name are allowed — do NOT underscore them) |
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Verification Checklist
|
|
278
|
+
|
|
279
|
+
Before generating value-set XML, verify:
|
|
280
|
+
|
|
281
|
+
### Type Selection
|
|
282
|
+
- [ ] Is this a reusable set shared across fields (GlobalValueSet) or a built-in standard picklist (StandardValueSet)?
|
|
283
|
+
- [ ] If StandardValueSet: is the name in the standard catalog appendix? If not, it must be a GlobalValueSet or inline picklist.
|
|
284
|
+
|
|
285
|
+
### GlobalValueSet Checks
|
|
286
|
+
- [ ] Is the root `<GlobalValueSet>` with namespace `http://soap.sforce.com/2006/04/metadata`?
|
|
287
|
+
- [ ] Is `<masterLabel>` present?
|
|
288
|
+
- [ ] Is `<sorted>` present (`true` or `false`)?
|
|
289
|
+
- [ ] Is there at least one `<customValue>`, each with `<fullName>` and `<label>` (at most one carrying `<default>true</default>`)?
|
|
290
|
+
- [ ] Is there NO root `<fullName>` (name comes from the filename)?
|
|
291
|
+
- [ ] When referencing from a field, is `<valueSetName>` the **bare** developer name with NO `__gvs` suffix?
|
|
292
|
+
|
|
293
|
+
### StandardValueSet Checks CRITICAL
|
|
294
|
+
- [ ] Are you emitting modifications ONLY to values you know exist (confirmed from known standard catalogs, or via grounding `search_metadata`/`query-metadata` / Tooling API if unsure) — never invented values?
|
|
295
|
+
- [ ] Is the root `<StandardValueSet>` with the correct namespace?
|
|
296
|
+
- [ ] Does the root use `<fullName>` set to the fixed catalog name (NOT `masterLabel`)?
|
|
297
|
+
- [ ] Are values `<standardValue>` entries (NOT `customValue`)?
|
|
298
|
+
- [ ] Are you ONLY modifying values that already exist (no new `fullName`)?
|
|
299
|
+
- [ ] Did you avoid adding a brand-new value or a new set name?
|
|
300
|
+
|
|
301
|
+
### Shared Checks
|
|
302
|
+
- [ ] At most one value has `<default>true</default>`?
|
|
303
|
+
- [ ] Are all value `fullName`s unique within the set? (Spaces in a value name are fine — preserve them as written; only the value-SET developer name and field API name use underscores.)
|
|
304
|
+
- [ ] Does the value set deploy BEFORE any CustomField that references it?
|
|
305
|
+
- [ ] Does the filename match the intended name?
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Credits & Acknowledgments
|
|
2
|
-
|
|
3
|
-
This skill is part of the `*-datacloud` family. Shared attribution, upstream source mapping, and maintenance notes live in:
|
|
4
|
-
- [../data360-orchestrate/CREDITS.md](../data360-orchestrate/CREDITS.md)
|
|
5
|
-
- [../data360-orchestrate/UPSTREAM.md](../data360-orchestrate/UPSTREAM.md)
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Credits & Acknowledgments
|
|
2
|
-
|
|
3
|
-
This skill is part of the `*-datacloud` family of skills covering the full Data Cloud workflow lifecycle. Shared upstream source mapping and maintenance notes live in:
|
|
4
|
-
- [../data360-orchestrate/CREDITS.md](../data360-orchestrate/CREDITS.md)
|
|
5
|
-
- [../data360-orchestrate/UPSTREAM.md](../data360-orchestrate/UPSTREAM.md)
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Credits & Acknowledgments
|
|
2
|
-
|
|
3
|
-
This skill family distills publicly shared Data Cloud implementation knowledge into sf-skills house style. Attribution is intentionally explicit because contributor credit is a core sf-skills principle.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
This family intentionally:
|
|
8
|
-
- keeps sf-skills naming consistency (`*-datacloud`)
|
|
9
|
-
- keeps the external CLI plugin outside this repo
|
|
10
|
-
- favors deterministic helper scripts and reusable JSON templates
|
|
11
|
-
- rewrites examples into generic sf-skills-style guidance rather than copying workshop-specific payloads
|
|
12
|
-
|
|
13
|
-
See [UPSTREAM.md](UPSTREAM.md) for the maintenance contract.
|
|
14
|
-
|
|
15
|
-
---
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Upstream Distillation Map for data360-orchestrate
|
|
2
|
-
|
|
3
|
-
This file exists to make downstream maintenance easy without sacrificing sf-skills consistency.
|
|
4
|
-
|
|
5
|
-
## Maintenance contract
|
|
6
|
-
|
|
7
|
-
When upstream changes, do **not** copy blindly.
|
|
8
|
-
|
|
9
|
-
Instead:
|
|
10
|
-
1. review new upstream commits
|
|
11
|
-
2. identify changed command behaviors, install patterns, or gotchas
|
|
12
|
-
3. update sf-skills prompts and templates in a distilled form
|
|
13
|
-
4. keep naming, attribution, and cross-skill boundaries consistent with sf-skills
|
|
14
|
-
5. update this file with the new reviewed commit SHAs
|
|
15
|
-
|
|
16
|
-
## High-priority upstream areas to re-check
|
|
17
|
-
|
|
18
|
-
- installation / linking workflow for the community plugin
|
|
19
|
-
- command counts and topic coverage
|
|
20
|
-
- API-version guidance
|
|
21
|
-
- known issues and bug-fix notes
|
|
22
|
-
- live-tested command set
|
|
23
|
-
- any new commands affecting Connect / Prepare / Harmonize / Segment / Act / Retrieve boundaries
|
|
24
|
-
- connector-specific payload examples worth distilling into generic repo-safe examples
|
|
25
|
-
- search-index / hybrid-search guidance and any command-surface changes around hybrid scoring or prefilter behavior
|
|
26
|
-
- Ingestion API schema-upload flow, send-data examples, and problem-record guidance
|
|
27
|
-
- unstructured-source setup differences between connection-level reruns, stream refreshes, and initial UI seeding
|
|
28
|
-
- UI-only gaps where upstream introduces browser automation; validate before importing
|
|
29
|
-
|
|
30
|
-
## Cross-skill boundary reminders
|
|
31
|
-
|
|
32
|
-
Keep Data Cloud product work in `*-datacloud`, but do not blur into:
|
|
33
|
-
- `agentforce-observe` for STDM/session tracing/parquet workflows
|
|
34
|
-
- `platform-soql-query` for CRM SOQL-only tasks
|
|
35
|
-
- `platform-data-manage` for CRM record seeding/cleanup
|
|
36
|
-
- `platform-*-generate` skills for CRM schema creation (custom objects, fields, validation rules, etc.)
|
|
37
|
-
|
|
38
|
-
## Local helper files in this family
|
|
39
|
-
|
|
40
|
-
- `references/plugin-setup.md`
|
|
41
|
-
- `scripts/bootstrap-plugin.sh`
|
|
42
|
-
- `scripts/verify-plugin.sh`
|
|
43
|
-
- `assets/definitions/`
|
|
44
|
-
|
|
45
|
-
These are sf-skills-owned conveniences and should evolve independently from upstream when that improves user experience.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Credits & Acknowledgments
|
|
2
|
-
|
|
3
|
-
Primary contributor: **Gnanasekaran Thoppae**
|
|
4
|
-
|
|
5
|
-
This skill is part of the `*-datacloud` family. Shared attribution, upstream source mapping, and maintenance notes live in:
|
|
6
|
-
- [../data360-orchestrate/CREDITS.md](../data360-orchestrate/CREDITS.md)
|
|
7
|
-
- [../data360-orchestrate/UPSTREAM.md](../data360-orchestrate/UPSTREAM.md)
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Credits & Acknowledgments
|
|
2
|
-
|
|
3
|
-
Primary contributor: **Gnanasekaran Thoppae**
|
|
4
|
-
|
|
5
|
-
This skill is part of the `*-datacloud` family. Shared attribution, upstream source mapping, and maintenance notes live in:
|
|
6
|
-
- [../data360-orchestrate/CREDITS.md](../data360-orchestrate/CREDITS.md)
|
|
7
|
-
- [../data360-orchestrate/UPSTREAM.md](../data360-orchestrate/UPSTREAM.md)
|