@salesforce/afv-skills 1.41.0 → 1.43.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 (288) 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-app-analytics-query/SKILL.md +1 -3
  6. package/skills/dx-devops-conflict-resolve/SKILL.md +205 -0
  7. package/skills/dx-devops-conflict-resolve/examples/conflict-workflows.md +165 -0
  8. package/skills/dx-devops-conflict-resolve/references/deploy-failure-resolution.md +75 -0
  9. package/skills/dx-devops-conflict-resolve/references/git-conflict-resolution.md +124 -0
  10. package/skills/dx-devops-conflict-resolve/scripts/detect-conflicts.sh +91 -0
  11. package/skills/dx-devops-conflict-resolve/scripts/diagnose-deploy-failure.sh +156 -0
  12. package/skills/dx-devops-request-status/SKILL.md +160 -0
  13. package/skills/dx-devops-request-status/examples/polling-workflows.md +101 -0
  14. package/skills/dx-devops-request-status/references/cli-commands.md +176 -0
  15. package/skills/dx-devops-request-status/scripts/poll-status.sh +134 -0
  16. package/skills/dx-devops-test-failures-analyze/SKILL.md +6 -6
  17. package/skills/dx-devops-test-pipeline-configure/SKILL.md +7 -7
  18. package/skills/dx-devops-test-suite-assignments-configure/SKILL.md +6 -6
  19. package/skills/dx-devops-test-suite-run/SKILL.md +6 -6
  20. package/skills/dx-devops-work-item-manage/SKILL.md +2 -0
  21. package/skills/dx-org-manage/references/creating-scratch-org.md +5 -2
  22. package/skills/dx-org-manage/references/creating-snapshot.md +1 -0
  23. package/skills/dx-org-shape-manage/SKILL.md +152 -0
  24. package/skills/dx-org-shape-manage/examples/create_error_output.json +9 -0
  25. package/skills/dx-org-shape-manage/examples/create_success_output.json +9 -0
  26. package/skills/dx-org-shape-manage/examples/delete_output.json +11 -0
  27. package/skills/dx-org-shape-manage/examples/list_inactive_output.json +32 -0
  28. package/skills/dx-org-shape-manage/examples/list_output.json +24 -0
  29. package/skills/dx-org-shape-manage/references/cli_flags.md +135 -0
  30. package/skills/dx-org-switch/SKILL.md +2 -2
  31. package/skills/dx-org-trial-expiration-check/SKILL.md +2 -0
  32. package/skills/dx-pkg-post-install-configure/SKILL.md +3 -0
  33. package/skills/education-cloud-multi-campus-configure/SKILL.md +211 -0
  34. package/skills/education-cloud-multi-campus-configure/examples/hierarchy_visualization.md +174 -0
  35. package/skills/education-cloud-multi-campus-configure/examples/output_examples.md +54 -0
  36. package/skills/education-cloud-multi-campus-configure/examples/sample_hierarchy_input.csv +29 -0
  37. package/skills/education-cloud-multi-campus-configure/examples/sample_hierarchy_input_edgecases.csv +16 -0
  38. package/skills/education-cloud-multi-campus-configure/references/account_recordtype_prerequisite.md +44 -0
  39. package/skills/education-cloud-multi-campus-configure/references/delta_computation.md +33 -0
  40. package/skills/education-cloud-multi-campus-configure/references/error_handling.md +198 -0
  41. package/skills/education-cloud-multi-campus-configure/references/foundation_prerequisites.md +54 -0
  42. package/skills/education-cloud-multi-campus-configure/references/gotchas.md +16 -0
  43. package/skills/education-cloud-multi-campus-configure/references/hierarchy_parsing_rules.md +133 -0
  44. package/skills/education-cloud-multi-campus-configure/references/mcp-invocation.md +75 -0
  45. package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/SKILL.md +1 -1
  46. package/skills/experience-cms-brand-apply/SKILL.md +4 -1
  47. package/skills/experience-cms-brand-create/SKILL.md +197 -0
  48. package/skills/experience-cms-brand-create/assets/brand-template.json +329 -0
  49. package/skills/experience-cms-brand-create/references/brand-anatomy.md +120 -0
  50. package/skills/experience-cms-brand-create/references/disk-contract.md +84 -0
  51. package/skills/experience-cms-content-generate/SKILL.md +190 -0
  52. package/skills/experience-cms-content-generate/assets/display-formats.md +84 -0
  53. package/skills/experience-cms-content-generate/assets/payloads/create-content-bulk.json +11 -0
  54. package/skills/experience-cms-content-generate/assets/payloads/create-content-single.json +11 -0
  55. package/skills/experience-cms-content-generate/assets/payloads/publish-content.json +4 -0
  56. package/skills/experience-cms-content-generate/assets/payloads/update-content.json +9 -0
  57. package/skills/experience-cms-content-generate/assets/questions.md +241 -0
  58. package/skills/experience-cms-content-generate/examples/create-content-call.md +81 -0
  59. package/skills/experience-cms-content-generate/references/bulk-batching.md +56 -0
  60. package/skills/experience-cms-content-generate/references/content-type-classification.md +88 -0
  61. package/skills/experience-cms-content-generate/references/content-write-tool.md +95 -0
  62. package/skills/experience-cms-content-generate/references/delegation-protocol.md +37 -0
  63. package/skills/experience-cms-content-generate/references/edit-publish-workflow.md +63 -0
  64. package/skills/experience-cms-content-generate/references/error-recovery.md +72 -0
  65. package/skills/experience-cms-content-generate/references/identifier-resolution.md +26 -0
  66. package/skills/experience-cms-content-generate/references/intent-routing.md +45 -0
  67. package/skills/experience-cms-content-generate/references/principles.md +19 -0
  68. package/skills/experience-cms-content-generate/references/ux-rules.md +68 -0
  69. package/skills/experience-cms-content-generate/references/workspace-resolution.md +33 -0
  70. package/skills/experience-cms-content-type-generate/SKILL.md +449 -0
  71. package/skills/experience-cms-content-type-generate/assets/discovery-prompts.md +79 -0
  72. package/skills/experience-cms-content-type-generate/assets/schema-example.json +70 -0
  73. package/skills/experience-cms-content-type-generate/references/agent-checklist.md +50 -0
  74. package/skills/experience-cms-content-type-generate/references/anti-patterns.md +39 -0
  75. package/skills/experience-cms-content-type-generate/references/deployment-errors.md +27 -0
  76. package/skills/experience-cms-content-type-generate/references/discovery-details.md +106 -0
  77. package/skills/experience-cms-content-type-generate/references/discovery-query-rules.md +85 -0
  78. package/skills/experience-cms-content-type-generate/references/edit-fields-loop.md +48 -0
  79. package/skills/experience-cms-content-type-generate/references/pre-deploy-checklist.md +21 -0
  80. package/skills/experience-cms-content-type-generate/references/retrieve-and-reconcile.md +105 -0
  81. package/skills/experience-cms-content-type-generate/references/schema-rules.md +51 -0
  82. package/skills/experience-cms-content-type-generate/references/schema-summary-format.md +60 -0
  83. package/skills/experience-lds-graphql-generate/SKILL.md +4 -0
  84. package/skills/experience-lwc-accessibility-jest-run/SKILL.md +79 -0
  85. package/skills/experience-lwc-accessibility-jest-run/references/running-sa11y-jest-tests.md +205 -0
  86. package/skills/experience-lwc-design-generate/SKILL.md +5 -4
  87. package/skills/experience-lwc-generate/SKILL.md +10 -9
  88. package/skills/experience-ui-bundle-deploy/references/dev-preview.md +21 -0
  89. package/skills/experience-ui-bundle-deploy/references/social-login.md +1 -0
  90. package/skills/experience-ui-bundle-file-upload-generate/SKILL.md +6 -6
  91. package/skills/experience-ui-bundle-localize/SKILL.md +30 -37
  92. package/skills/experience-ui-bundle-localize/references/gotchas.md +23 -7
  93. package/skills/experience-ui-bundle-localize/references/i18n-setup.md +48 -4
  94. package/skills/experience-ui-bundle-localize/references/label-xml.md +22 -8
  95. package/skills/experience-ui-bundle-localize/references/verifying.md +39 -11
  96. package/skills/experience-ui-bundle-localize/scripts/detect-bundle-type.sh +118 -15
  97. package/skills/experience-ui-bundle-localize/scripts/tests/test-detect-bundle-type.sh +187 -0
  98. package/skills/experience-ui-bundle-mfa-configure/SKILL.md +13 -2
  99. package/skills/experience-ui-bundle-mfa-configure/references/social-login.md +1 -0
  100. package/skills/experience-ui-bundle-project-generate/SKILL.md +2 -2
  101. package/skills/integration-connectivity-generate/SKILL.md +11 -10
  102. package/skills/integration-eventing-cdc-configure/SKILL.md +6 -6
  103. package/skills/integration-eventing-subscription-configure/SKILL.md +6 -5
  104. package/skills/mobile-platform-native-capabilities-integrate/SKILL.md +2 -2
  105. package/skills/mobile-platform-offline-validate/scripts/package.json +1 -1
  106. package/skills/platform-agentexchange-partner-offers-configure/SKILL.md +8 -8
  107. package/skills/platform-custom-application-generate/SKILL.md +2 -0
  108. package/skills/platform-custom-field-generate/SKILL.md +8 -6
  109. package/skills/platform-custom-metadata-type-generate/SKILL.md +460 -0
  110. package/skills/platform-custom-metadata-type-generate/references/cmdt-records.md +251 -0
  111. package/skills/platform-custom-metadata-type-generate/scripts/sanitize-developer-name.sh +46 -0
  112. package/skills/platform-custom-setting-generate/SKILL.md +419 -0
  113. package/skills/platform-dataspace-access-configure/SKILL.md +3 -3
  114. package/skills/platform-sharing-owd-configure/SKILL.md +3 -0
  115. package/skills/platform-value-set-generate/SKILL.md +2 -0
  116. package/skills/service-agentforce-channel-configure/SKILL.md +29 -20
  117. package/skills/service-agentforce-channel-configure/assets/BotEmailDefinition.botEmailDefinition-meta.xml +36 -0
  118. package/skills/service-agentforce-channel-configure/assets/email/unfiled$public/AgentforceForServiceEmailTemplate.email +17 -0
  119. package/skills/service-agentforce-channel-configure/assets/email/unfiled$public/AgentforceForServiceEmailTemplate.email-meta.xml +29 -0
  120. package/skills/service-agentforce-channel-configure/assets/mdapi-package.xml +25 -0
  121. package/skills/service-agentforce-channel-configure/assets/settings-mdapi-package.xml +30 -0
  122. package/skills/service-agentforce-channel-configure/references/agent-wiring.md +20 -0
  123. package/skills/service-agentforce-channel-configure/references/botemaildefinition.md +107 -0
  124. package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +203 -50
  125. package/skills/service-agentforce-channel-configure/references/channel-types.md +30 -3
  126. package/skills/service-agentforce-channel-configure/references/queue-resolution.md +17 -8
  127. package/skills/service-agentforce-channel-configure/references/routing-flow.md +14 -3
  128. package/skills/service-agentforce-channel-configure/scripts/validate-botemaildefinition.py +126 -0
  129. package/skills/service-agentforce-channel-configure/scripts/validate-emailtemplate.py +133 -0
  130. package/skills/service-de-channel-activate/SKILL.md +271 -0
  131. package/skills/service-de-channel-activate/references/gotchas.md +31 -0
  132. package/skills/service-de-channel-activate/references/phone-verification.md +96 -0
  133. package/skills/service-de-channel-activate/references/worked-examples.md +14 -0
  134. package/skills/service-de-channel-consent-configure/SKILL.md +230 -0
  135. package/skills/service-de-channel-consent-configure/references/gotchas.md +41 -0
  136. package/skills/service-de-channel-consent-configure/references/language-keywords.md +84 -0
  137. package/skills/service-de-channel-consent-configure/references/worked-examples.md +134 -0
  138. package/skills/service-de-channel-create/SKILL.md +369 -0
  139. package/skills/service-de-channel-create/references/apple.md +59 -0
  140. package/skills/service-de-channel-create/references/connect-insert.md +84 -0
  141. package/skills/service-de-channel-create/references/facebook.md +154 -0
  142. package/skills/service-de-channel-create/references/line.md +66 -0
  143. package/skills/service-de-channel-create/references/sms.md +98 -0
  144. package/skills/service-de-channel-create/references/whatsapp.md +98 -0
  145. package/skills/service-de-channel-create/references/worked-examples.md +70 -0
  146. package/skills/service-de-channel-routing-configure/SKILL.md +345 -0
  147. package/skills/service-de-channel-routing-configure/references/asa-routing.md +90 -0
  148. package/skills/service-de-channel-routing-configure/references/gotchas.md +27 -0
  149. package/skills/service-de-channel-routing-configure/references/queue-creation.md +123 -0
  150. package/skills/service-de-channel-routing-configure/references/target-locate.md +98 -0
  151. package/skills/service-de-channel-routing-configure/references/worked-examples.md +174 -0
  152. package/skills/service-de-headless-channel-configure/SKILL.md +305 -0
  153. package/skills/service-de-headless-channel-configure/references/gotchas.md +27 -0
  154. package/skills/service-de-headless-channel-configure/references/inputs.md +49 -0
  155. package/skills/service-de-headless-channel-configure/references/output-envelopes.md +53 -0
  156. package/skills/service-de-headless-channel-configure/references/partial-success.md +24 -0
  157. package/skills/service-de-headless-channel-configure/references/terms-and-conditions.md +54 -0
  158. package/skills/service-de-headless-channel-configure/references/worked-examples.md +108 -0
  159. package/skills/service-de-waba-integrate/SKILL.md +227 -0
  160. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +29 -0
  161. package/skills/service-digital-engagement-messaging-site-integrate/SKILL.md +10 -9
  162. package/skills/service-digital-engagement-messaging-site-integrate/references/lwr_patch.md +39 -21
  163. package/skills/service-digital-engagement-messaging-site-integrate/scripts/patch_lwr_bundle.sh +157 -96
  164. package/skills/service-email-to-case-configure/SKILL.md +190 -0
  165. package/skills/service-email-to-case-configure/assets/CaseSettings.settings-meta.xml +45 -0
  166. package/skills/service-email-to-case-configure/examples/CaseSettings-two-addresses.settings-meta.xml +36 -0
  167. package/skills/service-email-to-case-configure/references/apply-mechanics.md +73 -0
  168. package/skills/service-email-to-case-configure/references/routing_address_reference.md +73 -0
  169. package/skills/service-email-to-case-configure/references/troubleshooting.md +25 -0
  170. package/skills/service-email-to-case-configure/scripts/apply-casesettings.py +1315 -0
  171. package/skills/service-email-to-case-configure/scripts/check-agent-email-capability.sh +26 -0
  172. package/skills/service-email-to-case-configure/scripts/tests/__init__.py +0 -0
  173. package/skills/service-email-to-case-configure/scripts/tests/_bootstrap.py +45 -0
  174. package/skills/service-email-to-case-configure/scripts/tests/_fakeorg.py +366 -0
  175. package/skills/service-email-to-case-configure/scripts/tests/_run.py +84 -0
  176. package/skills/service-email-to-case-configure/scripts/tests/test_apply_org_scenarios.py +655 -0
  177. package/skills/service-email-to-case-configure/scripts/tests/test_get_session.py +134 -0
  178. package/skills/service-email-to-case-configure/scripts/tests/test_new_capabilities.py +193 -0
  179. package/skills/service-email-to-case-configure/scripts/tests/test_validate_casesettings.py +170 -0
  180. package/skills/service-email-to-case-configure/scripts/validate-casesettings.py +229 -0
  181. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +33 -15
  182. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +63 -47
  183. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +17 -12
  184. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/references/cli-invocation.md +5 -3
  185. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/classify-enable-plan.mjs +11 -3
  186. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +8 -6
  187. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/references/cli-invocation.md +3 -3
  188. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/scripts/classify-readiness.mjs +11 -3
  189. package/skills/service-itsm-agentic-setup-configure/SKILL.md +5 -5
  190. package/skills/service-itsm-agentic-setup-configure/examples/output-templates.md +5 -5
  191. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +2 -2
  192. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +11 -7
  193. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +20 -7
  194. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +10 -6
  195. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/action-availability.md +7 -7
  196. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +11 -7
  197. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/build-create-body.mjs +24 -17
  198. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-action-availability.mjs +98 -58
  199. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +20 -7
  200. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/strip-release-management.mjs +176 -0
  201. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +19 -19
  202. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/cli-invocation.md +3 -4
  203. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/helper-contracts.md +6 -6
  204. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/permset-topology.md +3 -10
  205. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-permset-availability.mjs +7 -9
  206. package/skills/service-itsm-incident-mgmt-configure/SKILL.md +2 -0
  207. package/skills/service-itsm-incident-priority-configure/SKILL.md +15 -12
  208. package/skills/service-itsm-incident-priority-configure/examples/matrix-operations.md +27 -1
  209. package/skills/service-itsm-incident-priority-configure/references/sf-cli-invocation.md +37 -6
  210. package/skills/service-native-voice-recording-transcription-configure/SKILL.md +146 -0
  211. package/skills/service-native-voice-recording-transcription-configure/assets/confirmation-output.json +16 -0
  212. package/skills/service-native-voice-recording-transcription-configure/assets/package.xml +22 -0
  213. package/skills/service-native-voice-recording-transcription-configure/references/thunderbird-voice-settings.md +101 -0
  214. package/skills/service-native-voice-recording-transcription-configure/scripts/enable-recording-transcription.sh +181 -0
  215. package/skills/data360-activate/README.md +0 -38
  216. package/skills/data360-activate/SKILL.md +0 -127
  217. package/skills/data360-connect/README.md +0 -57
  218. package/skills/data360-connect/SKILL.md +0 -163
  219. package/skills/data360-connect/examples/connections/heroku-postgres.json +0 -15
  220. package/skills/data360-connect/examples/connections/ingest-api-connection.json +0 -5
  221. package/skills/data360-connect/examples/connections/ingest-api-schema.json +0 -31
  222. package/skills/data360-connect/examples/connections/redshift.json +0 -16
  223. package/skills/data360-connect/examples/connections/sharepoint-unstructured.json +0 -20
  224. package/skills/data360-connect/examples/connections/snowflake-connection.json +0 -42
  225. package/skills/data360-harmonize/README.md +0 -31
  226. package/skills/data360-harmonize/SKILL.md +0 -126
  227. package/skills/data360-orchestrate/README.md +0 -120
  228. package/skills/data360-orchestrate/SKILL.md +0 -263
  229. package/skills/data360-orchestrate/assets/definitions/activation-target.template.json +0 -5
  230. package/skills/data360-orchestrate/assets/definitions/activation.template.json +0 -7
  231. package/skills/data360-orchestrate/assets/definitions/calculated-insight.template.json +0 -7
  232. package/skills/data360-orchestrate/assets/definitions/data-action-target.template.json +0 -5
  233. package/skills/data360-orchestrate/assets/definitions/data-action.template.json +0 -5
  234. package/skills/data360-orchestrate/assets/definitions/data-graph.template.json +0 -21
  235. package/skills/data360-orchestrate/assets/definitions/data-stream.template.json +0 -55
  236. package/skills/data360-orchestrate/assets/definitions/dmo.template.json +0 -17
  237. package/skills/data360-orchestrate/assets/definitions/identity-resolution.template.json +0 -30
  238. package/skills/data360-orchestrate/assets/definitions/mapping.template.json +0 -14
  239. package/skills/data360-orchestrate/assets/definitions/relationship.template.json +0 -12
  240. package/skills/data360-orchestrate/assets/definitions/search-index.template.json +0 -9
  241. package/skills/data360-orchestrate/assets/definitions/segment.template.json +0 -16
  242. package/skills/data360-orchestrate/references/feature-readiness.md +0 -157
  243. package/skills/data360-orchestrate/references/plugin-setup.md +0 -138
  244. package/skills/data360-orchestrate/scripts/bootstrap-plugin.sh +0 -53
  245. package/skills/data360-orchestrate/scripts/diagnose-org.mjs +0 -511
  246. package/skills/data360-orchestrate/scripts/generate-manifest.mjs +0 -68
  247. package/skills/data360-orchestrate/scripts/verify-plugin.sh +0 -58
  248. package/skills/data360-prepare/README.md +0 -50
  249. package/skills/data360-prepare/SKILL.md +0 -203
  250. package/skills/data360-prepare/examples/ingestion-api/.env.example +0 -8
  251. package/skills/data360-prepare/examples/ingestion-api/README.md +0 -48
  252. package/skills/data360-prepare/examples/ingestion-api/send-data.py +0 -144
  253. package/skills/data360-query/README.md +0 -43
  254. package/skills/data360-query/SKILL.md +0 -128
  255. package/skills/data360-query/examples/search-indexes/hybrid-structured.json +0 -44
  256. package/skills/data360-query/examples/search-indexes/vector-knowledge.json +0 -43
  257. package/skills/data360-segment/README.md +0 -35
  258. package/skills/data360-segment/SKILL.md +0 -123
  259. package/skills/service-helpagent-coordinate/references/channel-help-portal.md +0 -22
  260. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-1-1-non-text-content.md +0 -0
  261. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-1-i-lists.md +0 -0
  262. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-1-ii-tables.md +0 -0
  263. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-1-iii-form-labels.md +0 -0
  264. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-1-iv-regions.md +0 -0
  265. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-1-v-groups.md +0 -0
  266. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-3-5-identify-input.md +0 -0
  267. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-1-4-3-contrast.md +0 -0
  268. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-1-1-keyboard.md +0 -0
  269. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-4-4-link-purpose.md +0 -0
  270. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-4-6-headings-labels.md +0 -0
  271. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-5-1-pointer-gestures.md +0 -0
  272. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-5-2-pointer-cancellation.md +0 -0
  273. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-5-3-label-in-name.md +0 -0
  274. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-2-5-7-dragging-movement.md +0 -0
  275. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-3-2-1-on-focus.md +0 -0
  276. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-3-2-2-on-input.md +0 -0
  277. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-3-3-1-error-identification.md +0 -0
  278. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-3-3-2-labels-instructions.md +0 -0
  279. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-3-3-3-error-suggestion.md +0 -0
  280. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-4-1-2-i-name.md +0 -0
  281. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-4-1-2-ii-role.md +0 -0
  282. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/reviewers/sc-4-1-2-iii-value.md +0 -0
  283. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/vision/sc-1-1-1-non-text-content.md +0 -0
  284. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/vision/sc-1-4-1-use-of-color.md +0 -0
  285. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/vision/sc-1-4-10-resize-reflow.md +0 -0
  286. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/vision/sc-1-4-11-non-text-contrast.md +0 -0
  287. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/references/vision/sc-1-4-3-contrast.md +0 -0
  288. /package/skills/{experience-lwc-accessibility-validate → experience-accessibility-validate}/scripts/contrast-ratio.py +0 -0
@@ -0,0 +1,345 @@
1
+ ---
2
+ name: service-de-channel-routing-configure
3
+ description: "Configure routing on a newly-inserted Enhanced `MessagingChannel` so that activation will accept it. Given a `{CHANNEL_ID}`, walks the user through picking a routing type (Omni-Channel Queue, Omni-Flow, Agentforce Service Agent, Digital Worker, or direct User), locates or provisions the routing target, then PATCHes the channel's `SessionHandlerId` (plus `FallbackQueueId` where required) to it. Use between the insertion skill and the activation skill — activation fails server-side with `nullQueueId` / `LiveMessageSetupException` if no valid `SessionHandlerId` is set on the channel."
4
+ metadata:
5
+ version: "1.1"
6
+ minApiVersion: "67.0"
7
+ domains: ["Service"]
8
+ cliTools:
9
+ - tool: ["node"]
10
+ semver: ">=20.0.0"
11
+ - tool: ["sf"]
12
+ semver: ">=2.0.0"
13
+ relatedSkills:
14
+ - "service-de-channel-activate"
15
+ - "service-de-channel-consent-configure"
16
+ - "service-de-channel-create"
17
+ - "service-de-headless-channel-configure"
18
+ ---
19
+
20
+ # Configuring Channel Routing
21
+
22
+ ## What this skill does
23
+
24
+ Ensures a `MessagingChannel` has valid routing configured before activation. The channel's `SessionHandler` field is a **polymorphic foreign key** (verified against `MessagingChannel.entity.xml`, `domain="Queue, FlowDefinition, User, BotDefinition, AgenticCtxtDecorDefinition"`) — it names *who* the channel routes incoming sessions to. Some targets additionally require a `FallbackQueue` (an Omni-Channel Queue that catches sessions the primary target can't take).
25
+
26
+ These skills create **Enhanced** channels (`PlatformType=Enhanced`, SCRT2). All five SessionHandler domains are writable on Enhanced channels. (A Standard/SCRT1 channel would only accept a Flow as SessionHandler — the server rejects any other domain with "Only flows of type Omni-Channel are supported". These skills never create Standard channels, so that path isn't handled here.)
27
+
28
+ **Where this fits:** the channel is inserted by `service-de-channel-create` (or a per-type leaf); this skill sets routing; `service-de-channel-consent-configure` sets consent; then `service-de-channel-activate` flips it live — activation requires both routing and consent. The `service-de-headless-channel-configure` orchestrator runs all four in sequence.
29
+
30
+ Supported routing types — all set `SessionHandlerId`, some also set `FallbackQueueId`:
31
+
32
+ | Type | SessionHandler target | Id prefix | FallbackQueue |
33
+ | --- | --- | --- | --- |
34
+ | **Omni-Channel Queue** | `Group` (Type=Queue) | `00G` | must be **null** |
35
+ | **Omni-Flow** | `FlowDefinition` (ProcessType=RoutingFlow) | `300` | **required** |
36
+ | **Agentforce Service Agent (ASA)** | `BotDefinition` (Type=ExternalCopilot) | `0Xx` | **required** |
37
+ | **Digital Worker** | `AgenticCtxtDecorDefinition` | `1iE` | **required** |
38
+ | **User** | `User` (with a RoutingConfiguration) | `005` | must be **null** |
39
+
40
+ Provisioning behavior:
41
+ - **Queue** — pick an existing `MessagingSession`-capable Queue, or create a new Queue + QueueRoutingConfig via Metadata API.
42
+ - **Flow / ASA / Digital Worker / User** — locate an existing eligible target and PATCH it. These skills do **not** create Flows, bots, digital workers, or users — if none eligible exist, the skill reports the precondition and points the user at Setup.
43
+
44
+ ## Reference File Index
45
+
46
+ | Reference file | Load when |
47
+ | --- | --- |
48
+ | `references/queue-creation.md` | The user picked "create a new queue" on the Queue routing path — full Metadata API scaffold → deploy → ID lookup → optional member add. |
49
+ | `references/target-locate.md` | You need the per-domain SOQL to locate and validate an eligible target (Queue, Flow, ASA, Digital Worker, User) and the FallbackQueue requirement matrix. |
50
+ | `references/asa-routing.md` | The user picked ASA (Agentforce Service Agent) routing — precondition check, enumerating live ASAs, and selection. |
51
+ | `references/gotchas.md` | Troubleshooting an unexpected result, or before modifying this skill — the known gotchas. |
52
+ | `references/worked-examples.md` | You want a reference run of the reuse-existing-queue, create-new-queue, Flow, or ASA paths. |
53
+
54
+ ## When NOT to use this skill
55
+
56
+ - **The channel already has `SessionHandlerId` or `FallbackQueueId` set.** This skill no-ops and tells you — nothing to do. Proceed to activation.
57
+ - **The channel doesn't exist yet.** Run the insertion skill first; this skill expects a real `MessagingChannel.Id`.
58
+ - **You want to replace existing routing.** Safer to clear `SessionHandlerId` manually in the UI, then re-run this skill. The no-op check is a guardrail, not a limitation worth bypassing automatically.
59
+
60
+ ## Inputs (from caller)
61
+
62
+ - `{CHANNEL_ID}` — a 15- or 18-char `MessagingChannel.Id` (prefix `0Mj`). The channel must already exist.
63
+ - `{ORG_ALIAS}` — optional; the `sf` CLI target-org alias. Default: whatever `sf config get target-org` returns. All SOQL, PATCH, and Metadata deploys run against this org.
64
+
65
+ ## Output (to caller)
66
+
67
+ One of:
68
+
69
+ **Success — no change needed:**
70
+ ```json
71
+ {"ok": true, "noop": true, "routingType": "queue|flow|asa|digital_worker|user", "sessionHandlerId": "00G...|300...|0Xx...|1iE...|005...", "fallbackQueueId": "00G...|null", "targetName": "...", "message": "Routing already configured"}
72
+ ```
73
+
74
+ **Success — Queue routing configured:**
75
+ ```json
76
+ {"ok": true, "routingType": "queue", "sessionHandlerId": "00G...", "fallbackQueueId": null, "queueName": "...", "queueDeveloperName": "...", "created": true|false}
77
+ ```
78
+
79
+ **Success — Flow routing configured:**
80
+ ```json
81
+ {"ok": true, "routingType": "flow", "sessionHandlerId": "300...", "fallbackQueueId": "00G...", "flowName": "...", "flowDeveloperName": "...", "created": false}
82
+ ```
83
+
84
+ **Success — ASA routing configured:**
85
+ ```json
86
+ {"ok": true, "routingType": "asa", "sessionHandlerId": "0Xx...", "fallbackQueueId": "00G...", "asaName": "...", "asaDeveloperName": "...", "botUserId": "005...", "botVersionId": "0X9...", "created": false}
87
+ ```
88
+
89
+ **Success — Digital Worker routing configured:**
90
+ ```json
91
+ {"ok": true, "routingType": "digital_worker", "sessionHandlerId": "1iE...", "fallbackQueueId": "00G...", "workerName": "...", "created": false}
92
+ ```
93
+
94
+ **Success — User routing configured:**
95
+ ```json
96
+ {"ok": true, "routingType": "user", "sessionHandlerId": "005...", "fallbackQueueId": null, "userName": "...", "created": false}
97
+ ```
98
+
99
+ **Precondition not met:**
100
+ ```json
101
+ {"ok": false, "kind": "no-eligible-target", "routingType": "flow|asa|digital_worker|user", "hint": "no eligible <target> found on this org — <how to create one in Setup>, then re-run this skill"}
102
+ {"ok": false, "kind": "no-fallback-queue", "hint": "Flow/ASA/Digital Worker routing requires a FallbackQueue but no MessagingSession-capable queue exists — create one (Queue routing path) first"}
103
+ {"ok": false, "kind": "asa-not-supported", "hint": "this org doesn't have BotDefinition (Agentforce not licensed); use Queue routing instead"}
104
+ {"ok": false, "kind": "standard-channel", "hint": "this is a Standard (SCRT1) channel — only Flow routing is supported; these skills only create Enhanced channels, so this is unexpected"}
105
+ ```
106
+
107
+ **Failure:**
108
+ ```json
109
+ {"ok": false, "kind": "metadata-deploy-failed", "message": "..."}
110
+ {"ok": false, "kind": "patch-failed", "message": "..."}
111
+ {"ok": false, "kind": "verify-failed", "hint": "PATCH returned success but re-read shows SessionHandlerId still null — permission or trigger issue"}
112
+ ```
113
+
114
+ The PATCH failure `message` often carries the server-side validation error verbatim (from `MessagingChannelFunctionsHelper.validateSessionHandler`). Surface it — it tells the user exactly which linking rule failed. Common ones: `MissingFallbackQueueForFlowRouting` / `...ForAsaRouting` / `...ForDigitalWorkerRouting` (FallbackQueue required but null), `UnsupportedFallbackQueue` (FallbackQueue set on a Queue/User path where it must be null), `InvalidSessionHandlerFlowType` (Flow isn't ProcessType=RoutingFlow, **or** the channel is Standard/SCRT1), `NoRoutingConfigDefined` (User has no RoutingConfiguration).
115
+
116
+ ---
117
+
118
+ ## Stage 1: Read current routing state
119
+
120
+ Query the channel. If it already has `SessionHandlerId` OR `FallbackQueueId`, no-op. Otherwise, continue.
121
+
122
+ ```bash
123
+ sf data query --target-org '{ORG_ALIAS}' \
124
+ --query "SELECT Id, DeveloperName, SessionHandlerId, FallbackQueueId FROM MessagingChannel WHERE Id = '{CHANNEL_ID}'" \
125
+ --json > /tmp/ccr-channel.json
126
+ ```
127
+
128
+ Parse with `node -e` or `jq`. If the record is missing — halt with `Error: Channel {CHANNEL_ID} not found — check the id, or run the insertion skill first.`
129
+
130
+ If `SessionHandlerId` is non-null, branch on the Id prefix to figure out what the existing routing target is, then no-op with the right envelope. The prefix maps 1:1 to the SessionHandler domain (verified against `MessagingChannel.entity.xml`):
131
+
132
+ | Prefix | Domain / Target | Lookup query | routingType |
133
+ | --- | --- | --- | --- |
134
+ | `00G` | `Group` (Type=Queue) | `SELECT Id, Name, DeveloperName FROM Group WHERE Id='<sh>' AND Type='Queue'` | `queue` |
135
+ | `300` | `FlowDefinition` | `SELECT DurableId, Label, ApiName FROM FlowDefinitionView WHERE DurableId='<sh>'` | `flow` |
136
+ | `0Xx` | `BotDefinition` (ASA) | `SELECT Id, DeveloperName, MasterLabel, AgentType FROM BotDefinition WHERE Id='<sh>'` | `asa` |
137
+ | `1iE` | `AgenticCtxtDecorDefinition` (Digital Worker) | `SELECT Id, DeveloperName, MasterLabel FROM AgenticCtxtDecorDefinition WHERE Id='<sh>'` | `digital_worker` |
138
+ | `005` | `User` | `SELECT Id, Name FROM User WHERE Id='<sh>'` | `user` |
139
+
140
+ ```bash
141
+ SESSION_HANDLER_ID="$(node -e 'console.log(JSON.parse(require("fs").readFileSync("/tmp/ccr-channel.json","utf8")).result.records[0].SessionHandlerId)')"
142
+ PREFIX="${SESSION_HANDLER_ID:0:3}"
143
+ case "$PREFIX" in
144
+ 00G) sf data query --target-org '{ORG_ALIAS}' --query "SELECT Id, Name, DeveloperName FROM Group WHERE Id = '$SESSION_HANDLER_ID' AND Type = 'Queue'" --json > /tmp/ccr-noop-target.json ;;
145
+ 300) sf data query --target-org '{ORG_ALIAS}' --query "SELECT DurableId, Label, ApiName FROM FlowDefinitionView WHERE DurableId = '$SESSION_HANDLER_ID'" --json > /tmp/ccr-noop-target.json ;;
146
+ 0Xx) sf data query --target-org '{ORG_ALIAS}' --query "SELECT Id, DeveloperName, MasterLabel, AgentType FROM BotDefinition WHERE Id = '$SESSION_HANDLER_ID'" --json > /tmp/ccr-noop-target.json ;;
147
+ 1iE) sf data query --target-org '{ORG_ALIAS}' --query "SELECT Id, DeveloperName, MasterLabel FROM AgenticCtxtDecorDefinition WHERE Id = '$SESSION_HANDLER_ID'" --json > /tmp/ccr-noop-target.json ;;
148
+ 005) sf data query --target-org '{ORG_ALIAS}' --query "SELECT Id, Name FROM User WHERE Id = '$SESSION_HANDLER_ID'" --json > /tmp/ccr-noop-target.json ;;
149
+ *) echo "{\"records\":[{\"Id\":\"$SESSION_HANDLER_ID\"}]}" > /tmp/ccr-noop-target.json ;;
150
+ esac
151
+ ```
152
+
153
+ Report the success-noop envelope (include the existing `FallbackQueueId` from the Stage 1 read) and return.
154
+
155
+ If `FallbackQueueId` is non-null but `SessionHandlerId` is null — still no-op. That's a partially-configured Flow/ASA state; don't touch it, but flag it in the envelope `message` (`"FallbackQueue set but SessionHandler null — incomplete routing, review in Setup"`) since activation will still fail readiness without a SessionHandler.
156
+
157
+ ---
158
+
159
+ ## Stage 2: Confirm the channel is Enhanced, then choose routing type
160
+
161
+ First confirm `PlatformType`. The Stage 1 read didn't include it — add it, or re-query:
162
+
163
+ ```bash
164
+ sf data query --target-org '{ORG_ALIAS}' \
165
+ --query "SELECT Id, PlatformType FROM MessagingChannel WHERE Id = '{CHANNEL_ID}'" --json > /tmp/ccr-platform.json
166
+ ```
167
+
168
+ If `PlatformType != 'Enhanced'` (i.e. Standard/SCRT1), only Flow routing is writable. These skills only create Enhanced channels, so a Standard channel here is unexpected — emit `{ok:false, kind:"standard-channel", ...}` and stop rather than guessing.
169
+
170
+ Then ask the user (via a prompt — do NOT auto-pick):
171
+
172
+ ```text
173
+ The MessagingChannel '{developerName}' ({CHANNEL_ID}) has no routing configured.
174
+ Which routing type do you want?
175
+
176
+ 1) queue — Omni-Channel queue routing
177
+ 2) flow — Omni-Flow (RoutingFlow) + fallback queue
178
+ 3) asa — Agentforce Service Agent (requires Agentforce license) + fallback queue
179
+ 4) digital_worker — Digital Worker (Agentic) + fallback queue
180
+ 5) user — Direct to a specific user (requires a RoutingConfiguration on the user)
181
+
182
+ Pick [1-5]:
183
+ ```
184
+
185
+ Branch on the user's pick. For every non-queue path, **load `references/target-locate.md`** — it holds the per-domain locate SOQL, eligibility filters, FallbackQueue rules, and exact PATCH shape:
186
+
187
+ - **1 (queue)** — continue to Stage 3-Queue below.
188
+ - **2 (flow)** — locate an eligible `FlowDefinition` (ProcessType=RoutingFlow, active version) + a FallbackQueue, then Stage 5.
189
+ - **3 (asa)** — continue to Stage 3-ASA; ASA requires a FallbackQueue too.
190
+ - **4 (digital_worker)** — locate an eligible `AgenticCtxtDecorDefinition` + a FallbackQueue, then Stage 5.
191
+ - **5 (user)** — locate a `User` that has a RoutingConfiguration, then Stage 5.
192
+
193
+ If a path finds no eligible target, emit `{ok:false, kind:"no-eligible-target", routingType, hint}` (see `references/target-locate.md` for the per-domain Setup pointer) and return — do not fabricate an id.
194
+
195
+ ---
196
+
197
+ ## Stage 3-Queue: Pick an existing queue, or create a new one
198
+
199
+ *(This stage runs only on the Queue path. ASA path: see Stage 3-ASA below.)*
200
+
201
+ Enumerate eligible queues. The UI's routing dropdown (`MessagingRoutingMethodDataProviderController.getOmniQueues`) lists Groups where `QueueRoutingConfigId != null` — i.e. Omni-Channel-enabled queues. For a MessagingChannel we additionally want the queue to accept `MessagingSession`. Query the intersection: enumerate MessagingSession-capable queues, then keep only those with a QueueRoutingConfig.
202
+
203
+ ```bash
204
+ # MessagingSession-capable queues that are also Omni-enabled (QueueRoutingConfigId != null)
205
+ sf data query --target-org '{ORG_ALIAS}' \
206
+ --query "SELECT Id, Name, DeveloperName FROM Group WHERE Type = 'Queue' AND QueueRoutingConfigId != null AND Id IN (SELECT QueueId FROM QueueSobject WHERE SobjectType = 'MessagingSession') ORDER BY Name" \
207
+ --json > /tmp/ccr-queues.json
208
+ ```
209
+
210
+ Each row's `Id` is the `00G` `Group.Id` — that is what gets written to `SessionHandlerId`. (If the semi-join subquery errors on an org, fall back to two queries: list `QueueSobject WHERE SobjectType='MessagingSession'`, then filter to those whose `Group.QueueRoutingConfigId != null`.)
211
+
212
+ Present the user with a numbered list plus a final "create new" option:
213
+
214
+ ```text
215
+ Omni-enabled MessagingSession queues on {ORG_ALIAS}:
216
+
217
+ 1) Messaging Queue (Messaging_Queue) — 00GSG0000000LSf2AM
218
+ 2) MyQueue (MyQueue) — 00GSG000000144n2AA
219
+ ...
220
+ N) Create a new queue
221
+
222
+ Pick [1-N]:
223
+ ```
224
+
225
+ - **If the user picks an existing queue**: record its `Id` as `{QUEUE_ID}` (this is the `Group.Id`). Skip to Stage 5.
226
+ - **If the user picks "create new"**: go to Stage 4.
227
+
228
+ If the list is empty AND the user picks (1) "Create a new queue" implicitly, skip directly to Stage 4.
229
+
230
+ ---
231
+
232
+ ## Stage 3-Queue, continued: Create a new Queue via Metadata API
233
+
234
+ *(Continuation of the Queue path. Skip if the user picked an existing queue above.)*
235
+
236
+ We deploy a Queue + QueueRoutingConfig pair using a minimal scratch sfdx project (the `help-agent-accelerator` pattern), then look up the new Queue's Id and optionally add the current user as a member.
237
+
238
+ **To create a new Queue via the Metadata API (sfdx project scaffold → deploy → ID lookup → optional member add), load `references/queue-creation.md` and follow it — it is the complete guide for this flow.**
239
+
240
+ After that stage, jump to Stage 5 (PATCH).
241
+
242
+ ---
243
+
244
+ ## Stage 3-ASA: Pick an existing ASA
245
+
246
+ *(This stage runs only on the ASA path. Queue path: skip to Stage 5.)*
247
+
248
+ ASA routing points `SessionHandlerId` at an existing, live Agentforce Service Agent (`BotDefinition`). This skill never creates a new ASA — it verifies the org supports one (Agentforce licensed), enumerates the live/routable ones, and lets the user pick.
249
+
250
+ **For ASA precondition checks, enumeration, and selection, load `references/asa-routing.md`.** After selection, continue to Stage 5 (PATCH).
251
+
252
+ ---
253
+
254
+ ## Stage 5: PATCH `MessagingChannel.SessionHandlerId` (+ `FallbackQueueId`)
255
+
256
+ By this point we have a **routing target id** in `{TARGET_ID}` and know its `{ROUTING_TYPE}`:
257
+
258
+ | routingType | `{TARGET_ID}` | FallbackQueue write |
259
+ | --- | --- | --- |
260
+ | `queue` | `00G` `Group.Id` | none (must stay null) |
261
+ | `flow` | `300` `FlowDefinition` id | set `FallbackQueueId={FALLBACK_QUEUE_ID}` |
262
+ | `asa` | `0Xx` `BotDefinition.Id` | set `FallbackQueueId={FALLBACK_QUEUE_ID}` |
263
+ | `digital_worker` | `1iE` `AgenticCtxtDecorDefinition.Id` | set `FallbackQueueId={FALLBACK_QUEUE_ID}` |
264
+ | `user` | `005` `User.Id` | none (must stay null) |
265
+
266
+ `SessionHandler` is a polymorphic FK spanning `[Group, FlowDefinition, User, BotDefinition, AgenticCtxtDecorDefinition]` (per `MessagingChannel.entity.xml`; the BotDefinition/AgenticCtxtDecorDefinition targets only materialize on Agentforce-licensed orgs). The standard REST sObject PATCH accepts whichever Id type fits. The **FallbackQueue rule is enforced server-side** (`validateSessionHandler`): Flow/ASA/Digital Worker reject a null FallbackQueue; Queue/User reject a non-null one.
267
+
268
+ For the FallbackQueue paths, write both fields in one PATCH so the record never passes through an invalid intermediate state:
269
+
270
+ ```bash
271
+ # queue / user — SessionHandler only
272
+ sf data update record --target-org '{ORG_ALIAS}' --sobject MessagingChannel \
273
+ --record-id '{CHANNEL_ID}' \
274
+ --values 'SessionHandlerId={TARGET_ID}' --json > /tmp/ccr-patch.json
275
+
276
+ # flow / asa / digital_worker — SessionHandler + FallbackQueue together
277
+ sf data update record --target-org '{ORG_ALIAS}' --sobject MessagingChannel \
278
+ --record-id '{CHANNEL_ID}' \
279
+ --values 'SessionHandlerId={TARGET_ID} FallbackQueueId={FALLBACK_QUEUE_ID}' --json > /tmp/ccr-patch.json
280
+ ```
281
+
282
+ If `status !== 0`: emit `{ok:false, kind:"patch-failed", message: ...}` and return. Surface the server message verbatim — it names the exact linking rule that failed (see the failure-envelope note under "Output (to caller)").
283
+
284
+ ---
285
+
286
+ ## Stage 6: Verify
287
+
288
+ Re-read the channel:
289
+
290
+ ```bash
291
+ sf data query --target-org '{ORG_ALIAS}' \
292
+ --query "SELECT Id, SessionHandlerId, FallbackQueueId FROM MessagingChannel WHERE Id = '{CHANNEL_ID}'" \
293
+ --json
294
+ ```
295
+
296
+ If the freshly-read `SessionHandlerId` doesn't equal `{TARGET_ID}` — or (for flow/asa/digital_worker) `FallbackQueueId` doesn't equal `{FALLBACK_QUEUE_ID}`:
297
+ ```json
298
+ {"ok": false, "kind": "verify-failed", "hint": "PATCH returned success but re-read shows SessionHandlerId/FallbackQueueId not persisted — check user permissions or field-level security on MessagingChannel"}
299
+ ```
300
+
301
+ Otherwise, emit the path-appropriate success envelope (see "Output (to caller)" at the top of this file — one shape per routingType, each carrying `fallbackQueueId`).
302
+
303
+ ---
304
+
305
+ ## Stage 7: Report to caller
306
+
307
+ Report the JSON envelope. If this skill is the leaf (user invoked it directly), render:
308
+
309
+ **Queue path:**
310
+ - `Success — Routing configured — channel {CHANNEL_ID} now routes to Queue '{QUEUE_LABEL}' ({QUEUE_ID}).{'' if created else ' (reused existing queue)'}`
311
+ - `Info: Routing already configured — Queue '{name}' ({QUEUE_ID}). No changes.` (no-op path)
312
+
313
+ **Flow path:**
314
+ - `Success — Routing configured — channel {CHANNEL_ID} now routes to Omni-Flow '{FLOW_LABEL}' ({TARGET_ID}), fallback Queue {FALLBACK_QUEUE_ID}.`
315
+
316
+ **ASA path:**
317
+ - `Success — Routing configured — channel {CHANNEL_ID} now routes to Agentforce Service Agent '{ASA_LABEL}' ({ASA_ID}), fallback Queue {FALLBACK_QUEUE_ID}. Bot user: {BOT_USER_ID}. Active version: {BOT_VERSION_ID}.`
318
+ - `Info: Routing already configured — ASA '{MasterLabel}' ({ASA_ID}). No changes.` (no-op path)
319
+
320
+ **Digital Worker path:**
321
+ - `Success — Routing configured — channel {CHANNEL_ID} now routes to Digital Worker '{WORKER_LABEL}' ({TARGET_ID}), fallback Queue {FALLBACK_QUEUE_ID}.`
322
+
323
+ **User path:**
324
+ - `Success — Routing configured — channel {CHANNEL_ID} now routes directly to User '{USER_NAME}' ({TARGET_ID}).`
325
+
326
+ **Failure / precondition:**
327
+ - `Warning: No eligible {routingType} target found. {per-domain Setup pointer from references/target-locate.md}. Then re-run this skill.` (no-eligible-target)
328
+ - `Warning: {routingType} routing needs a fallback queue but none exists. Create a MessagingSession queue first (queue path), then re-run.` (no-fallback-queue)
329
+ - `Warning: This org doesn't have Agentforce licensed (no BotDefinition entity). Use Queue routing instead.` (asa-not-supported)
330
+ - `Warning: This is a Standard (SCRT1) channel — only Flow routing is supported. These skills only create Enhanced channels, so this is unexpected; check the channel.` (standard-channel)
331
+ - `Error: {kind}: {message}` (other failures — the message names the server-side validation rule that failed)
332
+
333
+ ---
334
+
335
+ ## Worked examples
336
+
337
+ For reference runs of both the reuse-an-existing-queue fast path (validated on test1) and the create-a-new-queue-via-Metadata-API path, see `references/worked-examples.md`.
338
+
339
+ ---
340
+
341
+ ## Gotchas
342
+
343
+ Known gotchas — `Group.Type` filtering, DeveloperName uniqueness, QueueRoutingConfig naming, empty-queue caveats, Metadata-API-only queue creation, the per-domain **FallbackQueue requirement matrix**, the server-side `nullQueueId` / readiness enforcement point, the **Standard-vs-Enhanced** SessionHandler write restriction, and `SessionHandler` polymorphism across org shapes.
344
+
345
+ **When troubleshooting an unexpected result, or before modifying this skill, load `references/gotchas.md` and follow it — it is the complete list.**
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: service-de-channel-routing-configure-asa-routing
3
+ description: "Load when the user picked Agentforce Service Agent (ASA) routing on service-de-channel-routing-configure. Covers the BotDefinition precondition check, enumerating live ASAs (with the routable-vs-not-yet-live filter and the INVALID_TYPE subquery fallback), and prompting the user to pick one. DO NOT load this for the Omni-Channel Queue routing path — see references/queue-creation.md for that."
4
+ metadata:
5
+ version: "1.0"
6
+ related-skills: service-de-channel-routing-configure
7
+ ---
8
+
9
+ # Stage 3-ASA: Pick an existing ASA
10
+
11
+ *(This stage runs only on the ASA path. Queue path: skip to Stage 5.)*
12
+
13
+ ## Stage 3-ASA.0: Precondition check
14
+
15
+ Verify the org has Agentforce licensed (`BotDefinition` sObject exists):
16
+
17
+ ```bash
18
+ sf sobject describe --target-org '{ORG_ALIAS}' --sobject BotDefinition 2>&1 | grep -q "does not exist" \
19
+ && echo "MISSING" \
20
+ || echo "PRESENT"
21
+ ```
22
+
23
+ If `MISSING` — emit and return:
24
+
25
+ ```json
26
+ {"ok": false, "kind": "asa-not-supported", "hint": "this org doesn't have BotDefinition (Agentforce not licensed); use Queue routing instead"}
27
+ ```
28
+
29
+ ## Stage 3-ASA.1: Enumerate live ASAs
30
+
31
+ ```bash
32
+ sf data query --target-org '{ORG_ALIAS}' \
33
+ --query "SELECT Id, DeveloperName, MasterLabel, BotUserId, (SELECT Id, Status FROM BotVersions WHERE Status='Active' LIMIT 1) FROM BotDefinition WHERE Type='ExternalCopilot' AND AgentType='EinsteinServiceAgent' ORDER BY MasterLabel" \
34
+ --json > /tmp/ccr-asas.json
35
+ ```
36
+
37
+ Parse with `node -e`. For each row, extract:
38
+ - `Id` — `BotDefinition.Id` (used as `SessionHandlerId`)
39
+ - `MasterLabel` / `DeveloperName` — for display
40
+ - `BotUserId` — bot user already linked? (null = not linked, ASA can't actually serve sessions yet)
41
+ - `BotVersions[0]` — has an Active version? (null = ASA exists but isn't live)
42
+
43
+ Filter: an ASA is **routable** only if `BotUserId != null` AND `BotVersions[0].Status == 'Active'`. ASAs failing either check are listed but flagged as "not yet live — selecting will fail at activation time."
44
+
45
+ If the channel-relationship subquery returns `INVALID_TYPE` (the `BotVersions` child relationship isn't named on some orgs — same family of issue as the MessagingChannelUsage subquery gotcha), fall back to two queries:
46
+
47
+ ```bash
48
+ sf data query --target-org '{ORG_ALIAS}' \
49
+ --query "SELECT Id, DeveloperName, MasterLabel, BotUserId FROM BotDefinition WHERE Type='ExternalCopilot' AND AgentType='EinsteinServiceAgent' ORDER BY MasterLabel" \
50
+ --json > /tmp/ccr-asas.json
51
+ # then for each id, query BotVersion separately
52
+ sf data query --target-org '{ORG_ALIAS}' \
53
+ --query "SELECT Id, BotDefinitionId, Status FROM BotVersion WHERE BotDefinitionId IN (<comma-sep ids>) AND Status='Active'" \
54
+ --json > /tmp/ccr-asas-versions.json
55
+ ```
56
+
57
+ If no live ASAs found (all rows have `BotUserId=null` or no Active BotVersion), emit:
58
+
59
+ ```json
60
+ {"ok": false, "kind": "no-live-asa", "hint": "no live ASAs found on this org — create one in Setup → Agentforce first, then re-run this skill"}
61
+ ```
62
+
63
+ ## Stage 3-ASA.2: Prompt the user
64
+
65
+ Present a numbered list of live ASAs only:
66
+
67
+ ```text
68
+ Existing live Agentforce Service Agents on {ORG_ALIAS}:
69
+
70
+ 1) Agentforce Service Agent KAFile (Agentforce_Service_Agent_KAFile) — 0XxRZ0000002ZWL0A2
71
+ 2) MON ASA Apex (MON_ASA_Apex) — 0XxRZ0000003APR0A2
72
+
73
+ Pick [1-N]:
74
+ ```
75
+
76
+ Record `{ASA_ID}` = `BotDefinition.Id`, `{ASA_LABEL}`, `{ASA_DEV_NAME}`, `{BOT_USER_ID}`, `{BOT_VERSION_ID}`.
77
+
78
+ ## Stage 3-ASA.3: Resolve a FallbackQueue (required)
79
+
80
+ ASA routing **requires a FallbackQueue** — `validateSessionHandler` rejects a null FallbackQueue on the `0Xx` SessionHandler path with `MissingFallbackQueueForAsaRouting`. Enumerate eligible queues (Omni-enabled, MessagingSession-capable) and let the user pick:
81
+
82
+ ```bash
83
+ sf data query --target-org '{ORG_ALIAS}' \
84
+ --query "SELECT Id, Name, DeveloperName FROM Group WHERE Type = 'Queue' AND QueueRoutingConfigId != null AND Id IN (SELECT QueueId FROM QueueSobject WHERE SobjectType = 'MessagingSession') ORDER BY Name" \
85
+ --json > /tmp/ccr-fallback-queues.json
86
+ ```
87
+
88
+ Record `{FALLBACK_QUEUE_ID}` = the chosen `00G` `Group.Id`. If 0 rows, emit `{ok:false, kind:"no-fallback-queue", hint:"ASA routing needs a fallback queue but no MessagingSession-capable queue exists — create one (queue path) first"}` and return.
89
+
90
+ Continue to Stage 5 (PATCH), which writes `SessionHandlerId={ASA_ID} FallbackQueueId={FALLBACK_QUEUE_ID}` in one call.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: service-de-channel-routing-configure-gotchas
3
+ description: "Load when debugging an unexpected result from service-de-channel-routing-configure, or before implementing changes to it. Covers the known gotchas: Group.Type filtering, DeveloperName uniqueness, QueueRoutingConfig naming, empty-queue caveats, Metadata-API-only queue creation, the per-domain FallbackQueue requirement matrix, the server-side nullQueueId enforcement point, the Standard-vs-Enhanced SessionHandler write restriction, and SessionHandler polymorphism differences across org shapes. DO NOT load this during a normal first-time routing configuration run — only when troubleshooting or modifying the skill."
4
+ metadata:
5
+ version: "1.0"
6
+ related-skills: service-de-channel-routing-configure
7
+ ---
8
+
9
+ # Gotchas
10
+
11
+ 1. **The `sf data query` `Group.Type='Queue'` filter matters.** `Group` also holds roles/role-and-subordinates/public-groups etc. Always filter on `Type='Queue'` when reading for a queue. (Entity shape confirmed on test1: 2 MessagingSession-capable queues present, both with `Type='Queue'`, both with matching `QueueSobject.SobjectType='MessagingSession'`.)
12
+
13
+ 2. **`DeveloperName` must be unique across all Queues.** A deploy with a duplicate DevName is rejected with `duplicate value found: DeveloperName duplicates value on record with id: <existingId>`. Either detect that up front (query Group first) or let the deploy fail and re-prompt.
14
+
15
+ 3. **`QueueRoutingConfig.DeveloperName` must also be globally unique.** The skill names it `{QUEUE_DEV_NAME}_Routing` to stay unique per queue. Keep this pattern — don't reuse a single routing config across queues unless the user explicitly asks.
16
+
17
+ 4. **A queue without members still PATCHes fine, and `activateChannelUsage` still succeeds.** But the channel won't actually route messages anywhere until someone joins the queue with an Omni Presence. The skill's "add self" option papers over this for demo/test orgs; for prod, the caller is responsible for populating the queue separately.
18
+
19
+ 5. **Queue + QueueRoutingConfig via Metadata API, NOT via `sf data create record`.** The REST sObject insert for `Group(Type=Queue)` works for the Group row itself but does NOT create the routing config, and some related `QueueMember`/Omni-Presence linkage is done server-side only by the Metadata API deploy. Stick with the metadata path — that's how `help-agent-accelerator` does it, and it's what we validated against test1.
20
+
21
+ 6. **`FallbackQueueId` is required for some SessionHandler domains and forbidden for others — it is NOT interchangeable.** The rule (from `MessagingChannelFunctionsHelper.validateSessionHandler`, cross-verified live): Flow (`300`), ASA (`0Xx`), and Digital Worker (`1iE`) **require** a non-null FallbackQueue; Queue (`00G`) and User (`005`) **require it null** (a non-null value is rejected with `UnsupportedFallbackQueue`). Setting a Flow SessionHandler with a null FallbackQueue is rejected with *"A Fallback Queue must be specified when selecting a Flow routing method."* (verified live on sdb6c 2026-08-12). See `references/target-locate.md` for the full matrix. This is why the FallbackQueue-required paths write both fields in a single PATCH.
22
+
23
+ 7. **The `channelRouteTrafficModal.js` enforcement is UI-side only.** Server-side, activation readiness (`MessagingChannelReadinessChecker.isRoutingConfiguredForChannel`) requires a **SessionHandler-based** routing method — Queue-as-SessionHandler (`00G`), User (`005`), Flow (`300`+FallbackQueue), or ASA (`0Xx`+FallbackQueue). It inspects `SessionHandler`, **not** `TargetQueue`. A legacy Standard/SCRT1 channel could route via `TargetQueueId`, but that does not satisfy this Enhanced-channel readiness check — and these skills only create Enhanced channels, so always route via `SessionHandler`. Neither-set raises `LiveMessageSetupException` (`nullQueueId`) at activation.
24
+
25
+ 8. **Standard (SCRT1) channels only accept a Flow as SessionHandler; Enhanced (SCRT2) channels accept all five domains.** `validateSessionHandler` (the `PlatformType==STANDARD` branch) rejects any non-Flow SessionHandler on a Standard channel with *"Only flows of type Omni-Channel are supported for a Messaging Channel"* — verified live: a `00G` Queue and a `0Xx` ASA both failed with that exact message on a Standard channel, and both succeeded on an Enhanced one. These skills create only Enhanced channels, so Stage 2 confirms `PlatformType=Enhanced` and bails with `kind:"standard-channel"` if it ever sees otherwise.
26
+
27
+ 9. **`MessagingChannel.SessionHandler` polymorphism is org-shape-dependent.** The full domain is `[Group, FlowDefinition, User, BotDefinition, AgenticCtxtDecorDefinition]`, but `BotDefinition` (ASA) only materializes on Agentforce-licensed orgs and `AgenticCtxtDecorDefinition` (Digital Worker) only when `orgHasOmniChannelScrt2DigitalWorkerRouting` is enabled (not present on sdb6c). The ASA precondition check (Stage 3-ASA.0) and the Digital Worker `INVALID_TYPE` guard (`references/target-locate.md`) catch the missing-domain cases before a PATCH is attempted. Note the SOQL field surface is thinner than the internal representation: the Data-API `BotDefinition` sObject exposes only `Type`/`AgentType`/`AgentTemplate`, so the active-version check goes through the `BotVersions` child relationship, not an `ActiveVersionId` column.
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: service-de-channel-routing-configure-queue-creation
3
+ description: "Load when the user picked 'create a new queue' on the Queue routing path of service-de-channel-routing-configure. Covers the full Metadata API creation flow: collecting queue inputs, scaffolding a minimal sfdx project with Queue + QueueRoutingConfig metadata, deploying it, looking up the new Queue's Id, and optionally adding the current user as a member. DO NOT load this when the user picked an existing queue from the enumerated list — that path skips straight to Stage 5 (PATCH)."
4
+ metadata:
5
+ version: "1.0"
6
+ related-skills: service-de-channel-routing-configure
7
+ ---
8
+
9
+ # Stage 3-Queue, continued: Create a new Queue via Metadata API
10
+
11
+ *(Continuation of the Queue path. Skip if the user picked an existing queue above.)*
12
+
13
+ We deploy a Queue + QueueRoutingConfig pair using a minimal scratch sfdx project. This mirrors the `help-agent-accelerator` pattern (`force-app-static/main/default/queues/Help_Support_Queue.queue-meta.xml`), which is the battle-tested route for MessagingSession queues.
14
+
15
+ ## Stage 3-Queue.1: Collect inputs
16
+
17
+ Ask the user:
18
+
19
+ ```text
20
+ New queue details:
21
+ Display name (e.g. "WhatsApp Support Queue"):
22
+ API name (DeveloperName, letters/digits/underscores, e.g. "WhatsApp_Support_Queue")
23
+ [press enter to derive from display name]:
24
+ Routing model [MostAvailable / LeastActive / HighestPriority] (default: MostAvailable):
25
+ Add the current user as a queue member? [Y/n]:
26
+ ```
27
+
28
+ Derive `DeveloperName` by slugifying the display name if the user leaves it blank:
29
+ - Replace any non-alphanumeric run with `_`
30
+ - Collapse repeats: `__` → `_`
31
+ - Trim leading/trailing `_`
32
+ - If the result starts with a digit, prepend `X_`
33
+
34
+ Validate `DeveloperName`: must match `^[A-Za-z][A-Za-z0-9_]*$`, length ≤ 40. If invalid, re-prompt.
35
+
36
+ Record:
37
+ - `{QUEUE_LABEL}` — display name
38
+ - `{QUEUE_DEV_NAME}` — DeveloperName
39
+ - `{ROUTING_MODEL}` — `MostAvailable` | `LeastActive` | `HighestPriority` (maps to `QueueRoutingConfig.routingModel`)
40
+ - `{ADD_SELF}` — boolean
41
+
42
+ ## Stage 3-Queue.2: Write the sfdx project
43
+
44
+ ```bash
45
+ TMP_DIR=/tmp/ccr-metadata-$(date +%s)
46
+ mkdir -p "$TMP_DIR/force-app/main/default/queues"
47
+ mkdir -p "$TMP_DIR/force-app/main/default/queueRoutingConfigs"
48
+
49
+ # sfdx-project.json
50
+ cat > "$TMP_DIR/sfdx-project.json" <<'JSON_EOF'
51
+ {
52
+ "packageDirectories": [{"path": "force-app", "default": true}],
53
+ "namespace": "",
54
+ "sourceApiVersion": "66.0"
55
+ }
56
+ JSON_EOF
57
+
58
+ # QueueRoutingConfig — named <DevName>_Routing so one config per queue
59
+ cat > "$TMP_DIR/force-app/main/default/queueRoutingConfigs/{QUEUE_DEV_NAME}_Routing.queueRoutingConfig-meta.xml" <<'XML_EOF'
60
+ <?xml version="1.0" encoding="UTF-8"?>
61
+ <QueueRoutingConfig xmlns="http://soap.sforce.com/2006/04/metadata">
62
+ <capacityType>INHERITED</capacityType>
63
+ <capacityWeight>1.0</capacityWeight>
64
+ <isAttributeBased>false</isAttributeBased>
65
+ <label>{QUEUE_LABEL} Routing</label>
66
+ <routingModel>{ROUTING_MODEL}</routingModel>
67
+ <routingPriority>1</routingPriority>
68
+ </QueueRoutingConfig>
69
+ XML_EOF
70
+
71
+ # Queue
72
+ cat > "$TMP_DIR/force-app/main/default/queues/{QUEUE_DEV_NAME}.queue-meta.xml" <<'XML_EOF'
73
+ <?xml version="1.0" encoding="UTF-8"?>
74
+ <Queue xmlns="http://soap.sforce.com/2006/04/metadata">
75
+ <doesSendEmailToMembers>false</doesSendEmailToMembers>
76
+ <name>{QUEUE_LABEL}</name>
77
+ <queueRoutingConfig>{QUEUE_DEV_NAME}_Routing</queueRoutingConfig>
78
+ <queueSobject>
79
+ <sobjectType>MessagingSession</sobjectType>
80
+ </queueSobject>
81
+ </Queue>
82
+ XML_EOF
83
+ ```
84
+
85
+ **Substitute** `{QUEUE_LABEL}`, `{QUEUE_DEV_NAME}`, `{ROUTING_MODEL}` into both files. Use `sed` or a Node script — watch the XML escape if the label contains `&`, `<`, `>`, `"`, `'`.
86
+
87
+ ## Stage 3-Queue.3: Deploy
88
+
89
+ ```bash
90
+ (cd "$TMP_DIR" && sf project deploy start --target-org '{ORG_ALIAS}' --wait 5 --json) > /tmp/ccr-deploy.json 2>&1
91
+ ```
92
+
93
+ Parse `/tmp/ccr-deploy.json`:
94
+ - `result.status === "Succeeded"` → continue
95
+ - anything else → emit `{ok:false, kind:"metadata-deploy-failed", message:<result.details.componentFailures[0].problem || raw tail>}` and return
96
+
97
+ ## Stage 3-Queue.4: Look up the new Queue's ID
98
+
99
+ The deploy returns component results but not the Group sObject id. Query it:
100
+
101
+ ```bash
102
+ sf data query --target-org '{ORG_ALIAS}' \
103
+ --query "SELECT Id FROM Group WHERE Type='Queue' AND DeveloperName='{QUEUE_DEV_NAME}' LIMIT 1" \
104
+ --json
105
+ ```
106
+
107
+ Record the Id as `{QUEUE_ID}`. If the query returns 0 records, something is wrong (deploy reported success but row not visible) — halt with `Error: Deploy reported success but Queue {QUEUE_DEV_NAME} not findable — check user permissions for viewing Group.`
108
+
109
+ ## Stage 3-Queue.5: Optionally add current user as member
110
+
111
+ If `{ADD_SELF}` is true:
112
+
113
+ ```bash
114
+ # Get the current user id
115
+ USER_ID=$(sf org display --target-org '{ORG_ALIAS}' --json | node -e 'console.log(JSON.parse(require("fs").readFileSync(0,"utf8")).result.id)')
116
+ # Insert GroupMember
117
+ sf data create record --target-org '{ORG_ALIAS}' --sobject GroupMember \
118
+ --values "GroupId={QUEUE_ID} UserOrGroupId=${USER_ID}" --json
119
+ ```
120
+
121
+ A failure here (e.g. duplicate GroupMember) is not fatal — log it and continue.
122
+
123
+ After this stage, jump to Stage 5 (PATCH).