@salesforce/afv-skills 1.68.0 → 1.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/package.json +1 -1
  2. package/skills/afcc-setup-coordinate/SKILL.md +348 -0
  3. package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
  4. package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
  5. package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
  6. package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
  7. package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
  8. package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
  9. package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
  10. package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
  11. package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
  12. package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
  13. package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
  14. package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
  15. package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
  16. package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
  17. package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
  18. package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
  19. package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
  20. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
  21. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
  22. package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
  23. package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
  24. package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
  25. package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
  26. package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
  27. package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
  28. package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
  29. package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
  30. package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
  31. package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
  32. package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
  33. package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
  34. package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
  35. package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
  36. package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
  37. package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
  38. package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
  39. package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
  40. package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
  41. package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
  42. package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
  43. package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
  44. package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
  45. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
  46. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
  47. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
  48. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
  49. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
  50. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
  51. package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
  52. package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
  53. package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
  54. package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
  55. package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +23 -31
  56. package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +2 -1
  57. package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +118 -2
  58. package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +2 -2
  59. package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +9 -2
  60. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +12 -1
  61. package/skills/commerce-react-storefront-create/SKILL.md +54 -21
  62. package/skills/data360-code-extension-generate/SKILL.md +160 -252
  63. package/skills/data360-code-extension-generate/references/README.md +34 -172
  64. package/skills/data360-code-extension-generate/references/environment-setup.md +198 -0
  65. package/skills/data360-code-extension-generate/references/mcp-integration.md +36 -0
  66. package/skills/data360-code-extension-generate/references/quick-reference.md +132 -202
  67. package/skills/data360-code-extension-generate/references/run-logs.md +31 -0
  68. package/skills/data360-code-extension-generate/references/schema-discovery.md +45 -0
  69. package/skills/data360-code-extension-generate/references/troubleshooting.md +45 -0
  70. package/skills/data360-code-extension-generate/scripts/check_env.sh +197 -0
  71. package/skills/data360-code-extension-generate/scripts/venv_hook.sh +22 -0
  72. package/skills/dx-devops-work-item-manage/SKILL.md +24 -8
  73. package/skills/dx-devops-work-item-manage/examples/common-workflows.md +32 -0
  74. package/skills/dx-devops-work-item-manage/references/review-api.md +95 -0
  75. package/skills/dx-lifecycle-center/SKILL.md +24 -18
  76. package/skills/dx-lifecycle-center/examples/workflows.md +57 -34
  77. package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
  78. package/skills/dx-lifecycle-center/references/connect-org.md +59 -28
  79. package/skills/dx-lifecycle-center/references/deploy.md +3 -3
  80. package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
  81. package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
  82. package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
  83. package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
  84. package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
  85. package/skills/dx-org-manage/SKILL.md +12 -12
  86. package/skills/dx-org-manage/examples/scratch-orgs/display_output.json +1 -3
  87. package/skills/dx-org-manage/examples/scratch-orgs/success_shape.json +1 -3
  88. package/skills/dx-org-manage/references/opening-org.md +1 -1
  89. package/skills/dx-org-manage/references/scratch-org-operations.md +15 -20
  90. package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
  91. package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
  92. package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +3 -4
  93. package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +10 -7
  94. package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
  95. package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
  96. package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
  97. package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
  98. package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
  99. package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
  100. package/skills/education-cloud-academic-calendar-generate/SKILL.md +2 -2
  101. package/skills/education-cloud-course-catalog-migrate/SKILL.md +1 -1
  102. package/skills/education-cloud-domain-configure/references/domain-features/recruitment-admissions.md +8 -7
  103. package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -0
  104. package/skills/education-cloud-multi-campus-configure/references/error_handling.md +7 -6
  105. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +2 -0
  106. package/skills/education-cloud-student-recruitment-agent-configure/references/customer-narration.md +2 -0
  107. package/skills/education-cloud-student-recruitment-agent-configure/references/flows.md +1 -1
  108. package/skills/education-cloud-student-recruitment-agent-configure/references/grounding.md +5 -4
  109. package/skills/education-cloud-student-recruitment-agent-configure/references/permissions.md +1 -1
  110. package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +1 -1
  111. package/skills/education-cloud-student-recruitment-agent-configure/references/routing.md +1 -1
  112. package/skills/experience-afv-analytics-query/SKILL.md +239 -0
  113. package/skills/experience-afv-analytics-query/references/references.md +176 -0
  114. package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
  115. package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
  116. package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
  117. package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
  118. package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
  119. package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
  120. package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
  121. package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
  122. package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
  123. package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
  124. package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
  125. package/skills/experience-app-mcp-generate/SKILL.md +174 -0
  126. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
  127. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
  128. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
  129. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
  130. package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
  131. package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
  132. package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
  133. package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
  134. package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
  135. package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
  136. package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
  137. package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
  138. package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
  139. package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
  140. package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
  141. package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
  142. package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
  143. package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
  144. package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
  145. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
  146. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
  147. package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
  148. package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
  149. package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
  150. package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
  151. package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
  152. package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
  153. package/skills/experience-cms-content-type-generate/SKILL.md +8 -7
  154. package/skills/experience-cms-content-type-generate/references/agent-checklist.md +3 -3
  155. package/skills/experience-cms-content-type-generate/references/anti-patterns.md +2 -2
  156. package/skills/experience-cms-content-type-generate/references/discovery-details.md +1 -1
  157. package/skills/experience-cms-content-type-generate/references/retrieve-and-reconcile.md +5 -9
  158. package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.mjs +10 -0
  159. package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +2 -2
  160. package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +2 -2
  161. package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +1 -1
  162. package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1 -1
  163. package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +2 -2
  164. package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +2 -2
  165. package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
  166. package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
  167. package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
  168. package/skills/platform-custom-application-generate/SKILL.md +97 -104
  169. package/skills/platform-custom-application-generate/references/app-properties.md +52 -0
  170. package/skills/platform-custom-application-generate/references/app-visibility.md +19 -0
  171. package/skills/platform-custom-application-generate/references/utility-bar.md +55 -0
  172. package/skills/platform-custom-field-generate/SKILL.md +24 -16
  173. package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
  174. package/skills/platform-custom-setting-generate/SKILL.md +1 -0
  175. package/skills/platform-datamask-run/SKILL.md +1 -1
  176. package/skills/platform-datamask-run/references/policy-authoring.md +41 -18
  177. package/skills/platform-dataspace-access-configure/SKILL.md +25 -10
  178. package/skills/platform-dsar-policy-manage/SKILL.md +7 -6
  179. package/skills/platform-dsar-policy-manage/references/export-and-history.md +10 -8
  180. package/skills/platform-dsar-policy-manage/references/report-format.md +4 -2
  181. package/skills/platform-flexipage-generate/SKILL.md +7 -10
  182. package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
  183. package/skills/platform-metadata-grounding-get/SKILL.md +7 -7
  184. package/skills/platform-policy-rule-generate/SKILL.md +9 -7
  185. package/skills/platform-policy-rule-generate/references/condition-model.md +3 -3
  186. package/skills/platform-policy-rule-generate/references/conjunction-expression.md +9 -1
  187. package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +9 -1
  188. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +1 -2
  189. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +1 -2
  190. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +1 -2
  191. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +1 -2
  192. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +1 -0
  193. package/skills/platform-policy-rule-generate/references/headless-transport.md +2 -2
  194. package/skills/platform-policy-rule-generate/references/policy-schema-full.md +1 -1
  195. package/skills/platform-policy-rule-generate/references/policy-shapes.md +33 -0
  196. package/skills/platform-policy-rule-generate/references/templates-advanced.md +1 -1
  197. package/skills/platform-policy-rule-generate/references/ui-compatibility.md +5 -5
  198. package/skills/platform-report-generate/SKILL.md +29 -8
  199. package/skills/platform-report-generate/references/column-names.md +12 -1
  200. package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
  201. package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
  202. package/skills/platform-report-generate/references/verification-checklist.md +12 -0
  203. package/skills/platform-sharing-rules-generate/SKILL.md +12 -3
  204. package/skills/platform-sharing-rules-generate/references/rule-types.md +1 -0
  205. package/skills/service-agentforce-channel-configure/SKILL.md +6 -3
  206. package/skills/service-agentforce-channel-configure/references/agent-wiring.md +5 -3
  207. package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +24 -15
  208. package/skills/service-agentforce-channel-configure/references/input-validation.md +23 -0
  209. package/skills/service-agentforce-channel-configure/references/live-traffic-gate.md +13 -7
  210. package/skills/service-agentforce-channel-configure/references/queue-resolution.md +3 -1
  211. package/skills/service-agentforce-human-escalation-configure/references/_vendored/input-validation.md +23 -0
  212. package/skills/service-agentforce-human-escalation-configure/references/_vendored/queue-resolution.md +146 -0
  213. package/skills/service-agentforce-human-escalation-configure/references/escalation-mechanism.md +1 -1
  214. package/skills/service-agentforce-human-escalation-configure/scripts/tests/_bootstrap.py +42 -11
  215. package/skills/service-agentforce-human-escalation-configure/scripts/tests/test_escalation_contracts.py +45 -0
  216. package/skills/service-agentforce-human-escalation-configure/scripts/verify-and-configure.sh +23 -9
  217. package/skills/service-de-channel-activate/SKILL.md +10 -10
  218. package/skills/service-de-channel-activate/references/gotchas.md +4 -4
  219. package/skills/service-de-channel-activate/references/phone-verification.md +43 -19
  220. package/skills/service-de-channel-create/SKILL.md +1 -1
  221. package/skills/service-de-channel-create/references/facebook.md +1 -1
  222. package/skills/service-de-channel-create/references/whatsapp.md +33 -6
  223. package/skills/service-de-channel-routing-configure/SKILL.md +5 -1
  224. package/skills/service-de-channel-routing-configure/references/gotchas.md +3 -1
  225. package/skills/service-de-channel-routing-configure/references/named-queue.md +39 -0
  226. package/skills/service-de-channel-settings-configure/SKILL.md +3 -1
  227. package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +2 -2
  228. package/skills/service-de-channel-settings-configure/references/gotchas.md +12 -1
  229. package/skills/service-de-headless-channel-configure/SKILL.md +68 -74
  230. package/skills/service-de-headless-channel-configure/references/gotchas.md +6 -2
  231. package/skills/service-de-headless-channel-configure/references/inputs.md +19 -0
  232. package/skills/service-de-headless-channel-configure/references/output-envelopes.md +23 -1
  233. package/skills/service-de-headless-channel-configure/references/partial-success.md +1 -0
  234. package/skills/service-de-headless-channel-configure/references/requested-settings.md +55 -0
  235. package/skills/service-de-headless-channel-configure/references/worked-examples.md +35 -1
  236. package/skills/service-digital-engagement-channel-configure/SKILL.md +45 -108
  237. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +2 -0
  238. package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
  239. package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
  240. package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
  241. package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
  242. package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +18 -14
  243. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +17 -21
  244. package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
  245. package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
  246. package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
  247. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
  248. package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
  249. package/skills/service-digital-engagement-deployment-configure/SKILL.md +2 -2
  250. package/skills/service-digital-engagement-deployment-configure/references/onboarding_contract.md +4 -2
  251. package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +1 -1
  252. package/skills/service-e911-configure/SKILL.md +242 -0
  253. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
  254. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
  255. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
  256. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
  257. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
  258. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
  259. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
  260. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
  261. package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
  262. package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
  263. package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
  264. package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
  265. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
  266. package/skills/service-omni-command-center-configure/SKILL.md +1 -1
  267. package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
  268. package/skills/data360-schema-get/SKILL.md +0 -388
  269. package/skills/data360-schema-get/references/README.md +0 -191
  270. package/skills/data360-schema-get/scripts/get_dlo_schema.py +0 -244
  271. package/skills/data360-schema-get/scripts/get_dmo_schema.py +0 -233
  272. package/skills/dx-lifecycle-center/assets/widgets/connect-connected/connect-connected.json +0 -65
  273. package/skills/dx-lifecycle-center/assets/widgets/connect-connected/schema.json +0 -32
  274. package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/connect-sign-in.json +0 -57
  275. package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/schema.json +0 -21
  276. package/skills/dx-lifecycle-center/scripts/card-policy.jq +0 -71
  277. package/skills/dx-lifecycle-center/scripts/fill-widget.jq +0 -29
  278. package/skills/dx-lifecycle-center/scripts/widget.sh +0 -28
  279. package/skills/experience-content-media-image-generate/SKILL.md +0 -83
  280. package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
  281. package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
  282. package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
  283. package/skills/field-service-prework-brief-deployer-configure/SKILL.md +0 -646
  284. package/skills/field-service-voice-to-form-configure/SKILL.md +0 -650
@@ -34,7 +34,7 @@ Given a `{CHANNEL_ID}`, reads the channel's `MessagingChannelUsage.Id`, then fir
34
34
  - `TEXT` → `registerCsotSms`.
35
35
  - `AppleBusinessChat`, `Line`, everything else → `default` branch, no external callout, no network wait.
36
36
  - On success: writes `DeploymentStatus = 'Active'` via PLSQL.
37
- - On failure: writes `DeploymentStatus = 'Error'` plus `ErrorReason` / `ErrorDetails`.
37
+ - On failure: writes `DeploymentStatus = 'Error'` plus `ErrorDetails` (the actual cause — always read this) and a coarse `ErrorReason` category.
38
38
  4. Inside the same observer, a second pass syncs `MessagingChannel.IsActive = true` once MCU reaches `Active` (the `isTransitioningStatus` flag skips the flip while status is still `Provisioning`).
39
39
 
40
40
  All synchronous within the PATCH request — the 204 response only comes back after the full chain completes. WhatsApp: ~15-21s (Meta `/register` round-trip). Apple / Line: ~1s (no external call; just the local save-hook + observer + PLSQL write). Verified on wadtesting 2026-04-30.
@@ -43,7 +43,7 @@ All synchronous within the PATCH request — the 204 response only comes back af
43
43
 
44
44
  | Reference file | Load when |
45
45
  | --- | --- |
46
- | `references/phone-verification.md` | Stage 3 comes back with `ErrorReason === "VERIFICATION_REQUIRED"` (WhatsApp only) — the phone-number OTP verification sub-flow. |
46
+ | `references/phone-verification.md` | Stage 3 comes back `Error` on a WhatsApp channel with `ErrorDetails` containing `NUMBER_NOT_VERIFIED` or `REVERIFICATION` — the phone-number OTP verification sub-flow. |
47
47
  | `references/worked-examples.md` | You want a reference run of the WhatsApp happy-path, Apple activation, a readiness failure, or the already-active no-op. |
48
48
  | `references/gotchas.md` | Troubleshooting an unexpected result, or before modifying this skill — the eleven known gotchas. |
49
49
 
@@ -90,7 +90,7 @@ Unlike the old Aura-based version of this skill, there are no `{POLL_TIMEOUT_S}`
90
90
  ```json
91
91
  {"ok": false, "kind": "readiness-failed", "errorCode": "FIELD_INTEGRITY_EXCEPTION",
92
92
  "message": "...", "hint": "validateChannelReadinessOnProvisioning rejected the write — most commonly missing consent; run service-de-channel-settings-configure first"}
93
- {"ok": false, "kind": "provisioning-error", "mcuId": "0gL...", "errorReason": "MetaRegistrationFailed", "errorDetails": "..."}
93
+ {"ok": false, "kind": "provisioning-error", "mcuId": "0gL...", "errorReason": "ProvisioningError", "errorDetails": "WhatsAppNumberRegistrationError__..."}
94
94
  {"ok": false, "kind": "verification-failed", "hint": "WhatsApp phone number verification failed or was declined by user"}
95
95
  {"ok": false, "kind": "verification-request-failed", "errorCode": "...", "message": "...", "hint": "Could not request verification code from Meta"}
96
96
  ```
@@ -150,10 +150,10 @@ sf api request rest \
150
150
  --body '{"DeploymentStatus":"Provisioning"}' \
151
151
  --include \
152
152
  > /tmp/amc-patch-response.txt 2>&1
153
- HTTP_CODE=$(head -1 /tmp/amc-patch-response.txt | grep -oE '[0-9]{3}')
153
+ HTTP_CODE=$(grep -m1 -oE '^HTTP/[0-9.]+ [0-9]{3}' /tmp/amc-patch-response.txt | awk '{print $2}')
154
154
  ```
155
155
 
156
- `--include` prints the HTTP status/headers block ahead of the (typically empty, on 204) body — read the status line from that block rather than a `-w`-style trailing marker.
156
+ `--include` prints the HTTP status/headers block ahead of the (typically empty, on 204) body. Match the `HTTP/x.y NNN` status line itself — **not** `head -1`: with `2>&1`, the CLI's `Warning: @salesforce/cli update available from 2.150.6 to 2.154.4` line can come first, and a bare 3-digit grep then returns `150`.
157
157
 
158
158
  Classify by HTTP status:
159
159
 
@@ -190,14 +190,14 @@ sf data query --target-org '{ORG_ALIAS}' \
190
190
  | Status | Handling |
191
191
  | --- | --- |
192
192
  | `Active` | Continue to Stage 4. |
193
- | `Error` with `ErrorReason === "VERIFICATION_REQUIRED"` | For WhatsApp channels only: phone number needs OTP verification. Continue to Stage 3.2 (WhatsApp verification flow). |
194
- | `Error` (other) | Emit `{ok:false, kind:"provisioning-error", mcuId, errorReason, errorDetails}`. |
193
+ | `Error`, WhatsApp, `ErrorDetails` contains `NUMBER_NOT_VERIFIED` or `REVERIFICATION` | Phone number needs OTP verification with Meta. Continue to Stage 3.2. (`ErrorReason` is just `ProvisioningError` here — the verification signal is only in `ErrorDetails`; see gotcha #9.) `ErrorDetails` is capped at 255 chars, so the Meta message at the end will usually be cut off mid-sentence — that's expected and harmless. All you need is the `NUMBER_NOT_VERIFIED (code 100, subcode 2593005)` part near the start, which always survives. |
194
+ | `Error` (other) | Emit `{ok:false, kind:"provisioning-error", mcuId, errorReason, errorDetails}`, with `errorDetails` verbatim — it is the actual cause; surface it to the user, not just `errorReason` (gotcha #8). |
195
195
  | `Provisioning` | Unexpected — the observer was supposed to terminate before the PATCH returned 204. Fall through to a defensive poll (see Stage 3.1). |
196
196
  | `Disabled` | The PATCH returned 204 but the write didn't take? Emit `{ok:false, kind:"transport", message:"PATCH returned 204 but MCU is still Disabled — observer didn't commit"}`. |
197
197
 
198
- ### Stage 3.2: WhatsApp phone number verification (only if ErrorReason === "VERIFICATION_REQUIRED")
198
+ ### Stage 3.2: WhatsApp phone number verification (only if `ErrorDetails` contains `NUMBER_NOT_VERIFIED` or `REVERIFICATION`)
199
199
 
200
- This sub-flow only runs for WhatsApp channels when activation fails with `ErrorReason === "VERIFICATION_REQUIRED"` — the phone number needs OTP verification with Meta before it can be registered. **If the MCU comes back with `ErrorReason === "VERIFICATION_REQUIRED"` (WhatsApp only), load `references/phone-verification.md` and follow it** to drive the phone-number verification sub-flow (request code → prompt user → validate code → retry activation once).
200
+ This sub-flow only runs for WhatsApp channels whose activation failed because Meta hasn't verified the phone number. **If the MCU comes back `Error` with `ErrorDetails` containing `NUMBER_NOT_VERIFIED` or `REVERIFICATION` (WhatsApp only), load `references/phone-verification.md` and follow it** to drive the phone-number verification sub-flow (request code → prompt user → validate code → retry activation once). Move into it directly — don't emit `provisioning-error` for this case. Its terminal envelopes are the Stage 4 success, `verification-declined`, `verification-request-failed`, or `verification-failed`.
201
201
 
202
202
  ### Stage 3.1: Defensive poll (only if Stage 3 saw `Provisioning`)
203
203
 
@@ -269,4 +269,4 @@ For end-to-end activation traces (WhatsApp happy-path, Apple activation, a readi
269
269
 
270
270
  ## Gotchas
271
271
 
272
- Eleven known gotchas — synchronous PATCH timing for WhatsApp, valid API status transitions, the `IsActive` sync pass, relationship-name variance across orgs, consent preconditions, `DeploymentStatus` picklist casing, the REST-vs-Apex equivalence, `ErrorReason` values, `VERIFICATION_REQUIRED` handling, OAuth token extraction, and the Status-code-409 Admin API conflict. Before troubleshooting an unexpected result or modifying this skill, load `references/gotchas.md` and follow it.
272
+ Eleven known gotchas — synchronous PATCH timing for WhatsApp, valid API status transitions, the `IsActive` sync pass, relationship-name variance across orgs, consent preconditions, `DeploymentStatus` picklist casing, the REST-vs-Apex equivalence, reading failures from `ErrorDetails` (not `ErrorReason`), detecting the OTP-verification case, OAuth token extraction, and the Status-code-409 Admin API conflict. Before troubleshooting an unexpected result or modifying this skill, load `references/gotchas.md` and follow it.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: service-de-channel-activate-gotchas
3
- description: "Load when debugging an unexpected result from service-de-channel-activate, or before implementing changes to it. Covers the eleven known gotchas: synchronous PATCH timing for WhatsApp, valid API status transitions, the IsActive sync pass, relationship-name variance across orgs, consent preconditions, DeploymentStatus picklist casing, the REST-vs-Apex equivalence, ErrorReason values, VERIFICATION_REQUIRED handling, keeping auth inside the CLI transport (sf api request rest), and the Status-code-409 Admin API conflict. DO NOT load this during a normal first-time activation run — only when troubleshooting or modifying the skill."
3
+ description: "Load when debugging an unexpected result from service-de-channel-activate, or before implementing changes to it. Covers the eleven known gotchas: synchronous PATCH timing for WhatsApp, valid API status transitions, the IsActive sync pass, relationship-name variance across orgs, consent preconditions, DeploymentStatus picklist casing, the REST-vs-Apex equivalence, the ErrorReason picklist and ErrorDetails reason format, detecting OTP verification from ErrorDetails, keeping auth inside the CLI transport (sf api request rest), and the Status-code-409 Admin API conflict. DO NOT load this during a normal first-time activation run — only when troubleshooting or modifying the skill."
4
4
  metadata:
5
5
  version: "1.0"
6
6
  related-skills: service-de-channel-activate
@@ -22,10 +22,10 @@ metadata:
22
22
 
23
23
  7. **The REST PATCH is equivalent to the old Apex `activateChannelUsage` method** but without the Aura session machinery or the quirk where that method returned `isSuccessful:false` with a misleading error even on success.
24
24
 
25
- 8. **If the observer fails partway, the MCU can land on `Error` with `ErrorReason` populated.** Common values for WhatsApp: `ProvisioningError` (Salesforce Admin API rejected — typically "Status code = 409" means phone already registered to another org; see gotcha #11), `MetaRegistrationFailed` (Meta `/register` rejected the phone — could be rate limit, PIN not set, WABA not shared, or credit line not attached), `NotAuthorized` (WABA partnership hasn't propagated). The `ErrorDetails` column carries the raw error response (Salesforce Admin API or Meta Graph API depending on where it failed). Don't swallow these — pass through to the caller's `provisioning-error` envelope.
25
+ 8. **On failure, read `ErrorDetails` — it is the field that says what went wrong.** The MCU lands on `Error` with `ErrorDetails` (text, truncated at 255 chars) carrying the actual cause. For Meta `/register` failures it reads `WhatsAppNumberRegistrationError__WhatsApp number registration failed <phoneId>: <REASON> (code <c>, subcode <s>) [fbtrace_id …]: <Meta message>`, where `<REASON>` is derived server-side: `NUMBER_NOT_VERIFIED` (code 100 / subcode 2593005), `REVERIFICATION` (133006), `RATE_LIMITED` (133016), `TWO_FACTOR_MISMATCH` (133005), `TWO_STEP_GUESSED_TOO_FAST` (133009), `BUSINESS_LOCKED` (131031), `DELETED_NUMBER` (33), `LOGGED_IN_ON_SMB_APP` / `DISABLE_2FA_ON_SOURCE_NUMBER` (subcode 2388001), and others. Admin API failures use the `AdminApiRegistrationError__` prefix instead (gotcha #11). Branch on `ErrorDetails`, and pass it through verbatim in the `provisioning-error` envelope. `ErrorReason` is only a coarse restricted-picklist category (`ProvisioningError`, `InternalError`, `InvalidSelection`, `DeprovisioningError`, `WHATSAPP_PROV_ERR_*` / `WHATSAPP_DEPROV_ERR_*`) — Meta registration failures are all plain `ProvisioningError`, so never branch on it; include it in the envelope for context only.
26
26
 
27
- 9. **`ErrorReason === "VERIFICATION_REQUIRED"` means phone number needs OTP verification.** When activation fails with this specific ErrorReason on the MessagingChannelUsage, the skill should automatically proceed to Stage 3.2 (WhatsApp verification flow) rather than returning a generic provisioning-error. This is a recoverable error state that we can handle programmatically via the Connect REST verification endpoints. After successful verification, retry activation once (Stage 3.2 Step 5). Live-validated on headless-sdb6 2026-05-21 — verification request → SMS code entry → validation → retry activation succeeded in ~1 minute total.
27
+ 9. **The OTP-verification case is signalled in `ErrorDetails`, not `ErrorReason`.** There is no `VERIFICATION_REQUIRED` value — it isn't in the `ErrorReason` picklist, so a check on it never fires and an unverified number falls through to a generic `provisioning-error`. Trigger Stage 3.2 when a WhatsApp MCU is `Error` and `ErrorDetails` contains `NUMBER_NOT_VERIFIED` or `REVERIFICATION`; the reason token comes right after the phone id, so it survives the 255-char truncation. Observed on sdb6 (2026-10-20, channel `<channel-id>`): `ErrorReason=ProvisioningError`, `ErrorDetails=WhatsAppNumberRegistrationError__WhatsApp number registration failed <phone-id>: NUMBER_NOT_VERIFIED (code 100, subcode 2593005) [fbtrace_id …]: Phone number is not verified through sms or voice, …`. After verification, retry activation once (Stage 3.2 Step 5) — `Error → Provisioning` is a valid transition.
28
28
 
29
29
  10. **Auth stays inside the CLI transport — use `sf api request rest`, not a manually-extracted bearer token.** The skill used to extract an OAuth token via `SF_TEMP_SHOW_SECRETS=true sf org display` + `jq -r '.result.accessToken'` and pass it as an `Authorization: Bearer` header to `curl`. That pattern put a live access token into shell state (visible in process lists, shell history, and any logging) and was removed as an S1 security anti-pattern. `sf api request rest --target-org '{ORG_ALIAS}'` manages the same OAuth session internally and never surfaces the token to the shell. Historical note: the old pattern's failure mode — omitting `SF_TEMP_SHOW_SECRETS` left the token field null, which surfaced as a 401 `INVALID_AUTH_HEADER` — no longer applies now that the CLI handles auth end-to-end.
30
30
 
31
- 11. **`ErrorDetails` containing "Status code = 409" comes from the *Salesforce* Admin API, not Meta.** When `ErrorReason = "ProvisioningError"` with `ErrorDetails = "AdminApiRegistrationError__Error occured in admin api with error code and error message Channel Registration response from Admin Api is a failure. Status code = 409"`, this indicates the phone number is already registered to a *different Salesforce org*. The Salesforce Admin API enforces a global constraint: one phone number can only be registered to one org at a time. To resolve: deactivate and deregister the phone from the other org, or use a different phone number for this org. This is distinct from Meta's validation errors (which would appear with `ErrorReason = "MetaRegistrationFailed"` and carry Meta Graph API error codes in `ErrorDetails`).
31
+ 11. **`ErrorDetails` containing "Status code = 409" comes from the *Salesforce* Admin API, not Meta.** When `ErrorReason = "ProvisioningError"` with `ErrorDetails = "AdminApiRegistrationError__Error occured in admin api with error code and error message Channel Registration response from Admin Api is a failure. Status code = 409"`, this indicates the phone number is already registered to a *different Salesforce org*. The Salesforce Admin API enforces a global constraint: one phone number can only be registered to one org at a time. To resolve: deactivate and deregister the phone from the other org, or use a different phone number for this org. This is distinct from Meta `/register` errors, which also land as `ProvisioningError` but carry the `WhatsAppNumberRegistrationError__` prefix and a Meta code/subcode in `ErrorDetails` (gotcha #8).
@@ -1,31 +1,41 @@
1
1
  ---
2
2
  name: service-de-channel-activate-phone-verification
3
- description: "Load when service-de-channel-activate's Stage 3 read comes back with MessagingChannelUsage.ErrorReason === \"VERIFICATION_REQUIRED\" (WhatsApp channels only). Covers the phone-number OTP verification sub-flow: prompting for SMS/voice, requesting and validating the verification code via the Connect livemessage/whatsapp/verification endpoints, and retrying activation once verification succeeds. DO NOT load this for any other ErrorReason, for non-WhatsApp message types, or during the normal happy-path activation run."
3
+ description: "Load when service-de-channel-activate's Stage 3 read comes back DeploymentStatus=Error on a WhatsApp channel with MessagingChannelUsage.ErrorDetails containing NUMBER_NOT_VERIFIED or REVERIFICATION. Covers the phone-number OTP verification sub-flow: prompting for SMS/voice, requesting and validating the verification code via the Connect livemessage/whatsapp/verification endpoints (classified by the body's success field), and retrying activation once verification succeeds. DO NOT load this for any other ErrorDetails reason, for non-WhatsApp message types, or during the normal happy-path activation run."
4
4
  metadata:
5
5
  version: "1.0"
6
6
  related-skills: service-de-channel-activate
7
7
  ---
8
8
 
9
- # Stage 3.2: WhatsApp phone number verification (only if ErrorReason === "VERIFICATION_REQUIRED")
9
+ # Stage 3.2: WhatsApp phone number verification (only if ErrorDetails contains NUMBER_NOT_VERIFIED or REVERIFICATION)
10
10
 
11
- **This stage only runs for WhatsApp channels when activation fails with `VERIFICATION_REQUIRED`.** The phone number must be verified with Meta before it can be registered. We use the two Connect REST verification endpoints via `sf api request rest`, which manages OAuth internally — no token extraction needed.
11
+ **This stage only runs for WhatsApp channels whose activation failed because Meta hasn't verified the phone number.** The MCU shows `DeploymentStatus=Error`, `ErrorReason=ProvisioningError` (there is no dedicated `ErrorReason` for this), and `ErrorDetails` like:
12
+
13
+ ```text
14
+ WhatsAppNumberRegistrationError__WhatsApp number registration failed <phone-id>: NUMBER_NOT_VERIFIED (code 100, subcode 2593005) [fbtrace_id …]: Phone number is not verified through sms or voice, …
15
+ ```
16
+
17
+ Expect the string to be truncated: `ErrorDetails` is capped at 255 chars and Meta's message comes last, so it usually ends mid-word (as above). Don't treat the cut-off as an error or try to recover the rest — all the skill needs is the `NUMBER_NOT_VERIFIED (code 100, subcode 2593005)` part (or `REVERIFICATION (code 133006, …)`), which sits right after the phone id and always survives. Match on that, never on the Meta message text. We use the two Connect REST verification endpoints via `sf api request rest`, which manages OAuth internally — no token extraction needed.
18
+
19
+ **Both endpoints return the same body: `{"success": <bool>, "errorMessage": <string|null>}`** — nothing else. There is no `displayNumber` and no Meta error code in the Connect response (the Setup UI gets those over a different, Aura-only path). Meta-side failures come back as a **2xx with `success:false`**, not as a 4xx, so classify by `success` first and status second.
12
20
 
13
21
  #### Step 1: Prompt for verification method
14
22
 
15
- Ask the user:
23
+ Go straight from the Stage 3 read into this prompt, in the same response — don't emit a `provisioning-error` first, and don't present the activation failure as the end of the run. This is a planned pause for user input, not a failure. Ask:
16
24
 
17
25
  ```text
18
- WhatsApp phone number verification required.
26
+ Activation paused: Meta hasn't verified this WhatsApp phone number yet
27
+ (NUMBER_NOT_VERIFIED). We can verify it now with a one-time code sent to the number.
19
28
 
20
29
  How should we send the verification code?
21
30
 
22
31
  [1] SMS (text message)
23
32
  [2] Voice call
33
+ [3] Cancel — leave the channel inactive for now
24
34
 
25
- Choice [1/2]:
35
+ Choice [1/2/3]:
26
36
  ```
27
37
 
28
- Record `{CODE_METHOD}` as `"SMS"` or `"VOICE"` based on response.
38
+ Record `{CODE_METHOD}` as `"SMS"` or `"VOICE"`. Show the reason token actually seen (`NUMBER_NOT_VERIFIED` or `REVERIFICATION`). On `3`, emit `{ok:false, kind:"verification-declined", mcuId, errorDetails, hint:"Phone number not verified. Re-run activation when ready to verify — the MCU stays in Error, which is a valid retry source."}` and stop.
29
39
 
30
40
  #### Step 2: Request verification code
31
41
 
@@ -40,21 +50,30 @@ sf api request rest \
40
50
  > /tmp/amc-verify-request.txt 2>&1
41
51
  ```
42
52
 
43
- `{PHONE_NUMBER_ID}` is `{MESSAGING_PLATFORM_KEY}` from Stage 1. `--include` prints the HTTP status/headers block ahead of the body — read the status from that block rather than a trailing marker line.
53
+ `{PHONE_NUMBER_ID}` is `{MESSAGING_PLATFORM_KEY}` from Stage 1. `--include` prints the HTTP status/headers block ahead of the body — read the status from the `HTTP/x.y NNN` line (as in Stage 2), not `head -1`. There's no blank line between headers and body, so take the body from the first line starting with `{`:
54
+
55
+ ```bash
56
+ HTTP_CODE=$(grep -m1 -oE '^HTTP/[0-9.]+ [0-9]{3}' /tmp/amc-verify-request.txt | awk '{print $2}')
57
+ SUCCESS=$(sed -n '/^{/,$p' /tmp/amc-verify-request.txt | jq -r '.success')
58
+ ```
59
+
60
+ Verified live on sdb6 (2026-10-20, `codeMethod=SMS`): `HTTP/1.1 201` with body `{"errorMessage": null, "success": true}`.
44
61
 
45
62
  **Important:** The endpoint expects query parameters, not a JSON body. Pass `numberId` and `codeMethod` as URL parameters. Still send `--body '{}'` (not `--body ''`): `sf api request rest` treats an empty body string as no body and fails locally with `No 'mode' found in 'body' entry` before the request is issued, so an empty `{}` object is the way to make a body-less POST reach the endpoint.
46
63
 
47
64
  | HTTP status | Body | Handling |
48
65
  | --- | --- | --- |
49
- | 200 or 204 | Empty or `{"success": true, "displayNumber": "..."}` | Success. Continue to Step 3. Optionally extract `displayNumber` from response to show user which phone will receive the code. |
50
- | 400 | `[{errorCode: "...", message: "..."}]` | Business error. Common: code already requested recently (Meta rate limit). Emit `{ok:false, kind:"verification-request-failed", errorCode, message, hint:"Meta may be rate-limiting requests. Wait a few minutes and retry."}`. |
51
- | 401 | (empty) | Bearer token invalid. Emit `{ok:false, kind:"auth"}`. |
66
+ | 2xx | `{"success": true, "errorMessage": null}` | Code sent. Continue to Step 3. |
67
+ | 2xx | `{"success": false, "errorMessage": "..."}` | Meta rejected the request (commonly: a code was requested too recently). Emit `{ok:false, kind:"verification-request-failed", message:"<errorMessage>", hint:"Meta may be rate-limiting code requests. Wait a few minutes, then retry activation."}`. Surface `errorMessage` verbatim — don't paraphrase or guess a Meta code. |
68
+ | 400 | `[{"errorCode":"INVALID_API_INPUT", ...}]` | A query param is missing (`numberId is required` / `Either codeMethod or verificationCode is required`) — a skill bug, not a user error. Emit `{ok:false, kind:"transport", status:400, message}`. |
69
+ | 401 | (empty) / `INVALID_SESSION_ID` | SF session invalid. Emit `{ok:false, kind:"auth"}`. |
52
70
  | 404 | HTML | Endpoint unavailable. Emit `{ok:false, kind:"transport", status:404, hint:"Verification endpoint not available — check API version"}`. |
71
+ | 500 | `[{"errorCode":"UNKNOWN_EXCEPTION", "message":"Failed to process WhatsApp verification: ..."}]` | Server-side failure. Emit `{ok:false, kind:"transport", status:500, message}`. |
53
72
 
54
73
  #### Step 3: Prompt for verification code
55
74
 
56
75
  ```text
57
- A {CODE_METHOD} verification code has been sent to the phone number.
76
+ A {CODE_METHOD} verification code has been sent to this channel's WhatsApp phone number.
58
77
  Please check the device and enter the 6-digit code:
59
78
 
60
79
  Code:
@@ -77,20 +96,25 @@ sf api request rest \
77
96
 
78
97
  **Important:** The endpoint expects query parameters, not a JSON body. Pass `numberId` and `verificationCode` as URL parameters. Send `--body '{}'` rather than `--body ''` — an empty body string makes `sf api request rest` fail locally with `No 'mode' found in 'body' entry` before the POST is sent.
79
98
 
99
+ The response has the same shape as Step 2: a successful validate returns `HTTP/1.1 201` with exactly `{"errorMessage": null, "success": true}`. Parse it the same way and branch on `success`:
100
+
101
+ ```bash
102
+ HTTP_CODE=$(grep -m1 -oE '^HTTP/[0-9.]+ [0-9]{3}' /tmp/amc-verify-validate.txt | awk '{print $2}')
103
+ SUCCESS=$(sed -n '/^{/,$p' /tmp/amc-verify-validate.txt | jq -r '.success')
104
+ ```
105
+
80
106
  | HTTP status | Body | Handling |
81
107
  | --- | --- | --- |
82
- | 200 or 204 | Empty or `{"success": true}` | Success. Number is now verified. Continue to Step 5 (retry activation). |
83
- | 400 | `[{errorCode: "...", message: "..."}]` | Invalid code or rate limit. Parse error message: if "wrong code" or "guessing too fast", prompt: "Invalid verification code. Try again? [y/n]". If `y`, repeat Step 3 (up to 3 total attempts). If `n` or after 3 failures, emit `{ok:false, kind:"verification-failed", hint:"Verification code validation failed"}`. |
84
- | 401 | (empty) | Bearer token invalid. Emit `{ok:false, kind:"auth"}`. |
108
+ | 2xx (201 expected) | `{"errorMessage": null, "success": true}` | Number is verified — nothing else comes back (no confirmation text, no display number). Continue to Step 5 (retry activation). |
109
+ | 2xx | `{"success": false, "errorMessage": "..."}` | Meta rejected the code (wrong code, guessing too fast, or too many attempts — the response doesn't say which beyond `errorMessage`). Show `errorMessage` verbatim and ask: "Try another code? [y/n]". If `y`, repeat Step 3 — **don't** request a new code — up to 3 validate attempts total. If `n` or after 3 failures, emit `{ok:false, kind:"verification-failed", message:"<last errorMessage>", hint:"Verification code validation failed. If Meta reports too many attempts, wait before retrying activation."}`. |
110
+ | 400 / 401 / 404 / 500 | as in Step 2 | Same handling as Step 2. |
85
111
 
86
- Common Meta error codes from the UI component:
87
- - `136024`: Too many recent attempts (rate limit). Emit `{ok:false, kind:"verification-failed", hint:"Too many verification attempts. Wait a few minutes and retry activation."}`.
88
- - `136025`: Wrong code or guessing too fast. Allow retry (up to 3 attempts total).
112
+ > **Don't branch on Meta codes `136024` / `136025`.** The Setup UI distinguishes "too many attempts" from "wrong code" using those codes, but Connect returns only `errorMessage` — the codes never reach the skill.
89
113
 
90
114
  #### Step 5: Retry activation after verification
91
115
 
92
116
  The phone number is now verified. Return to Stage 2 (PATCH activation) with a retry counter to avoid infinite loops. Maximum 1 retry after verification.
93
117
 
94
- If the second activation attempt also fails with `VERIFICATION_REQUIRED`, emit `{ok:false, kind:"verification-failed", hint:"Phone number verification succeeded but activation still reports VERIFICATION_REQUIRED — unusual, check Meta Business Manager"}`.
118
+ If the second activation attempt fails again with `ErrorDetails` containing `NUMBER_NOT_VERIFIED` or `REVERIFICATION`, emit `{ok:false, kind:"verification-failed", errorDetails:"<ErrorDetails>", hint:"Phone number verification succeeded but Meta still reports the number unverified — check the number in Meta Business Manager"}`. Any other `Error` on the retry → the normal `provisioning-error` envelope (Stage 3).
95
119
 
96
120
  If the second activation succeeds (`Active`), proceed to Stage 4 as normal.
@@ -124,7 +124,7 @@ Type-specific inputs:
124
124
  {"ok": false, "kind": "verify-failed", "hint": "Connect returned 201 but follow-up SOQL shows no matching channel"}
125
125
  ```
126
126
  Type-specific failure kinds (`partnership-blocked`, `user-declined`, `waba-manage-failed`,
127
- `meta-precondition` for WhatsApp; `line-token-invalid` for LINE; `apple-precondition` for Apple;
127
+ `unified-messaging-required`, `meta-precondition` for WhatsApp; `line-token-invalid` for LINE; `apple-precondition` for Apple;
128
128
  `oauth-not-complete`, `oauth-failed` for Facebook) are documented in the per-type reference files.
129
129
 
130
130
  ---
@@ -34,7 +34,7 @@ sf data query --target-org '{ORG_ALIAS}' \
34
34
  ```
35
35
  Record `{AUTH_PROVIDER_ID}` = `records[0].Id` and `{OAUTH_KICKOFF_URL}` = `records[0].OauthKickoffUrl`
36
36
  (e.g. `https://<myDomain>/services/auth/oauth/LiveMessageSetup`). If no record →
37
- `{ok:false, kind:"missing-authprovider", hint:"LiveMessageSetup AuthProvider not found — org may not have Facebook Messenger enabled"}`.
37
+ `{ok:false, kind:"missing-authprovider", hint:"LiveMessageSetup AuthProvider not found — run the Messaging Setup wizard once in Setup → Messaging Settings (enabling messaging alone doesn't create it), then re-run"}`.
38
38
 
39
39
  > **Use `OauthKickoffUrl`, NOT the generic `/services/auth/sso/<orgId>/LiveMessageSetup` SSO URL.**
40
40
  > That SSO door runs the AuthProvider's Apex *registration handler* to log a user in; `LiveMessageSetup`
@@ -33,19 +33,30 @@ Suite. There's no Graph API to probe this without a customer Meta token, so invo
33
33
  - `{ok:false, kind:"user-declined"}` → propagate; re-run when ready
34
34
 
35
35
  **Stage 3 — SF-side management.** The customer-side share from Stage 2 alone does not subscribe SF's
36
- webhook or share SF's Meta line of credit. Call the sanctioned Connect endpoint. **The WABA id (and
37
- phone id) go in the URL query string, NOT the JSON body** — the endpoint reads `wabaId`/`phoneId`
38
- from the query and ignores a body `externalAccountId`. Send an empty body:
36
+ webhook or share SF's Meta line of credit. Call the sanctioned Connect endpoint. It needs
37
+ `{AUTH_PROVIDER_ID}`, so **run the Stage 4.1 AuthProvider lookup (SKILL.md) first** — on a fresh run
38
+ Stage 3 executes before Stage 4. **The WABA id (and phone id) go in the URL query string, NOT the
39
+ JSON body** — the endpoint reads `wabaId`/`phoneId` from the query and ignores a body
40
+ `externalAccountId`. The body is empty, but **pass `--body '{}'` explicitly**: current `sf` CLI
41
+ versions reject a body-less POST locally with `No 'mode' found in 'body'` before anything reaches the
42
+ server.
39
43
 
40
44
  ```bash
41
45
  sf api request rest \
42
46
  "/services/data/v{API_VERSION}/connect/livemessage/whatsapp/business-account?authProviderId=${AUTH_PROVIDER_ID}&wabaId=${WABA_ID}&phoneId=${PHONE_NUMBER_ID}" \
43
47
  --method POST --target-org '{ORG_ALIAS}' \
44
48
  --header 'Content-Type: application/json' --header 'Accept: application/json' \
45
- --include
49
+ --body '{}' --include > "${SCRATCH_DIR}/waba-manage.txt" 2>&1
46
50
  ```
47
- On failure emit
48
- `{ok:false, kind:"waba-manage-failed", hint:"manageWhatsAppBusinessAccount failed — SF could not subscribe its webhook / share credit line with this WABA. Most likely: WABA not actually shared yet (partnership landed Meta-side but hasn't propagated), or the WABA id is wrong.", message:"..."}`.
51
+
52
+ **Classify by the response body's `success` field, not the HTTP status** (gotcha #7). This endpoint
53
+ returns **HTTP 201 even when it fails**, with `{"success":false,"errorMessage":"..."}` in the body.
54
+ - `success:true` → proceed to Stage 4.
55
+ - `success:false` with `errorMessage` containing `DE Unlimited Access orgs must create Unified Messaging channels`
56
+ → emit `{ok:false, kind:"unified-messaging-required", message:"<errorMessage>", hint:"This org's Digital Engagement license (DE Unlimited Access) only allows Unified Messaging WhatsApp channels; these skills create Enhanced WhatsApp channels, so WhatsApp can't be set up headlessly here. Set WhatsApp up in Setup → Messaging Settings instead. Other channel types aren't affected."}`. Stop — don't
57
+ attempt the insert; it fails on the same gate with a less readable error.
58
+ - any other `success:false`, or a non-2xx status → emit
59
+ `{ok:false, kind:"waba-manage-failed", hint:"manageWhatsAppBusinessAccount failed — SF could not subscribe its webhook / share credit line with this WABA. Most likely: WABA not actually shared yet (partnership landed Meta-side but hasn't propagated), or the WABA id is wrong.", message:"<errorMessage or response body>"}`.
49
60
 
50
61
  > **Do NOT put the WABA id in the body** (gotcha #6). A body of `{"externalAccountId":"<WABA_ID>"}` —
51
62
  > or even `{"wabaId":"<WABA_ID>"}` — returns `400 INVALID_API_INPUT "wabaId is required"`, because the
@@ -74,6 +85,8 @@ WhatsApp inserts across orgs; Facebook lands as `New`). Any pre-activation value
74
85
  - `partnership-blocked` — from Stage 2 (`service-de-waba-integrate`).
75
86
  - `user-declined` — user cancelled the WABA-linking prompt.
76
87
  - `waba-manage-failed` — from Stage 3 (SF-side `manageWhatsAppBusinessAccount`).
88
+ - `unified-messaging-required` — from Stage 3; the org's license only allows Unified Messaging
89
+ WhatsApp channels (gotcha #8).
77
90
  - `meta-precondition` — Connect rejected the insert (WABA not shared, phone not OTP'd on Meta side,
78
91
  etc.); hint `"Connect API rejected the request — WABA not shared, phone not OTP'd on Meta side"`.
79
92
 
@@ -96,3 +109,17 @@ WhatsApp inserts across orgs; Facebook lands as `New`). Any pre-activation value
96
109
  body shape `{"externalAccountId":"<WABA_ID>"}` returns `400 INVALID_API_INPUT "wabaId is required"`
97
110
  (as does `{"wabaId":...}` in the body). Pass `?...&wabaId=<WABA_ID>&phoneId=<PHONE_NUMBER_ID>` with an
98
111
  empty body — see Stage 3.
112
+ 7. **WABA-manage reports failure inside a 201.** A failed call returns HTTP 201 with
113
+ `{"success":false,"errorMessage":"..."}`. Classifying by status alone treats it as success and
114
+ pushes the run into an insert that fails anyway. Always read `success`.
115
+ 8. **DE Unlimited Access orgs can't create Enhanced WhatsApp channels.** On orgs licensed "DE
116
+ Unlimited Access" (Messaging Unlimited), both WhatsApp Connect calls are blocked by the same
117
+ server-side check: `DE Unlimited Access orgs must create Unified Messaging channels.` WABA-manage
118
+ returns it readably (201 + `success:false`). The insert returns it as
119
+ `400 CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY`, or on some builds as an opaque `500 UNKNOWN_EXCEPTION`
120
+ ("Error creating a new Messaging Channel"), which is why Stage 3 stops on it. Setting
121
+ `platformType:"Unified"` in the insert body isn't a workaround — it's rejected with
122
+ `Invalid value for platform type`. The check fires before the WABA partnership matters, and it
123
+ only affects WhatsApp: Facebook, MIAW and Voice channels on the same org stay Enhanced. There's no
124
+ headless Unified Messaging path in these skills, so the user has to set up WhatsApp in Setup.
125
+ (Verified on a 264 DE Unlimited Access org, 2026-10-05, and a local 266 org, 2026-09-23.)
@@ -49,6 +49,7 @@ Provisioning behavior:
49
49
  | --- | --- |
50
50
  | `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. |
51
51
  | `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. |
52
+ | `references/named-queue.md` | The caller supplied `{QUEUE}` (a queue the user named). |
52
53
  | `references/asa-routing.md` | The user picked ASA (Agentforce Service Agent) routing — precondition check, enumerating live ASAs, and selection. |
53
54
  | `references/gotchas.md` | Troubleshooting an unexpected result, or before modifying this skill — the known gotchas. |
54
55
  | `references/worked-examples.md` | You want a reference run of the reuse-existing-queue, create-new-queue, Flow, or ASA paths. |
@@ -62,6 +63,7 @@ Provisioning behavior:
62
63
  ## Inputs (from caller)
63
64
 
64
65
  - `{CHANNEL_ID}` — a 15- or 18-char `MessagingChannel.Id` (prefix `0Mj`). The channel must already exist.
66
+ - `{QUEUE}` — optional; a queue the user named (label, DeveloperName, or `00G` Id). Implies Queue routing — no routing-type prompt.
65
67
  - `{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.
66
68
 
67
69
  ## Output (to caller)
@@ -175,7 +177,7 @@ sf data query --target-org '{ORG_ALIAS}' \
175
177
 
176
178
  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.
177
179
 
178
- Then ask the user (via a prompt — do NOT auto-pick):
180
+ If `{QUEUE}` was supplied, the routing type is `queue` — skip the prompt and go to Stage 3-Queue. Otherwise ask the user (via a prompt — do NOT auto-pick):
179
181
 
180
182
  ```text
181
183
  The MessagingChannel '{developerName}' ({CHANNEL_ID}) has no routing configured.
@@ -217,6 +219,8 @@ sf data query --target-org '{ORG_ALIAS}' \
217
219
 
218
220
  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`.)
219
221
 
222
+ **If `{QUEUE}` was supplied**, validate it against this list instead of prompting — **load `references/named-queue.md` and follow it.**
223
+
220
224
  Present the user with a numbered list plus a final "create new" option:
221
225
 
222
226
  ```text
@@ -1,6 +1,6 @@
1
1
  ---
2
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."
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, SessionHandler polymorphism differences across org shapes, and the MessagingSession-eligibility rule the server doesn't enforce. DO NOT load this during a normal first-time routing configuration run — only when troubleshooting or modifying the skill."
4
4
  metadata:
5
5
  version: "1.0"
6
6
  related-skills: service-de-channel-routing-configure
@@ -25,3 +25,5 @@ metadata:
25
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
26
 
27
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.
28
+
29
+ 10. **The server does not enforce MessagingSession eligibility on the SessionHandler PATCH.** Validation (Round 5, release 264) routed both a MIAW and a Facebook channel to a queue whose supported objects were only `ContactRequest` and `VoiceCall`, and the PATCH succeeded. So the skill's eligible-queue filter (`QueueRoutingConfigId != null` + `QueueSobject.SobjectType='MessagingSession'`) is stricter than the server. Keep the filter as the **recommended** rule — a queue can only own records of the object types it supports, and the runtime effect of routing sessions to such a queue hasn't been verified — but treat it as advice, not a hard block: when the user names an ineligible queue, explain what's missing and let them choose (Stage 3-Queue). Don't send a user who named a real queue down the "create a new queue" branch just because the filtered list is empty.
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: service-de-channel-routing-configure-named-queue
3
+ description: "Load when the caller of service-de-channel-routing-configure supplied {QUEUE} (a queue the user already named) and it has to be validated on the Queue routing path. Covers matching it against the eligible list, the unfiltered lookup when it isn't eligible, the three-way prompt (use anyway / pick eligible / create new), and the warning added to the success envelope. DO NOT load when no {QUEUE} was supplied — the normal Stage 3-Queue list applies."
4
+ metadata:
5
+ version: "1.0"
6
+ related-skills: service-de-channel-routing-configure
7
+ ---
8
+
9
+ # Validating a queue the user named (`{QUEUE}`)
10
+
11
+ Match `{QUEUE}` against the Stage 3-Queue eligible list by `Id`, `DeveloperName`, or `Name`.
12
+
13
+ - **Match** → record `{QUEUE_ID}`, skip to Stage 5, no prompt.
14
+ - **No match** → look it up without the eligibility filters:
15
+
16
+ ```bash
17
+ sf data query --target-org '{ORG_ALIAS}' \
18
+ --query "SELECT Id, Name, DeveloperName, QueueRoutingConfigId FROM Group WHERE Type='Queue' AND (DeveloperName='{QUEUE}' OR Name='{QUEUE}')" \
19
+ --json
20
+ ```
21
+
22
+ If `{QUEUE}` is an Id (15 or 18 chars starting with `00G`), filter on `Id='{QUEUE}'` instead. Don't combine the two: comparing `Id` to a name fails the whole query with `INVALID_QUERY_FILTER_OPERATOR` ("invalid ID field").
23
+
24
+ If it exists, tell the user exactly what's missing. Never silently accept it, and never silently fall through to "create new":
25
+
26
+ ```text
27
+ Queue '{QUEUE}' exists but isn't set up for messaging: {"it doesn't list Messaging Session as a supported object" | "it has no Omni-Channel routing configuration"}.
28
+ The server will accept it, but the skill can't confirm sessions will route there.
29
+
30
+ 1) Use it anyway
31
+ 2) Pick an eligible queue from the list
32
+ 3) Create a new messaging queue
33
+ ```
34
+
35
+ On (1), record `{QUEUE_ID}`, add `"warning": "queue is not MessagingSession-capable / Omni-enabled"` to the success envelope, and continue to Stage 5. (2) → the normal numbered list. (3) → `references/queue-creation.md`.
36
+
37
+ - **No queue matches `{QUEUE}` at all** → say so, then show the normal numbered list.
38
+
39
+ Why the rule and the server disagree: see `references/gotchas.md` #10.
@@ -168,6 +168,8 @@ Outline:
168
168
  3. Deploy it back (`sf project deploy start -m MessagingChannel:{DeveloperName}`).
169
169
  4. On deploy failure: `{ok:false, kind:"metadata-deploy-failed", message: <componentFailures>}`.
170
170
 
171
+ > **Facebook:** real metadata changes currently fail with an opaque numeric error (e.g. `(-462367322)`). It's a known platform issue, not bad input. Don't retry; return `metadata-deploy-failed` with the Setup-UI fallback hint (see `references/gotchas.md` #16).
172
+
171
173
  **Never emit `<actionParameterMappings>`** (0 occurrences across a 191-channel scan — it's a Tooling-only mapping done in the UI post-deploy).
172
174
 
173
175
  ---
@@ -176,7 +178,7 @@ Outline:
176
178
 
177
179
  Run only when requested **and** applicable to this `MessageType`:
178
180
 
179
- - **Facet 4 (inactivity):** the four timeout fields (`endUserIdleTimeOut` 5–30, `endUserIdleAction` = `Inactivate`|`End`|`InactivateAndEnd`, `endInactiveSessionTimeOut`, `isAgentMessageResetInactivityEnabled`) are **top-level siblings of `<embeddedConfig>`**, not inside it. Full four fields → **MIAW only**; `isAgentMessageResetInactivityEnabled` also valid on Apple/Facebook; **not applicable on SMS/WhatsApp/LINE** → emit `facet-not-applicable`. (On 262-line pods only `endUserIdleTimeOut` deploys — see `references/gotchas.md`.)
181
+ - **Facet 4 (inactivity):** the four timeout fields (`endUserIdleTimeOut` 5–30, `endUserIdleAction` = `Inactivate`|`End`|`InactivateAndEnd`, `endInactiveSessionTimeOut`, `isAgentMessageResetInactivityEnabled`) are **top-level siblings of `<embeddedConfig>`**, not inside it. Full four fields → **MIAW only**; `isAgentMessageResetInactivityEnabled` also valid on Apple/Facebook; **not applicable on SMS/WhatsApp/LINE** → emit `facet-not-applicable`. (Release-gated: on 262 pods only `endUserIdleTimeOut` deploys and the reset flag is silently dropped; all four work on 264+ — see `references/gotchas.md` #15.)
180
182
  - **Facet 5 (parameters):** `<customParameters>` (`name`, `masterLabel`, `externalParameterName`, `parameterDataType=String`, optional `maxLength`) and `<standardParameters>` — **MIAW pre-chat only**, rare. Skip unless the caller explicitly configures pre-chat.
181
183
 
182
184
  Both use the same retrieve→edit→deploy flow as Stage 3 (`references/channel-settings-facets.md`).
@@ -117,7 +117,7 @@ Four fields, **siblings of `<embeddedConfig>`** (top-level, NOT nested inside it
117
117
  <endUserIdleTimeOut>5</endUserIdleTimeOut>
118
118
  ```
119
119
 
120
- **Per-type scope (verified live):** all four → **MIAW (EmbeddedMessaging) only**. `isAgentMessageResetInactivityEnabled` alone also appears on **Apple** and **Facebook**. **SMS/WhatsApp/LINE carry no inactivity fields** — emit `facet-not-applicable`. On 262-line pods only `endUserIdleTimeOut` deploys (`endInactiveSessionTimeOut`/`endUserIdleAction` land at 264+) — see `gotchas.md`.
120
+ **Per-type scope (verified live):** all four → **MIAW (EmbeddedMessaging) only**. `isAgentMessageResetInactivityEnabled` alone also appears on **Apple** and **Facebook**. **SMS/WhatsApp/LINE carry no inactivity fields** — emit `facet-not-applicable`. Release-gated: on 262-line pods only `endUserIdleTimeOut` deploys (`endInactiveSessionTimeOut`/`endUserIdleAction` are rejected, and `isAgentMessageResetInactivityEnabled` reports `Succeeded` but is silently dropped); all four deploy and persist on 264+ — see `gotchas.md` #15.
121
121
 
122
122
  ---
123
123
 
@@ -149,4 +149,4 @@ Four fields, **siblings of `<embeddedConfig>`** (top-level, NOT nested inside it
149
149
  | Inactivity — reset flag (4) | yes | yes | yes | no | no | no |
150
150
  | Pre-chat parameters (5) | pre-chat only | no | no | no | no | no |
151
151
 
152
- Derived from a Metadata-API retrieve of real channels of each type. Don't deploy a facet a type doesn't support — the deploy will either fail or silently drop the element.
152
+ Derived from a Metadata-API retrieve of real channels of each type. **Facebook caveat:** the facets are supported, but real metadata updates to Facebook channels currently fail with an opaque error — see `gotchas.md` #16. Don't deploy a facet a type doesn't support — the deploy will either fail or silently drop the element.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: service-de-channel-settings-configure-gotchas
3
- description: "Load when debugging an unexpected result from service-de-channel-settings-configure, or before implementing changes to it. Covers the known gotchas: the exact per-ConsentType activation-readiness contract and its source, the ImplicitOptIn-still-needs-a-keyword-record trap, comma-separated keyword storage, one-record-per-language uniqueness, the Unified-SMS help/French-custom rules, the OptInPrompt Unified-SMS/WhatsApp/RCS exemption, the outbound-only auto-pass, the Enhanced-only gate, the legacy OptInResponse/OptOutResponse deprecation, and why MsgChannelLanguageKeyword must be written over the Data/SObjects API rather than the Tooling API despite its setupEntity perApiAccess block. DO NOT load this during a normal first-time consent run — only when troubleshooting or modifying the skill."
3
+ description: "Load when debugging an unexpected result from service-de-channel-settings-configure, or before implementing changes to it. Covers the known gotchas: the exact per-ConsentType activation-readiness contract and its source, the ImplicitOptIn-still-needs-a-keyword-record trap, comma-separated keyword storage, one-record-per-language uniqueness, the Unified-SMS help/French-custom rules, the OptInPrompt Unified-SMS/WhatsApp/RCS exemption, the outbound-only auto-pass, the Enhanced-only gate, the legacy OptInResponse/OptOutResponse deprecation, why MsgChannelLanguageKeyword must be written over the Data/SObjects API rather than the Tooling API despite its setupEntity perApiAccess block, which inactivity fields deploy on 262 vs 264 pods, and the Facebook metadata-update failure. DO NOT load this during a normal first-time consent run — only when troubleshooting or modifying the skill."
4
4
  metadata:
5
5
  version: "1.0"
6
6
  related-skills: service-de-channel-settings-configure
@@ -39,3 +39,14 @@ metadata:
39
39
  13. **`ConsentType` requires minApiVersion 224.** All consent fields (`ConsentType`, `OptInPrompt`, `DoubleOptInPrompt`, `IsRequireDoubleOptIn`) and the `MsgChannelLanguageKeyword` entity were introduced in API 224. The skill declares `minApiVersion: "67.0"` (well above 224); on an older org the fields won't exist and the Stage 1 query will error.
40
40
 
41
41
  14. **Write `MsgChannelLanguageKeyword` over the regular Data/SObjects API — NOT the Tooling API.** `sf data create/update record --sobject MsgChannelLanguageKeyword` (the path this skill uses) works and is the sanctioned write path — verified live on sdb6c 2026-08-13: a `sf data update record` returned `success=true` at API v69.0, and `sf sobject describe` reports the object `createable: true, updateable: true`. **The entity XML is misleading here.** `MsgChannelLanguageKeyword.entity.xml` is a `setupEntity` carrying `<perApiAccess minApiVersion="246" apiAccess="isDevInternal || isUiTier" sobjectFamily="TOOLING"/>`. That block reads like a blanket write gate, but `sobjectFamily="TOOLING"` scopes it to the **Tooling API family only** — `ApiDictionaryInitializer._getFieldAccessStrategy` selects the `TOOLING` `perApiAccess` seed exclusively when `apiFamily.isTooling()`, so a regular SObjects/Data API request never applies it and instead uses the entity's base `createAccess`/`editAccess` (`LiveMessage.userCanCustomizeSetup`, which a setup-capable admin satisfies). Consequently a **Tooling** API write (`sf ... --use-tooling-api`, or the Tooling REST/SOAP endpoints) returns `NOT_FOUND` for this entity for external callers, while the Data API write succeeds. If a keyword write fails, first suspect a transient org issue (sdb6c 503 maintenance windows produced spurious `UNKNOWN_EXCEPTION` on Data-API writes during testing) and retry — do NOT switch to the Tooling API thinking it's the "real" write path; it isn't.
42
+
43
+ 15. **Inactivity fields are release-gated: 262 vs 264.** The Metadata API only exposes all four facet-4 fields from release **264**. The Setup UI can set all of them on 262 because it writes through a different layer. Check the org's release (`sf org display` → API version: v67.0 = 262, v69.0 = 264) before promising the full set:
44
+ | Field | 262 pods | 264+ |
45
+ | --- | --- | --- |
46
+ | `endUserIdleTimeOut` | deploys and persists | deploys and persists |
47
+ | `endUserIdleAction` | **rejected** by the deploy schema | deploys and persists |
48
+ | `endInactiveSessionTimeOut` | **rejected** by the deploy schema | deploys and persists |
49
+ | `isAgentMessageResetInactivityEnabled` | deploy reports `Succeeded` but the field is **silently dropped** | deploys and persists |
50
+ No org setting turns these on; only a 264+ build has them. On 262, deploy only `endUserIdleTimeOut` and report the other three as unsupported on this release. The Stage 5 re-retrieve is what catches the silent drop of the reset flag — never trust a `Succeeded` deploy on its own. The 5–30 minute bound on `endUserIdleTimeOut` is enforced server-side on both (`must be between 5 and 30 minutes`; the org value is unchanged). (Verified on a v67.0/262 org and a v69.0/264 org, Round 4/5 validation, 2026-10.)
51
+
52
+ 16. **Facebook channels reject any real metadata change with an opaque numeric error.** Deploying an edited `.messagingChannel-meta.xml` for a Facebook channel fails with a bare code like `(-462367322)`, even when the only change is `masterLabel`. Redeploying the unchanged retrieved file succeeds, but only because nothing changed. It reproduces on a brand-new, correctly configured Facebook channel on a 264 org (2026-10), so it isn't corruption of one channel; the root cause is unknown and looks like a platform defect. MIAW channels on the same org deploy fine. Until it's fixed, facets 2–4 can't be written headlessly on Facebook: don't retry. Emit `{ok:false, kind:"metadata-deploy-failed", message:"<the code>", hint:"Facebook channels currently reject metadata updates with this opaque error (known platform issue, not your input). Configure these settings in Setup → Messaging Settings → this channel instead."}`. Consent (facet 1, Data API) is unaffected.