@salesforce/afv-skills 1.42.0 → 1.44.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 (243) hide show
  1. package/package.json +2 -6
  2. package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +3 -0
  3. package/skills/automation-sandbox-post-copy-configure/SKILL.md +4 -0
  4. package/skills/design-systems-slds-validate/SKILL.md +2 -2
  5. package/skills/dx-devops-conflict-resolve/SKILL.md +205 -0
  6. package/skills/dx-devops-conflict-resolve/examples/conflict-workflows.md +165 -0
  7. package/skills/dx-devops-conflict-resolve/references/deploy-failure-resolution.md +75 -0
  8. package/skills/dx-devops-conflict-resolve/references/git-conflict-resolution.md +124 -0
  9. package/skills/dx-devops-conflict-resolve/scripts/detect-conflicts.sh +91 -0
  10. package/skills/dx-devops-conflict-resolve/scripts/diagnose-deploy-failure.sh +156 -0
  11. package/skills/dx-devops-request-status/SKILL.md +160 -0
  12. package/skills/dx-devops-request-status/examples/polling-workflows.md +101 -0
  13. package/skills/dx-devops-request-status/references/cli-commands.md +176 -0
  14. package/skills/dx-devops-request-status/scripts/poll-status.sh +134 -0
  15. package/skills/dx-devops-test-failures-analyze/SKILL.md +6 -6
  16. package/skills/dx-devops-test-pipeline-configure/SKILL.md +7 -7
  17. package/skills/dx-devops-test-suite-assignments-configure/SKILL.md +6 -6
  18. package/skills/dx-devops-test-suite-run/SKILL.md +6 -6
  19. package/skills/dx-devops-work-item-manage/SKILL.md +2 -0
  20. package/skills/dx-org-manage/references/creating-scratch-org.md +5 -2
  21. package/skills/dx-org-manage/references/creating-snapshot.md +1 -0
  22. package/skills/dx-org-shape-manage/SKILL.md +152 -0
  23. package/skills/dx-org-shape-manage/examples/create_error_output.json +9 -0
  24. package/skills/dx-org-shape-manage/examples/create_success_output.json +9 -0
  25. package/skills/dx-org-shape-manage/examples/delete_output.json +11 -0
  26. package/skills/dx-org-shape-manage/examples/list_inactive_output.json +32 -0
  27. package/skills/dx-org-shape-manage/examples/list_output.json +24 -0
  28. package/skills/dx-org-shape-manage/references/cli_flags.md +135 -0
  29. package/skills/dx-org-switch/SKILL.md +2 -2
  30. package/skills/dx-org-trial-expiration-check/SKILL.md +2 -0
  31. package/skills/dx-pkg-post-install-configure/SKILL.md +3 -0
  32. package/skills/education-cloud-multi-campus-configure/SKILL.md +211 -0
  33. package/skills/education-cloud-multi-campus-configure/examples/hierarchy_visualization.md +174 -0
  34. package/skills/education-cloud-multi-campus-configure/examples/output_examples.md +54 -0
  35. package/skills/education-cloud-multi-campus-configure/examples/sample_hierarchy_input.csv +29 -0
  36. package/skills/education-cloud-multi-campus-configure/examples/sample_hierarchy_input_edgecases.csv +16 -0
  37. package/skills/education-cloud-multi-campus-configure/references/account_recordtype_prerequisite.md +44 -0
  38. package/skills/education-cloud-multi-campus-configure/references/delta_computation.md +33 -0
  39. package/skills/education-cloud-multi-campus-configure/references/error_handling.md +198 -0
  40. package/skills/education-cloud-multi-campus-configure/references/foundation_prerequisites.md +54 -0
  41. package/skills/education-cloud-multi-campus-configure/references/gotchas.md +16 -0
  42. package/skills/education-cloud-multi-campus-configure/references/hierarchy_parsing_rules.md +133 -0
  43. package/skills/education-cloud-multi-campus-configure/references/mcp-invocation.md +75 -0
  44. package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/SKILL.md +1 -1
  45. package/skills/experience-cms-brand-apply/SKILL.md +4 -1
  46. package/skills/experience-cms-brand-create/SKILL.md +197 -0
  47. package/skills/experience-cms-brand-create/assets/brand-template.json +329 -0
  48. package/skills/experience-cms-brand-create/references/brand-anatomy.md +120 -0
  49. package/skills/experience-cms-brand-create/references/disk-contract.md +84 -0
  50. package/skills/experience-cms-content-generate/SKILL.md +192 -0
  51. package/skills/experience-cms-content-generate/assets/display-formats.md +84 -0
  52. package/skills/experience-cms-content-generate/assets/payloads/create-content-bulk.json +11 -0
  53. package/skills/experience-cms-content-generate/assets/payloads/create-content-single.json +11 -0
  54. package/skills/experience-cms-content-generate/assets/payloads/publish-content.json +4 -0
  55. package/skills/experience-cms-content-generate/assets/payloads/update-content.json +9 -0
  56. package/skills/experience-cms-content-generate/assets/questions.md +241 -0
  57. package/skills/experience-cms-content-generate/examples/create-content-call.md +81 -0
  58. package/skills/experience-cms-content-generate/references/bulk-batching.md +56 -0
  59. package/skills/experience-cms-content-generate/references/content-type-classification.md +88 -0
  60. package/skills/experience-cms-content-generate/references/content-write-tool.md +95 -0
  61. package/skills/experience-cms-content-generate/references/delegation-protocol.md +37 -0
  62. package/skills/experience-cms-content-generate/references/edit-publish-workflow.md +63 -0
  63. package/skills/experience-cms-content-generate/references/error-recovery.md +72 -0
  64. package/skills/experience-cms-content-generate/references/identifier-resolution.md +26 -0
  65. package/skills/experience-cms-content-generate/references/intent-routing.md +45 -0
  66. package/skills/experience-cms-content-generate/references/principles.md +19 -0
  67. package/skills/experience-cms-content-generate/references/ux-rules.md +68 -0
  68. package/skills/experience-cms-content-generate/references/workspace-resolution.md +33 -0
  69. package/skills/experience-cms-content-type-generate/SKILL.md +449 -0
  70. package/skills/experience-cms-content-type-generate/assets/discovery-prompts.md +79 -0
  71. package/skills/experience-cms-content-type-generate/assets/schema-example.json +70 -0
  72. package/skills/experience-cms-content-type-generate/references/agent-checklist.md +50 -0
  73. package/skills/experience-cms-content-type-generate/references/anti-patterns.md +39 -0
  74. package/skills/experience-cms-content-type-generate/references/deployment-errors.md +27 -0
  75. package/skills/experience-cms-content-type-generate/references/discovery-details.md +106 -0
  76. package/skills/experience-cms-content-type-generate/references/discovery-query-rules.md +85 -0
  77. package/skills/experience-cms-content-type-generate/references/edit-fields-loop.md +48 -0
  78. package/skills/experience-cms-content-type-generate/references/pre-deploy-checklist.md +21 -0
  79. package/skills/experience-cms-content-type-generate/references/retrieve-and-reconcile.md +105 -0
  80. package/skills/experience-cms-content-type-generate/references/schema-rules.md +51 -0
  81. package/skills/experience-cms-content-type-generate/references/schema-summary-format.md +60 -0
  82. package/skills/experience-lds-graphql-generate/SKILL.md +4 -0
  83. package/skills/experience-lwc-accessibility-jest-run/SKILL.md +79 -0
  84. package/skills/experience-lwc-accessibility-jest-run/references/running-sa11y-jest-tests.md +205 -0
  85. package/skills/experience-lwc-design-generate/SKILL.md +5 -4
  86. package/skills/experience-lwc-generate/SKILL.md +10 -9
  87. package/skills/experience-ui-bundle-deploy/references/dev-preview.md +21 -0
  88. package/skills/experience-ui-bundle-deploy/references/social-login.md +1 -0
  89. package/skills/experience-ui-bundle-file-upload-generate/SKILL.md +6 -6
  90. package/skills/experience-ui-bundle-localize/SKILL.md +30 -37
  91. package/skills/experience-ui-bundle-localize/references/gotchas.md +23 -7
  92. package/skills/experience-ui-bundle-localize/references/i18n-setup.md +48 -4
  93. package/skills/experience-ui-bundle-localize/references/label-xml.md +22 -8
  94. package/skills/experience-ui-bundle-localize/references/verifying.md +39 -11
  95. package/skills/experience-ui-bundle-localize/scripts/detect-bundle-type.sh +118 -15
  96. package/skills/experience-ui-bundle-localize/scripts/tests/test-detect-bundle-type.sh +187 -0
  97. package/skills/experience-ui-bundle-mfa-configure/SKILL.md +13 -2
  98. package/skills/experience-ui-bundle-mfa-configure/references/social-login.md +1 -0
  99. package/skills/experience-ui-bundle-project-generate/SKILL.md +2 -2
  100. package/skills/integration-connectivity-generate/SKILL.md +11 -10
  101. package/skills/integration-eventing-cdc-configure/SKILL.md +6 -6
  102. package/skills/integration-eventing-subscription-configure/SKILL.md +6 -5
  103. package/skills/mobile-platform-native-capabilities-integrate/SKILL.md +2 -2
  104. package/skills/mobile-platform-offline-validate/scripts/package.json +1 -1
  105. package/skills/platform-agentexchange-partner-offers-configure/SKILL.md +8 -8
  106. package/skills/platform-custom-application-generate/SKILL.md +2 -0
  107. package/skills/platform-custom-field-generate/SKILL.md +8 -6
  108. package/skills/platform-custom-metadata-type-generate/SKILL.md +460 -0
  109. package/skills/platform-custom-metadata-type-generate/references/cmdt-records.md +251 -0
  110. package/skills/platform-custom-metadata-type-generate/scripts/sanitize-developer-name.sh +46 -0
  111. package/skills/platform-custom-setting-generate/SKILL.md +419 -0
  112. package/skills/platform-dataspace-access-configure/SKILL.md +2 -0
  113. package/skills/platform-sharing-owd-configure/SKILL.md +3 -0
  114. package/skills/platform-value-set-generate/SKILL.md +2 -0
  115. package/skills/service-agentforce-channel-configure/SKILL.md +29 -20
  116. package/skills/service-agentforce-channel-configure/assets/BotEmailDefinition.botEmailDefinition-meta.xml +36 -0
  117. package/skills/service-agentforce-channel-configure/assets/email/unfiled$public/AgentforceForServiceEmailTemplate.email +17 -0
  118. package/skills/service-agentforce-channel-configure/assets/email/unfiled$public/AgentforceForServiceEmailTemplate.email-meta.xml +29 -0
  119. package/skills/service-agentforce-channel-configure/assets/mdapi-package.xml +25 -0
  120. package/skills/service-agentforce-channel-configure/assets/settings-mdapi-package.xml +30 -0
  121. package/skills/service-agentforce-channel-configure/references/agent-wiring.md +20 -0
  122. package/skills/service-agentforce-channel-configure/references/botemaildefinition.md +107 -0
  123. package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +203 -50
  124. package/skills/service-agentforce-channel-configure/references/channel-types.md +30 -3
  125. package/skills/service-agentforce-channel-configure/references/queue-resolution.md +17 -8
  126. package/skills/service-agentforce-channel-configure/references/routing-flow.md +14 -3
  127. package/skills/service-agentforce-channel-configure/scripts/validate-botemaildefinition.py +126 -0
  128. package/skills/service-agentforce-channel-configure/scripts/validate-emailtemplate.py +133 -0
  129. package/skills/service-de-channel-activate/SKILL.md +271 -0
  130. package/skills/service-de-channel-activate/references/gotchas.md +31 -0
  131. package/skills/service-de-channel-activate/references/phone-verification.md +96 -0
  132. package/skills/service-de-channel-activate/references/worked-examples.md +14 -0
  133. package/skills/service-de-channel-consent-configure/SKILL.md +230 -0
  134. package/skills/service-de-channel-consent-configure/references/gotchas.md +41 -0
  135. package/skills/service-de-channel-consent-configure/references/language-keywords.md +84 -0
  136. package/skills/service-de-channel-consent-configure/references/worked-examples.md +134 -0
  137. package/skills/service-de-channel-create/SKILL.md +369 -0
  138. package/skills/service-de-channel-create/references/apple.md +59 -0
  139. package/skills/service-de-channel-create/references/connect-insert.md +84 -0
  140. package/skills/service-de-channel-create/references/facebook.md +154 -0
  141. package/skills/service-de-channel-create/references/line.md +66 -0
  142. package/skills/service-de-channel-create/references/sms.md +98 -0
  143. package/skills/service-de-channel-create/references/whatsapp.md +98 -0
  144. package/skills/service-de-channel-create/references/worked-examples.md +70 -0
  145. package/skills/service-de-channel-routing-configure/SKILL.md +345 -0
  146. package/skills/service-de-channel-routing-configure/references/asa-routing.md +90 -0
  147. package/skills/service-de-channel-routing-configure/references/gotchas.md +27 -0
  148. package/skills/service-de-channel-routing-configure/references/queue-creation.md +123 -0
  149. package/skills/service-de-channel-routing-configure/references/target-locate.md +98 -0
  150. package/skills/service-de-channel-routing-configure/references/worked-examples.md +174 -0
  151. package/skills/service-de-headless-channel-configure/SKILL.md +305 -0
  152. package/skills/service-de-headless-channel-configure/references/gotchas.md +27 -0
  153. package/skills/service-de-headless-channel-configure/references/inputs.md +49 -0
  154. package/skills/service-de-headless-channel-configure/references/output-envelopes.md +53 -0
  155. package/skills/service-de-headless-channel-configure/references/partial-success.md +24 -0
  156. package/skills/service-de-headless-channel-configure/references/terms-and-conditions.md +54 -0
  157. package/skills/service-de-headless-channel-configure/references/worked-examples.md +108 -0
  158. package/skills/service-de-waba-integrate/SKILL.md +227 -0
  159. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +29 -0
  160. package/skills/service-digital-engagement-messaging-site-integrate/SKILL.md +10 -9
  161. package/skills/service-digital-engagement-messaging-site-integrate/references/lwr_patch.md +39 -21
  162. package/skills/service-digital-engagement-messaging-site-integrate/scripts/patch_lwr_bundle.sh +157 -96
  163. package/skills/service-email-to-case-configure/SKILL.md +190 -0
  164. package/skills/service-email-to-case-configure/assets/CaseSettings.settings-meta.xml +45 -0
  165. package/skills/service-email-to-case-configure/examples/CaseSettings-two-addresses.settings-meta.xml +36 -0
  166. package/skills/service-email-to-case-configure/references/apply-mechanics.md +73 -0
  167. package/skills/service-email-to-case-configure/references/routing_address_reference.md +73 -0
  168. package/skills/service-email-to-case-configure/references/troubleshooting.md +25 -0
  169. package/skills/service-email-to-case-configure/scripts/apply-casesettings.py +1315 -0
  170. package/skills/service-email-to-case-configure/scripts/check-agent-email-capability.sh +26 -0
  171. package/skills/service-email-to-case-configure/scripts/tests/__init__.py +0 -0
  172. package/skills/service-email-to-case-configure/scripts/tests/_bootstrap.py +45 -0
  173. package/skills/service-email-to-case-configure/scripts/tests/_fakeorg.py +366 -0
  174. package/skills/service-email-to-case-configure/scripts/tests/_run.py +84 -0
  175. package/skills/service-email-to-case-configure/scripts/tests/test_apply_org_scenarios.py +655 -0
  176. package/skills/service-email-to-case-configure/scripts/tests/test_get_session.py +134 -0
  177. package/skills/service-email-to-case-configure/scripts/tests/test_new_capabilities.py +193 -0
  178. package/skills/service-email-to-case-configure/scripts/tests/test_validate_casesettings.py +170 -0
  179. package/skills/service-email-to-case-configure/scripts/validate-casesettings.py +229 -0
  180. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +33 -15
  181. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +63 -47
  182. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +17 -12
  183. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/references/cli-invocation.md +5 -3
  184. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/classify-enable-plan.mjs +11 -3
  185. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +8 -6
  186. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/references/cli-invocation.md +3 -3
  187. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/scripts/classify-readiness.mjs +11 -3
  188. package/skills/service-itsm-agentic-setup-configure/SKILL.md +5 -5
  189. package/skills/service-itsm-agentic-setup-configure/examples/output-templates.md +5 -5
  190. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +2 -2
  191. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +11 -7
  192. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +20 -7
  193. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +10 -6
  194. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/action-availability.md +7 -7
  195. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +11 -7
  196. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/build-create-body.mjs +24 -17
  197. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-action-availability.mjs +98 -58
  198. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +20 -7
  199. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/strip-release-management.mjs +176 -0
  200. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +19 -19
  201. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/cli-invocation.md +3 -4
  202. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/helper-contracts.md +6 -6
  203. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/permset-topology.md +3 -10
  204. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-permset-availability.mjs +7 -9
  205. package/skills/service-itsm-incident-mgmt-configure/SKILL.md +2 -0
  206. package/skills/service-itsm-incident-priority-configure/SKILL.md +15 -12
  207. package/skills/service-itsm-incident-priority-configure/examples/matrix-operations.md +27 -1
  208. package/skills/service-itsm-incident-priority-configure/references/sf-cli-invocation.md +37 -6
  209. package/skills/service-native-voice-recording-transcription-configure/SKILL.md +146 -0
  210. package/skills/service-native-voice-recording-transcription-configure/assets/confirmation-output.json +16 -0
  211. package/skills/service-native-voice-recording-transcription-configure/assets/package.xml +22 -0
  212. package/skills/service-native-voice-recording-transcription-configure/references/thunderbird-voice-settings.md +101 -0
  213. package/skills/service-native-voice-recording-transcription-configure/scripts/enable-recording-transcription.sh +181 -0
  214. package/skills/service-helpagent-coordinate/references/channel-help-portal.md +0 -22
  215. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-1-1-non-text-content.md +0 -0
  216. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-1-i-lists.md +0 -0
  217. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-1-ii-tables.md +0 -0
  218. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-1-iii-form-labels.md +0 -0
  219. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-1-iv-regions.md +0 -0
  220. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-1-v-groups.md +0 -0
  221. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-5-identify-input.md +0 -0
  222. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-4-3-contrast.md +0 -0
  223. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-1-1-keyboard.md +0 -0
  224. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-4-4-link-purpose.md +0 -0
  225. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-4-6-headings-labels.md +0 -0
  226. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-5-1-pointer-gestures.md +0 -0
  227. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-5-2-pointer-cancellation.md +0 -0
  228. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-5-3-label-in-name.md +0 -0
  229. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-5-7-dragging-movement.md +0 -0
  230. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-3-2-1-on-focus.md +0 -0
  231. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-3-2-2-on-input.md +0 -0
  232. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-3-3-1-error-identification.md +0 -0
  233. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-3-3-2-labels-instructions.md +0 -0
  234. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-3-3-3-error-suggestion.md +0 -0
  235. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-4-1-2-i-name.md +0 -0
  236. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-4-1-2-ii-role.md +0 -0
  237. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-4-1-2-iii-value.md +0 -0
  238. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/vision/sc-1-1-1-non-text-content.md +0 -0
  239. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/vision/sc-1-4-1-use-of-color.md +0 -0
  240. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/vision/sc-1-4-10-resize-reflow.md +0 -0
  241. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/vision/sc-1-4-11-non-text-contrast.md +0 -0
  242. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/vision/sc-1-4-3-contrast.md +0 -0
  243. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/scripts/contrast-ratio.py +0 -0
@@ -0,0 +1,251 @@
1
+ # CMDT Records — Value Typing, Coercion, and Error Reference
2
+
3
+ Depth reference for `customMetadata/<Type>.<Record>.md-meta.xml`. Read this when a record deploy fails, or
4
+ when deciding whether an `xsi:type` mismatch is actually a problem.
5
+
6
+ Every error string in Section 3 is verbatim from `componentFailures[].problem` in
7
+ `sf project deploy start --json`.
8
+
9
+ ---
10
+
11
+ ## 1. The type check is asymmetric
12
+
13
+ There is **no single "types must match" rule.** Some mismatches are silently accepted, others are rejected.
14
+ Knowing which prevents both false alarms and missed bugs.
15
+
16
+ | Field type | `xsi:type` used | Outcome |
17
+ |---|---|---|
18
+ | Number | `xsd:double` | accepted (canonical) |
19
+ | Number | `xsd:int` | **accepted** |
20
+ | Number | `xsd:string` (`42`) | **accepted** |
21
+ | Number | `xsd:boolean` | rejected — `S Number: value not of required type: true` |
22
+ | Number | `xsd:double` with value `abc` | rejected at parse — `Error parsing file: 'abc' is not valid for the type xsd:double` |
23
+ | Date | `xsd:date` | accepted (canonical) |
24
+ | Date | `xsd:dateTime` | **accepted** |
25
+ | Date | `xsd:string` | rejected — `S Date: value not of required type: 2024-01-15` |
26
+ | DateTime | `xsd:dateTime` | accepted (canonical) |
27
+ | DateTime | `xsd:date` | **accepted** |
28
+ | DateTime | `xsd:string` | rejected — `S DateTime: value not of required type: 2024-01-15T10:30:00.000Z` |
29
+ | Checkbox | `xsd:boolean` | accepted (canonical) |
30
+ | Checkbox | `xsd:string` | rejected — `S Checkbox: value not of required type: true` |
31
+ | Checkbox | `xsd:int` | rejected — `S Checkbox: value not of required type: 1` |
32
+ | Text | `xsd:string` | accepted (canonical) |
33
+ | Text | `xsd:double` | rejected — `S Text: value not of required type: 42.5` |
34
+
35
+ **Summary of the pattern:** `Number` accepts `xsd:string` and `xsd:int`; Date and DateTime interconvert
36
+ freely; **Checkbox and Text are strict.** The most common real-world failure is a Date field given
37
+ `xsi:type="xsd:string"`. Only `Number` was probed among the numeric types — do not assume `Percent` behaves
38
+ identically.
39
+
40
+ Always emit the canonical type from the main skill's Section 4 table. The tolerances above are for
41
+ diagnosing existing files, not a licence to be loose in generated output.
42
+
43
+ ### `Percent`, `Email`, `Phone`, `Url`, `TextArea`, `LongTextArea`
44
+
45
+ Their canonical types are confirmed correct by a successful all-fields record deploy, but they were not
46
+ individually probed with *wrong* types, so no per-field verbatim rejection string exists. The
47
+ `value not of required type` shape is expected to hold, since it held for Date, DateTime, Number, Checkbox,
48
+ and Text.
49
+
50
+ ---
51
+
52
+ ## 2. `xsd:picklist` — the documented type that must not be emitted
53
+
54
+ Salesforce's documentation lists `xsd:picklist` for Picklist fields. It is **not a valid XML Schema type**,
55
+ and the platform does not reject it cleanly: instead of a component-level validation error it fails the whole
56
+ deploy server-side with no component diagnostics, taking every other component in the deploy down with it.
57
+
58
+ **Always emit `xsi:type="xsd:string"` for a Picklist field's value; never `xsd:picklist`.** This is the
59
+ canonical typing from the main skill's Section 4 table, so following the generation rule avoids the failure
60
+ entirely.
61
+
62
+ ---
63
+
64
+ ## 3. Full record error catalog
65
+
66
+ | What was wrong | VERBATIM error string |
67
+ |---|---|
68
+ | Date field with `xsi:type="xsd:string"` | `S Date: value not of required type: 2024-01-15` |
69
+ | Checkbox field with `xsi:type="xsd:string"` | `S Checkbox: value not of required type: true` |
70
+ | Checkbox field with `xsi:type="xsd:int"` | `S Checkbox: value not of required type: 1` |
71
+ | Number field with `xsi:type="xsd:boolean"` | `S Number: value not of required type: true` |
72
+ | DateTime field with `xsi:type="xsd:string"` | `S DateTime: value not of required type: 2024-01-15T10:30:00.000Z` |
73
+ | Text field with `xsi:type="xsd:double"` | `S Text: value not of required type: 42.5` |
74
+ | `xsd:double` with non-numeric text | `Error parsing file: 'abc' is not valid for the type xsd:double` |
75
+ | Restricted Picklist, value not in the value set | `S Picklist: bad value for restricted picklist field: NotAValidEntry` |
76
+ | Text(255) given 300 characters | `S Text: data value too large: AAAA…AAAA (max length=255)` |
77
+ | `<value>` with no `xsi:type` | `Error parsing file: Only the following configurations are supported : 1) if the type is mentioned i.g. type="xsi:boolean" 2) With metadata CRUD API with fullName required` |
78
+ | `<value xsi:nil="true"/>` on a **required** field | `Required fields are missing: [ReqText__c]` |
79
+ | Required field omitted entirely | `Required fields are missing: [ReqText__c]` |
80
+ | `<label>` omitted | `Required fields are missing: [MasterLabel]` |
81
+ | `<fullName>` inside a `<values>` block | `Error parsing file: Element {http://soap.sforce.com/2006/04/metadata}fullName invalid at this location in type CustomMetadataValue` |
82
+ | `<field>` naming a nonexistent field | `Probe01__mdt: could not find fields: Does_Not_Exist__c` |
83
+ | Record whose type doesn't exist and isn't in the deploy | `Custom metadata type Probe99__mdt is not available in this organization.` |
84
+ | DeveloperName starting with a digit, containing a space, or containing a hyphen | `Custom Metadata Record Name: The Probe01__mdt API Name can only contain underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.` |
85
+ | DeveloperName over 40 characters | `Value too long for field: fullName maximum length is:40` |
86
+
87
+ ### Exact-text notes
88
+
89
+ These are easy to get wrong when matching strings:
90
+
91
+ - **Errors name the field by its Label, not its API name.** `S Date: …` where the API name is `S_Date__c`.
92
+ Map errors back to files using the label, or the `fullName`/`fileName` on the failure object.
93
+ - The no-`xsi:type` error has **two spaces** after `Error parsing file:`, a **space before the colon** in
94
+ `supported :`, and the typo `i.g.` rather than `e.g.`. Confusingly, the example it prints is
95
+ `type="xsi:boolean"` even though the attribute you must write is `xsi:type="xsd:boolean"`.
96
+ - The `fullName invalid at this location` error has **one** space after `Error parsing file:` and no
97
+ trailing period.
98
+ - The length error is the literal string `S Text: data value too large: `, then the full untruncated value,
99
+ then ` (max length=255)`.
100
+ - The DeveloperName error names the type **with** the `__mdt` suffix even though the filename omits it.
101
+ - `maximum length is:40` has **no space** after the final colon. The limit is on the record DeveloperName.
102
+ - `Required fields are missing: [MasterLabel]` reports the sObject field name, not the metadata element
103
+ name `label`.
104
+
105
+ ---
106
+
107
+ ## 4. Deploy ordering — precise
108
+
109
+ **There is no ordering constraint between a type and its records.** The only rule is that the type and every
110
+ referenced field must *resolve* — either already present in the org, or present in the same deploy.
111
+
112
+ | Case | Result |
113
+ |---|---|
114
+ | Records alone, type and fields already in the org | **Succeeds** |
115
+ | Type + fields + records in one deploy | **Succeeds** |
116
+ | Records alone, type does not exist anywhere | **Fails** — `Custom metadata type <Type>__mdt is not available in this organization.` |
117
+
118
+ The common claim that "the type must be in the same deploy as the records" is **not** a platform rule.
119
+ Including the type is one way to satisfy resolution; deploying it earlier is equally valid. That claim
120
+ usually comes from hitting the third row.
121
+
122
+ Two distinct errors distinguish the failure modes:
123
+
124
+ - `Custom metadata type <Type>__mdt is not available in this organization.` — the **type** is missing.
125
+ - `<Type>__mdt: could not find fields: <Field>__c` — the type exists, the **field** is missing.
126
+
127
+ ---
128
+
129
+ ## 5. Other record body rules
130
+
131
+ - `<protected>` is optional and defaults to `false`. The platform emits `<protected>false</protected>` on
132
+ retrieve.
133
+ - `<value xsi:nil="true"/>` is what the platform itself emits for every unpopulated field on retrieve, so it
134
+ is the canonical way to represent a null. On a required field it is rejected exactly as if the field were
135
+ absent.
136
+ - Omitting `xsi:type` on a non-nil value is **always** fatal, including for string fields.
137
+ - Deploys are atomic. When a batch mixes good and bad components, the good ones appear in
138
+ `componentSuccesses` but are still rolled back — a component listed as a success did not necessarily
139
+ persist.
140
+ - `fileName` in the failure payload is the **MDAPI** path (`customMetadata/X.md`, `objects/Y.object`), never
141
+ the source-format path you wrote. Do not pattern-match it expecting `-meta.xml`.
142
+
143
+ ---
144
+
145
+ ## 6. Filename convention — why the no-suffix form wins
146
+
147
+ Both `Type__mdt.Record.md-meta.xml` and `Type.Record.md-meta.xml` deploy successfully and create real
148
+ records, so the `__mdt` suffix is tolerated rather than required.
149
+
150
+ Salesforce's own tooling settles which to write. After records deployed under **both** spellings existed in
151
+ the org, `sf project retrieve start --metadata CustomMetadata` wrote:
152
+
153
+ ```text
154
+ force-app/main/default/customMetadata/Probe01.Rec1.md-meta.xml
155
+ force-app/main/default/customMetadata/Probe01.Rec2.md-meta.xml
156
+ ```
157
+
158
+ The record originally deployed *with* the suffix came back **without** it. Retrieve normalizes to the
159
+ no-suffix form, so writing the suffixed form guarantees git churn the first time anyone retrieves.
160
+
161
+ The MDAPI `fileName` in the deploy payload agrees: `customMetadata/Probe01.Rec1.md`.
162
+
163
+ Note that the platform still *reports* the type with the suffix in error text — a record file named
164
+ `Probe99.Orphan.md-meta.xml` errors with `Custom metadata type Probe99__mdt is not available in this
165
+ organization.`
166
+
167
+ ---
168
+
169
+ ## 7. Record DeveloperName sanitization — the deterministic transform
170
+
171
+ The DeveloperName is the second filename segment (`<Type>.<DeveloperName>.md-meta.xml`) and the key passed to
172
+ `getInstance('<DeveloperName>')`. The per-label transform is a pure function — the same label always yields
173
+ the same name (no divergence) — but it is **many-to-one**: different labels can map to the same name, so a
174
+ per-batch uniqueness check (step 7) is required on top of it. Apply these steps **in order**:
175
+
176
+ 1. Replace every run of non-alphanumeric characters (spaces, punctuation, accents) with a single `_`.
177
+ 2. Strip any leading `_`.
178
+ 3. If the result now starts with a digit, prefix `X` (Salesforce's own convention for number-leading names).
179
+ 4. Strip any trailing `_`.
180
+ 5. Truncate to 40 characters, then strip a trailing `_` the cut may have introduced.
181
+ 6. If the result is empty (an all-symbol or non-Latin label folds to nothing), emit the deterministic
182
+ fallback `Record_<rowIndex>` (1-based source position) — never an empty name, and never a free-handed literal.
183
+ 7. Across the **whole batch**, enforce uniqueness (see below) — steps 1–6 guarantee a *valid* name, not a
184
+ *distinct* one.
185
+
186
+ Canonical implementation — invoke the skill-local script (same `$LABEL` at a given `$ROW` → same valid name;
187
+ the empty-guard lives **in the script**, not in prose):
188
+
189
+ ```bash
190
+ scripts/sanitize-developer-name.sh "$LABEL" "$ROW"
191
+ ```
192
+
193
+ Equivalent inline form of what the script runs:
194
+
195
+ ```bash
196
+ name=$(printf '%s' "$LABEL" \
197
+ | sed -E 's/[^A-Za-z0-9]+/_/g; s/^_+//; s/^([0-9])/X\1/; s/_+$//' \
198
+ | cut -c1-40 | sed -E 's/_+$//')
199
+ [ -z "$name" ] && name="Record_$ROW" # all-symbol / non-ASCII label collapsed to empty; $ROW = 1-based source position
200
+ printf '%s' "$name"
201
+ ```
202
+
203
+ Worked examples:
204
+
205
+ | Source label | DeveloperName |
206
+ |---|---|
207
+ | `United States` | `United_States` |
208
+ | `Gold (EMEA)` | `Gold_EMEA` |
209
+ | `2024 Q1` | `X2024_Q1` |
210
+ | `ACME — West` | `ACME_West` |
211
+ | `Côte d'Ivoire` | `C_te_d_Ivoire` |
212
+
213
+ Every output satisfies the "Record DeveloperName rules" in the skill: letter-first, alphanumerics and single
214
+ underscores only, no leading/trailing underscore, ≤ 40 characters.
215
+
216
+ **The transform is ASCII-only and lossy for accented / non-Latin labels.** Step 1 folds any character outside
217
+ `[A-Za-z0-9]` to `_` — it does **not** transliterate — so `Côte d'Ivoire → C_te_d_Ivoire` (the `ô` becomes
218
+ `_`) and `中文 → Record_<rowIndex>` (via the step-6 fallback). Because the DeveloperName is the
219
+ `getInstance('<name>')` API key, this is lossy and collision-prone. When a label set relies on non-ASCII
220
+ distinctions, transliterate to ASCII first (e.g. `Côte → Cote`) or have the user supply explicit
221
+ DeveloperNames rather than deriving them.
222
+
223
+ ### Uniqueness across the batch (step 7)
224
+
225
+ Steps 1–6 are **many-to-one**. `United States` and `United-States` both collapse to `United_States` (step 1
226
+ folds every punctuation/accent run to a single `_`), and step 5's 40-char cut makes any two labels sharing
227
+ their first 40 sanitized characters collide as well. Because each record is written to
228
+ `<Type>.<DeveloperName>.md-meta.xml`, a collision **silently overwrites** the earlier row — you lose a record
229
+ with no deploy error.
230
+
231
+ So after deriving names for **all** rows, detect duplicates before writing any file:
232
+
233
+ ```bash
234
+ # pairs.tsv = one line per source row, "<derived_name>\t<source_label>", in source order
235
+ # Print each derived name produced by more than one label, with the source labels that collided:
236
+ sort pairs.tsv | awk -F'\t' '{g[$1]=g[$1] (g[$1]?", ":"") $2; n[$1]++} END{for (k in n) if (n[k]>1) print k" <= "g[k]}'
237
+ # e.g. United_States <= United States, United-States
238
+ ```
239
+
240
+ - **Nothing printed** → names are distinct; write the files.
241
+ - **Anything printed** → do **not** overwrite. Default action: **stop and report the colliding source labels**
242
+ (e.g. `"United States" and "United-States" both → United_States`) so the user renames or supplies distinct
243
+ keys. The DeveloperName is an API key used in `getInstance('<DeveloperName>')`, so silently renaming it can
244
+ break consuming code — surface it rather than guess.
245
+ - **Only if the user asks you to auto-resolve**, append a deterministic, length-aware suffix: keep the first
246
+ occurrence (in source order) unchanged, and for each later collision append `_2`, `_3`, … after truncating
247
+ the base so `base + suffix ≤ 40`. Source order + fixed suffixes keep it deterministic — the same batch
248
+ always produces the same names.
249
+
250
+ Collision example (needs step 7): `United States` → `United_States` and `United-States` → `United_States`;
251
+ after auto-resolution → `United_States` and `United_States_2`.
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env bash
2
+ # Sanitize a CMDT record label into a Metadata API-safe DeveloperName.
3
+ #
4
+ # Usage:
5
+ # scripts/sanitize-developer-name.sh "<LABEL>" [ROW]
6
+ #
7
+ # Args:
8
+ # LABEL Source label / key column value to sanitize.
9
+ # ROW Optional 1-based source-row index. Used only when the label collapses
10
+ # to empty (all-symbol / non-Latin); defaults to 1.
11
+ #
12
+ # Rules (same input → same valid name):
13
+ # 1. Fold every run of non-[A-Za-z0-9] characters to a single _
14
+ # 2. Strip leading _
15
+ # 3. If the result starts with a digit, prefix X
16
+ # 4. Strip trailing _
17
+ # 5. Truncate to 40 characters, then strip a trailing _ the cut may have introduced
18
+ # 6. If empty, emit Record_<ROW> — never an empty name
19
+ #
20
+ # Prints the DeveloperName on stdout. Exits 0 on success, 1 on usage error.
21
+ # ASCII-only and lossy for accented / non-Latin labels — see references/cmdt-records.md §7.
22
+
23
+ set -euo pipefail
24
+
25
+ LABEL="${1-}"
26
+ ROW="${2:-1}"
27
+
28
+ if [ -z "$LABEL" ]; then
29
+ echo "Usage: sanitize-developer-name.sh \"<LABEL>\" [ROW]" >&2
30
+ exit 1
31
+ fi
32
+
33
+ if ! [[ "$ROW" =~ ^[1-9][0-9]*$ ]]; then
34
+ echo "Error: ROW must be a positive integer (got '$ROW')" >&2
35
+ exit 1
36
+ fi
37
+
38
+ name=$(printf '%s' "$LABEL" \
39
+ | sed -E 's/[^A-Za-z0-9]+/_/g; s/^_+//; s/^([0-9])/X\1/; s/_+$//' \
40
+ | cut -c1-40 | sed -E 's/_+$//')
41
+
42
+ if [ -z "$name" ]; then
43
+ name="Record_$ROW"
44
+ fi
45
+
46
+ printf '%s\n' "$name"