@salesforce/afv-skills 1.55.0 → 1.56.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 (220) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-generate/SKILL.md +8 -0
  3. package/skills/agentforce-generate/references/actions-reference.md +2 -2
  4. package/skills/agentforce-generate/references/voice-modality-reference.md +51 -15
  5. package/skills/agentforce-generate/references/voice-telephony-cli.md +193 -0
  6. package/skills/agentforce-observe/SKILL.md +13 -9
  7. package/skills/agentforce-observe/references/ahm-alerts.md +193 -14
  8. package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +24 -15
  9. package/skills/automation-sandbox-post-copy-config-generate/assets/config_template.json +11 -0
  10. package/skills/automation-sandbox-post-copy-config-generate/assets/json_schema.json +33 -1
  11. package/skills/automation-sandbox-post-copy-config-generate/references/configuration_catalog.md +32 -1
  12. package/skills/automation-sandbox-post-copy-configure/SKILL.md +75 -71
  13. package/skills/automation-sandbox-post-copy-configure/assets/scheduled_apex_template.apex +13 -0
  14. package/skills/automation-sandbox-post-copy-configure/examples/sample_scheduled_apex_config.json +13 -0
  15. package/skills/automation-sandbox-post-copy-configure/references/scheduled_apex_path.md +155 -0
  16. package/skills/automation-sandbox-post-copy-configure/scripts/build-scheduled-apex.mjs +62 -0
  17. package/skills/automation-sandbox-post-copy-configure/scripts/soql-escape-job-name.mjs +28 -0
  18. package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +383 -0
  19. package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +324 -0
  20. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +63 -0
  21. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +100 -0
  22. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -0
  23. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +46 -0
  24. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/04-deploy-engine.js +198 -0
  25. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/05-deploy-tpm-accruals.js +231 -0
  26. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +82 -0
  27. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +517 -0
  28. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +416 -0
  29. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -0
  30. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +514 -0
  31. package/skills/consumer-goods-sync-management-configure/SKILL.md +137 -0
  32. package/skills/consumer-goods-sync-management-configure/examples/scenarios.md +294 -0
  33. package/skills/consumer-goods-sync-management-configure/references/act1-setup-sync.md +333 -0
  34. package/skills/consumer-goods-sync-management-configure/references/act2-assign-users.md +324 -0
  35. package/skills/consumer-goods-sync-management-configure/references/act3-plan-verify.md +113 -0
  36. package/skills/consumer-goods-sync-management-configure/references/readiness-and-enablement.md +164 -0
  37. package/skills/consumer-goods-sync-management-configure/references/sync-management-app-install-backbone.md +159 -0
  38. package/skills/consumer-goods-sync-management-configure/references/transports-and-namespace.md +220 -0
  39. package/skills/consumer-goods-sync-management-configure/references/verify-and-smoke.md +175 -0
  40. package/skills/dx-org-analyze/SKILL.md +0 -1
  41. package/skills/dx-org-analyze/scripts/collect_org_data.py +2 -2
  42. package/skills/dx-org-analyze/scripts/compute_diff.py +2 -4
  43. package/skills/dx-org-analyze/scripts/introspect_org.py +4 -40
  44. package/skills/dx-org-manage/SKILL.md +6 -50
  45. package/skills/dx-org-manage/examples/README.md +10 -16
  46. package/skills/dx-org-manage/references/scratch-org-create.md +1 -1
  47. package/skills/dx-org-manage/references/scratch-org-operations.md +1 -1
  48. package/skills/dx-org-shape-manage/SKILL.md +4 -3
  49. package/skills/education-cloud-domain-configure/references/gotchas-extended.md +1 -0
  50. package/skills/experience-accessibility-validate/SKILL.md +8 -5
  51. package/skills/experience-accessibility-validate/references/reviewers/sc-1-1-1-non-text-content.md +1 -4
  52. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-i-lists.md +0 -4
  53. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-ii-tables.md +20 -85
  54. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iii-form-labels.md +4 -4
  55. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iv-regions.md +0 -4
  56. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-v-groups.md +2 -4
  57. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-5-identify-input.md +0 -4
  58. package/skills/experience-accessibility-validate/references/reviewers/sc-1-4-3-contrast.md +4 -14
  59. package/skills/experience-accessibility-validate/references/reviewers/sc-2-1-1-keyboard.md +9 -5
  60. package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-4-link-purpose.md +1 -4
  61. package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-6-headings-labels.md +0 -4
  62. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-1-pointer-gestures.md +0 -4
  63. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-2-pointer-cancellation.md +0 -4
  64. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-3-label-in-name.md +0 -4
  65. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-7-dragging-movement.md +0 -4
  66. package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-1-on-focus.md +0 -4
  67. package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-2-on-input.md +1 -4
  68. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-1-error-identification.md +1 -4
  69. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-2-labels-instructions.md +1 -4
  70. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-3-error-suggestion.md +1 -4
  71. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-i-name.md +4 -5
  72. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-ii-role.md +1 -4
  73. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-iii-value.md +0 -4
  74. package/skills/experience-lwc-accessibility-jest-run/SKILL.md +104 -25
  75. package/skills/experience-lwc-accessibility-jest-run/assets/jest.config.js +4 -0
  76. package/skills/experience-lwc-accessibility-jest-run/assets/sa11y-jest-setup.js +5 -0
  77. package/skills/experience-ui-bundle-app-coordinate/SKILL.md +5 -5
  78. package/skills/experience-ui-bundle-features-generate/SKILL.md +65 -36
  79. package/skills/experience-ui-bundle-features-generate/references/angular/features.md +74 -0
  80. package/skills/experience-ui-bundle-features-generate/references/react/features.md +59 -0
  81. package/skills/experience-ui-bundle-features-generate/scripts/detect-framework.sh +73 -0
  82. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -2
  83. package/skills/experience-ui-bundle-metadata-generate/SKILL.md +26 -14
  84. package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +37 -0
  85. package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +32 -0
  86. package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +73 -0
  87. package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +30 -8
  88. package/skills/field-service-data-capture-migrate/SKILL.md +391 -0
  89. package/skills/field-service-data-capture-migrate/assets/sample-legacy-flow.flow-meta.xml +163 -0
  90. package/skills/field-service-data-capture-migrate/references/architecture-notes.md +40 -0
  91. package/skills/field-service-data-capture-migrate/references/component-mapping.md +278 -0
  92. package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +183 -0
  93. package/skills/field-service-data-capture-migrate/references/dc-platform-rules.md +130 -0
  94. package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +215 -0
  95. package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +36 -0
  96. package/skills/field-service-data-capture-migrate/references/migration-checklist.md +121 -0
  97. package/skills/field-service-data-capture-migrate/references/transformer-rules.md +132 -0
  98. package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +277 -0
  99. package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1311 -0
  100. package/skills/field-service-data-capture-migrate/scripts/cud_analysis.py +402 -0
  101. package/skills/field-service-data-capture-migrate/scripts/deploy_flow.sh +230 -0
  102. package/skills/field-service-data-capture-migrate/scripts/discover_subflow_tree.py +230 -0
  103. package/skills/field-service-data-capture-migrate/scripts/flow_input.py +186 -0
  104. package/skills/field-service-data-capture-migrate/scripts/flow_xml_utils.py +39 -0
  105. package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +413 -0
  106. package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +199 -0
  107. package/skills/field-service-data-capture-migrate/scripts/json_to_flow_xml.py +146 -0
  108. package/skills/field-service-data-capture-migrate/scripts/manual_review_flags.py +42 -0
  109. package/skills/field-service-data-capture-migrate/scripts/retrieve_flow_rest.sh +155 -0
  110. package/skills/field-service-data-capture-migrate/scripts/subflow_names.py +49 -0
  111. package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +1661 -0
  112. package/skills/field-service-data-capture-migrate/scripts/validate_flow.sh +147 -0
  113. package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +1258 -0
  114. package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +1 -1
  115. package/skills/life-sciences-fieldsalesrep-coordinate/references/orchestration-flow.md +1 -1
  116. package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +14 -1
  117. package/skills/mobile-apps-create/SKILL.md +1 -1
  118. package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/SKILL.md +7 -7
  119. package/skills/platform-sandbox-configure/SKILL.md +108 -133
  120. package/skills/platform-sandbox-configure/references/api-response-shapes.md +39 -0
  121. package/skills/platform-sandbox-configure/references/definition-file-approach.md +73 -0
  122. package/skills/platform-widget-generate/SKILL.md +26 -18
  123. package/skills/platform-widget-generate/examples/formulas.json +191 -0
  124. package/skills/platform-widget-generate/references/widget-formulas.md +123 -0
  125. package/skills/platform-widget-generate/references/widget-meta-directives.md +4 -4
  126. package/skills/sales-call-scoring-configure/SKILL.md +318 -0
  127. package/skills/sales-call-scoring-configure/assets/best-practice-competencies.json +67 -0
  128. package/skills/sales-call-scoring-configure/assets/ootb-competencies.json +58 -0
  129. package/skills/sales-call-scoring-configure/references/admin-communication.md +79 -0
  130. package/skills/sales-call-scoring-configure/references/competency-crud.md +130 -0
  131. package/skills/sales-call-scoring-configure/scripts/create-competency.sh +166 -0
  132. package/skills/sales-call-scoring-configure/scripts/create-custom-competency.sh +166 -0
  133. package/skills/sales-call-scoring-configure/scripts/edit-competency.sh +185 -0
  134. package/skills/sales-call-scoring-configure/scripts/edit-custom-competency.sh +190 -0
  135. package/skills/sales-call-scoring-configure/scripts/enable-call-scoring.sh +436 -0
  136. package/skills/sales-call-scoring-configure/scripts/get-competency.sh +72 -0
  137. package/skills/sales-call-scoring-configure/scripts/get-custom-competency.sh +78 -0
  138. package/skills/sales-call-scoring-configure/scripts/install-best-practice-competencies.sh +223 -0
  139. package/skills/sales-call-scoring-configure/scripts/install-ootb-competencies.sh +237 -0
  140. package/skills/sales-call-scoring-configure/scripts/list-competencies.sh +99 -0
  141. package/skills/sales-call-scoring-configure/scripts/shared/auth.sh +116 -0
  142. package/skills/sales-call-scoring-configure/scripts/shared/cap.sh +86 -0
  143. package/skills/sales-call-scoring-configure/scripts/shared/soap.sh +267 -0
  144. package/skills/sales-call-scoring-configure/scripts/shared/soql.sh +25 -0
  145. package/skills/sales-call-scoring-configure/scripts/toggle-competency.sh +112 -0
  146. package/skills/sales-call-scoring-configure/scripts/toggle-custom-competency.sh +125 -0
  147. package/skills/sales-call-scoring-configure/scripts/verify-ootb-competencies.sh +116 -0
  148. package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1 -0
  149. package/skills/service-de-channel-activate/SKILL.md +6 -5
  150. package/skills/service-de-channel-create/SKILL.md +3 -3
  151. package/skills/service-de-channel-routing-configure/SKILL.md +3 -3
  152. package/skills/service-de-channel-settings-configure/SKILL.md +195 -0
  153. package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +152 -0
  154. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/gotchas.md +3 -3
  155. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/language-keywords.md +4 -4
  156. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/worked-examples.md +14 -14
  157. package/skills/service-de-headless-channel-configure/SKILL.md +6 -6
  158. package/skills/service-de-headless-channel-configure/references/worked-examples.md +1 -1
  159. package/skills/service-helpagent-coordinate/SKILL.md +3 -2
  160. package/skills/service-helpagent-coordinate/references/channel-voice.md +15 -4
  161. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +49 -31
  162. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +71 -6
  163. package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +26 -4
  164. package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +35 -10
  165. package/skills/service-itsm-agentic-setup-cmdb-access-assign/references/mcp-invocation.md +25 -5
  166. package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +1 -1
  167. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +5 -5
  168. package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +1 -1
  169. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +2 -2
  170. package/skills/service-itsm-agentic-setup-cmdb-coordinate/examples/output-templates.md +1 -1
  171. package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +25 -15
  172. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +8 -5
  173. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +4 -2
  174. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +1 -1
  175. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +29 -16
  176. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +8 -5
  177. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +4 -2
  178. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +1 -1
  179. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +29 -16
  180. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +138 -68
  181. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +31 -15
  182. package/skills/service-itsm-agentic-setup-incident-management/references/incident-persona-psg.md +156 -0
  183. package/skills/service-itsm-agentic-setup-incident-management/references/incident-preferences.md +148 -0
  184. package/skills/service-itsm-agentic-setup-incident-management/references/major-incident-management.md +162 -0
  185. package/skills/service-itsm-agentic-setup-incident-management/references/service-mgmt-privilege.md +149 -0
  186. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +103 -89
  187. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +2 -2
  188. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +21 -39
  189. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +3 -3
  190. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +18 -1
  191. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +63 -37
  192. package/skills/service-omni-attribute-routing-configure/SKILL.md +53 -0
  193. package/skills/service-omni-attribute-routing-configure/references/api-notes.md +7 -0
  194. package/skills/service-omni-attribute-routing-configure/scripts/configure-and-report.sh +224 -0
  195. package/skills/service-omni-attribute-routing-configure/scripts/tests/test_attribute_routing_contracts.py +137 -0
  196. package/skills/service-omni-channel-inventory-analyze/SKILL.md +96 -0
  197. package/skills/service-omni-channel-inventory-analyze/references/api-notes.md +52 -0
  198. package/skills/service-omni-channel-inventory-analyze/scripts/analyze.sh +185 -0
  199. package/skills/service-omni-channel-inventory-analyze/scripts/tests/_bootstrap.py +84 -0
  200. package/skills/service-omni-channel-inventory-analyze/scripts/tests/test_inventory_analyze_contracts.py +141 -0
  201. package/skills/service-omni-channel-limits-analyze/SKILL.md +70 -0
  202. package/skills/service-omni-channel-limits-analyze/references/api-notes.md +22 -0
  203. package/skills/service-omni-channel-limits-analyze/scripts/analyze.sh +159 -0
  204. package/skills/service-omni-channel-limits-analyze/scripts/tests/_bootstrap.py +87 -0
  205. package/skills/service-omni-channel-limits-analyze/scripts/tests/test_limits_analyze_contracts.py +99 -0
  206. package/skills/service-omni-channel-setup-coordinate/SKILL.md +12 -20
  207. package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +55 -5
  208. package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +38 -0
  209. package/skills/service-omni-command-center-analyze/SKILL.md +2 -2
  210. package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
  211. package/skills/dx-org-manage/examples/snapshots/error_output.json +0 -9
  212. package/skills/dx-org-manage/examples/snapshots/success_output.json +0 -15
  213. package/skills/dx-org-manage/references/cli_flags.md +0 -67
  214. package/skills/dx-org-manage/references/creating-snapshot.md +0 -103
  215. package/skills/dx-org-manage/references/snapshot_usage.md +0 -74
  216. package/skills/experience-accessibility-validate/scripts/contrast-ratio.py +0 -153
  217. package/skills/experience-lwc-accessibility-jest-run/references/running-sa11y-jest-tests.md +0 -205
  218. package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +0 -14
  219. /package/skills/experience-ui-bundle-features-generate/references/{conflict-resolution-schema.json → common/conflict-resolution-schema.json} +0 -0
  220. /package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/references/api-response-schema.md +0 -0
@@ -0,0 +1,195 @@
1
+ ---
2
+ name: service-de-channel-settings-configure
3
+ description: "Configure settings on an already-existing Enhanced `MessagingChannel` (any type — WhatsApp, Text/SMS, LINE, Apple, Facebook, EmbeddedMessaging), given its `{CHANNEL_ID}`. Covers five facets: consent (ConsentType + per-language keyword records), automated responses, messaging keywords, session-inactivity timeouts, and pre-chat parameters. Consent + a matching language-keyword record are required for activation's readiness check. TRIGGER when setting or changing settings on a channel that already exists (opt-out keyword, consent type, double opt-in confirmation, initial/help auto-responses, OptIn/OptOut keywords, session-inactivity timeout) — typically between insertion/routing and activation, or on a live channel. DO NOT TRIGGER for creating a new channel (`service-de-channel-create`), deploying a MIAW/EmbeddedMessaging channel from metadata XML (`service-digital-engagement-channel-configure`), setting routing (`service-de-channel-routing-configure`), or activating a channel (`service-de-channel-activate`)."
4
+ metadata:
5
+ version: "2.0"
6
+ minApiVersion: "67.0"
7
+ domains: ["Service"]
8
+ cliTools:
9
+ - tool: ["sf"]
10
+ semver: ">=2.0.0"
11
+ relatedSkills:
12
+ - "service-de-channel-activate"
13
+ - "service-de-channel-create"
14
+ - "service-de-channel-routing-configure"
15
+ - "service-de-headless-channel-configure"
16
+ - "service-digital-engagement-channel-configure"
17
+ ---
18
+
19
+ # Configuring Channel Settings
20
+
21
+ ## What this skill does
22
+
23
+ Configures settings on an **already-existing Enhanced `MessagingChannel`** (identified by `{CHANNEL_ID}`), for any message type. It groups five facets; you only run the ones the caller asks for.
24
+
25
+ | # | Facet | Write surface | Applies to |
26
+ | --- | --- | --- | --- |
27
+ | 1 | **Consent** — `ConsentType` + `OptInPrompt`/`DoubleOptInPrompt` on the channel, plus per-language `MsgChannelLanguageKeyword` records | **Data/SObjects API** (`sf data update/create record`) | all Enhanced types |
28
+ | 2 | **Automated responses** — `<automatedResponses>` (initial, agent-engaged/-ended, opt-in prompt/confirmation, help, opt-out, inactive/idle) | **Metadata API** deploy | all Enhanced types |
29
+ | 3 | **Messaging keywords** — `<messagingKeywords>` (OptIn/OptOut/Help keyword groups per language) | **Metadata API** deploy | all Enhanced types |
30
+ | 4 | **Session inactivity** — `endUserIdleTimeOut`, `endUserIdleAction`, `endInactiveSessionTimeOut`, `isAgentMessageResetInactivityEnabled` | **Metadata API** deploy | **MIAW-only** (reset-flag also Apple/Facebook) |
31
+ | 5 | **Pre-chat parameters** — `<customParameters>` / `<standardParameters>` | **Metadata API** deploy | **MIAW pre-chat only** (rare) |
32
+
33
+ **This skill is mixed-surface.** Consent (facet 1) is written with the Data API on the live record. Facets 2–5 live only in the channel's **metadata** and are configured by retrieving the channel's `.messagingChannel-meta.xml`, editing it, and deploying it back. Verified live on sdb6 (2026-09): every Data/Connect/Tooling read of the facet-2–5 fields fails `INVALID_TYPE`/"No such column" — they are Metadata-API-only.
34
+
35
+ **Per-type applicability is verified, not assumed** (from a live retrieve of real channels of each type). Facets 2 and 3 are genuinely type-agnostic. Facet 4's four timeout fields appear **only on MIAW**; only `isAgentMessageResetInactivityEnabled` extends to Apple/Facebook, and SMS/WhatsApp/LINE carry no inactivity fields at all. Facet 5 appears only on MIAW channels that use pre-chat. Scope per-type accordingly — do **not** deploy a facet a type doesn't support.
36
+
37
+ ## When to use (TRIGGER)
38
+
39
+ Trigger this skill when the user wants to configure or change settings on a channel that **already exists**, e.g.:
40
+
41
+ - "set the opt-out keyword / consent type on my WhatsApp channel"
42
+ - "add a double opt-in confirmation to this messaging channel"
43
+ - "configure the initial / agent-engaged / help auto-response on my Apple channel"
44
+ - "add OptIn/OptOut/Help keywords to my Text channel"
45
+ - "set the session inactivity timeout / idle action on my MIAW channel"
46
+ - "change the auto-responses on channel 0MjXXXXXXXXXXXX"
47
+
48
+ **DO NOT TRIGGER — hand off instead:**
49
+
50
+ - **Creating or deploying a new channel from a metadata XML file (MIAW / EmbeddedMessaging)** → `service-digital-engagement-channel-configure`. That skill *creates* an Embedded Messaging channel from XML; **this** skill only configures a channel that already exists (it needs a live `{CHANNEL_ID}`, prefix `0Mj`).
51
+ - **Inserting a brand-new channel of any type** → `service-de-channel-create`.
52
+ - **Setting routing / queue / SessionHandler** → `service-de-channel-routing-configure`.
53
+ - **Flipping a channel live** → `service-de-channel-activate`.
54
+
55
+ ## Where this fits
56
+
57
+ Part of the Enhanced-channel headless pipeline: `service-de-channel-create` → `service-de-channel-routing-configure` → **this skill** → `service-de-channel-activate`. Activation's readiness check requires **both** routing and consent, so at minimum run facet 1 before activating. The `service-de-headless-channel-configure` orchestrator sequences the pipeline automatically; invoke this skill directly to configure settings on their own. For the MIAW-specific channel-*creation-from-XML* flow, see the sibling `service-digital-engagement-channel-configure`.
58
+
59
+ ## Reference File Index
60
+
61
+ | Reference file | Load when |
62
+ | --- | --- |
63
+ | `references/language-keywords.md` | Facet 1: creating/updating `MsgChannelLanguageKeyword` records — field list, CSV keyword semantics, create-vs-update, Unified-SMS help/custom rules. |
64
+ | `references/channel-settings-facets.md` | Facets 2–5: the Metadata-API retrieve→edit→deploy flow, the full `<automatedResponses>` type/shape catalog (12 types, 2 content shapes), `<messagingKeywords>`, the inactivity fields, and per-type applicability. |
65
+ | `references/gotchas.md` | Troubleshooting an unexpected result, or before modifying this skill. |
66
+ | `references/worked-examples.md` | Reference runs of the ImplicitOptIn/ExplicitOptIn/DoubleOptIn consent paths. |
67
+
68
+ ## When NOT to use this skill
69
+
70
+ - **The channel isn't Enhanced.** These settings apply to `PlatformType=Enhanced` channels only. Stage 1 confirms this and stops otherwise.
71
+ - **The channel doesn't exist yet.** Run `service-de-channel-create` first; this skill expects a real `MessagingChannel.Id` (prefix `0Mj`).
72
+ - **You're configuring consent on an outbound-only channel.** Outbound-only channels pass the consent-readiness check automatically — nothing to configure for facet 1.
73
+
74
+ ## Inputs (from caller)
75
+
76
+ - `{CHANNEL_ID}` — a 15/18-char `MessagingChannel.Id` (prefix `0Mj`). Must already exist and be Enhanced.
77
+ - `{FACETS}` — optional; which facets to configure (`consent`, `auto-responses`, `keywords`, `inactivity`, `parameters`). If omitted, infer from the request or ask.
78
+ - `{CONSENT_TYPE}` — optional (facet 1); `ImplicitOptIn` | `ExplicitOptIn` | `DoubleOptIn`.
79
+ - `{LANGUAGE}` — optional; locale for keyword/response records (e.g. `en_US`). Default `en_US`.
80
+ - `{ORG_ALIAS}` — optional; `sf` target-org alias. Default: `sf config get target-org`.
81
+
82
+ Facet-specific values (prompts, keyword lists, response text, timeout minutes) are collected interactively per facet, or accepted if pre-supplied.
83
+
84
+ ## Output (to caller)
85
+
86
+ **Success:**
87
+ ```json
88
+ {"ok": true, "channelId": "0Mj...", "messageType": "WhatsApp",
89
+ "facetsConfigured": ["consent","auto-responses"],
90
+ "consent": {"consentType": "ExplicitOptIn", "languageKeywordId": "3Or...", "activationReady": true},
91
+ "metadataDeploy": {"status": "Succeeded", "facets": ["auto-responses","keywords"]}}
92
+ ```
93
+
94
+ **No change needed / precondition / failure:**
95
+ ```json
96
+ {"ok": true, "noop": true, "message": "Requested settings already configured"}
97
+ {"ok": false, "kind": "not-enhanced", "hint": "settings apply to Enhanced channels only; this channel is PlatformType=<x>"}
98
+ {"ok": false, "kind": "facet-not-applicable", "hint": "<facet> is not supported on <messageType> channels"}
99
+ {"ok": false, "kind": "channel-patch-failed" | "keyword-record-failed" | "metadata-deploy-failed" | "verify-failed", "message": "..."}
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Stage 1: Read the channel and decide facets
105
+
106
+ Read the channel; confirm it exists and is Enhanced; capture `MessageType` (drives per-type applicability).
107
+
108
+ ```bash
109
+ sf data query --target-org '{ORG_ALIAS}' \
110
+ --query "SELECT Id, DeveloperName, PlatformType, MessageType, MessagingPlatformKey, ConsentType, OptInPrompt, DoubleOptInPrompt, IsRequireDoubleOptIn FROM MessagingChannel WHERE Id = '{CHANNEL_ID}'" \
111
+ --json > /tmp/cs-channel.json
112
+ ```
113
+
114
+ - Channel missing → halt: `Error: Channel {CHANNEL_ID} not found — check the id, or run service-de-channel-create first.`
115
+ - `PlatformType != 'Enhanced'` → emit `{ok:false, kind:"not-enhanced", ...}` and stop.
116
+
117
+ Decide which facets to run from `{FACETS}` or the request. For each requested facet, check per-type applicability (table above / `references/channel-settings-facets.md`); if a facet doesn't apply to this `MessageType`, emit `{ok:false, kind:"facet-not-applicable", ...}` for that facet (or skip it and note it) rather than deploying an unsupported field.
118
+
119
+ **sf CLI is slow, not broken.** Calls to this org routinely take 2–4 minutes (heavy CLI startup + slow round-trip). Run each `sf` command with a generous timeout; a slow return is normal, not a hang.
120
+
121
+ ---
122
+
123
+ ## Stage 2: Facet 1 — Consent (Data API)
124
+
125
+ Run when `consent` is requested (and always before activation). Read the existing keyword records:
126
+
127
+ ```bash
128
+ sf data query --target-org '{ORG_ALIAS}' \
129
+ --query "SELECT Id, MasterLanguage, OptInKeywords, DoubleOptInKeywords, OptInConfirmation, OptOutKeywords, OptOutConfirmation, HelpKeywords, HelpResponse, CustomKeywords, CustomResponse FROM MsgChannelLanguageKeyword WHERE MessagingChannelId = '{CHANNEL_ID}'" \
130
+ --json > /tmp/cs-keywords.json
131
+ ```
132
+
133
+ **No-op check:** if `ConsentType` is non-null AND an existing keyword record already satisfies the readiness matrix for that ConsentType, don't overwrite — this facet is already activation-ready.
134
+
135
+ Choose the ConsentType (prompt if `{CONSENT_TYPE}` absent — do not auto-pick), then satisfy this contract (the exact server-side activation-readiness rule — source in `references/gotchas.md`):
136
+
137
+ | ConsentType | MessagingChannel fields | `MsgChannelLanguageKeyword` (≥1 record) |
138
+ | --- | --- | --- |
139
+ | ImplicitOptIn | (none required) | `OptOutKeywords` + `OptOutConfirmation` |
140
+ | ExplicitOptIn | `OptInPrompt`¹ | above + `OptInKeywords` |
141
+ | DoubleOptIn | `OptInPrompt`¹ + `DoubleOptInPrompt` + `IsRequireDoubleOptIn=true` | above + `DoubleOptInKeywords` |
142
+
143
+ ¹ `OptInPrompt` is optional for readiness on Unified SMS / WhatsApp / RCS (`MessageType IN ('Text','WhatsApp','Rcs')` on Enhanced); still recommend setting it. `ImplicitOptIn` is **never a no-op** — it still needs an opt-out keyword record.
144
+
145
+ Write the channel fields in one PATCH, then create/update the language-keyword record per `references/language-keywords.md`.
146
+
147
+ **Quoting rule (load-bearing):** `sf data ... --values` splits on spaces — wrap every multi-word value in single quotes *inside* the double-quoted string: `OptInPrompt='Reply YES to receive messages'`. Unquoted fails with `Malformed key=value pair`.
148
+
149
+ ```bash
150
+ # ExplicitOptIn example
151
+ sf data update record --target-org '{ORG_ALIAS}' --sobject MessagingChannel \
152
+ --record-id '{CHANNEL_ID}' --values "ConsentType=ExplicitOptIn OptInPrompt='{OPT_IN_PROMPT}'" --json > /tmp/cs-patch.json
153
+ ```
154
+
155
+ On non-zero status: emit `{ok:false, kind:"channel-patch-failed"|"keyword-record-failed", message: ...}`. Then verify by re-reading (Stage 5).
156
+
157
+ > **WhatsApp rich content rejects ExplicitOptIn** server-side — surface the message, don't retry (see `references/gotchas.md`).
158
+
159
+ ---
160
+
161
+ ## Stage 3: Facets 2 & 3 — Automated responses + Messaging keywords (Metadata API)
162
+
163
+ Run when `auto-responses` and/or `keywords` are requested. These are type-agnostic (all Enhanced types). **Load `references/channel-settings-facets.md` and follow it** — it has the retrieve→edit→deploy flow, the 12 `<automatedResponses>` type values, the two content shapes (`TextResponse` vs `MessageDefinition`), the `EndUserIdleResponse` `<responseTimeoutInMins>` rule, XML escaping, and the `<messagingKeywords>` OptIn/OptOut/Help groups.
164
+
165
+ Outline:
166
+ 1. Retrieve the channel's metadata into a scratch sfdx project (`sf project retrieve start -m MessagingChannel:{DeveloperName}`).
167
+ 2. Edit `<automatedResponses>` / `<messagingKeywords>` blocks in the retrieved `.messagingChannel-meta.xml` (add/replace by `<type>` / `<keywordType>`+`<language>`; XML-escape response text).
168
+ 3. Deploy it back (`sf project deploy start -m MessagingChannel:{DeveloperName}`).
169
+ 4. On deploy failure: `{ok:false, kind:"metadata-deploy-failed", message: <componentFailures>}`.
170
+
171
+ **Never emit `<actionParameterMappings>`** (0 occurrences across a 191-channel scan — it's a Tooling-only mapping done in the UI post-deploy).
172
+
173
+ ---
174
+
175
+ ## Stage 4: Facets 4 & 5 — Inactivity + Pre-chat parameters (Metadata API, scoped)
176
+
177
+ Run only when requested **and** applicable to this `MessageType`:
178
+
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`.)
180
+ - **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
+
182
+ Both use the same retrieve→edit→deploy flow as Stage 3 (`references/channel-settings-facets.md`).
183
+
184
+ ---
185
+
186
+ ## Stage 5: Verify and report
187
+
188
+ For facet 1, re-read the channel + keyword records and confirm every required field for the chosen ConsentType is non-null (channel and ≥1 language record); else `{ok:false, kind:"verify-failed", hint:"..."}`. For metadata facets, confirm the deploy `status` is `Succeeded`, then re-retrieve the channel metadata and confirm the edited `<automatedResponses>` / `<messagingKeywords>` / inactivity / parameter blocks are present; if a deploy reports `Succeeded` but the re-retrieved block is missing, emit `{ok:false, kind:"verify-failed", hint:"..."}`.
189
+
190
+ Emit the JSON envelope. If invoked directly (leaf), render a short summary:
191
+ - `Success — configured {facets} on channel {CHANNEL_ID} ({MessageType}).` (add `Activation-ready.` when consent passed)
192
+ - `Info: requested settings already configured — no changes.` (no-op)
193
+ - `Warning: {facet} is not supported on {MessageType} channels — skipped.` (facet-not-applicable)
194
+ - `Warning: this channel is PlatformType={x}, not Enhanced — these settings don't apply.` (not-enhanced)
195
+ - `Error: {kind}: {message}` (failures)
@@ -0,0 +1,152 @@
1
+ # Metadata-API facets: automated responses, keywords, inactivity, parameters
2
+
3
+ Load this for facets 2–5. These settings live only in the channel's **metadata** — every Data/Connect/Tooling read of them returns `INVALID_TYPE`/"No such column" (verified live on sdb6, 2026-09). Configure them by retrieving the channel's `.messagingChannel-meta.xml`, editing it, and deploying it back.
4
+
5
+ ## The retrieve → edit → deploy flow
6
+
7
+ You need the channel's **DeveloperName** (the metadata member name), not just its Id. Get it from the Stage 1 query (`DeveloperName`).
8
+
9
+ ```bash
10
+ # 1. Scratch sfdx project (throwaway — do NOT create inside the skills repo)
11
+ mkdir -p /tmp/cs-meta/force-app/main/default && cd /tmp/cs-meta
12
+ cat > sfdx-project.json <<'EOF'
13
+ { "packageDirectories": [{ "path": "force-app", "default": true }], "sourceApiVersion": "69.0" }
14
+ EOF
15
+
16
+ # 2. Retrieve the channel (use a package.xml manifest for >1 channel;
17
+ # a comma-separated -m list is parsed as one member by some CLI versions)
18
+ sf project retrieve start --target-org '{ORG_ALIAS}' -m 'MessagingChannel:{DeveloperName}' --json
19
+
20
+ # 3. Edit force-app/main/default/messagingChannels/{DeveloperName}.messagingChannel-meta.xml
21
+ # (add/replace the facet blocks below)
22
+
23
+ # 4. Deploy back
24
+ sf project deploy start --target-org '{ORG_ALIAS}' -m 'MessagingChannel:{DeveloperName}' --json
25
+ ```
26
+
27
+ On deploy failure, read `result.details.componentFailures[].problem` and return it as `{ok:false, kind:"metadata-deploy-failed", message: ...}`. **sf calls on this org take 2–4 min each — slow is normal, not a hang.**
28
+
29
+ Edit rules: match/replace an existing block by its identity (`<type>` for auto-responses; `<keywordType>`+`<language>` for keywords), otherwise append a new one. Preserve all other elements. Keep the file well-formed.
30
+
31
+ ---
32
+
33
+ ## Facet 2 — Automated responses (`<automatedResponses>`)
34
+
35
+ Repeatable top-level element. Each block has a `<type>` (the event) and one of two content shapes.
36
+
37
+ **Content shapes:**
38
+ - `TextResponse` — inline text: `<autoResponseContentType>TextResponse</autoResponseContentType>`, `<response>…</response>`, and usually `<language>` (may be omitted on `OptInPrompt`).
39
+ - `MessageDefinition` — references a `ConversationMessageDefinition` by name: `<autoResponseContentType>MessageDefinition</autoResponseContentType>`, `<messageDefinitionName>…</messageDefinitionName>` (that definition must already exist in the org). Common on MIAW.
40
+
41
+ **The 12 `<type>` values** (superset across all Enhanced types):
42
+
43
+ | `type` | When sent |
44
+ | --- | --- |
45
+ | `InitialResponse` | Customer's first inbound message was received |
46
+ | `AgentEngagedResponse` | A service rep accepted the session |
47
+ | `AgentEndEngagementResponse` | Session ended (rep or end user); optional post-chat URL |
48
+ | `EndUserInactiveResponse` | Conversation ended because the end user stopped responding |
49
+ | `EndUserIdleResponse` | End user went idle; **adds `<responseTimeoutInMins>`** (minutes of idle before it fires) |
50
+ | `RerouteResponse` | Conversation was rerouted |
51
+ | `OptInPrompt` | Reply didn't match an opt-in keyword |
52
+ | `OptInConfirmation` | Successful opt-in |
53
+ | `DoubleOptInPrompt` | Reply didn't match a double-opt-in keyword |
54
+ | `OptOutConfirmation` | Successful opt-out |
55
+ | `HelpResponse` | End user sent a help keyword |
56
+ | `CustomResponse` | Custom keyword match |
57
+
58
+ **XML-escape** `<response>` text: `'`→`&apos;` `"`→`&quot;` `&`→`&amp;` `<`→`&lt;` `>`→`&gt;`.
59
+
60
+ ```xml
61
+ <!-- TextResponse -->
62
+ <automatedResponses>
63
+ <autoResponseContentType>TextResponse</autoResponseContentType>
64
+ <language>en_US</language>
65
+ <response>You&apos;ve opted out of receiving messages from us.</response>
66
+ <type>OptOutConfirmation</type>
67
+ </automatedResponses>
68
+ <!-- MessageDefinition + idle timeout -->
69
+ <automatedResponses>
70
+ <autoResponseContentType>MessageDefinition</autoResponseContentType>
71
+ <messageDefinitionName>Customer_Idle_Message</messageDefinitionName>
72
+ <responseTimeoutInMins>4</responseTimeoutInMins>
73
+ <type>EndUserIdleResponse</type>
74
+ </automatedResponses>
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Facet 3 — Messaging keywords (`<messagingKeywords>`)
80
+
81
+ Repeatable top-level element — one block per (keywordType, language). Each has one or more `<keyword>` children, a `<keywordType>` (`OptIn` | `OptOut` | `Help`), and a `<language>`. Type-agnostic; `OptIn` groups appear on types that support explicit opt-in (e.g. Apple, LINE).
82
+
83
+ ```xml
84
+ <messagingKeywords>
85
+ <keyword>cancel</keyword>
86
+ <keyword>end</keyword>
87
+ <keyword>stop</keyword>
88
+ <keyword>unsubscribe</keyword>
89
+ <keywordType>OptOut</keywordType>
90
+ <language>en_US</language>
91
+ </messagingKeywords>
92
+ <messagingKeywords>
93
+ <keyword>help</keyword>
94
+ <keywordType>Help</keywordType>
95
+ <language>en_US</language>
96
+ </messagingKeywords>
97
+ ```
98
+
99
+ > Consent keyword *records* (`MsgChannelLanguageKeyword`, facet 1) and metadata `<messagingKeywords>` are distinct surfaces. Facet 1 (Data API) drives the activation-readiness check; `<messagingKeywords>` is the channel's metadata representation. Configure consent via facet 1 for activation; use `<messagingKeywords>` when editing the channel's metadata directly.
100
+
101
+ ---
102
+
103
+ ## Facet 4 — Session inactivity (top-level, scoped)
104
+
105
+ Four fields, **siblings of `<embeddedConfig>`** (top-level, NOT nested inside it):
106
+
107
+ | Field | Type | Notes |
108
+ | --- | --- | --- |
109
+ | `endUserIdleTimeOut` | int (5–30) | minutes idle before the idle action |
110
+ | `endUserIdleAction` | enum | `Inactivate` \| `End` \| `InactivateAndEnd` |
111
+ | `endInactiveSessionTimeOut` | int | minutes before an inactive session ends |
112
+ | `isAgentMessageResetInactivityEnabled` | bool | agent message resets the idle timer |
113
+
114
+ ```xml
115
+ <endInactiveSessionTimeOut>5</endInactiveSessionTimeOut>
116
+ <endUserIdleAction>InactivateAndEnd</endUserIdleAction>
117
+ <endUserIdleTimeOut>5</endUserIdleTimeOut>
118
+ ```
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`.
121
+
122
+ ---
123
+
124
+ ## Facet 5 — Pre-chat parameters (MIAW pre-chat only, rare)
125
+
126
+ `<customParameters>` / `<standardParameters>` are pre-chat-form fields. A live scan found **0 occurrences across all sampled channels including MIAW** — they exist only on MIAW channels that explicitly enable pre-chat. Skip unless the caller is configuring pre-chat.
127
+
128
+ ```xml
129
+ <customParameters>
130
+ <externalParameterName>City</externalParameterName>
131
+ <masterLabel>City</masterLabel>
132
+ <maxLength>30</maxLength>
133
+ <name>City</name>
134
+ <parameterDataType>String</parameterDataType>
135
+ </customParameters>
136
+ ```
137
+
138
+ `parameterDataType` is `String` (not `Text`). **Never emit `<actionParameterMappings>`** — 0 occurrences across a 191-channel scan; it's a Tooling-only entity, mapped in the UI post-deploy. `<standardParameters>` (`parameterType` = `FirstName`|`LastName`|`Email`|`Subject`) is likewise MIAW-pre-chat-only.
139
+
140
+ ---
141
+
142
+ ## Per-type applicability matrix (verified live, sdb6 2026-09)
143
+
144
+ | Facet | MIAW | Apple | Facebook | LINE | SMS | WhatsApp |
145
+ | --- | :-: | :-: | :-: | :-: | :-: | :-: |
146
+ | Auto-responses (2) | yes | yes | yes | yes | yes | yes |
147
+ | Messaging keywords (3) | yes | yes | yes | yes | yes | yes |
148
+ | Inactivity — 3 timeout fields (4) | yes | no | no | no | no | no |
149
+ | Inactivity — reset flag (4) | yes | yes | yes | no | no | no |
150
+ | Pre-chat parameters (5) | pre-chat only | no | no | no | no | no |
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.
@@ -1,9 +1,9 @@
1
1
  ---
2
- name: service-de-channel-consent-configure-gotchas
3
- description: "Load when debugging an unexpected result from service-de-channel-consent-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."
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."
4
4
  metadata:
5
5
  version: "1.0"
6
- related-skills: service-de-channel-consent-configure
6
+ related-skills: service-de-channel-settings-configure
7
7
  ---
8
8
 
9
9
  # Gotchas
@@ -1,6 +1,6 @@
1
1
  # Per-language keyword records: `MsgChannelLanguageKeyword`
2
2
 
3
- Load this when Stage 4 needs to create or update the per-language keyword record for a channel.
3
+ Load this when Stage 2 (Facet 1 — Consent) needs to create or update the per-language keyword record for a channel.
4
4
 
5
5
  ## Entity shape
6
6
 
@@ -33,7 +33,7 @@ Keyword fields hold a **comma-separated string**, not a multi-value/picklist. Th
33
33
 
34
34
  ## Create vs update — reuse the record for a language
35
35
 
36
- **There is one record per (channel, language).** Before creating, check the Stage 1 read (`/tmp/cc-keywords.json`) for an existing `MsgChannelLanguageKeyword` whose `MasterLanguage` equals `{LANGUAGE}`:
36
+ **There is one record per (channel, language).** Before creating, check the Stage 2 read (`/tmp/cs-keywords.json`) for an existing `MsgChannelLanguageKeyword` whose `MasterLanguage` equals `{LANGUAGE}`:
37
37
 
38
38
  - **Exists →** `updateRecord` path: PATCH that record's Id with the new field values. Do NOT create a second record for the same language — duplicates confuse the readiness check and the UI.
39
39
  - **Doesn't exist →** `createRecord` path: insert a new record, setting `MessagingChannelId={CHANNEL_ID}` and `MasterLanguage={LANGUAGE}` plus the collected keyword/response fields.
@@ -44,7 +44,7 @@ Keyword fields hold a **comma-separated string**, not a multi-value/picklist. Th
44
44
  sf data create record --target-org '{ORG_ALIAS}' --sobject MsgChannelLanguageKeyword \
45
45
  --values "MessagingChannelId={CHANNEL_ID} MasterLanguage={LANGUAGE} \
46
46
  OptOutKeywords='STOP,UNSUBSCRIBE' OptOutConfirmation='You have been unsubscribed.'" \
47
- --json > /tmp/cc-kw-write.json
47
+ --json > /tmp/cs-kw-write.json
48
48
  ```
49
49
 
50
50
  Add `OptInKeywords`/`OptInConfirmation` for ExplicitOptIn, and `DoubleOptInKeywords` for DoubleOptIn.
@@ -57,7 +57,7 @@ Add `OptInKeywords`/`OptInConfirmation` for ExplicitOptIn, and `DoubleOptInKeywo
57
57
  sf data update record --target-org '{ORG_ALIAS}' --sobject MsgChannelLanguageKeyword \
58
58
  --record-id '{KEYWORD_RECORD_ID}' \
59
59
  --values "OptInKeywords='START,YES' OptInConfirmation='You are now subscribed.'" \
60
- --json > /tmp/cc-kw-write.json
60
+ --json > /tmp/cs-kw-write.json
61
61
  ```
62
62
 
63
63
  Check `status` in the JSON result; on non-zero return `{ok:false, kind:"keyword-record-failed", message: ...}`.
@@ -1,6 +1,6 @@
1
- # Worked examples: `service-de-channel-consent-configure`
1
+ # Worked examples: consent facet (`service-de-channel-settings-configure`)
2
2
 
3
- Reference runs for the three ConsentType paths. The ExplicitOptIn channel-side write, the read model, and the WhatsApp restriction below were verified live on `messaging_sdb6c` 2026-08-13.
3
+ Reference runs for the three ConsentType paths — all sub-steps of **Stage 2 (Facet 1 — Consent)** in the current skill (read state → choose ConsentType → collect prompts → write channel + keyword record), verified against **Stage 5 (verify)**. The step labels below describe that consent sub-flow, not separate top-level SKILL.md stages. The ExplicitOptIn channel-side write, the read model, and the WhatsApp restriction below were verified live on `messaging_sdb6c` 2026-08-13.
4
4
 
5
5
  ---
6
6
 
@@ -10,7 +10,7 @@ Input:
10
10
  - `{CHANNEL_ID}` = `0MjSG00000030wL0AQ` (Enhanced WhatsApp channel `DummyChannelForTesting`)
11
11
  - `{LANGUAGE}` = `en_US`
12
12
 
13
- **Stage 1** read shows `PlatformType=Enhanced`, `ConsentType=ImplicitOptIn`, and one existing `MsgChannelLanguageKeyword` (`3OrSG0000002kUz0AI`, `MasterLanguage=en_US`) with:
13
+ The **Stage 1** channel read shows `PlatformType=Enhanced`, `ConsentType=ImplicitOptIn`, and the **Stage 2** keyword read finds one existing `MsgChannelLanguageKeyword` (`3OrSG0000002kUz0AI`, `MasterLanguage=en_US`) with:
14
14
  ```text
15
15
  OptOutKeywords = unsubscribe_en_US,stopall_en_US,cancel_en_US,quit_en_US,stop_en_US,end_en_US
16
16
  OptOutConfirmation = You've opted out of receiving messages from us, so we won't contact you again.
@@ -44,11 +44,11 @@ Input:
44
44
 
45
45
  **Stage 1**: `PlatformType=Enhanced`, `ConsentType=ImplicitOptIn`, `OptInPrompt=null`. Continue.
46
46
 
47
- **Stage 2**: ExplicitOptIn chosen. Facebook accepts it (unlike WhatsApp rich content — see below).
47
+ **Stage 2 (Facet 1) — choose ConsentType**: ExplicitOptIn chosen. Facebook accepts it (unlike WhatsApp rich content — see below).
48
48
 
49
- **Stage 3**: collect `OptInPrompt` = `Reply YES to receive messages`.
49
+ **Stage 2 — collect prompts**: `OptInPrompt` = `Reply YES to receive messages`.
50
50
 
51
- **Stage 5 (channel PATCH)** — verified live, note the single-quoting of the multi-word prompt:
51
+ **Stage 2 — channel PATCH** — verified live, note the single-quoting of the multi-word prompt:
52
52
 
53
53
  ```bash
54
54
  $ sf data update record --sobject MessagingChannel --record-id 0MjSG0000000D9V0AU \
@@ -58,7 +58,7 @@ $ sf data update record --sobject MessagingChannel --record-id 0MjSG0000000D9V0A
58
58
 
59
59
  Re-read confirmed `ConsentType=ExplicitOptIn`, `OptInPrompt=Reply YES to receive messages`.
60
60
 
61
- **Stage 5 (keyword record)** — the record must also carry `OptInKeywords` (plus the ImplicitOptIn opt-out fields). Create or update the `en_US` record:
61
+ **Stage 2 — keyword record** — the record must also carry `OptInKeywords` (plus the ImplicitOptIn opt-out fields). Create or update the `en_US` record:
62
62
 
63
63
  ```bash
64
64
  sf data update record --sobject MsgChannelLanguageKeyword --record-id <3Or...> \
@@ -67,9 +67,9 @@ sf data update record --sobject MsgChannelLanguageKeyword --record-id <3Or...> \
67
67
 
68
68
  (Live keyword shape confirmed on sdb6c: e.g. Facebook channel `0MjSG0000000Beb0AE` carries `OptInKeywords=yes,sure` — multiple opt-in keywords as a comma-separated string.)
69
69
 
70
- **Stage 6**: re-read channel + keyword record; `OptInPrompt` non-null on the channel and `OptInKeywords`+`OptOutKeywords`+`OptOutConfirmation` non-null on the keyword record → activation-ready.
70
+ **Stage 5 (verify)**: re-read channel + keyword record; `OptInPrompt` non-null on the channel and `OptInKeywords`+`OptOutKeywords`+`OptOutConfirmation` non-null on the keyword record → activation-ready.
71
71
 
72
- **Stage 7**:
72
+ **Stage 5 (report)**:
73
73
  ```json
74
74
  {"ok": true, "consentType": "ExplicitOptIn", "channelFieldsSet": ["ConsentType","OptInPrompt"],
75
75
  "languageKeywordId": "3Or...", "language": "en_US", "created": false, "activationReady": true}
@@ -85,9 +85,9 @@ Input:
85
85
  - `{CHANNEL_ID}` = an Enhanced Text (SMS) channel
86
86
  - `{CONSENT_TYPE}` = `DoubleOptIn`
87
87
 
88
- **Stage 3** collects both `OptInPrompt` and `DoubleOptInPrompt`.
88
+ **Stage 2 — collect prompts**: both `OptInPrompt` and `DoubleOptInPrompt`.
89
89
 
90
- **Stage 5 (channel PATCH)** — all three fields in one write:
90
+ **Stage 2 — channel PATCH** — all three fields in one write:
91
91
 
92
92
  ```bash
93
93
  sf data update record --sobject MessagingChannel --record-id '{CHANNEL_ID}' \
@@ -95,7 +95,7 @@ sf data update record --sobject MessagingChannel --record-id '{CHANNEL_ID}' \
95
95
  DoubleOptInPrompt='Reply CONFIRM to confirm your subscription' IsRequireDoubleOptIn=true"
96
96
  ```
97
97
 
98
- **Stage 5 (keyword record)** — needs `OptInKeywords`, `DoubleOptInKeywords`, `OptOutKeywords`, `OptOutConfirmation`:
98
+ **Stage 2 — keyword record** — needs `OptInKeywords`, `DoubleOptInKeywords`, `OptOutKeywords`, `OptOutConfirmation`:
99
99
 
100
100
  ```bash
101
101
  sf data update record --sobject MsgChannelLanguageKeyword --record-id <3Or...> \
@@ -105,7 +105,7 @@ OptOutKeywords=stop,unsubscribe OptOutConfirmation='You have been unsubscribed.'
105
105
 
106
106
  (Live example on sdb6c: keyword record `3OrSG00000002rR0AQ` has both `OptInKeywords=yes` and `DoubleOptInKeywords=yes`, confirming DoubleOptIn uses both keyword fields.)
107
107
 
108
- **Stage 6** verifies `OptInPrompt` + `DoubleOptInPrompt` non-null on the channel and `OptInKeywords` + `DoubleOptInKeywords` + opt-out fields non-null on the keyword record.
108
+ **Stage 5 (verify)** confirms `OptInPrompt` + `DoubleOptInPrompt` non-null on the channel and `OptInKeywords` + `DoubleOptInKeywords` + opt-out fields non-null on the keyword record.
109
109
 
110
110
  ---
111
111
 
@@ -115,7 +115,7 @@ Input:
115
115
  - `{CHANNEL_ID}` = `0MjSG00000030wL0AQ` (Enhanced WhatsApp channel with rich content)
116
116
  - User asks for `ExplicitOptIn`
117
117
 
118
- **Stage 5** PATCH is rejected server-side:
118
+ **Stage 2 — channel PATCH** is rejected server-side:
119
119
 
120
120
  ```bash
121
121
  $ sf data update record --sobject MessagingChannel --record-id 0MjSG00000030wL0AQ \
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: service-de-headless-channel-configure
3
- description: "Top-level orchestrator: given a messaging channel type and its type-specific inputs, produces an activated Enhanced `MessagingChannel` in the target Salesforce org — without the Meta/LINE/Apple setup popups. Prompts for `{MESSAGE_TYPE}` if not supplied, then sequences insert → route → consent → activate via the type-agnostic dispatcher (`service-de-channel-create`) plus the shared routing/consent/activation leaves. Resumes from partial state on re-run. Use this skill when the user wants to set up an Enhanced messaging channel (WhatsApp, Facebook, LINE, Apple, or SMS/Text) end-to-end from the command line, bypassing the in-org setup popups."
3
+ description: "Top-level orchestrator: given a messaging channel type and its inputs, produces an activated Enhanced `MessagingChannel` in the target org — without the Meta/LINE/Apple setup popups. Prompts for `{MESSAGE_TYPE}` if not supplied, then sequences insert → route → consent → activate via the type-agnostic dispatcher (`service-de-channel-create`) plus the shared routing/consent/activation leaves. Resumes from partial state on re-run. Use to set up an Enhanced channel (WhatsApp, Facebook, LINE, Apple, SMS) end-to-end, bypassing in-org setup popups. Do not use for a single stage of an already-inserted channel — use the matching leaf skill (`service-de-channel-activate`, `service-de-channel-settings-configure`, `service-de-channel-routing-configure`) instead."
4
4
  metadata:
5
5
  version: "1.0"
6
6
  minApiVersion: "67.0"
@@ -10,9 +10,9 @@ metadata:
10
10
  semver: ">=2.0.0"
11
11
  relatedSkills:
12
12
  - "service-de-channel-activate"
13
- - "service-de-channel-consent-configure"
14
13
  - "service-de-channel-create"
15
14
  - "service-de-channel-routing-configure"
15
+ - "service-de-channel-settings-configure"
16
16
  - "service-de-waba-integrate"
17
17
  ---
18
18
 
@@ -25,7 +25,7 @@ Takes a channel type (`WhatsApp` | `Line` | `AppleBusinessChat` | `Facebook` | `
25
25
  0. **Accept Terms and Conditions** — renders the Enhanced Messaging disclaimer and requires the user to certify they have authority to bind their org, mirroring the in-org "Add a Channel" wizard. Blocking — a decline ends the run before any org work. *(Stage 0.5, in this skill)*
26
26
  1. **Insert the channel** — invokes `service-de-channel-create`, which handles the per-type third-party prereq internally (e.g. WhatsApp's `service-de-waba-integrate` runs inside `service-de-channel-create`). *(skill: `service-de-channel-create`)*
27
27
  2. **Configure routing** — sets `SessionHandlerId` to an Omni-Channel Queue (pick existing or create new). Message-type-agnostic. *(skill: `service-de-channel-routing-configure`)*
28
- 3. **Configure consent** — ensures a valid `ConsentType` + matching `MsgChannelLanguageKeyword` record. The Connect insert auto-seeds a default `ConsentType=ImplicitOptIn` + opt-out keyword, so on a fresh channel this step is frequently a **no-op** — or an *upgrade* if the caller wants ExplicitOptIn/DoubleOptIn. Activation's readiness check requires both routing AND consent, so this runs before activation. *(skill: `service-de-channel-consent-configure`)*
28
+ 3. **Configure consent** — ensures a valid `ConsentType` + matching `MsgChannelLanguageKeyword` record. The Connect insert auto-seeds a default `ConsentType=ImplicitOptIn` + opt-out keyword, so on a fresh channel this step is frequently a **no-op** — or an *upgrade* if the caller wants ExplicitOptIn/DoubleOptIn. Activation's readiness check requires both routing AND consent, so this runs before activation. *(skill: `service-de-channel-settings-configure`)*
29
29
  4. **Activate** — PATCHes `MessagingChannelUsage.DeploymentStatus` to `Provisioning` via REST; the server-side save-hook drives the full observer chain synchronously and returns 204 once the MCU reaches `Active` and `MessagingChannel.IsActive=true`. Message-type-agnostic. *(skill: `service-de-channel-activate`)*
30
30
 
31
31
  **Resume-by-default.** Each step is idempotent — if you re-run after a failure, the orchestrator detects existing state and skips steps that already succeeded.
@@ -49,7 +49,7 @@ Takes a channel type (`WhatsApp` | `Line` | `AppleBusinessChat` | `Facebook` | `
49
49
 
50
50
  **This orchestrator MUST run all stages (0-5) in a SINGLE response without stopping between stages.**
51
51
 
52
- When you invoke a leaf skill (service-de-channel-create, service-de-channel-routing-configure, service-de-channel-consent-configure, service-de-channel-activate) and it returns via function_results:
52
+ When you invoke a leaf skill (service-de-channel-create, service-de-channel-routing-configure, service-de-channel-settings-configure, service-de-channel-activate) and it returns via function_results:
53
53
 
54
54
  - **DO:** Immediately parse the function_results return value and continue to the next stage
55
55
  - **DO:** Run Stage 0.5 → Stage 1 → Stage 2 → Stage 3 → Stage 3.5 → Stage 4 → Stage 5 consecutively in ONE response
@@ -209,7 +209,7 @@ Handle the envelope:
209
209
 
210
210
  ## Stage 3.5: Configure consent (before activation)
211
211
 
212
- Activation's readiness check requires **consent AND routing** — a fully-routed channel still fails to activate if consent isn't configured. Invoke `service-de-channel-consent-configure`:
212
+ Activation's readiness check requires **consent AND routing** — a fully-routed channel still fails to activate if consent isn't configured. Invoke `service-de-channel-settings-configure`:
213
213
 
214
214
  - `{CHANNEL_ID}` = recorded above
215
215
  - `{CONSENT_TYPE}`, `{LANGUAGE}`, and the keyword/prompt values — forward whatever the user supplied; omit what they didn't
@@ -248,7 +248,7 @@ Handle the envelope:
248
248
  | `{ok: true, isActive: true, ...}` (including `noop: true`) | Record results. Append `"activate"` to `STEPS_RUN`. Continue to Stage 5. |
249
249
  | `{ok: false, kind: "no-routing"}` | Unusual (we just set it) — probably a race or permission issue. Emit failure with a hint about the permissions check. Return. |
250
250
  | `{ok: false, kind: "no-mcu" \| "channel-missing"}` | Shouldn't happen after successful insert. Emit failure with the leaf's envelope. Return. |
251
- | `{ok: false, kind: "readiness-failed", errorMessage}` | `validateChannelReadinessOnProvisioning` rejected the PATCH — missing consent (STOP/HELP keyword record). Stage 3.5 should have caught this; if it re-appears, re-run `service-de-channel-consent-configure` for the channel. Emit failure and pass through the resume hint. Return. |
251
+ | `{ok: false, kind: "readiness-failed", errorMessage}` | `validateChannelReadinessOnProvisioning` rejected the PATCH — missing consent (STOP/HELP keyword record). Stage 3.5 should have caught this; if it re-appears, re-run `service-de-channel-settings-configure` for the channel. Emit failure and pass through the resume hint. Return. |
252
252
  | `{ok: false, kind: "provisioning-error", errorReason, errorDetails}` | Third-party side rejected (Meta `/register` failed, etc.). MCU is now in `Error`. Emit failure and pass through `errorReason`/`errorDetails`. Return. |
253
253
  | `{ok: false, kind: "auth" \| "transport"}` | REST call failed at the HTTP layer (401 from `sf` auth, 5xx from the instance). Pass through. Return. |
254
254
 
@@ -26,7 +26,7 @@ Returns `{ok:true, channelId:"0MjSG...", mcuId:"0gLSG...", developerName:"WHATSA
26
26
 
27
27
  **Stage 3** (route): `service-de-channel-routing-configure` prompts user. User picks existing `Messaging_Queue` (`00GSG0000000LSf2AM`). PATCH lands. `STEPS_RUN=["insert","route"]`.
28
28
 
29
- **Stage 3.5** (consent): `service-de-channel-consent-configure` runs. The insert auto-seeded `ConsentType=ImplicitOptIn` + a default opt-out `MsgChannelLanguageKeyword` (STOP-family + confirmation), so the leaf's Stage 1 finds the channel already activation-ready and returns `noop:true` — no write needed. (Had the user asked for ExplicitOptIn/DoubleOptIn or custom keywords, the leaf would upgrade it here.) `STEPS_RUN=["insert","route"]`, `STEPS_SKIPPED=["consent"]`.
29
+ **Stage 3.5** (consent): `service-de-channel-settings-configure` runs. The insert auto-seeded `ConsentType=ImplicitOptIn` + a default opt-out `MsgChannelLanguageKeyword` (STOP-family + confirmation), so the leaf's Stage 1 finds the channel already activation-ready and returns `noop:true` — no write needed. (Had the user asked for ExplicitOptIn/DoubleOptIn or custom keywords, the leaf would upgrade it here.) `STEPS_RUN=["insert","route"]`, `STEPS_SKIPPED=["consent"]`.
30
30
 
31
31
  **Stage 4** (activate): `service-de-channel-activate` PATCHes `MessagingChannelUsage.DeploymentStatus='Provisioning'` via REST. The PATCH blocks synchronously until the server-side observer chain finishes, then returns 204 with `DeploymentStatus=Active` → `channel.IsActive=true` in ~15-21s (Meta `/register` round-trip). `STEPS_RUN=["insert","route","activate"]`.
32
32
 
@@ -13,6 +13,7 @@ metadata:
13
13
  - "integration-connectivity-connected-app-configure"
14
14
  - "platform-metadata-deploy"
15
15
  - "service-agentforce-channel-configure"
16
+ - "service-agentforce-contact-center-coordinate"
16
17
  - "service-concierge-portal-generate"
17
18
  - "service-digital-engagement-channel-configure"
18
19
  - "service-digital-engagement-deployment-configure"
@@ -193,7 +194,7 @@ Deploy new channels with Queue routing (`service-digital-engagement-channel-conf
193
194
 
194
195
  - **Help Portal** → delegate to `service-concierge-portal-generate` (deploys an Agentforce Concierge experience on an LWR site). Pass the resolved `$ORG`, `$BOT_ID`, and `$BOT_DEV_NAME` so it can skip its entry-point questions.
195
196
 
196
- - **Voice** → read `references/channel-voice.md` and follow it fully. Voice wires an existing `PstnVoice` MessagingChannel via `service-agentforce-channel-configure` Branch B — it does not provision a phone number.
197
+ - **Voice** → read `references/channel-voice.md` and follow it fully. Wires a `PstnVoice` MessagingChannel via `service-agentforce-channel-configure` Branch B; if none exists, the reference delegates procurement to `service-agentforce-contact-center-coordinate`.
197
198
 
198
199
  - **Any other existing channel (WhatsApp, SMS, Facebook, Apple Business Chat, Line, Email-to-Case, Custom)** → no dedicated reference file. List channels of that type from discovery, let the user pick one (`"Add agent to: {MasterLabel}"`), and delegate straight to `service-agentforce-channel-configure` with the agent and channel DeveloperNames — it resolves the fallback queue and picks the routing branch itself (Branch A for Enhanced Chat/Messaging, Branch C for Email-to-Case). This skill only wires an agent to a channel that already exists; it never provisions the underlying 3rd-party/email infrastructure.
199
200
 
@@ -256,5 +257,5 @@ The one deliverable is a single `report.md`: a **status report of what was decid
256
257
  | `references/agent-script.md` | At agent creation only (after Checkpoint 2) — the canonical agent script + placeholders |
257
258
  | `references/channel-web-chat.md` | Only if the user selects Web Chat at Checkpoint 3 |
258
259
  | `service-concierge-portal-generate` (external skill) | Only if the user selects Help Portal at Checkpoint 3 — delegate, do not inline |
259
- | `references/channel-voice.md` | Only if the user selects Voice (wires an existing `PstnVoice` channel; no number provisioning) |
260
+ | `references/channel-voice.md` | Only if the user selects Voice (wires a `PstnVoice` channel; delegates procurement when none exists) |
260
261
  | `references/output-report-format.md` | Right before writing the final `report.md` — the two report shapes, templates, and scored-failure list |