@salesforce/afv-skills 1.67.0 → 1.68.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 +55 -5
- package/package.json +1 -1
- package/skills/agentforce-offline-experimentation-run/SKILL.md +14 -22
- package/skills/agentforce-offline-experimentation-run/scripts/bt_compare.py +81 -0
- package/skills/agentforce-offline-experimentation-run/scripts/bt_fetch.py +358 -0
- package/skills/agentforce-offline-experimentation-run/scripts/bt_patch_agent.py +110 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/__init__.py +34 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentpatch.py +483 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentsrc.py +565 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/cache.py +95 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/compare.py +617 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/fetch.py +1012 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +148 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +92 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/patch.py +327 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/redact.py +40 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/results.py +288 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/scoring.py +340 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +238 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/splits.py +136 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/stdm.py +98 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/tokens.py +173 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/units.py +199 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/versions.py +194 -0
- package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +366 -378
- package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +14 -4
- package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +472 -796
- package/skills/dx-lifecycle-center/SKILL.md +5 -2
- package/skills/dx-lifecycle-center/assets/widgets/connect-connected/connect-connected.json +65 -0
- package/skills/dx-lifecycle-center/assets/widgets/connect-connected/schema.json +32 -0
- package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/connect-sign-in.json +57 -0
- package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/schema.json +21 -0
- package/skills/dx-lifecycle-center/examples/workflows.md +20 -6
- package/skills/dx-lifecycle-center/references/connect-org.md +21 -2
- package/skills/dx-lifecycle-center/references/deploy.md +2 -2
- package/skills/dx-lifecycle-center/references/list-orgs.md +1 -1
- package/skills/dx-lifecycle-center/scripts/card-policy.jq +71 -0
- package/skills/dx-lifecycle-center/scripts/fill-widget.jq +29 -0
- package/skills/dx-lifecycle-center/scripts/widget.sh +28 -0
- package/skills/dx-org-devhub-configure/SKILL.md +85 -84
- package/skills/dx-org-devhub-configure/examples/status-output.md +25 -2
- package/skills/dx-org-devhub-configure/scripts/devhub.sh +265 -140
- package/skills/dx-org-devhub-configure/scripts/test-devhub.sh +100 -15
- package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +89 -0
- package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +164 -0
- package/skills/dx-scratch-def-configure/SKILL.md +163 -0
- package/skills/dx-scratch-def-configure/examples/confirm-card.md +53 -0
- package/skills/dx-scratch-def-configure/examples/report-recipes.md +100 -0
- package/skills/dx-scratch-def-configure/references/features.json +3270 -0
- package/skills/dx-scratch-def-configure/references/project-scratch-def.schema.json +1841 -0
- package/skills/dx-scratch-def-configure/references/settings-map.json +682 -0
- package/skills/dx-scratch-def-configure/scripts/lib_scratch_def.py +1306 -0
- package/skills/dx-scratch-def-configure/scripts/requirements.txt +3 -0
- package/skills/dx-scratch-def-configure/scripts/scrape_config_values.py +848 -0
- package/skills/education-cloud-domain-configure/SKILL.md +1 -1
- package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -1
- package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +1 -1
- package/skills/experience-design-validate/SKILL.md +1 -1
- package/skills/experience-search-coordinate/SKILL.md +18 -12
- package/skills/experience-search-coordinate/references/content-route.md +79 -1
- package/skills/field-service-data-capture-migrate/SKILL.md +1 -1
- package/skills/platform-apex-generate/SKILL.md +14 -11
- package/skills/platform-apex-test-generate/SKILL.md +2 -1
- package/skills/platform-datamask-run/SKILL.md +52 -71
- package/skills/platform-datamask-run/references/api-surface.md +10 -4
- package/skills/platform-datamask-run/references/policy-authoring.md +56 -7
- package/skills/platform-datamask-run/references/run-and-abort.md +17 -10
- package/skills/platform-datamask-run/scripts/poll-job.sh +15 -25
- package/skills/platform-dataspace-access-configure/SKILL.md +19 -1
- package/skills/platform-metadata-discovery-get/SKILL.md +185 -0
- package/skills/platform-metadata-discovery-get/references/api-map.md +25 -0
- package/skills/platform-metadata-discovery-get/references/h360-routes.md +30 -0
- package/skills/platform-metadata-discovery-get/references/scoped-soql.md +52 -0
- package/skills/platform-metadata-grounding-get/SKILL.md +170 -0
- package/skills/platform-policy-rule-generate/SKILL.md +84 -232
- package/skills/platform-policy-rule-generate/references/condition-model.md +47 -0
- package/skills/platform-policy-rule-generate/references/condition-templates.md +89 -0
- package/skills/platform-policy-rule-generate/references/conjunction-compiler.md +25 -0
- package/skills/platform-policy-rule-generate/references/conjunction-expression.md +22 -0
- package/skills/platform-policy-rule-generate/references/consumer-all.md +9 -0
- package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +91 -0
- package/skills/platform-policy-rule-generate/references/deploy-errors.md +24 -36
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +6 -0
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitions/ExistsJoinRLS_Rule_1.policyRuleDefinition +91 -0
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +6 -0
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitions/FieldReadDeny_Rule_1.policyRuleDefinition +72 -0
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +6 -0
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitions/LastCharactersFieldMasking_Rule_1.policyRuleDefinition +77 -0
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +6 -0
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitions/PrincipalFieldMatchRLS_Rule_1.policyRuleDefinition +77 -0
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +4 -0
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitions/TaggedObjectAccess_Rule_1.policyRuleDefinition +65 -0
- package/skills/platform-policy-rule-generate/references/headless-transport.md +87 -0
- package/skills/platform-policy-rule-generate/references/policy-schema-full.md +17 -10
- package/skills/platform-policy-rule-generate/references/policy-shapes.md +74 -0
- package/skills/platform-policy-rule-generate/references/principal-expression.md +31 -0
- package/skills/platform-policy-rule-generate/references/reference-resolution.md +51 -0
- package/skills/platform-policy-rule-generate/references/resource-expression.md +48 -0
- package/skills/platform-policy-rule-generate/references/runtime-context.md +9 -0
- package/skills/platform-policy-rule-generate/references/templates-access.md +11 -9
- package/skills/platform-policy-rule-generate/references/templates-advanced.md +4 -2
- package/skills/platform-policy-rule-generate/references/templates-record.md +37 -22
- package/skills/platform-policy-rule-generate/references/templates-transform.md +10 -8
- package/skills/platform-policy-rule-generate/references/templates.md +2 -2
- package/skills/platform-policy-rule-generate/references/ui-compatibility.md +35 -17
- package/skills/platform-report-generate/SKILL.md +9 -4
- package/skills/platform-report-generate/references/chart-types.md +26 -2
- package/skills/platform-report-generate/references/column-names.md +43 -0
- package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
- package/skills/platform-report-generate/references/verification-checklist.md +10 -2
- package/skills/service-digital-engagement-channel-configure/SKILL.md +7 -5
- package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +33 -0
- package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +110 -14
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<PolicyRuleDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<action>Read</action>
|
|
4
|
+
<category>TRANSFORM_POLICY_RULE_DEFINITION</category>
|
|
5
|
+
<effect>Transform</effect>
|
|
6
|
+
<label>Rule 1</label>
|
|
7
|
+
<policyRuleDefinitionSetName>LastCharactersFieldMasking</policyRuleDefinitionSetName>
|
|
8
|
+
<principalAuthenticationLevel>INTERNAL</principalAuthenticationLevel>
|
|
9
|
+
<principalScopeType>ANY</principalScopeType>
|
|
10
|
+
<resourceExpression>
|
|
11
|
+
<transformExpression>
|
|
12
|
+
<argument>
|
|
13
|
+
<type>STRING</type>
|
|
14
|
+
<value>12</value>
|
|
15
|
+
</argument>
|
|
16
|
+
</transformExpression>
|
|
17
|
+
<type>ARGLIST</type>
|
|
18
|
+
<version>1</version>
|
|
19
|
+
</resourceExpression>
|
|
20
|
+
<resourceScopeType>FIELD</resourceScopeType>
|
|
21
|
+
<resourceTransform>LAST_N_CHARS_RESOURCE_TRANSFORM</resourceTransform>
|
|
22
|
+
<ruleConsumer>DATACLOUD</ruleConsumer>
|
|
23
|
+
<transformPrecedence>0</transformPrecedence>
|
|
24
|
+
<whenPolicyRuleDefinitionClauseConjunction>
|
|
25
|
+
<conditions>
|
|
26
|
+
<clause>WHEN</clause>
|
|
27
|
+
<operator>IS</operator>
|
|
28
|
+
<policyRuleValueSet>
|
|
29
|
+
<valueText>FIELD</valueText>
|
|
30
|
+
</policyRuleValueSet>
|
|
31
|
+
<resourcePath>ENTITYTYPE</resourcePath>
|
|
32
|
+
</conditions>
|
|
33
|
+
<conditions>
|
|
34
|
+
<clause>WHEN</clause>
|
|
35
|
+
<operator>CONTAINS_NONE</operator>
|
|
36
|
+
<policyRuleValueSet>
|
|
37
|
+
<valueReference>cust_perm1</valueReference>
|
|
38
|
+
<valueReferenceType>CUSTOM_PERMISSION</valueReferenceType>
|
|
39
|
+
</policyRuleValueSet>
|
|
40
|
+
<principalPath>ASSIGNED_PERMISSIONS_PATH</principalPath>
|
|
41
|
+
</conditions>
|
|
42
|
+
<conditions>
|
|
43
|
+
<clause>WHEN</clause>
|
|
44
|
+
<operator>EQUALS</operator>
|
|
45
|
+
<policyRuleValueSet>
|
|
46
|
+
<valueText>ewstrdthfg</valueText>
|
|
47
|
+
</policyRuleValueSet>
|
|
48
|
+
<principalExpression>
|
|
49
|
+
<soqlTarget>
|
|
50
|
+
<select>Division</select>
|
|
51
|
+
</soqlTarget>
|
|
52
|
+
<type>SOQLTARGETLISTEXPR</type>
|
|
53
|
+
<version>1</version>
|
|
54
|
+
</principalExpression>
|
|
55
|
+
<principalPath>SCALAR_ATTRIBUTE</principalPath>
|
|
56
|
+
</conditions>
|
|
57
|
+
<conditions>
|
|
58
|
+
<clause>WHEN</clause>
|
|
59
|
+
<operator>CONTAINS_ANY</operator>
|
|
60
|
+
<policyRuleValueSet>
|
|
61
|
+
<valueReference>DataGovernanceTags.EthicalAiStandards.EthicalAI.Caste</valueReference>
|
|
62
|
+
<valueReferenceType>STANDARD_TAG</valueReferenceType>
|
|
63
|
+
</policyRuleValueSet>
|
|
64
|
+
<resourcePath>TAG</resourcePath>
|
|
65
|
+
</conditions>
|
|
66
|
+
<conditions>
|
|
67
|
+
<clause>WHEN</clause>
|
|
68
|
+
<operator>CONTAINS_ANY</operator>
|
|
69
|
+
<policyRuleValueSet>
|
|
70
|
+
<valueReference>DataGovernanceClassifications.DataCategorization.DataSensitivity.DataSensitivity</valueReference>
|
|
71
|
+
<valueReferenceType>STANDARD_CLASSIFICATION</valueReferenceType>
|
|
72
|
+
</policyRuleValueSet>
|
|
73
|
+
<resourcePath>CLASSIFICATION</resourcePath>
|
|
74
|
+
</conditions>
|
|
75
|
+
<conjunctionExpression>(AND 1 (OR 2 3) (OR 4 5))</conjunctionExpression>
|
|
76
|
+
</whenPolicyRuleDefinitionClauseConjunction>
|
|
77
|
+
</PolicyRuleDefinition>
|
package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/package.xml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<types>
|
|
4
|
+
<members>PrincipalFieldMatchRLS_Rule_1</members>
|
|
5
|
+
<name>PolicyRuleDefinition</name>
|
|
6
|
+
</types>
|
|
7
|
+
<types>
|
|
8
|
+
<members>PrincipalFieldMatchRLS</members>
|
|
9
|
+
<name>PolicyRuleDefinitionSet</name>
|
|
10
|
+
</types>
|
|
11
|
+
<version>{API_VERSION}</version>
|
|
12
|
+
</Package>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<PolicyRuleDefinitionSet xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<builderCompatible>false</builderCompatible>
|
|
4
|
+
<builderValidated>false</builderValidated>
|
|
5
|
+
<label>PrincipalFieldMatchRLS</label>
|
|
6
|
+
</PolicyRuleDefinitionSet>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<PolicyRuleDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<action>Read</action>
|
|
4
|
+
<category>RECORD_POLICY_RULE_DEFINITION</category>
|
|
5
|
+
<effect>Permit</effect>
|
|
6
|
+
<label>Rule 1</label>
|
|
7
|
+
<policyRuleDefinitionSetName>PrincipalFieldMatchRLS</policyRuleDefinitionSetName>
|
|
8
|
+
<policyRuleResourceDomains>
|
|
9
|
+
<resourceDomain>contacts_to_importcsv__dlm</resourceDomain>
|
|
10
|
+
</policyRuleResourceDomains>
|
|
11
|
+
<principalAuthenticationLevel>INTERNAL</principalAuthenticationLevel>
|
|
12
|
+
<principalScopeType>ANY</principalScopeType>
|
|
13
|
+
<resourceScopeType>RECORD</resourceScopeType>
|
|
14
|
+
<ruleConsumer>DATACLOUD</ruleConsumer>
|
|
15
|
+
<transformPrecedence>0</transformPrecedence>
|
|
16
|
+
<whenPolicyRuleDefinitionClauseConjunction>
|
|
17
|
+
<conditions>
|
|
18
|
+
<clause>WHEN</clause>
|
|
19
|
+
<operator>EQUALS</operator>
|
|
20
|
+
<policyRuleValueSet>
|
|
21
|
+
<valueText>qsdfad</valueText>
|
|
22
|
+
</policyRuleValueSet>
|
|
23
|
+
<principalExpression>
|
|
24
|
+
<soqlTarget>
|
|
25
|
+
<select>Division</select>
|
|
26
|
+
</soqlTarget>
|
|
27
|
+
<type>SOQLTARGETLISTEXPR</type>
|
|
28
|
+
<version>1</version>
|
|
29
|
+
</principalExpression>
|
|
30
|
+
<principalPath>SCALAR_ATTRIBUTE</principalPath>
|
|
31
|
+
</conditions>
|
|
32
|
+
<conditions>
|
|
33
|
+
<clause>WHEN</clause>
|
|
34
|
+
<operator>NOT_EQUALS</operator>
|
|
35
|
+
<policyRuleValueSet>
|
|
36
|
+
<valueText>qwefasdf</valueText>
|
|
37
|
+
</policyRuleValueSet>
|
|
38
|
+
<principalExpression>
|
|
39
|
+
<soqlTarget>
|
|
40
|
+
<select>Department</select>
|
|
41
|
+
</soqlTarget>
|
|
42
|
+
<type>SOQLTARGETLISTEXPR</type>
|
|
43
|
+
<version>1</version>
|
|
44
|
+
</principalExpression>
|
|
45
|
+
<principalPath>SCALAR_ATTRIBUTE</principalPath>
|
|
46
|
+
</conditions>
|
|
47
|
+
<conditions>
|
|
48
|
+
<clause>WHEN</clause>
|
|
49
|
+
<operator>EQUALS</operator>
|
|
50
|
+
<principalExpression>
|
|
51
|
+
<soqlTarget>
|
|
52
|
+
<select>Email</select>
|
|
53
|
+
</soqlTarget>
|
|
54
|
+
<type>SOQLTARGETLISTEXPR</type>
|
|
55
|
+
<version>1</version>
|
|
56
|
+
</principalExpression>
|
|
57
|
+
<resourcePath>RECORDFIELD</resourcePath>
|
|
58
|
+
<valueDomain>contacts_to_importcsv__dlm:EMAIL__c</valueDomain>
|
|
59
|
+
<valuePrincipalPath>SCALAR_ATTRIBUTE</valuePrincipalPath>
|
|
60
|
+
</conditions>
|
|
61
|
+
<conditions>
|
|
62
|
+
<clause>WHEN</clause>
|
|
63
|
+
<operator>EQUALS</operator>
|
|
64
|
+
<principalExpression>
|
|
65
|
+
<soqlTarget>
|
|
66
|
+
<select>Title</select>
|
|
67
|
+
</soqlTarget>
|
|
68
|
+
<type>SOQLTARGETLISTEXPR</type>
|
|
69
|
+
<version>1</version>
|
|
70
|
+
</principalExpression>
|
|
71
|
+
<resourcePath>RECORDFIELD</resourcePath>
|
|
72
|
+
<valueDomain>contacts_to_importcsv__dlm:FNAME__c</valueDomain>
|
|
73
|
+
<valuePrincipalPath>SCALAR_ATTRIBUTE</valuePrincipalPath>
|
|
74
|
+
</conditions>
|
|
75
|
+
<conjunctionExpression>(AND (OR 1 2) (AND 3 4))</conjunctionExpression>
|
|
76
|
+
</whenPolicyRuleDefinitionClauseConjunction>
|
|
77
|
+
</PolicyRuleDefinition>
|
package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/package.xml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<types>
|
|
4
|
+
<members>TaggedObjectAccess_Rule_1</members>
|
|
5
|
+
<name>PolicyRuleDefinition</name>
|
|
6
|
+
</types>
|
|
7
|
+
<types>
|
|
8
|
+
<members>TaggedObjectAccess</members>
|
|
9
|
+
<name>PolicyRuleDefinitionSet</name>
|
|
10
|
+
</types>
|
|
11
|
+
<version>{API_VERSION}</version>
|
|
12
|
+
</Package>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<PolicyRuleDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<action>TupleRead</action>
|
|
4
|
+
<category>GOVERNANCE_POLICY_RULE_DEFINITION</category>
|
|
5
|
+
<effect>Permit</effect>
|
|
6
|
+
<label>Rule 1</label>
|
|
7
|
+
<policyRuleDefinitionSetName>TaggedObjectAccess</policyRuleDefinitionSetName>
|
|
8
|
+
<principalAuthenticationLevel>INTERNAL</principalAuthenticationLevel>
|
|
9
|
+
<principalScopeType>ANY</principalScopeType>
|
|
10
|
+
<resourceScopeType>ANY</resourceScopeType>
|
|
11
|
+
<ruleConsumer>DATACLOUD</ruleConsumer>
|
|
12
|
+
<transformPrecedence>0</transformPrecedence>
|
|
13
|
+
<whenPolicyRuleDefinitionClauseConjunction>
|
|
14
|
+
<conditions>
|
|
15
|
+
<clause>WHEN</clause>
|
|
16
|
+
<operator>IS</operator>
|
|
17
|
+
<policyRuleValueSet>
|
|
18
|
+
<valueText>OBJECT</valueText>
|
|
19
|
+
</policyRuleValueSet>
|
|
20
|
+
<resourcePath>ENTITYTYPE</resourcePath>
|
|
21
|
+
</conditions>
|
|
22
|
+
<conditions>
|
|
23
|
+
<clause>WHEN</clause>
|
|
24
|
+
<operator>IS</operator>
|
|
25
|
+
<policyRuleValueSet>
|
|
26
|
+
<valueText>FIELD</valueText>
|
|
27
|
+
</policyRuleValueSet>
|
|
28
|
+
<resourcePath>ENTITYTYPE</resourcePath>
|
|
29
|
+
</conditions>
|
|
30
|
+
<conditions>
|
|
31
|
+
<clause>WHEN</clause>
|
|
32
|
+
<operator>CONTAINS_ANY</operator>
|
|
33
|
+
<policyRuleValueSet>
|
|
34
|
+
<valueReference>cust_perm1</valueReference>
|
|
35
|
+
<valueReferenceType>CUSTOM_PERMISSION</valueReferenceType>
|
|
36
|
+
</policyRuleValueSet>
|
|
37
|
+
<principalPath>ASSIGNED_PERMISSIONS_PATH</principalPath>
|
|
38
|
+
</conditions>
|
|
39
|
+
<conditions>
|
|
40
|
+
<clause>WHEN</clause>
|
|
41
|
+
<operator>EQUALS</operator>
|
|
42
|
+
<policyRuleValueSet>
|
|
43
|
+
<valueText>Finance</valueText>
|
|
44
|
+
</policyRuleValueSet>
|
|
45
|
+
<principalExpression>
|
|
46
|
+
<soqlTarget>
|
|
47
|
+
<select>Department</select>
|
|
48
|
+
</soqlTarget>
|
|
49
|
+
<type>SOQLTARGETLISTEXPR</type>
|
|
50
|
+
<version>1</version>
|
|
51
|
+
</principalExpression>
|
|
52
|
+
<principalPath>SCALAR_ATTRIBUTE</principalPath>
|
|
53
|
+
</conditions>
|
|
54
|
+
<conditions>
|
|
55
|
+
<clause>WHEN</clause>
|
|
56
|
+
<operator>CONTAINS_ANY</operator>
|
|
57
|
+
<policyRuleValueSet>
|
|
58
|
+
<valueReference>DataGovernanceTags.FinancialData.AccountInfo.AccountInfo</valueReference>
|
|
59
|
+
<valueReferenceType>STANDARD_TAG</valueReferenceType>
|
|
60
|
+
</policyRuleValueSet>
|
|
61
|
+
<resourcePath>TAG</resourcePath>
|
|
62
|
+
</conditions>
|
|
63
|
+
<conjunctionExpression>(AND (OR 1 2) (AND 3 4) (AND 5))</conjunctionExpression>
|
|
64
|
+
</whenPolicyRuleDefinitionClauseConjunction>
|
|
65
|
+
</PolicyRuleDefinition>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Headless Transport — `/headless/metadata` MD-CRUD
|
|
2
|
+
|
|
3
|
+
The transport for H360 policy-rule **create / read / update** is the headless-360 MCP server's `/headless/metadata` MD-CRUD endpoint, called through `dispatch` (for CREATE/UPDATE) and `dispatch_readonly` (for the GET read-back). **DELETE is a different surface**: Core has no real metadata delete (a `/headless/metadata` DELETE 405s or no-ops), so a policy is deleted over the Data 360 MCP Data Governance Access Policy tool `d360_data_governance_access_policy_delete` (see the DELETE section below). There is no `sf`/MDAPI fallback — when the headless path is unavailable or a type/op is not onboarded, surface the gap to the operator.
|
|
4
|
+
|
|
5
|
+
Always `discover` and `describe` the operation before calling it; the shapes below are the confirmed request/response contract, not a substitute for checking `describe` against the connected server version.
|
|
6
|
+
|
|
7
|
+
**Exception for `PolicyRuleDefinition`/`PolicyRuleDefinitionSet`:** these two types have no dedicated MD-CRUD operation to describe — `discover` only surfaces the `platform-policy-rule-generate` SOR itself, whose `describe` shows `"steps": []` and `"referenced_operation_ids": []`. There is nothing to describe for this specific pair. Treat that empty result as expected, not as a blocker or an error: fall through to the request/response contract documented in this file, which is authoritative for these two types. Still run `discover`/`describe` first for any other metadata type this skill might touch.
|
|
8
|
+
|
|
9
|
+
## Request Shapes
|
|
10
|
+
|
|
11
|
+
All four requests target a **bare** `/headless/metadata` URL, with no version segment:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
url: /headless/metadata
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The server resolves the API version automatically — `ORG_API_VERSION` is NOT required for this MCP path (confirmed: a bare-URL dispatch response echoed `v67.0` without the caller ever supplying it). A versioned URL (`/services/data/v{ORG_API_VERSION}/headless/metadata`) also works if `ORG_API_VERSION` is already known, but is not required on the MCP path — prefer the bare URL and let the server resolve it. Do not attempt an unversioned `dispatch_readonly GET /services/data` to discover the version over MCP — that route is not MCP-reachable (`ROUTE_NOT_FOUND`).
|
|
18
|
+
|
|
19
|
+
### CREATE — `dispatch`, `method: POST`
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"method": "POST",
|
|
24
|
+
"url": "/headless/metadata",
|
|
25
|
+
"body": {
|
|
26
|
+
"type": "PolicyRuleDefinitionSet",
|
|
27
|
+
"fullName": "<name>",
|
|
28
|
+
"xmlRep": "<single-line XML>"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Response: `{"results":[{"success":true,"id":"...","fullName":"...","errors":[],...}]}`.
|
|
34
|
+
|
|
35
|
+
### UPDATE — `dispatch`, `method: PUT`
|
|
36
|
+
|
|
37
|
+
Identical body shape to CREATE, with `"method": "PUT"`.
|
|
38
|
+
|
|
39
|
+
### READ / verify — `dispatch_readonly`, `method: GET`
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"method": "GET",
|
|
44
|
+
"url": "/headless/metadata",
|
|
45
|
+
"queryParams": { "type": "<Type>", "fullName": "<name>" }
|
|
46
|
+
}
|
|
47
|
+
```
|
|
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 server-added `<builderCompatible>false</builderCompatible>` and `<builderValidated>false</builderValidated>` even though neither was authored.
|
|
50
|
+
|
|
51
|
+
### DELETE — Data 360 MCP `d360_data_governance_access_policy_delete` (NOT `/headless/metadata`)
|
|
52
|
+
|
|
53
|
+
Delete is **not** a `/headless/metadata` verb. Core has no real metadata delete — a `/headless/metadata` DELETE `405`s, and the metadata team's interim delete is a no-op `200` that removes nothing. Route deletes over the Data 360 MCP **Data Governance Access Policy** surface instead:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
Data 360 MCP: execute(tool=d360_data_governance_access_policy_delete, params={ "name": "<setDeveloperName>" })
|
|
57
|
+
```
|
|
58
|
+
|
|
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
|
+
|
|
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
|
+
- Hand-authored sets are `builderCompatible: false`, so `d360_data_governance_access_policy_list` needs `includeIncompatible: true` to enumerate them; `access_policy_get` and `access_policy_delete` address them by `name` regardless.
|
|
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
|
+
|
|
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.
|
|
66
|
+
|
|
67
|
+
## `xmlRep` Newlines — Flatten Defensively
|
|
68
|
+
|
|
69
|
+
The skill's generated `.policyRuleDefinition`/`.policyRuleDefinitionSet` XML is pretty-printed with newlines. Whether a multi-line `xmlRep` survives depends on the caller's transport: when the `dispatch` tool takes `body` as a structured JSON object and the client serializes the newlines as proper `\n` string escapes, a multi-line `xmlRep` is accepted and persists cleanly (confirmed live: a pretty-printed set POSTed through the headless-360 MCP `dispatch` tool returned `success:true` and read back intact — the server normalizes formatting on storage regardless). The `'body' must be a JSON object, got an unexpected type` 400 comes from a client/transport that lets a raw, unescaped newline reach the JSON body, not from the server rejecting multi-line XML per se.
|
|
70
|
+
|
|
71
|
+
Because that failure mode is transport-dependent and invisible from inside the skill, flatten `xmlRep` to a single line as the last step before dispatch anyway — it is always accepted and sidesteps any client that mangles newlines. Flatten (e.g. strip newlines and collapse redundant whitespace between tags) without otherwise altering the XML content.
|
|
72
|
+
|
|
73
|
+
## Transient Retry
|
|
74
|
+
|
|
75
|
+
The `'body' must be a JSON object` error can also appear spuriously on an otherwise-valid body. Treat a single occurrence as a flaky tool-arg serialization glitch: retry the identical clean body once before concluding the shape is unsupported.
|
|
76
|
+
|
|
77
|
+
## HTTP Error Taxonomy
|
|
78
|
+
|
|
79
|
+
| Status / error | Meaning | Action |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| `400 FIELD_INTEGRITY_EXCEPTION "Not available for deploy for this organization"` | Type/op is on the MD-CRUD allowlist, but the org lacks the feature/perm provisioning to deploy this metadata type | Org setup gap, not a skill or transport problem — surface it to the operator; do not fall back to CLI on this error alone (CLI will hit the same org gate). |
|
|
82
|
+
| `400 UNSUPPORTED_OPERATION` | The type/op is genuinely not on the MD-CRUD allowlist | Onboarding gap — surface it to the operator; there is no CLI fallback for this workflow. |
|
|
83
|
+
| `404` (on GET) | Type/op is allowlisted; the named member does not exist | Expected result for a not-yet-created component — not an error. |
|
|
84
|
+
| `405` / no-op `200` (on a `/headless/metadata` DELETE) | Core has no real metadata delete — the verb 405s, and the interim delete is a no-op 200 that removes nothing | Do not delete via `/headless/metadata`. Route the delete over the Data 360 MCP `d360_data_governance_access_policy_delete` tool instead (see the DELETE section above). |
|
|
85
|
+
| DC-connectivity error (on the Data 360 Access Policy delete) | The off-core Data Cloud delete path failed on DC connectivity | Provisioning gap — surface it to the operator; there is no `sf` CLI fallback. |
|
|
86
|
+
|
|
87
|
+
See `references/deploy-errors.md` for the full server-side error taxonomy (all errors surface on the `dispatch` path).
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Path Enums
|
|
6
6
|
|
|
7
|
-
> **Surface principle.**
|
|
7
|
+
> **Surface principle.** Prefer shapes that have been retrieved and round-trip validated at the target API version. Enum lists alone do not establish authorability.
|
|
8
8
|
|
|
9
9
|
### `<principalPath>` / `<valuePrincipalPath>` — `RulePrincipalPathType` (6 values)
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| `USER_ROLE_ID` | Principal role ID |
|
|
18
18
|
| `RBAC_TAGS` | Principal RBAC tags |
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
`SCALAR_ATTRIBUTE` is not listed in the six-value table above, but it is a confirmed, deployable, Policy Builder-compatible principal path: it is how the Data Governance UI itself creates principal scalar-attribute conditions, which is why it appears throughout retrieved API 69.0 OLS, FLS, masking, and RLS evidence when paired with `SOQLTARGETLISTEXPR`. Generate it directly in normal author mode whenever the request needs a principal-attribute comparison. The other unpublished values — `IS_INTERNAL`, `CONTACT_ID`, `PLURAL_ATTRIBUTE`, `PLACEHOLDER` — remain unconfirmed; do not generate those unless the target release publishes them or a separate approved creation path establishes authorability.
|
|
21
21
|
|
|
22
22
|
### `<resourcePath>` / `<valueResourcePath>` — `RuleResourcePathType` (16 values)
|
|
23
23
|
|
|
@@ -26,7 +26,7 @@ Outside contract (not in `RulePrincipalPathType`): `IS_INTERNAL`, `CONTACT_ID`,
|
|
|
26
26
|
| `NAMESPACE` | Resource namespace |
|
|
27
27
|
| `ENTITY` | Entity (object) reference |
|
|
28
28
|
| `FIELD` | Field reference |
|
|
29
|
-
| `ENTITYTYPE` | Entity type — pair with `IS`
|
|
29
|
+
| `ENTITYTYPE` | Entity type — pair with `IS` and `valueText` set to `OBJECT` or `FIELD` as shown in retrieved examples |
|
|
30
30
|
| `ENTITYKIND` | Entity kind bits |
|
|
31
31
|
| `FIELDKIND` | Field kind bits |
|
|
32
32
|
| `DATASPACE` | Resource dataspace |
|
|
@@ -48,7 +48,7 @@ Outside contract (not in `RulePrincipalPathType`): `IS_INTERNAL`, `CONTACT_ID`,
|
|
|
48
48
|
|
|
49
49
|
Outside contract: `SESSION_CONSUMER_ID`, `CONTEXT_AGENT_ID`, `CONTEXT_AGENT_VERSION_ID` (IDENTIFIED_RECORD / agentic — runtime RuleProvider only).
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
`SCALAR_ATTRIBUTE` is confirmed deployable and UI-compatible per DG UI source (this is how the builder itself authors the condition, not established by a per-shape round-trip) for principal scalar-attribute comparisons even though it is absent from the published enum table above; generate it directly in normal author mode.
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
@@ -96,9 +96,16 @@ Outside contract: `SESSION_CONSUMER_ID`, `CONTEXT_AGENT_ID`, `CONTEXT_AGENT_VERS
|
|
|
96
96
|
|
|
97
97
|
Three fields (all optional at schema level, but a non-empty value set needs at least one):
|
|
98
98
|
|
|
99
|
-
### Literal values — `<valueString>`
|
|
99
|
+
### Literal values — `<valueText>` and `<valueString>`
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
Retrieved API 69.0 policies use `valueText` for entity type and scalar text:
|
|
102
|
+
|
|
103
|
+
```xml
|
|
104
|
+
<valueText>FIELD</valueText>
|
|
105
|
+
<valueText>Toxico</valueText>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Older fixture-only typed literals use JSON in `valueString` (escape `"` to `"`):
|
|
102
109
|
```xml
|
|
103
110
|
<valueString>{"t":"Text","v":"FIELD"}</valueString>
|
|
104
111
|
<valueString>{"t":"Boolean","v":true}</valueString>
|
|
@@ -122,7 +129,7 @@ For plain string equality:
|
|
|
122
129
|
| `CUSTOM_PERMISSION` | Custom permission | `principalPath=ASSIGNED_PERMISSIONS_PATH` |
|
|
123
130
|
| `DATASPACE` | Dataspace | `resourcePath=DATASPACE` or `contextPath=SESSION_DATASPACE` |
|
|
124
131
|
|
|
125
|
-
> **Tag/classification dev names are NOT free-form.** The deploy-time validator checks `<valueReference>` against the org's taxonomy.
|
|
132
|
+
> **Tag/classification dev names are NOT free-form.** The deploy-time validator checks `<valueReference>` against the org's taxonomy. Build the `<valueReference>` from a Data 360 MCP tag/classification lookup per `reference-resolution.md#constructing-valuereference-for-standard_tag--standard_classification`, or read a known-good rule back with `dispatch_readonly` GET `/headless/metadata?type=PolicyRuleDefinition&fullName=<existing-rule-name>` and copy `<valueReference>` from the returned `xmlRep`. Never use the `sf` CLI.
|
|
126
133
|
|
|
127
134
|
Multiple `<policyRuleValueSet>` siblings inside one condition are OR-combined.
|
|
128
135
|
|
|
@@ -146,14 +153,14 @@ Multiple `<policyRuleValueSet>` siblings inside one condition are OR-combined.
|
|
|
146
153
|
<version>1</version>
|
|
147
154
|
<transformExpression>
|
|
148
155
|
<argument>
|
|
149
|
-
<type>
|
|
156
|
+
<type>STRING</type>
|
|
150
157
|
<value>4</value>
|
|
151
158
|
</argument>
|
|
152
159
|
</transformExpression>
|
|
153
160
|
</resourceExpression>
|
|
154
161
|
```
|
|
155
162
|
|
|
156
|
-
`TransformExpressionArgumentType` = `STRING` or `NUMBER`.
|
|
163
|
+
`TransformExpressionArgumentType` = `STRING` or `NUMBER`. The retrieved `LAST_N_CHARS_RESOURCE_TRANSFORM` evidence uses `STRING` even for numeric text. Other transforms may use a different type; require a retrieved or documented shape rather than inferring it.
|
|
157
164
|
|
|
158
165
|
### PROJECTION — RLS join
|
|
159
166
|
|
|
@@ -207,7 +214,7 @@ Plural (use a set operator: `CONTAINS_ANY` / `CONTAINS_NONE` / `CONTAINS_ALL`):
|
|
|
207
214
|
</principalExpression>
|
|
208
215
|
```
|
|
209
216
|
|
|
210
|
-
|
|
217
|
+
The retrieved API 69.0 examples persist `SCALAR_ATTRIBUTE` with `SOQLTARGETLISTEXPR`. Treat plural targets as unsupported until a real-org policy is retrieved and round-trip validated.
|
|
211
218
|
|
|
212
219
|
---
|
|
213
220
|
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Policy Shapes
|
|
2
|
+
|
|
3
|
+
Choose the shape before constructing conditions. Do not mix top-level fields between shapes.
|
|
4
|
+
|
|
5
|
+
## Every renderable rule needs at least one resource condition
|
|
6
|
+
|
|
7
|
+
A DC Data Governance UI-renderable rule MUST carry **at least one resource condition** — a `<conditions>` whose left operand is resource-side (`resourcePath` = `ENTITYTYPE`, `TAG`, `CLASSIFICATION`, `RECORDFIELD`, `EXPRESSION`, or `DATASPACE`). Principal conditions (`ASSIGNED_PERMISSIONS_PATH`, `SCALAR_ATTRIBUTE`) are **optional**. A rule with **zero `<conditions>`**, or with only principal conditions and no resource condition, is **not deployable and not renderable** — do not author it.
|
|
8
|
+
|
|
9
|
+
Per shape, the mandatory resource condition is:
|
|
10
|
+
|
|
11
|
+
- **OLS** — the `(OR OBJECT FIELD)` entity-type group.
|
|
12
|
+
- **FLS / Masking** — the `FIELD` entity-type condition.
|
|
13
|
+
- **RLS** — a `RECORDFIELD` comparison or an `EXPRESSION` (`EXISTS` join) row criterion. `policyRuleResourceDomains` scopes the rule to the object but is **not** a condition and does not satisfy this requirement. "Read the whole object, no row filter" therefore has no resource condition and is **not** a renderable RLS policy — obtain a row criterion, or route object-wide read to the permission-set path (`platform-dataspace-access-configure`).
|
|
14
|
+
|
|
15
|
+
## Selecting the shape (deterministic — do not ask the user)
|
|
16
|
+
|
|
17
|
+
Route from the request signal. Only ask when there is genuinely no signal (see SKILL.md routing for the policy-vs-permission-set case) — do not turn a clear signal into a clarifying question. The single human checkpoint is the preview-and-confirm before the create/update dispatch, not a mid-flow shape question.
|
|
18
|
+
|
|
19
|
+
| Request signal | Shape |
|
|
20
|
+
|---|---|
|
|
21
|
+
| Grant or deny **read of a specific named object's data** (a DMO/DLO/CIO named or clearly implied) | **RLS** — `RECORD_POLICY_RULE_DEFINITION`, `resourceScopeType=RECORD`, `policyRuleResourceDomains` = that object, **plus a row criterion** |
|
|
22
|
+
| **Hide or deny a specific field** | **FLS** — `Forbid` / `Read` / `FIELD` |
|
|
23
|
+
| **Mask or transform a field's value** | **Masking** — `TRANSFORM_POLICY_RULE_DEFINITION` |
|
|
24
|
+
| Object access gated by **tag / classification across the tenant** (no single named object) | **OLS** — `TupleRead` + tag/classification conditions |
|
|
25
|
+
|
|
26
|
+
Naming a specific object is the decisive RLS signal: `policyRuleResourceDomains` scopes a RECORD rule to that object. An OLS `TupleRead` rule does **not** scope to a named object — see the OLS warning below.
|
|
27
|
+
|
|
28
|
+
| Shape | Category | Effect | Action | Scope | Required entity-type group |
|
|
29
|
+
|---|---|---|---|---|---|
|
|
30
|
+
| OLS Permit | `GOVERNANCE_POLICY_RULE_DEFINITION` | `Permit` | `TupleRead` | `ANY` | `(OR OBJECT FIELD)` |
|
|
31
|
+
| FLS deny | `GOVERNANCE_POLICY_RULE_DEFINITION` | `Forbid` | `Read` | `ANY` | `FIELD` only |
|
|
32
|
+
| Masking | `TRANSFORM_POLICY_RULE_DEFINITION` | `Transform` | `Read` | `FIELD` | `FIELD` only |
|
|
33
|
+
| RLS | `RECORD_POLICY_RULE_DEFINITION` | `Permit` | `Read` | `RECORD` | Exact resource DMO |
|
|
34
|
+
|
|
35
|
+
## OLS
|
|
36
|
+
|
|
37
|
+
Start with two conditions in this exact order: entity type `OBJECT`, entity type `FIELD`. Group them as `(OR 1 2)`, and always combine that group under a top-level `AND` — never leave `(OR 1 2)` bare at the top level (see `ui-compatibility.md` / `conjunction-expression.md`). Add principal and resource condition groups afterward.
|
|
38
|
+
|
|
39
|
+
> **An OLS rule applies tenant-wide unless a resource condition narrows it.** The entity-type conditions (`ENTITYTYPE IS OBJECT` / `IS FIELD`) match *every* object and field in the org — they satisfy the mandatory-resource-condition rule but are **not** a scoping mechanism. Without a `TAG` / `CLASSIFICATION` / `DATASPACE` gate, an OLS Permit is an allow-all. `policyRuleResourceDomains` does **not** confine a GOVERNANCE rule — it is a RECORD (RLS) scoping mechanism only. To grant read access scoped to one named object, use **RLS**, not OLS.
|
|
40
|
+
|
|
41
|
+
## FLS
|
|
42
|
+
|
|
43
|
+
The validated FLS example uses `Forbid`. Condition 1 is entity type `FIELD`; it has no `OBJECT` condition. Add requested principal conditions and tag/classification resource conditions after it. Construct the conjunction from the requested semantics rather than copying the example's grouping blindly. This evidence does not establish whether a Permit FLS variant is valid.
|
|
44
|
+
|
|
45
|
+
## Masking
|
|
46
|
+
|
|
47
|
+
Use category `TRANSFORM_POLICY_RULE_DEFINITION`, effect `Transform`, action `Read`, and resource scope `FIELD`. Set `resourceTransform` to the requested transform. Condition 1 is entity type `FIELD`. Do not add an `OBJECT` condition.
|
|
48
|
+
|
|
49
|
+
For the retrieved `LAST_N_CHARS_RESOURCE_TRANSFORM`, add one top-level `resourceExpression`:
|
|
50
|
+
|
|
51
|
+
```xml
|
|
52
|
+
<resourceExpression>
|
|
53
|
+
<transformExpression>
|
|
54
|
+
<argument>
|
|
55
|
+
<type>STRING</type>
|
|
56
|
+
<value>12</value>
|
|
57
|
+
</argument>
|
|
58
|
+
</transformExpression>
|
|
59
|
+
<type>ARGLIST</type>
|
|
60
|
+
<version>1</version>
|
|
61
|
+
</resourceExpression>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The retrieved example uses one `STRING` argument even though its value is numeric text. Copy a retrieved shape for the selected transform; do not infer argument type or count.
|
|
65
|
+
|
|
66
|
+
## RLS
|
|
67
|
+
|
|
68
|
+
Use category `RECORD_POLICY_RULE_DEFINITION`, effect `Permit`, action `Read`, and resource scope `RECORD`. Add one `policyRuleResourceDomains` block containing the exact target DMO API name. These are MDAPI persistence-validated shapes; runtime row-filter behavior requires separate positive and negative data-access tests.
|
|
69
|
+
|
|
70
|
+
Every RLS rule needs **at least one resource (row) condition** — a `RECORDFIELD` comparison or an `EXISTS`/`EXPRESSION` join (see "Every renderable rule needs at least one resource condition" above). A `RECORD` rule with zero conditions is not deployable/renderable; `policyRuleResourceDomains` scopes the rule but is not a condition.
|
|
71
|
+
|
|
72
|
+
The retrieved direct-comparison evidence uses `resourcePath=RECORDFIELD`, a `valueDomain` in `DMO_API_NAME:FIELD_API_NAME` form, a version-1 `SOQLTARGETLISTEXPR`, and `valuePrincipalPath=SCALAR_ATTRIBUTE`. This is the confirmed normal-author-mode shape for a record-field-to-principal-attribute comparison; generate it directly, resolving the exact DMO, field, and principal attribute in the target org.
|
|
73
|
+
|
|
74
|
+
For an `EXISTS` join, use `resourcePath=EXPRESSION`, a version-1 `PROJECTION`, one or more nested `policyRuleDefinitionCondition` elements, and a `whereClauseConjunction` that indexes those nested conditions independently of the top-level rule conditions. Use the complete semantic `ExistsJoinRLS` example; do not invent joins or relationship direction.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Principal Expressions
|
|
2
|
+
|
|
3
|
+
Retrieved server evidence can contain a principal attribute selected from the principal record using `SOQLTARGETLISTEXPR`:
|
|
4
|
+
|
|
5
|
+
```xml
|
|
6
|
+
<conditions>
|
|
7
|
+
<clause>WHEN</clause>
|
|
8
|
+
<operator>EQUALS</operator>
|
|
9
|
+
<policyRuleValueSet>
|
|
10
|
+
<valueText>EXPECTED_VALUE</valueText>
|
|
11
|
+
</policyRuleValueSet>
|
|
12
|
+
<principalExpression>
|
|
13
|
+
<soqlTarget>
|
|
14
|
+
<select>PrincipalField</select>
|
|
15
|
+
</soqlTarget>
|
|
16
|
+
<type>SOQLTARGETLISTEXPR</type>
|
|
17
|
+
<version>1</version>
|
|
18
|
+
</principalExpression>
|
|
19
|
+
<principalPath>SCALAR_ATTRIBUTE</principalPath>
|
|
20
|
+
</conditions>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Construction:
|
|
24
|
+
|
|
25
|
+
1. Resolve the principal field name from the target org.
|
|
26
|
+
2. Put that field in `<soqlTarget><select>`.
|
|
27
|
+
3. Use `SOQLTARGETLISTEXPR`, version `1`.
|
|
28
|
+
4. Put the comparison value in the right-side `policyRuleValueSet`.
|
|
29
|
+
5. Use the operator appropriate to the value.
|
|
30
|
+
|
|
31
|
+
`SCALAR_ATTRIBUTE` paired with `SOQLTARGETLISTEXPR` is the normal-author-mode mechanism for a principal scalar-attribute comparison (for example, `Department`, `Title`, `Division`). It is not in the shorter enum table published for other principal paths, but it is a confirmed, deployable, Policy Builder-compatible construct per DG UI source: it is how the Data Governance UI itself creates user-attribute conditions (not established by a per-shape round-trip), which is why it appears throughout retrieved API 69.0 evidence for OLS, FLS, masking, and RLS. Generate it directly in normal author mode — resolve the requested attribute against the target org's supported-attribute table in `consumer-datacloud-ui.md` and use the exact field name in `<soqlTarget><select>`. Do not replace it with `ASSIGNED_PERMISSIONS_PATH`; permission membership and scalar principal attributes are different operands.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Reference Resolution
|
|
2
|
+
|
|
3
|
+
Resolve exact values in the target org before generating XML. User requests may identify a reference by developer name, fully qualified name, display label, or a natural-language description. Treat those forms as lookup inputs, not as deployable values. Required references include:
|
|
4
|
+
|
|
5
|
+
- Standard tag developer names
|
|
6
|
+
- Standard classification names
|
|
7
|
+
- Custom permission developer names
|
|
8
|
+
- DMO / DLO / calculated-insight-object (CIO) API names
|
|
9
|
+
- DMO / DLO / CIO field (and measure/dimension) API names
|
|
10
|
+
- Principal fields selected by `principalExpression`
|
|
11
|
+
- ID-valued principal comparisons, including profiles
|
|
12
|
+
- Schemas and fields used by resource projections
|
|
13
|
+
|
|
14
|
+
Use a read-only metadata or Data 360 lookup to map every requested label or description to one exact target-org reference. This applies equally to standard and custom tags, standard and custom classifications, custom permissions, DMO/DLOs, fields, resource domains, join fields, and principal fields. If the lookup returns multiple matches, stop and ask for clarification; do not choose heuristically. If no match exists, stop and report the unresolved reference. Never shorten a dotted tag/classification name, infer a developer name from a label, reuse an ID from an evidence package, or guess a DMO/DLO field. Preserve resolved spelling exactly in `<valueReference>`, `<valueDomain>`, `<select>`, and projection elements.
|
|
15
|
+
|
|
16
|
+
## Data 360 MCP lookup operations
|
|
17
|
+
|
|
18
|
+
When a Data 360 MCP session is available, use it for read-only reference lookup only — never for policy mutation. The MCP client exposes three facade tools: `search(query)` to discover the operation, `payload_examples(toolName)` to see that operation's expected input shape, and `execute(toolName, paramsJson)` to invoke it. Resolve the concrete tool name for each operation below through `search`/`payload_examples` before calling `execute`, since the exact binding (a single generic `execute` versus a per-operation tool name) varies by client.
|
|
19
|
+
|
|
20
|
+
| Reference type | Lookup operation | Notes |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| Standard tag | `d360_data_governance_tag_list` | Filter by `searchString`/`taxonomyName`/`parentTagFullyQualifiedName` (no `limit`/`offset` beyond the schema's own paging fields — see call notes below). The record's `id` is the D360 policy-JSON reference value, not the MDAPI one — see the `<valueReference>` construction rule below. |
|
|
23
|
+
| Standard classification | `d360_data_governance_classification_list` | Same pattern as tags, via `parentClassificationFullyQualifiedName`. |
|
|
24
|
+
| **Custom / mapped / derived DMO and fields** (most `resourceDomains` targets, `__dlm` suffix) | `d360_dmo_list` / `d360_dmo_get` | **PRIMARY resource path — family `DataModelObject`** (distinct from the standard-only `DataModelObjectCatalog` below). `d360_dmo_list` lists customer-created **and derived** DMOs (custom, SQL/transform, segment-membership, calculated-insight); pass `includeFields:"true"` to return each DMO's field definitions, and optionally filter with `dataSpaceName` / `dataObjectCategory` / `isEnabled` (`limit` defaults to 50). `d360_dmo_get` takes `dataModelObjectName` and returns one DMO **with all field definitions**. Note: `isEnabled=false` does NOT mean the DMO is unusable — it can still back a policy/mapping. Confirmed live: a custom `__dlm` DMO that is absent from the sObject-describe surface resolves cleanly here. This is the correct Data 360 MCP path for the `__dlm` targets that most `resourceDomains`/`valueDomain` entries reference. |
|
|
25
|
+
| Standard (out-of-box / canonical) DMO and fields | `d360_data_model_objects_list` / `d360_data_model_object_get` | Family `DataModelObjectCatalog` — Salesforce-provided **standard/canonical** models only, NOT org-specific custom/derived DMOs (use `d360_dmo_list`/`d360_dmo_get` above for those). Depends on the org having the Schema Interface Connect API enabled; if it errors (`Schema Interface API is not enabled for this organization`), that is an org capability gap, not a lookup-input mistake. |
|
|
26
|
+
| Raw ingested DLO and fields (`__dll`) | `d360_dlo_list` / `d360_dlo_get` | Family `DataLakeObject`. `d360_dlo_list` enumerates the raw ingested source objects; `d360_dlo_get` takes `recordIdOrDeveloperName` and returns one DLO with all field API names. Use when a rule targets the **pre-mapping** `__dll` object rather than the mapped `__dlm` DMO. |
|
|
27
|
+
| Calculated Insight Object (CIO) and its measures/dimensions | `d360_ci_list` / `d360_ci_get` | Family `CalculatedInsight`. `d360_ci_list` enumerates calculated insights (optional `definitionType` filter: CalculatedMetric / StreamingMetric / ExternalMetric / GraphMetric / HistoryMetric); `d360_ci_get` takes `apiName` and returns the full definition including dimensions, measures, and SQL. Use to resolve a CIO name and its measure/dimension field API names before authoring a rule that targets it. |
|
|
28
|
+
| Custom DMO/DLO fields when the Data 360 MCP session is unreachable (last-resort fallback only) | `dispatch_readonly` sObject describe | Use ONLY when no Data 360 MCP session is available — the tools above are the preferred path. GET `/services/data/vXX/sobjects/<name>/describe` and confirm the field name from the describe output before authoring `resourceDomain`/`valueDomain`. Caveat: some custom `__dlm` DMOs are **not present** in `/services/data/vXX/sobjects` at all (confirmed live), so this fallback can miss them entirely — resolve through `d360_dmo_get` above whenever the Data 360 MCP session is reachable. Never use the `sf` CLI. |
|
|
29
|
+
| Dataspace | `d360_dataspace_list` / `d360_dataspace_get` | Only needed when the request names a non-default dataspace. |
|
|
30
|
+
| Custom permission | `dispatch_readonly` SOQL | No Data 360 MCP lookup exists for `CustomPermission`. Resolve read-only via `dispatch_readonly` GET `/services/data/vXX/query?q=SELECT+DeveloperName+FROM+CustomPermission+WHERE+…`. Never use the `sf` CLI. |
|
|
31
|
+
| ID-valued principal comparisons (e.g. `ProfileId`) | `dispatch_readonly` SOQL | Resolve read-only via `dispatch_readonly` GET `/services/data/vXX/query` against the owning standard object (e.g. `Profile`); these are not exposed through a Data 360 MCP lookup tool. Never use the `sf` CLI. |
|
|
32
|
+
|
|
33
|
+
The D360 policy-JSON authoring path (a separate, MCP-mutating skill) persists a tag/classification lookup's `id` as its `reference` value. This skill's MDAPI XML persists the resolved **developer/API name**, not the `id` — take the `id` only when the target field is itself ID-typed (`ProfileId` and similar), and otherwise construct the MDAPI `<valueReference>` from the lookup record as follows.
|
|
34
|
+
|
|
35
|
+
### Constructing `<valueReference>` for STANDARD_TAG / STANDARD_CLASSIFICATION
|
|
36
|
+
|
|
37
|
+
The lookup record's `fullyQualifiedName` is a Connect API path (`<taxonomy>.<tag/classification path>`) and is **not** a direct copy for the MDAPI value — it is missing the MDAPI root namespace, and (for a tag/classification with no parent) missing a category segment that MDAPI still requires. Build the value as:
|
|
38
|
+
|
|
39
|
+
1. Root literal: `DataGovernanceTags` for a tag, `DataGovernanceClassifications` for a classification. `<valueReferenceType>` is `STANDARD_TAG` or `STANDARD_CLASSIFICATION` respectively.
|
|
40
|
+
2. If the record has a `parentTag` (tags) or `parentClassification` (classifications) — i.e. it is nested under a category — its `fullyQualifiedName` is already `<taxonomy>.<category>.<leaf>`; the value is `<Root>.<fullyQualifiedName>`.
|
|
41
|
+
3. If the record has **no** parent (it sits directly under its taxonomy, `fullyQualifiedName` is only `<taxonomy>.<leaf>`) — MDAPI still requires a 3-segment path after the root, so **repeat the leaf `name` as the missing category segment**: `<Root>.<fullyQualifiedName>.<name>`.
|
|
42
|
+
|
|
43
|
+
Both shapes are confirmed against live org lookups and persisted evidence: a top-level tag (`FinancialData.AccountInfo`, no `parentTag`) persists as `DataGovernanceTags.FinancialData.AccountInfo.AccountInfo`; a top-level classification (`DataCategorization.DataSensitivity`, no `parentClassification`) persists as `DataGovernanceClassifications.DataCategorization.DataSensitivity.DataSensitivity`; a nested tag (`EthicalAiStandards.EthicalAI.Caste`, has `parentTag`) persists as-is with only the root prepended: `DataGovernanceTags.EthicalAiStandards.EthicalAI.Caste`.
|
|
44
|
+
|
|
45
|
+
`search` only accepts a `query` argument — do not pass a `limit` field to it (the live server rejects unrecognized fields); pass `limit`/`offset` to the resolved lookup tool itself (e.g. `d360_data_governance_tag_list`) if needed for paging.
|
|
46
|
+
|
|
47
|
+
Every reference above resolves through MCP only — Data 360 MCP for tags / classifications / dataspaces AND every resource-side object schema: custom/derived DMOs (`d360_dmo_list`/`d360_dmo_get`), standard DMOs (`d360_data_model_objects_list`/`d360_data_model_object_get`), DLOs (`d360_dlo_list`/`d360_dlo_get`), and calculated insight objects (`d360_ci_list`/`d360_ci_get`). Read-only headless-360 `dispatch_readonly` is used only for the references Data 360 MCP has no lookup for — custom permissions and ID-valued comparisons (SOQL `/query`) — and, strictly as a last resort when no Data 360 MCP session is reachable, a custom-DMO sObject describe (which can miss `__dlm` objects). There is no `sf` CLI resolution path. If neither MCP session can resolve a reference, stop and report the unresolved reference to the operator rather than routing around it.
|
|
48
|
+
|
|
49
|
+
Serialize XML structurally. XML-escape text values and validate developer names, API names, fields, operators, aliases, and reference types against their expected grammar or enum before interpolation.
|
|
50
|
+
|
|
51
|
+
The semantic evidence packages demonstrate exact resolved source-org values. In normal author mode, resolve every value again in the target org. In explicit evidence-recreation mode, exact fidelity to the named API 69.0 evidence package takes precedence: preserve its evidence values rather than substituting current target-org values, and do not deploy that fixture as though it were newly resolved authored output.
|