@salesforce/afv-skills 1.69.0 → 1.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/package.json +1 -1
  2. package/skills/data360-code-extension-generate/SKILL.md +160 -252
  3. package/skills/data360-code-extension-generate/references/README.md +34 -172
  4. package/skills/data360-code-extension-generate/references/environment-setup.md +198 -0
  5. package/skills/data360-code-extension-generate/references/mcp-integration.md +36 -0
  6. package/skills/data360-code-extension-generate/references/quick-reference.md +132 -202
  7. package/skills/data360-code-extension-generate/references/run-logs.md +31 -0
  8. package/skills/data360-code-extension-generate/references/schema-discovery.md +45 -0
  9. package/skills/data360-code-extension-generate/references/troubleshooting.md +45 -0
  10. package/skills/data360-code-extension-generate/scripts/check_env.sh +197 -0
  11. package/skills/data360-code-extension-generate/scripts/venv_hook.sh +22 -0
  12. package/skills/dx-devops-work-item-manage/SKILL.md +24 -8
  13. package/skills/dx-devops-work-item-manage/examples/common-workflows.md +32 -0
  14. package/skills/dx-devops-work-item-manage/references/review-api.md +95 -0
  15. package/skills/dx-org-manage/SKILL.md +12 -12
  16. package/skills/dx-org-manage/examples/scratch-orgs/display_output.json +1 -3
  17. package/skills/dx-org-manage/examples/scratch-orgs/success_shape.json +1 -3
  18. package/skills/dx-org-manage/references/opening-org.md +1 -1
  19. package/skills/dx-org-manage/references/scratch-org-operations.md +15 -20
  20. package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +1 -1
  21. package/skills/education-cloud-academic-calendar-generate/SKILL.md +2 -2
  22. package/skills/education-cloud-course-catalog-migrate/SKILL.md +1 -1
  23. package/skills/education-cloud-domain-configure/references/domain-features/recruitment-admissions.md +8 -7
  24. package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -0
  25. package/skills/education-cloud-multi-campus-configure/references/error_handling.md +7 -6
  26. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +2 -0
  27. package/skills/education-cloud-student-recruitment-agent-configure/references/customer-narration.md +2 -0
  28. package/skills/education-cloud-student-recruitment-agent-configure/references/flows.md +1 -1
  29. package/skills/education-cloud-student-recruitment-agent-configure/references/grounding.md +5 -4
  30. package/skills/education-cloud-student-recruitment-agent-configure/references/permissions.md +1 -1
  31. package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +1 -1
  32. package/skills/education-cloud-student-recruitment-agent-configure/references/routing.md +1 -1
  33. package/skills/experience-cms-content-type-generate/SKILL.md +7 -6
  34. package/skills/experience-cms-content-type-generate/references/agent-checklist.md +3 -3
  35. package/skills/experience-cms-content-type-generate/references/anti-patterns.md +2 -2
  36. package/skills/experience-cms-content-type-generate/references/discovery-details.md +1 -1
  37. package/skills/experience-cms-content-type-generate/references/retrieve-and-reconcile.md +5 -9
  38. package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.mjs +10 -0
  39. package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +2 -2
  40. package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +2 -2
  41. package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +1 -1
  42. package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1 -1
  43. package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +2 -2
  44. package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +2 -2
  45. package/skills/platform-custom-application-generate/SKILL.md +97 -104
  46. package/skills/platform-custom-application-generate/references/app-properties.md +52 -0
  47. package/skills/platform-custom-application-generate/references/app-visibility.md +19 -0
  48. package/skills/platform-custom-application-generate/references/utility-bar.md +55 -0
  49. package/skills/platform-datamask-run/SKILL.md +1 -1
  50. package/skills/platform-datamask-run/references/policy-authoring.md +41 -18
  51. package/skills/platform-dsar-policy-manage/SKILL.md +7 -6
  52. package/skills/platform-dsar-policy-manage/references/export-and-history.md +10 -8
  53. package/skills/platform-dsar-policy-manage/references/report-format.md +4 -2
  54. package/skills/platform-metadata-grounding-get/SKILL.md +7 -7
  55. package/skills/platform-report-generate/SKILL.md +9 -7
  56. package/skills/platform-report-generate/references/column-names.md +12 -1
  57. package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
  58. package/skills/platform-sharing-rules-generate/SKILL.md +12 -3
  59. package/skills/platform-sharing-rules-generate/references/rule-types.md +1 -0
  60. package/skills/service-agentforce-channel-configure/SKILL.md +6 -3
  61. package/skills/service-agentforce-channel-configure/references/agent-wiring.md +5 -3
  62. package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +24 -15
  63. package/skills/service-agentforce-channel-configure/references/input-validation.md +23 -0
  64. package/skills/service-agentforce-channel-configure/references/live-traffic-gate.md +13 -7
  65. package/skills/service-agentforce-channel-configure/references/queue-resolution.md +3 -1
  66. package/skills/service-agentforce-human-escalation-configure/references/_vendored/input-validation.md +23 -0
  67. package/skills/service-agentforce-human-escalation-configure/references/_vendored/queue-resolution.md +146 -0
  68. package/skills/service-agentforce-human-escalation-configure/references/escalation-mechanism.md +1 -1
  69. package/skills/service-agentforce-human-escalation-configure/scripts/tests/_bootstrap.py +42 -11
  70. package/skills/service-agentforce-human-escalation-configure/scripts/tests/test_escalation_contracts.py +45 -0
  71. package/skills/service-agentforce-human-escalation-configure/scripts/verify-and-configure.sh +23 -9
  72. package/skills/service-de-channel-activate/SKILL.md +10 -10
  73. package/skills/service-de-channel-activate/references/gotchas.md +4 -4
  74. package/skills/service-de-channel-activate/references/phone-verification.md +43 -19
  75. package/skills/service-de-channel-create/SKILL.md +1 -1
  76. package/skills/service-de-channel-create/references/facebook.md +1 -1
  77. package/skills/service-de-channel-create/references/whatsapp.md +33 -6
  78. package/skills/service-de-channel-routing-configure/SKILL.md +5 -1
  79. package/skills/service-de-channel-routing-configure/references/gotchas.md +3 -1
  80. package/skills/service-de-channel-routing-configure/references/named-queue.md +39 -0
  81. package/skills/service-de-channel-settings-configure/SKILL.md +3 -1
  82. package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +2 -2
  83. package/skills/service-de-channel-settings-configure/references/gotchas.md +12 -1
  84. package/skills/service-de-headless-channel-configure/SKILL.md +68 -74
  85. package/skills/service-de-headless-channel-configure/references/gotchas.md +6 -2
  86. package/skills/service-de-headless-channel-configure/references/inputs.md +19 -0
  87. package/skills/service-de-headless-channel-configure/references/output-envelopes.md +23 -1
  88. package/skills/service-de-headless-channel-configure/references/partial-success.md +1 -0
  89. package/skills/service-de-headless-channel-configure/references/requested-settings.md +55 -0
  90. package/skills/service-de-headless-channel-configure/references/worked-examples.md +35 -1
  91. package/skills/service-digital-engagement-channel-configure/SKILL.md +3 -3
  92. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +2 -2
  93. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +1 -1
  94. package/skills/service-digital-engagement-deployment-configure/SKILL.md +2 -2
  95. package/skills/service-digital-engagement-deployment-configure/references/onboarding_contract.md +4 -2
  96. package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +1 -1
  97. package/skills/service-omni-command-center-configure/SKILL.md +1 -1
  98. package/skills/data360-schema-get/SKILL.md +0 -388
  99. package/skills/data360-schema-get/references/README.md +0 -191
  100. package/skills/data360-schema-get/scripts/get_dlo_schema.py +0 -244
  101. package/skills/data360-schema-get/scripts/get_dmo_schema.py +0 -233
  102. package/skills/field-service-prework-brief-deployer-configure/SKILL.md +0 -646
  103. package/skills/field-service-voice-to-form-configure/SKILL.md +0 -650
@@ -15,7 +15,7 @@ Outputs a JSON report with:
15
15
 
16
16
  Classification is keyed on the REAL FSM Flow vocabulary (fieldType first,
17
17
  extensionName only for ComponentInstance) via scripts/fsm_dc_catalog.py — NOT
18
- Lightning component names. See reference/fsm-dc-capability-catalog.md.
18
+ Lightning component names. See references/fsm-dc-capability-catalog.md.
19
19
  """
20
20
 
21
21
  import sys
@@ -113,7 +113,7 @@ def extract_field_type(field_element: ET.Element) -> tuple:
113
113
  # `lightning:*` / `c:*` name never appears as a fieldType — it only ever
114
114
  # shows up as a ComponentInstance <extensionName>, and core (FieldService-
115
115
  # MobileFlowValidator) whitelists exactly one such extension:
116
- # forceContent:fileUpload. See reference/fsm-dc-capability-catalog.md.
116
+ # forceContent:fileUpload. See references/fsm-dc-capability-catalog.md.
117
117
 
118
118
  # Already a DC component (partially hand-migrated source) — pass through.
119
119
  if ext_name and 'runtime_service_fieldservice:dc' in ext_name:
@@ -6,7 +6,7 @@ This module is the single source of truth for the migration skill's decisions
6
6
  about which Field Service Mobile (FSM) Flow screen components have a Data
7
7
  Capture (DC) equivalent, which do not, and which DC components have no FSM
8
8
  source at all. It is consumed by analyze_flow.py (gap reporting) and is the
9
- data behind reference/fsm-dc-capability-catalog.md. WI-7/WI-10 import it too.
9
+ data behind references/fsm-dc-capability-catalog.md. WI-7/WI-10 import it too.
10
10
 
11
11
  KEYED ON THE REAL FSM VOCABULARY
12
12
  --------------------------------
@@ -282,7 +282,7 @@ def capability_gaps() -> List[Dict[str, str]]:
282
282
  "detail": "Fault connectors are unsupported. FSM fault handling is "
283
283
  "stripped and cannot be preserved.",
284
284
  "evidence": "navigateToFault() is an empty stub; $Flow.FaultMessage "
285
- "global blocked (see dc-conditional-logic-sources.md).",
285
+ "global blocked (see references/dc-platform-rules.md).",
286
286
  },
287
287
  {
288
288
  "gap": "Subflows: DC-type only, no CUD",
@@ -20,7 +20,7 @@ AGX_NOTE = (
20
20
  "buttons; the only action a DC flow can invoke is an `AGX_FLOW` action. "
21
21
  "Button-driven FSM logic (`PlainButtons`) has no DC equivalent and is "
22
22
  "dropped — redesign it in Flow Builder. "
23
- "See `reference/fsm-dc-capability-catalog.md`.")
23
+ "See `references/fsm-dc-capability-catalog.md`.")
24
24
 
25
25
  LDS_WARNING = (
26
26
  "DataCaptureFlow forms are offline-first and rely on Lightning Data Service "
@@ -28,7 +28,7 @@ LDS_WARNING = (
28
28
  "writes must be added to the Briefcase and have correct FLS/sharing, or it "
29
29
  "will be unavailable on-device. Verify Briefcase, FLS, and OWD before "
30
30
  "activating. See `configure-field-service-mobile` and "
31
- "`reference/migration-checklist.md`.")
31
+ "`references/migration-checklist.md`.")
32
32
 
33
33
 
34
34
  def load_spec(path: str) -> Dict[str, Any]:
@@ -23,16 +23,6 @@ Use this skill when you need to:
23
23
 
24
24
  Custom applications (Lightning Apps) that group tabs and functionality to provide a focused user experience for specific business processes. Always configured for Lightning Experience.
25
25
 
26
- ## Purpose
27
- - Organize related functionality into focused applications
28
- - Group tabs and components for specific user roles
29
- - Provide tailored user experiences
30
- - Control access to specific features and data
31
- - Use Standard navigation for general business applications or Console navigation for specialized service/support workflows requiring multi-tab workspaces
32
- - Create professional, branded application identity with custom colors and branding
33
- - Override standard actions with custom Lightning pages for enhanced user experience
34
- - Enable profile-specific experiences through profile action overrides
35
-
36
26
  ## Required Properties
37
27
 
38
28
  ### Core Application Properties
@@ -51,9 +41,13 @@ Custom applications (Lightning Apps) that group tabs and functionality to provid
51
41
  - **brand**: HIGHLY RECOMMENDED - Branding configuration object (headerColor, shouldOverrideOrgTheme, footerColor)
52
42
  - **actionOverrides**: REQUIRED when custom record pages exist - Action override configuration (actionName, content, formFactor, type, pageOrSobjectType)
53
43
  - **profileActionOverrides**: Profile-specific action overrides (actionName, content, formFactor, pageOrSobjectType, type, profile)
54
- - **isNavAutoTempTabsDisabled**: Navigation behavior setting (default: false)
55
- - **isNavPersonalizationDisabled**: Personalization setting (default: false)
56
- - **isNavTabPersistenceDisabled**: Tab persistence setting (default: false)
44
+ - **isNavAutoTempTabsDisabled**, **isNavPersonalizationDisabled**, **isNavTabPersistenceDisabled**: automatic temporary tabs, user personalization, and tab persistence across sessions (default: false)
45
+
46
+ ## Asking the User
47
+ - Ask every question as plain text in your reply, so the skill works in any client; do not depend on a picker, multi-select, or confirm UI component. Wait for the user's next message as the answer
48
+ - Ask only what the request leaves open (navigation style, tabs, utility items, profiles), all in one message, each with a sensible default the user can accept with "yes" or "go ahead". Profiles are the exception: if the request doesn't name the profiles, always ask before saving (a group such as "my support agents" names no profile: suggest the matching ones and ask), and don't default to the admin alone
49
+ - Finding an existing app by name: query Tooling `SELECT Id, DeveloperName, Label FROM CustomApplication WHERE Label = '<name>'` (or `LIKE`). Don't use AppDefinition for this, because it lists only the apps the running user can see, so an app shared with other profiles looks missing. If several apps match, or none does, ask in plain text with the closest labels as a numbered list
50
+ - Before saving, restate the plan in one short list (label, API name, navigation style, tabs, utility items, profiles including the admin) and save once the user agrees. When the request already says everything (including who should see the app), say what you'll create and go ahead. If no one can answer, use the defaults and say so
57
51
 
58
52
  ## Application Configuration
59
53
 
@@ -73,17 +67,55 @@ Custom applications (Lightning Apps) that group tabs and functionality to provid
73
67
 
74
68
  **When in doubt:** Default to "Standard" for most general business use cases
75
69
 
76
- ### Navigation Settings
77
- - **isNavAutoTempTabsDisabled**: Controls automatic temporary tab creation
78
- - **isNavPersonalizationDisabled**: Controls user personalization features
79
- - **isNavTabPersistenceDisabled**: Controls tab persistence across sessions
80
-
81
70
  ### Tab Management
82
71
  - **tabs**: Array of tab names to include in the application
72
+ - **workspaceConfig** (Console apps only): one `<mappings><tab>TAB</tab></mappings>` entry per tab, e.g. `standard-Case`. Every tab of a Console app needs a mapping, including tabs added later; otherwise the save fails with "The standard-Account tab doesn't include a workspace mapping"
83
73
  - **formFactors**: Device-specific configurations (Large for desktop, Small for mobile)
84
74
 
85
75
  ### Utility Bar
86
- - **utilityBar**: Reference to Lightning utility bar (appears at bottom of Lightning Experience)
76
+ - **utilityBar**: API name of a FlexiPage of type UtilityBar (the bar at the bottom of Lightning Experience). The page is separate metadata and must exist before the app references it, otherwise the app save fails with "In field: utilityBar - no FlexiPage named ... found". Generate it alongside the app: template `one:utilityBarTemplateDesktop`, one `utilityItems` Region for the items and one `backgroundComponents` Background region:
77
+ ```xml
78
+ <FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
79
+ <flexiPageRegions>
80
+ <itemInstances>
81
+ <componentInstance>
82
+ <componentName>console:history</componentName>
83
+ <identifier>console_history</identifier>
84
+ </componentInstance>
85
+ </itemInstances>
86
+ <name>utilityItems</name>
87
+ <type>Region</type>
88
+ </flexiPageRegions>
89
+ <flexiPageRegions>
90
+ <name>backgroundComponents</name>
91
+ <type>Background</type>
92
+ </flexiPageRegions>
93
+ <masterLabel>Support Console UtilityBar</masterLabel>
94
+ <template>
95
+ <name>one:utilityBarTemplateDesktop</name>
96
+ </template>
97
+ <type>UtilityBar</type>
98
+ </FlexiPage>
99
+ ```
100
+ - Common Service Console items (componentName): `console:history` (History), `notes:utilityBarNoteList` (Notes), `flexipage:recentItems` (Recent Items), `macros:macroUtilityItem` (Macros), `runtime_service_omnichannel:omniWidget` (Omni-Channel, only when Omni-Channel is enabled)
101
+ - `flexipage:recentItems` needs exactly these properties, or the save fails with "missing required decorator property [label]". Copy this instance; a decorator property keeps its plain name and adds `<type>decorator</type>` (never `decorator.label`), and `entityNames` is a `valueList` of the objects reps need (a plain string fails with "Value is not allowed for Array attribute type"). Other items (History, Notes, Macros, Omni-Channel) take no properties at all: adding decorators to them fails with "You can't modify decorator property":
102
+ ```xml
103
+ <componentInstance>
104
+ <componentInstanceProperties><name>eager</name><type>decorator</type><value>false</value></componentInstanceProperties>
105
+ <componentInstanceProperties><name>entityNames</name><valueList><valueListItems><value>Case</value></valueListItems><valueListItems><value>Contact</value></valueListItems></valueList></componentInstanceProperties>
106
+ <componentInstanceProperties><name>height</name><type>decorator</type><value>480</value></componentInstanceProperties>
107
+ <componentInstanceProperties><name>icon</name><type>decorator</type><value>fallback</value></componentInstanceProperties>
108
+ <componentInstanceProperties><name>label</name><value>Standard.RecentItems</value></componentInstanceProperties>
109
+ <componentInstanceProperties><name>label</name><type>decorator</type><value>Recent Items</value></componentInstanceProperties>
110
+ <componentInstanceProperties><name>maxRecords</name><value>3</value></componentInstanceProperties>
111
+ <componentInstanceProperties><name>scrollable</name><type>decorator</type><value>true</value></componentInstanceProperties>
112
+ <componentInstanceProperties><name>width</name><type>decorator</type><value>340</value></componentInstanceProperties>
113
+ <componentName>flexipage:recentItems</componentName>
114
+ <identifier>flexipage_recentItems</identifier>
115
+ </componentInstance>
116
+ ```
117
+ - Only `lightning:backgroundUtilityItem` goes in the Background region
118
+ - Changing a bar: read the current page and add only the requested items whose componentName isn't on it yet; leave existing items (identifiers, properties) as they are. Identifiers must be unique on the page, so give a new item an unused one (e.g. `console_history_2`). Running the same setup twice leaves the bar unchanged
87
119
 
88
120
  ### Branding (HIGHLY RECOMMENDED - DO NOT SKIP)
89
121
  **IMPORTANT**: Provide branding configuration to create a professional, visually distinct application identity.
@@ -91,125 +123,86 @@ Custom applications (Lightning Apps) that group tabs and functionality to provid
91
123
  - **brand.headerColor**: Header bar color in hex format (e.g., "#0070D2") - RECOMMENDED
92
124
  - **brand.shouldOverrideOrgTheme**: Override organization theme (true/false) - Default: false
93
125
  - **brand.footerColor**: Footer color in hex format
126
+ - **logo**: a ContentAsset API name. Before setting it, look for `contentassets/<name>.asset-meta.xml` in the project or a ContentAsset with that DeveloperName in the org. If neither exists, omit `<logo>` even when the user names one (the deploy fails otherwise) and say so.
94
127
 
95
128
  ### Action Overrides (CRITICAL - DO NOT SKIP)
96
129
  **IMPORTANT**: Action overrides MUST be created for every custom object tab that has a record page generated by flexipage expert.
97
130
 
98
131
  - **actionOverrides.actionName**: Action to override ("View" or "Tab")
99
- - **actionOverrides.content**: Page/component name (FlexiPage, Visualforce, Lightning component)
100
- - For "View" action: Reference record pages generated by flexipage expert
101
- - For "Tab" action: Reference home/app pages generated by flexipage expert
132
+ - **actionOverrides.content**: Page/component name (FlexiPage, Visualforce, Lightning component): the record page ("View") or home/app page ("Tab") generated by flexipage expert
102
133
  - **actionOverrides.formFactor**: Device type ("Large" or "Small")
103
- - **actionOverrides.type**: Override type ("Default", "Visualforce", "Flexipage", "LightningComponent", "Scontrol")
104
- - Recommended: Use "Flexipage" for Lightning record/home pages generated by flexipage expert
134
+ - **actionOverrides.type**: Override type ("Default", "Visualforce", "Flexipage", "LightningComponent", "Scontrol"); use "Flexipage" for Lightning record/home pages generated by flexipage expert
105
135
  - **actionOverrides.pageOrSobjectType**: Object API name the override applies to
106
136
  - **actionOverrides.comment**: Optional description (max 1000 characters)
107
- - Auto-generated comment: "Action override created by Lightning App Builder during activation."
108
137
  - **actionOverrides.skipRecordTypeSelect**: Skip record type selection (default: false)
109
138
 
110
139
  ### Profile Action Overrides
111
140
  - **profileActionOverrides.actionName**: Action to override ("View" or "Tab")
112
- - **profileActionOverrides.content**: Page/component name
113
- - For "View" action: Reference profile-specific record pages generated by flexipage expert
114
- - For "Tab" action: Reference profile-specific home pages generated by flexipage expert
115
- - Can reference same or different FlexiPages than actionOverrides for profile-specific experiences
141
+ - **profileActionOverrides.content**: Page/component name: the profile-specific record page ("View") or home page ("Tab") generated by flexipage expert
116
142
  - **profileActionOverrides.formFactor**: Device type ("Large" or "Small")
117
143
  - **profileActionOverrides.pageOrSobjectType**: Object API name
118
- - **profileActionOverrides.type**: Override type
119
- - Recommended: Use "Flexipage" for Lightning pages generated by flexipage expert
144
+ - **profileActionOverrides.type**: Override type; use "Flexipage" for Lightning pages generated by flexipage expert
120
145
  - **profileActionOverrides.profile**: Profile API name (e.g., "Admin", "Standard User")
121
146
  - Enables different page layouts for different user profiles
147
+ - This does NOT control who can see the app; see App Visibility
148
+
149
+ ### App Visibility (CRITICAL - DO NOT SKIP)
150
+ **IMPORTANT**: CustomApplication has no visibility field. An app that no profile or permission set grants is invisible to everyone, including the admin who created it. This is the User Profiles step (the last step) of the New Lightning App wizard. `profileActionOverrides` does not grant visibility. If the request asks only for the CustomApplication file, don't add Profile or FlexiPage files; mention visibility in the summary instead.
151
+
152
+ - **Always grant the running admin's profile** on top of the profiles the user names, as the wizard pre-selects it, in the same step; say so in the summary, and leave it out only when the user explicitly says the admin must not see the app. The admin is the user making the calls, not the app's creator, which matters when editing someone else's app (see Discovery queries)
153
+ - **Ask which other profiles should see the app** when the user hasn't said, once, in plain text (see Asking the User): a numbered list of the assignable profiles, support agents' profiles first for service/console apps, noting that System Administrator is already included and that the user can name several (names or numbers, e.g. "Standard User, Contract Manager" or "1, 3"), "all", or "just me"
154
+ - **Read the answer as a list**: split on commas, "and", and new lines; match each entry by number, exact name, or a case-insensitive unique prefix ("marketing" -> Marketing User). "all" means every assignable profile; "just me" / "only admins" means only the admin's. Grant every match in one save
155
+ - **Unmatched names**: if an entry matches no profile, or several, ask once about just those entries (show the closest names) before saving anything; never guess and never silently drop one. If the user then skips them, grant the rest and list the skipped names in the summary
156
+ - **Removing a profile**: remove only that profile: delete its SetupEntityAccess row (`DELETE /sobjects/SetupEntityAccess/<0J0 Id>`, found with `SELECT Id FROM SetupEntityAccess WHERE SetupEntityId = '<02u app Id>' AND ParentId = '<0PS Id>'`) or deploy its applicationVisibilities with `<visible>false</visible>`. Never remove the admin's profile unless the user names it
157
+ - **On a connected org, grant with SetupEntityAccess** (preferred): insert rows with `SetupEntityId` = the app's 02u Id and `ParentId` = the profile's PermissionSet Id, only for ids that don't have a row yet, in one `composite/sobjects` call. It adds profiles without touching the others and works for any profile name. The NavigationMenus (App Manager) skill is an alternative
158
+ - **Grant with Profile metadata**: one `applicationVisibilities` entry per Profile (or PermissionSet), deployed after (or in the same package as) the app; a Profile with only this element merges into the existing profile. Address the profile by metadata name, not label: "Admin" (System Administrator), "Standard" (Standard User), "MarketingProfile", "ContractManager"; look one up with Tooling `SELECT FullName FROM Profile WHERE Name = '<label>'`. `/headless/metadata` rejects names with spaces or special characters with "Invalid fullName" (most custom profiles, e.g. "Tier 2 Support Agent"), so use SetupEntityAccess for those. Set `<default>true</default>` only when the user asks for the app to be the profile's default. Example: [references/app-visibility.md](references/app-visibility.md)
159
+ - **Discovery queries** (data API `/query`, not Tooling, which has no Profile.UserType):
160
+ - assignable profiles and their PermissionSet Ids: `SELECT Id, Profile.Name FROM PermissionSet WHERE IsOwnedByProfile = true AND Profile.UserType = 'Standard' ORDER BY Profile.Name`
161
+ - support agents' profiles: `SELECT Profile.Name, COUNT(Id) FROM User WHERE IsActive = true AND UserPermissionsSupportUser = true GROUP BY Profile.Name`
162
+ - the running admin's profile: `GET /services/data/v66.0/` returns `identity` as `…/id/<org Id>/<user Id>`; take the last segment, then `SELECT Profile.Name FROM User WHERE Id = '<user Id>'`
163
+ - **Verify**: `SELECT Parent.Profile.Name FROM SetupEntityAccess WHERE SetupEntityId = '<02u app Id>'` lists every chosen profile, and `SELECT DurableId FROM AppDefinition WHERE DeveloperName = '<app>'` returns the app for the admin
164
+
165
+ ## Deploying to a Connected Org
166
+ - **Order**: UtilityBar FlexiPage, then the CustomApplication (references the FlexiPage), then the visibility grants (reference the app). Each fails with INVALID_CROSS_REFERENCE_KEY if the one before it isn't saved
167
+ - **Headless 360**: create with `POST /headless/metadata` and update with `PUT /headless/metadata`, body `{"type": "<FlexiPage|CustomApplication|Profile>", "fullName": "<api name>", "xmlRep": "<xml>"}`; read with `GET /headless/metadata?type=<type>&fullName=<api name>`.
168
+ - **Updating an existing app**: GET its current metadata first and send back the full definition with your changes; do not drop tabs, overrides, or utilityBar the user didn't ask to change
169
+ - **Timeouts and 500s can still mean it saved**: a metadata save can take a minute or more, and a FlexiPage save can commit and still return an opaque 500 "Internal error" (no componentFailures, no message). Never retry a POST straight away: first run Tooling `SELECT Id FROM FlexiPage|CustomApplication WHERE DeveloperName = '<name>'`. If a row comes back, the save landed; read it back and continue (PUT for any further change). A save can take a few seconds to show up, so if the query comes back empty, wait about 10 seconds and query once more before retrying. A retried POST that returns DUPLICATE_VALUE ("Component already exists") means an earlier save landed. A GET of a UtilityBar FlexiPage can also return 500; the query still tells you whether it exists
170
+ - **Org_Admin_Locked**: another setup change holds the org lock; wait a few seconds and retry the same save (check first that it didn't land). Save one component at a time, never in parallel
171
+ - **Errors are actionable**: "missing required decorator property" means a utility item lacks properties; "no FlexiPage named ... found" or "no CustomApplication named ... found" means the save order was wrong
172
+
173
+ ## Device Support, Navigation Behavior, and Integration Points
174
+ See [references/app-properties.md](references/app-properties.md) for the purpose of an app, form factors per device, navigation behavior flags, accessibility, and the tab and component types an app can include.
122
175
 
123
- ## Device Support
124
-
125
- ### Desktop Configuration
126
- - **formFactor**: "Large"
127
- - **tabs**: Full list of application tabs
128
-
129
- ### Phone Configuration
130
- - **formFactor**: "Small"
131
- - **tabs**: Mobile-optimized tab selection
132
-
133
- ### Tablet Configuration
134
- - **formFactor**: "Medium"
135
- - **tabs**: Tablet-appropriate tab selection
136
-
137
- ## User Experience Features
138
-
139
- ### Navigation Behavior
140
- - **Auto Temporary Tabs**: Can be enabled/disabled
141
- - **Personalization**: User customization options
142
- - **Tab Persistence**: Remember user's tab selections
143
-
144
- ### Accessibility
145
- - **Keyboard Navigation**: Full keyboard support
146
- - **Screen Reader**: Compatible with assistive technologies
147
- - **High Contrast**: Support for high contrast modes
148
-
149
- ## Integration Points
150
- - **Custom Tabs**: Include custom object and web tabs
151
- - **Standard Tabs**: Include standard Salesforce tabs
152
- - **Lightning Pages**: Integrate with Lightning page layouts
153
- - **Components**: Include custom Lightning components
154
176
  ## Best Practices
155
- - **Always use Lightning UI**: Set `uiType` to "Lightning" for modern apps
156
- - **Choose appropriate navigation**: CRITICAL - Analyze requirements carefully for `navType` selection
157
- - Use "Standard" (DEFAULT) for general business applications
158
- - Use "Console" ONLY when workflow requires multi-tab workspace, split-view, or managing multiple related records simultaneously
159
- - Examples for Console: customer service, call centers, support operations
160
- - Default to "Standard" for most general business use cases
161
- - **Include Standard Tabs**: Add common Salesforce tabs (Home, Accounts, Contacts, etc.)
162
- - **Use clear, descriptive application names**
163
- - **Group related functionality logically**
164
- - **Consider different user roles and needs**
165
- - **Test across different device types**
166
- - **Ensure proper permissions and access control**
167
- - **Provide meaningful descriptions for users**
168
- - **Follow consistent naming conventions**
169
- - **Always configure branding**: Set headerColor to create professional application identity
177
+ - **General design**: clear names and descriptions, related functionality grouped by user role (see references/app-properties.md)
170
178
  - **Use accessible brand colors**: Ensure hex colors have sufficient contrast (WCAG AA compliant)
171
- - **Configure utility bars**: Add useful quick-access tools for users
172
- - **Leverage action overrides**: Customize page layouts for specific objects using FlexiPages from flexipage expert
173
- - **Use profile overrides**: Provide role-specific experiences by referencing different flexipage expert generated pages per profile
179
+ - **Configure utility bars**: Add useful quick-access tools for users (for console apps: History, Notes, Recent Items, Macros)
180
+ - **Always grant app visibility**: Ask which profiles should see the app and include the running admin's
174
181
 
175
182
  ## Enhancement Rules
176
183
  - **uiType**: Always set to "Lightning" for modern app experience
177
- - **navType**: CRITICAL DECISION - Analyze user requirements carefully
178
- - Set to "Standard" (DEFAULT) for general business applications
179
- - Set to "Console" ONLY when workflow requires:
180
- - Managing multiple related records simultaneously with split-view capability
181
- - Multi-tab workspace for handling complex, interconnected data
182
- - Contextual information from multiple sources visible at once
183
- - Console examples: customer service operations, call centers, support desks
184
- - When in doubt between Standard and Console, choose "Standard" for most business use cases
184
+ - **navType**: CRITICAL DECISION - apply Navigation Type Selection; when in doubt, choose "Standard"
185
185
  - **formFactors**: Always set to ["LARGE"] for desktop Lightning Experience
186
186
  - **Standard Tabs**: Automatically add Home, Accounts, Contacts, Opportunities, Leads, Cases
187
187
  - **Navigation Settings**: Set all navigation flags to false for best user experience
188
188
  - **Branding**: ALWAYS include brand configuration for professional application identity
189
189
  - MANDATORY: Set brand.headerColor to appropriate color (e.g., "#0070D2" for Salesforce Blue)
190
190
  - Set brand.shouldOverrideOrgTheme based on requirements
191
- - **Action Overrides**: ALWAYS create action overrides when custom record pages exist
192
- - MANDATORY: Add actionOverrides for "View" action pointing to flexipage expert generated record pages
193
- - Use "Flexipage" type and reference the exact FlexiPage name
194
- - Set formFactor to "Large" for desktop
195
- - Include pageOrSobjectType with the object API name
191
+ - **Action Overrides**: ALWAYS create a "View" override (type "Flexipage", formFactor "Large") for every custom object with a flexipage expert record page
196
192
  - **Profile Action Overrides**: Reference flexipage expert generated pages for role-based customization
197
193
  - **Form Factors**: Use "Large" for desktop, "Small" for mobile in overrides
198
194
 
199
195
  ## CRITICAL Verification Checklist (MUST VERIFY)
200
196
  - [ ] All tabs are included in the application
201
197
  - [ ] **navType IS CORRECTLY SET** - Verify Console vs Standard selection
202
- - [ ] Default to "Standard" for most general business applications
203
- - [ ] Set to "Console" ONLY if workflow requires managing multiple records simultaneously, split-view, or multi-tab workspace
204
- - [ ] If requirements are general/ambiguous → navType should be "Standard"
198
+ - [ ] "Console" ONLY if the workflow needs multiple records at once (split-view, multi-tab workspace); otherwise, or when ambiguous, "Standard"
205
199
  - [ ] **BRANDING IS CONFIGURED** - This is HIGHLY RECOMMENDED for professional applications
206
- - [ ] brand.headerColor is set with valid hex color (e.g., "#0070D2")
207
- - [ ] brand.shouldOverrideOrgTheme is set (default: false)
200
+ - [ ] brand.headerColor is a valid hex color (e.g., "#0070D2") and brand.shouldOverrideOrgTheme is set (default: false)
208
201
  - [ ] **ACTION OVERRIDES ARE CREATED** - This is MANDATORY for every custom object with a record page
209
- - [ ] Action overrides are defined for EACH custom object tab pointing to the correct record page
210
- - [ ] actionOverrides.content matches the exact FlexiPage name generated by flexipage expert
211
- - [ ] actionOverrides.pageOrSobjectType is set to the correct object API name
212
- - [ ] actionOverrides.type is set to "Flexipage"
213
- - [ ] actionOverrides.actionName is set to "View"
214
- - [ ] actionOverrides.formFactor is set to "Large"
202
+ - [ ] EACH custom object tab has an actionOverrides entry: actionName "View", type "Flexipage", formFactor "Large", the object's API name as pageOrSobjectType, and the exact flexipage expert FlexiPage name as content
215
203
  - [ ] All required fields are populated (fullName, label, uiType, navType, formFactors)
204
+ - [ ] **APP VISIBILITY IS GRANTED** - the running admin's profile (even if the user didn't pick it) plus every profile the user chose have a SetupEntityAccess row or applicationVisibilities entry (visible true)
205
+ - [ ] Profiles are addressed by metadata name (Admin, Standard, ...), not label
206
+ - [ ] Console apps: every tab has a workspaceConfig mapping
207
+ - [ ] If utilityBar is set, the UtilityBar FlexiPage is generated (or already exists) and is saved before the app
208
+ - [ ] Every flexipage:recentItems item carries entityNames and its decorator properties
@@ -0,0 +1,52 @@
1
+ # CustomApplication: Purpose, Device Support, User Experience, and Integration Points
2
+
3
+ ## Purpose
4
+ - Organize related functionality into focused applications
5
+ - Group tabs and components for specific user roles
6
+ - Provide tailored user experiences
7
+ - Control access to specific features and data
8
+ - Use Standard navigation for general business applications or Console navigation for specialized service/support workflows requiring multi-tab workspaces
9
+ - Create professional, branded application identity with custom colors and branding
10
+ - Override standard actions with custom Lightning pages for enhanced user experience
11
+ - Enable profile-specific experiences through profile action overrides
12
+
13
+ ## Device Support
14
+
15
+ ### Desktop Configuration
16
+ - **formFactor**: "Large"
17
+ - **tabs**: Full list of application tabs
18
+
19
+ ### Phone Configuration
20
+ - **formFactor**: "Small"
21
+ - **tabs**: Mobile-optimized tab selection
22
+
23
+ ### Tablet Configuration
24
+ - **formFactor**: "Medium"
25
+ - **tabs**: Tablet-appropriate tab selection
26
+
27
+ ## User Experience Features
28
+
29
+ ### Navigation Behavior
30
+ - **Auto Temporary Tabs**: Can be enabled/disabled
31
+ - **Personalization**: User customization options
32
+ - **Tab Persistence**: Remember user's tab selections
33
+
34
+ ### Accessibility
35
+ - **Keyboard Navigation**: Full keyboard support
36
+ - **Screen Reader**: Compatible with assistive technologies
37
+ - **High Contrast**: Support for high contrast modes
38
+
39
+ ## Integration Points
40
+ - **Custom Tabs**: Include custom object and web tabs
41
+ - **Standard Tabs**: Include standard Salesforce tabs
42
+ - **Lightning Pages**: Integrate with Lightning page layouts
43
+ - **Components**: Include custom Lightning components
44
+
45
+ ## General Design Practices
46
+ - **Use clear, descriptive application names**
47
+ - **Group related functionality logically**
48
+ - **Consider different user roles and needs**
49
+ - **Test across different device types**
50
+ - **Ensure proper permissions and access control**
51
+ - **Provide meaningful descriptions for users**
52
+ - **Follow consistent naming conventions**
@@ -0,0 +1,19 @@
1
+ # App Visibility with Profile metadata
2
+
3
+ One `applicationVisibilities` entry per Profile (or PermissionSet), deployed after (or in the same package as) the app. A Profile containing only this element merges into the existing profile; it does not reset its other settings.
4
+
5
+ ```xml
6
+ <Profile xmlns="http://soap.sforce.com/2006/04/metadata">
7
+ <applicationVisibilities>
8
+ <application>Support_Console</application>
9
+ <default>false</default>
10
+ <visible>true</visible>
11
+ </applicationVisibilities>
12
+ </Profile>
13
+ ```
14
+
15
+ - `<application>` is the app's API name
16
+ - The Profile `fullName` is its metadata name, not its label: "Admin" (System Administrator), "Standard" (Standard User), "MarketingProfile" (Marketing User), "ContractManager" (Contract Manager). Look one up with Tooling `SELECT FullName FROM Profile WHERE Name = '<label>'` (one profile per query)
17
+ - `/headless/metadata` rejects metadata names with spaces or special characters ("Invalid fullName", on GET and PUT), e.g. "Tier 2 Support Agent" or "Custom%3A Support Profile" for "Custom: Support Profile". On a connected org, grant those with SetupEntityAccess rows instead
18
+ - Set `<default>true</default>` only when the user asks for this app to be the profile's default app
19
+ - To hide the app from a profile, deploy its entry with `<visible>false</visible>`
@@ -0,0 +1,55 @@
1
+ # Utility Bar FlexiPage
2
+
3
+ A UtilityBar FlexiPage referenced by a CustomApplication's `utilityBar`. Save it before the app.
4
+
5
+ ## Page template
6
+
7
+ ```xml
8
+ <FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
9
+ <flexiPageRegions>
10
+ <itemInstances>
11
+ <componentInstance>
12
+ <componentName>console:history</componentName>
13
+ <identifier>console_history</identifier>
14
+ </componentInstance>
15
+ </itemInstances>
16
+ <name>utilityItems</name>
17
+ <type>Region</type>
18
+ </flexiPageRegions>
19
+ <flexiPageRegions>
20
+ <name>backgroundComponents</name>
21
+ <type>Background</type>
22
+ </flexiPageRegions>
23
+ <masterLabel>Support Console UtilityBar</masterLabel>
24
+ <template>
25
+ <name>one:utilityBarTemplateDesktop</name>
26
+ </template>
27
+ <type>UtilityBar</type>
28
+ </FlexiPage>
29
+ ```
30
+
31
+ ## Recent Items item
32
+
33
+ `flexipage:recentItems` fails to save without these properties ("missing required decorator property [label]"). Decorator properties keep their plain name and add `<type>decorator</type>`. `entityNames` is a `valueList`, not a string. Add this `componentInstance` under the `utilityItems` region's `itemInstances`:
34
+
35
+ ```xml
36
+ <componentInstance>
37
+ <componentInstanceProperties><name>eager</name><type>decorator</type><value>false</value></componentInstanceProperties>
38
+ <componentInstanceProperties>
39
+ <name>entityNames</name>
40
+ <valueList>
41
+ <valueListItems><value>Case</value></valueListItems>
42
+ <valueListItems><value>Contact</value></valueListItems>
43
+ </valueList>
44
+ </componentInstanceProperties>
45
+ <componentInstanceProperties><name>height</name><type>decorator</type><value>480</value></componentInstanceProperties>
46
+ <componentInstanceProperties><name>icon</name><type>decorator</type><value>fallback</value></componentInstanceProperties>
47
+ <componentInstanceProperties><name>label</name><value>Standard.RecentItems</value></componentInstanceProperties>
48
+ <componentInstanceProperties><name>label</name><type>decorator</type><value>Recent Items</value></componentInstanceProperties>
49
+ <componentInstanceProperties><name>maxRecords</name><value>3</value></componentInstanceProperties>
50
+ <componentInstanceProperties><name>scrollable</name><type>decorator</type><value>true</value></componentInstanceProperties>
51
+ <componentInstanceProperties><name>width</name><type>decorator</type><value>340</value></componentInstanceProperties>
52
+ <componentName>flexipage:recentItems</componentName>
53
+ <identifier>flexipage_recentItems</identifier>
54
+ </componentInstance>
55
+ ```
@@ -117,7 +117,7 @@ Then author one with the **two-step** recipe (the
117
117
  2. **Tooling-insert** the `DataMaskPolicyObject` (one per object) then its `DataMaskPolicyField`
118
118
  rows. Each field row's treatment is `MaskingCategory` + `MaskValue`. For `library`, `MaskValue` is a
119
119
  snake_case token like `first_name`, `email`, `phone`. For `characters` and `replaceRandom`, `MaskValue`
120
- is the field's Salesforce type (`Text`, `Date`). There is **no `MaskingRuleType` column**.
120
+ is the field's type group (`Text`, `Date`; Long Text Area is `Text`). There is **no `MaskingRuleType` column**.
121
121
 
122
122
  > Insert order matters: a Tooling-created parent (no active revision) makes the child insert fail
123
123
  > `INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY`. Metadata-deploy the shell first.
@@ -92,14 +92,20 @@ Each `DataMaskPolicyField` carries a `MaskingCategory` plus a `MaskValue` — th
92
92
  were wrong; that column does not exist).
93
93
 
94
94
  - `MaskingCategory` — `library` (pick a value from the built-in library, the common case),
95
- `characters` (random characters), or `replaceRandom` (random replacement).
95
+ `characters` (random characters), `replaceRandom` (random replacement), or `numberRange`.
96
96
  - `MaskValue` depends on the category:
97
- - `library` — a snake_case library token identifying the value set. Verified tokens include:
98
- `first_name`, `last_name`, `email`, `phone`, `street`, `city`, `state`, `postal_code`,
99
- `country`, `account_name`, `URL`.
100
- - `characters` and `replaceRandom` — the field's Salesforce type (for example `Text`, `Date`).
101
- Left empty, the run fails with `UNKNOWN_EXCEPTION` ("Mask Value is required for Replace Random
102
- field").
97
+ - `library` — a snake_case library token identifying the value set. Verified tokens:
98
+ `first_name`, `last_name`, `full_name`, `name`, `email`, `phone`, `street`, `city`, `state`,
99
+ `postal_code`, `postal_code_ca`, `country`, `country_abbr`, `ssn`, `account_name`, `URL`.
100
+ Use the token exactly as written here (the frontend name, not an internal name).
101
+ - `characters` and `replaceRandom` — the field's **type group**, not its raw type: `Text` for
102
+ Text, Text Area, Long Text Area, Rich Text Area, Encrypted and Address; `Date` for Date and
103
+ Date/Time; `Number` for Number, Percent and Currency; Time, Checkbox, Phone, Email and URL are
104
+ their own groups. A raw type such as `Long Text Area` fails the run with `UNKNOWN_EXCEPTION`
105
+ ("Mask With Random is not supported for field type Long Text Area"). Left empty, the run fails
106
+ with `UNKNOWN_EXCEPTION` ("Mask Value is required for Replace Random field").
107
+ - `numberRange` — no `MaskValue`; set `MinMaskValue` and `MaxMaskValue` instead (the UI defaults
108
+ are `0` and `100`; Geolocation latitude `-90`/`90`, longitude `-180`/`180`).
103
109
 
104
110
  ## Choosing the fields from Core's classification
105
111
 
@@ -118,23 +124,40 @@ this once per target object, before inserting any `DataMaskPolicyField` row.
118
124
  2. **Read the response.** The result is `{status_code, body}`, where `body` is an array with one entry
119
125
  per field. Each entry carries `apiName`, `label`, `type`, and `recommendedPiiType` (`null` when Core
120
126
  has no recommendation). Any other shape counts as a failed call (step 4).
121
- 3. **Map each recommendation to a treatment.** Core returns tokens such as `last_name`, `street`,
122
- `phone`, `characters`, and `replaceRandom`. Compare `recommendedPiiType` case-insensitively with the
123
- verified `MaskValue` tokens in "Field treatment columns" above. `characters` and `text` are the same
124
- category.
125
- - A verified token → `MaskingCategory=library`, `MaskValue=<that token>`.
126
- - `characters`/`text` → `MaskingCategory=characters`. `replaceRandom` → `MaskingCategory=replaceRandom`.
127
- Both also require `MaskValue` = the field's Salesforce type as Core reports it in `type` (for example
128
- `Text`, `Date`). The UI's "Mask With" menu offers `Random Characters` for `characters`.
129
- - Any other recommendation (for example `title`, `full_name`, `full_address`, `credit_card`, `ssn`,
130
- `password`, `date`, `numberRange`) has no `MaskingCategory` or verified token here. **Report it as
131
- unmapped. Do not guess a `MaskValue`.**
127
+ 3. **Map each recommendation to a treatment**, the way the UI does. Compare `recommendedPiiType`
128
+ case-insensitively. Core has already applied the sensitivity feature flag and the field's
129
+ compliance categories, so do not re-derive the decision from `sensitivity` or `categories`.
130
+ - A verified library token (see "Field treatment columns") → `MaskingCategory=library`,
131
+ `MaskValue=<that token>`. This also holds for a Long Text Area or Rich Text Area field (for
132
+ example a `street` field): the UI hides library values for those types, the backend accepts
133
+ them.
134
+ - `characters` → `MaskingCategory=characters`; `replaceRandom` → `MaskingCategory=replaceRandom`.
135
+ Both need `MaskValue` = the field's **type group** (`Text`, `Date`, ...), never the raw `type`.
136
+ - `numberRange` → `MaskingCategory=numberRange` with the `MinMaskValue`/`MaxMaskValue` defaults.
137
+ - Any other recommendation (`title`, `middle_name`, `salutation`, `suffix`, `country_code`,
138
+ `state_code`, `credit_card`, `sin`, `nino`, `password`, `full_address`, `date`, `datetime`,
139
+ `picklist`) is one the UI does not apply either. **Leave the field unmasked and report it
140
+ as unmapped, with its sensitivity, so the user can add it by choice. Do not guess a `MaskValue`.**
132
141
  - A field with no `recommendedPiiType` is not masked. List it in the report.
142
+ - If the object has a subset filter and a recommended field is also the filter field (for example
143
+ `LastName`), masking it changes the value the filter matches on, so a second run of the same
144
+ policy matches nothing. Mention this in the report.
145
+ - If the policy object already exists (its Id starts with `8po`), the UI does not auto-apply
146
+ recommendations to it. Add only the fields the user asked for and list the other
147
+ recommendations as suggestions.
133
148
  4. **Fall back only when the call fails** (refused, errored, the `project-codey` server is unavailable,
134
149
  or the response shape is unrecognized). Then use the static table below and state in the report that
135
150
  the field list came from the static table, not from Core. When the call succeeds, Core's answer is
136
151
  authoritative. Do not add fields from the static table.
137
152
 
153
+ ### Custom fields: check access for the masking service
154
+
155
+ The masking service runs as the org's Platform Integration User. On a test sandbox, custom
156
+ (`__c`) fields were silently left unchanged when that user had no field-level access to them; the
157
+ job still ended `completed` and wrote no per-field detail rows. Standard fields were unaffected.
158
+ After a run that includes custom fields, sample a few records. If a custom field did not change,
159
+ check field access for the integration user before re-running.
160
+
138
161
  ## Fallback treatments (static table)
139
162
 
140
163
  Use this table **only** when the classification call in "Choosing the fields from Core's classification"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: platform-dsar-policy-manage
3
- description: "Configure, run, and audit DsarPolicy Right-to-Portability exports end to end: author the data map over a subject's related records, resolve a request's subject (email/name/id) to a root-entity record, run an export against an ACTIVE policy (poll a couple of times, then ask before continuing; download once terminal), and read run history. Use when the user needs to set up, edit, execute, or inspect a DsarPolicy or Right-to-Portability (RTP) export, or audit which personal data a policy does not cover yet. TRIGGER when: the user configures a DsarPolicy or RTP data map, authors DsarPolicyPath or DsarPolicyField metadata, runs or exports a subject's portable data, downloads an RTP export file, reviews DsarPolicy run history, or asks what personal data the policy does not cover yet (coverage gap analysis). DO NOT TRIGGER when: the user wants to erase, delete, or remove a subject's records (RTP is portability export, not erasure — this skill deletes nothing), mask sandbox PII, or deploy unrelated metadata."
3
+ description: "Set up, edit, run, and audit a customer's personal-data portability map (DsarPolicy / Right-to-Portability export). Use for choosing subject roots, follow/stop relationships and fields, including requests to figure out what counts as personal data: elicit the admin's classification decisions, never guess. Covers inactive policy authoring/review, subject resolution, ACTIVE-policy export with bounded polling and terminal-only download, history and coverage gaps. This end-to-end workflow can dispatch the DsarPolicyManager setup SOR; loading its generated configuration skill alone does not replace this workflow. Not subject erasure/deletion, sandbox masking or unrelated metadata deployment."
4
4
  metadata:
5
5
  version: "1.7"
6
6
  domains: ["Platform"]
@@ -44,7 +44,7 @@ literal first action of every task — before you pick a workflow, before any `s
44
44
  "looks like a quick lookup" is the top recurring miss, and it is wrong even when it would work.
45
45
  `sf` is the fallback **only** when no routing tool is in reach (checking `sf org list` to see which
46
46
  orgs are authenticated locally is fine — that is a client-side auth check, not a SOR call). Every
47
- `sf`/`salesforce-api-context` command shown in the workflows below is the *no-routing-tool*
47
+ `sf` command shown in the workflows below is the *no-routing-tool*
48
48
  spelling; when the routing tool is present, dispatch the equivalent operation through it instead.
49
49
  Detail: `references/headless-sor.md`.
50
50
  2. **Export, never erasure.** A run produces an **export file**; it does not erase/redact/delete the
@@ -108,7 +108,8 @@ Each entity is reached a **different** way — guessing the surface is the top t
108
108
  | Execute an export | — | **Connect DSR endpoint** (`POST`) |
109
109
  | Status / getfile | — | **Connect DSR endpoint** on the handle; getfile segment `dsr` |
110
110
 
111
- Resolve the exact Connect route/version at run time via `salesforce-api-context` (or `sf`). Don't
111
+ Resolve the exact Connect route through the routing tool's `describe`; only when no router is available,
112
+ use the verified-contract/`sf` fallback in `references/export-and-history.md`. Don't
112
113
  `sf sobject describe DsarPolicy*` — the tree is metadata; only `DsarPolicyLog` answers standard
113
114
  SOQL. On an MCP surface, each row is one `DsarPolicyManager` operation.
114
115
 
@@ -124,7 +125,7 @@ SOQL. On an MCP surface, each row is one `DsarPolicyManager` operation.
124
125
  Mixed request → do the one asked; don't add an export to a configure, or a run to a history.
125
126
 
126
127
  **Every workflow below assumes call #1 is already done** — you have routed through the discover/
127
- describe/dispatch SOR tool (or confirmed none is in reach). The `sf`/`salesforce-api-context`
128
+ describe/dispatch SOR tool (or confirmed none is in reach). The `sf`
128
129
  commands in each workflow are the *no-routing-tool* spelling; with the routing tool present, dispatch
129
130
  the equivalent operation through it.
130
131
 
@@ -169,8 +170,8 @@ Endpoints, sample envelopes, poll/download sequence: `references/export-and-hist
169
170
  Individual / Lead / User) — e.g. SOQL `Lead`/`Contact` by `Email`. Confirm the type **is a policy
170
171
  root** (execute matches only the root subtree of the subject's type — a non-root subject exports
171
172
  nothing). On **0 / many / non-root** matches, stop and report; never execute a guessed Id.
172
- - **B1. Preconditions.** Policy must be **ACTIVE** (else route to A). Resolve DSR routes via
173
- `salesforce-api-context`.
173
+ - **B1. Preconditions.** Policy must be **ACTIVE** (else route to A). Resolve DSR routes through
174
+ the router's `describe`, or the verified-contract fallback in `references/export-and-history.md` when no router is available.
174
175
  - **Pick the policy deliberately:** named → use it; else the in-context policy; if none is
175
176
  established or **multiple ACTIVE could match**, **ask to confirm** (e.g. *"Run `<policy>` for
176
177
  `<subject>` — confirm?"*). Never pick silently.