@salesforce/afv-skills 1.65.0 → 1.66.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 (379) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-offline-experimentation-run/SKILL.md +16 -15
  3. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +3 -245
  4. package/skills/dx-devops-work-item-manage/SKILL.md +34 -17
  5. package/skills/dx-devops-work-item-manage/examples/common-workflows.md +49 -0
  6. package/skills/dx-devops-work-item-manage/references/commit-api.md +116 -0
  7. package/skills/experience-lwc-widget-assess/SKILL.md +79 -0
  8. package/skills/experience-lwc-widget-migrate/SKILL.md +50 -0
  9. package/skills/field-service-data-capture-form-deployer-configure/SKILL.md +2 -23
  10. package/skills/field-service-data-capture-form-designer-configure/SKILL.md +3 -13
  11. package/skills/field-service-mobile-branding-configure/SKILL.md +3 -17
  12. package/skills/field-service-objective-designer-configure/SKILL.md +379 -72
  13. package/skills/field-service-prework-brief-deployer-configure/SKILL.md +537 -10
  14. package/skills/field-service-scheduling-policy-designer-query/SKILL.md +1093 -65
  15. package/skills/field-service-sobject-create-configure/SKILL.md +213 -13
  16. package/skills/field-service-voice-to-form-configure/SKILL.md +11 -40
  17. package/skills/field-service-work-rule-designer-configure/SKILL.md +95 -121
  18. package/skills/platform-role-hierarchy-apply/SKILL.md +177 -0
  19. package/skills/platform-widget-generate/SKILL.md +58 -41
  20. package/skills/platform-widget-generate/references/widget-bundle-validation.md +14 -0
  21. package/skills/service-agentforce-contact-center-coordinate/SKILL.md +1 -1
  22. package/skills/service-agentforce-contact-center-coordinate/references/number_management_api.md +11 -1
  23. package/skills/service-agentforce-contact-center-coordinate/scripts/fetch-numbers.sh +12 -6
  24. package/skills/service-agentforce-contact-center-coordinate/scripts/lib.sh +16 -0
  25. package/skills/service-agentforce-contact-center-coordinate/scripts/procure-number.sh +2 -1
  26. package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +24 -11
  27. package/skills/service-digital-engagement-channel-configure/SKILL.md +25 -14
  28. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +143 -0
  29. package/skills/service-digital-engagement-deployment-configure/SKILL.md +61 -12
  30. package/skills/service-digital-engagement-deployment-configure/references/connect_api_creation.md +14 -5
  31. package/skills/service-digital-engagement-deployment-configure/references/onboarding_contract.md +146 -0
  32. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +23 -13
  33. package/skills/service-itsm-agentic-setup-incident-management/references/incident-persona-psg.md +7 -6
  34. package/skills/service-itsm-agentic-setup-incident-management/references/incident-preferences.md +9 -10
  35. package/skills/service-itsm-agentic-setup-incident-management/references/major-incident-management.md +6 -6
  36. package/skills/service-itsm-agentic-setup-incident-management/references/service-mgmt-privilege.md +1 -1
  37. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +34 -25
  38. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +1 -1
  39. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +90 -86
  40. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/workflow.md +63 -38
  41. package/skills/agentforce-gpt-email-generation-configure/SKILL.md +0 -312
  42. package/skills/agentforce-wizard-ui-forecasting-analytics-components-configure/SKILL.md +0 -64
  43. package/skills/agentforce-wizard-ui-sales-einstein-components-configure/SKILL.md +0 -46
  44. package/skills/automation-company-profile-info-query/SKILL.md +0 -51
  45. package/skills/automation-digital-wallet-configure/SKILL.md +0 -689
  46. package/skills/automation-flow-coordinate/SKILL.md +0 -95
  47. package/skills/automation-flow-coordinate/references/elements/action-call/action-call.md +0 -1569
  48. package/skills/automation-flow-coordinate/references/elements/action-call/conversation-messaging.md +0 -96
  49. package/skills/automation-flow-coordinate/references/elements/action-call/examples/send-sms-message.json +0 -23
  50. package/skills/automation-flow-coordinate/references/elements/action-call/examples/send-to-journey-no-fields.json +0 -31
  51. package/skills/automation-flow-coordinate/references/elements/action-call/send-to-journey.md +0 -179
  52. package/skills/automation-flow-coordinate/references/elements/exit-rule/examples/event-email-link-click.json +0 -13
  53. package/skills/automation-flow-coordinate/references/elements/exit-rule/exit-rule.md +0 -83
  54. package/skills/automation-flow-coordinate/references/elements/forward-to-bot-or-agent/examples/forward-to-bot-or-agent.json +0 -69
  55. package/skills/automation-flow-coordinate/references/elements/forward-to-bot-or-agent/forward-to-bot-or-agent.md +0 -274
  56. package/skills/automation-flow-coordinate/references/elements/start/audience-common.md +0 -192
  57. package/skills/automation-flow-coordinate/references/elements/start/automation-event-triggered.md +0 -130
  58. package/skills/automation-flow-coordinate/references/elements/start/data-cloud-data-change-triggered.md +0 -92
  59. package/skills/automation-flow-coordinate/references/elements/start/form-submission-triggered.md +0 -88
  60. package/skills/automation-flow-coordinate/references/elements/start/segment-triggered.md +0 -152
  61. package/skills/automation-flow-coordinate/references/elements/start/start.md +0 -539
  62. package/skills/automation-flow-coordinate/references/elements/subflow/subflow.md +0 -152
  63. package/skills/automation-flow-coordinate/references/elements/wait/wait.md +0 -497
  64. package/skills/automation-flow-coordinate/references/recipes/author/author.md +0 -868
  65. package/skills/automation-flow-coordinate/references/recipes/summarize/element-generic.md +0 -300
  66. package/skills/automation-flow-coordinate/references/recipes/summarize/reference-resolution.md +0 -292
  67. package/skills/automation-flow-coordinate/references/recipes/summarize/summarize.md +0 -323
  68. package/skills/automation-flow-coordinate/references/recipes/testing/examples/debug-output-template.md +0 -109
  69. package/skills/automation-flow-coordinate/references/recipes/testing/shape.md +0 -219
  70. package/skills/automation-flow-coordinate/references/recipes/testing/shared-stages/intent-analyzer.md +0 -180
  71. package/skills/automation-flow-coordinate/references/recipes/testing/workflows/debug.md +0 -175
  72. package/skills/automation-flow-coordinate/references/recipes/testing/workflows/promote.md +0 -255
  73. package/skills/automation-flow-coordinate/references/recipes/testing/workflows/save-debug.md +0 -212
  74. package/skills/automation-flow-coordinate/references/resources/variable/variable.md +0 -171
  75. package/skills/automation-flow-coordinate/references/shared/anti-patterns.md +0 -786
  76. package/skills/automation-flow-coordinate/references/shared/end/end.md +0 -267
  77. package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/eval/README.md +0 -69
  78. package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/eval/predictions.jsonl +0 -80
  79. package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/eval/prompts.jsonl +0 -116
  80. package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/flow-type-resolver.md +0 -321
  81. package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/taxonomy.json +0 -320
  82. package/skills/automation-flow-coordinate/references/shared/server-functions.md +0 -597
  83. package/skills/automotive-cloud-appraisal-management-settings-configure/SKILL.md +0 -69
  84. package/skills/automotive-cloud-dealer-essentials-configure/SKILL.md +0 -78
  85. package/skills/automotive-cloud-ground-agent-data-pipelines-configure/SKILL.md +0 -373
  86. package/skills/automotive-cloud-ground-mfg-agent-data-pipelines-configure/SKILL.md +0 -273
  87. package/skills/automotive-cloud-mfg-agent-data-pipelines-configure/SKILL.md +0 -259
  88. package/skills/automotive-cloud-mfg-sales-concierge-agent-create/SKILL.md +0 -369
  89. package/skills/automotive-cloud-mfg-sales-concierge-foundation-configure/SKILL.md +0 -542
  90. package/skills/automotive-cloud-mfg-sales-concierge-foundation-coordinate/SKILL.md +0 -159
  91. package/skills/automotive-cloud-mfg-sales-concierge-orchestrator-agent-create/SKILL.md +0 -349
  92. package/skills/automotive-cloud-mfg-sales-concierge-orchestrator-configure/SKILL.md +0 -505
  93. package/skills/automotive-cloud-sales-concierge-agent-create/SKILL.md +0 -380
  94. package/skills/automotive-cloud-sales-concierge-foundation-configure/SKILL.md +0 -567
  95. package/skills/automotive-cloud-sales-concierge-foundation-coordinate/SKILL.md +0 -159
  96. package/skills/automotive-cloud-sales-concierge-orchestrator-agent-create/SKILL.md +0 -360
  97. package/skills/automotive-cloud-sales-concierge-orchestrator-configure/SKILL.md +0 -539
  98. package/skills/automotive-cloud-sales-concierge-search-grounding-configure/SKILL.md +0 -358
  99. package/skills/commerce-b2b-merchant-quote-configure/SKILL.md +0 -602
  100. package/skills/commerce-b2b-store-configure/SKILL.md +0 -251
  101. package/skills/commerce-credit-memo-create/SKILL.md +0 -139
  102. package/skills/commerce-delivery-business-hours-configure/SKILL.md +0 -277
  103. package/skills/commerce-delivery-estimation-apply/SKILL.md +0 -155
  104. package/skills/commerce-delivery-estimation-configure/SKILL.md +0 -377
  105. package/skills/commerce-delivery-routing-specs-integrate/SKILL.md +0 -174
  106. package/skills/commerce-estimate-bopis-query/SKILL.md +0 -279
  107. package/skills/commerce-estimate-delivery-date-query/SKILL.md +0 -349
  108. package/skills/commerce-fees-apply/SKILL.md +0 -227
  109. package/skills/commerce-fulfillment-routing-analyze/SKILL.md +0 -200
  110. package/skills/commerce-guest-buyer-create/SKILL.md +0 -173
  111. package/skills/commerce-location-bopis-configure/SKILL.md +0 -378
  112. package/skills/commerce-location-business-hours-configure/SKILL.md +0 -235
  113. package/skills/commerce-location-delivery-processing-time-configure/SKILL.md +0 -309
  114. package/skills/commerce-location-graph-integrate/SKILL.md +0 -131
  115. package/skills/commerce-location-shipping-carrier-method-configure/SKILL.md +0 -755
  116. package/skills/commerce-location-temporary-operating-hours-configure/SKILL.md +0 -331
  117. package/skills/commerce-merchant-buyer-groups-configure/SKILL.md +0 -579
  118. package/skills/commerce-merchant-buyer-user-onboarding-create/SKILL.md +0 -626
  119. package/skills/commerce-merchant-catalog-configure/SKILL.md +0 -614
  120. package/skills/commerce-merchant-extension-provider-configure/SKILL.md +0 -368
  121. package/skills/commerce-merchant-insights-account-health-churn-analyze/SKILL.md +0 -118
  122. package/skills/commerce-merchant-insights-inventory-returns-analyze/SKILL.md +0 -65
  123. package/skills/commerce-merchant-insights-order-shopper-get/SKILL.md +0 -90
  124. package/skills/commerce-merchant-insights-product-performance-analyze/SKILL.md +0 -72
  125. package/skills/commerce-merchant-insights-query/SKILL.md +0 -279
  126. package/skills/commerce-merchant-storefront-guest-access-configure/SKILL.md +0 -656
  127. package/skills/commerce-order-summary-change-apply/SKILL.md +0 -375
  128. package/skills/commerce-product-details-get/SKILL.md +0 -363
  129. package/skills/commerce-product-search/SKILL.md +0 -563
  130. package/skills/commerce-react-storefront-create/SKILL.md +0 -350
  131. package/skills/commerce-return-order-summary-create/SKILL.md +0 -513
  132. package/skills/commerce-search-relevance-analyze/SKILL.md +0 -757
  133. package/skills/commerce-temporary-processing-time-override-create/SKILL.md +0 -274
  134. package/skills/communications-initial-setup-configure/SKILL.md +0 -630
  135. package/skills/communications-multisite-configure/SKILL.md +0 -571
  136. package/skills/communications-revenue-cloud-settings-configure/SKILL.md +0 -74
  137. package/skills/communications-smb-fiber-catalog-create/SKILL.md +0 -413
  138. package/skills/communications-tmf-integrate/SKILL.md +0 -1368
  139. package/skills/consumer-goods-visit-activity-act4-questions-assign/SKILL.md +0 -448
  140. package/skills/consumer-goods-visit-activity-act5-standard-create/SKILL.md +0 -269
  141. package/skills/consumer-goods-visit-activity-act6-assortment-configure/SKILL.md +0 -271
  142. package/skills/consumer-goods-visit-activity-act7-account-scoping-create/SKILL.md +0 -382
  143. package/skills/consumer-goods-visit-activity-act8-plan-attach-create/SKILL.md +0 -373
  144. package/skills/consumer-goods-visit-activity-act9-proof-validate/SKILL.md +0 -389
  145. package/skills/consumer-goods-visit-and-activity-act1-specification-create/SKILL.md +0 -338
  146. package/skills/consumer-goods-visit-and-activity-act2-template-create/SKILL.md +0 -547
  147. package/skills/consumer-goods-visit-and-activity-act3-definition-create/SKILL.md +0 -346
  148. package/skills/consumer-goods-visit-and-activity-configure/SKILL.md +0 -1110
  149. package/skills/crm-analytics-adoption-insights-configure/SKILL.md +0 -224
  150. package/skills/crm-analytics-custom-report-type-lightning-configure/SKILL.md +0 -418
  151. package/skills/crm-analytics-dashboards-configure/SKILL.md +0 -731
  152. package/skills/crm-analytics-operational-analytics-metadata-bridge-migrate/SKILL.md +0 -233
  153. package/skills/crm-analytics-report-notifications-ui-configure/SKILL.md +0 -184
  154. package/skills/crm-analytics-sharing-inheritance-coverage-analyze/SKILL.md +0 -167
  155. package/skills/crm-analytics-sonic-getting-started-configure/SKILL.md +0 -55
  156. package/skills/crm-analytics-tableau-next-app-deploy/SKILL.md +0 -1350
  157. package/skills/crm-analytics-tableau-next-c360-basemodel-validate/SKILL.md +0 -1862
  158. package/skills/crm-analytics-tableau-next-datacloud-validate/SKILL.md +0 -83
  159. package/skills/crm-analytics-tableau-next-provisioning-validate/SKILL.md +0 -81
  160. package/skills/data360-activation-create/SKILL.md +0 -104
  161. package/skills/data360-activation-external-platform-get/SKILL.md +0 -49
  162. package/skills/data360-activation-target-create/SKILL.md +0 -93
  163. package/skills/data360-activation-v2-create/SKILL.md +0 -456
  164. package/skills/data360-audience-dmo-get/SKILL.md +0 -38
  165. package/skills/data360-calculated-affinity-create/SKILL.md +0 -82
  166. package/skills/data360-calculated-insight-create/SKILL.md +0 -148
  167. package/skills/data360-catalog-metadata-create/SKILL.md +0 -183
  168. package/skills/data360-code-extension-create/SKILL.md +0 -115
  169. package/skills/data360-communication-capping-create/SKILL.md +0 -227
  170. package/skills/data360-connection-create/SKILL.md +0 -491
  171. package/skills/data360-content-lens-create/SKILL.md +0 -181
  172. package/skills/data360-data-action-create/SKILL.md +0 -126
  173. package/skills/data360-data-action-target-create/SKILL.md +0 -181
  174. package/skills/data360-data-clean-room-create/SKILL.md +0 -238
  175. package/skills/data360-data-governance-create/SKILL.md +0 -746
  176. package/skills/data360-data-graph-create/SKILL.md +0 -82
  177. package/skills/data360-data-harmonized-model-object-reference-create/SKILL.md +0 -38
  178. package/skills/data360-data-lake-object-create/SKILL.md +0 -207
  179. package/skills/data360-data-model-object-catalog-get/SKILL.md +0 -49
  180. package/skills/data360-data-model-object-create/SKILL.md +0 -128
  181. package/skills/data360-data-model-object-mapping-create/SKILL.md +0 -106
  182. package/skills/data360-data-space-create/SKILL.md +0 -161
  183. package/skills/data360-data-streams-create/SKILL.md +0 -324
  184. package/skills/data360-engagement-signal-get/SKILL.md +0 -38
  185. package/skills/data360-experiment-create/SKILL.md +0 -82
  186. package/skills/data360-goal-based-campaign-create/SKILL.md +0 -192
  187. package/skills/data360-harmonization-process-history-get/SKILL.md +0 -38
  188. package/skills/data360-harmonized-unstructured-dmo-create/SKILL.md +0 -84
  189. package/skills/data360-identity-resolution-create/SKILL.md +0 -115
  190. package/skills/data360-intelligent-document-processing-create/SKILL.md +0 -148
  191. package/skills/data360-knowledge-graph-construction-create/SKILL.md +0 -93
  192. package/skills/data360-knowledge-graph-create/SKILL.md +0 -216
  193. package/skills/data360-knowledge-space-mcp-configure/SKILL.md +0 -475
  194. package/skills/data360-machine-learning-mcp-configure/SKILL.md +0 -697
  195. package/skills/data360-multi-org-mcp-configure/SKILL.md +0 -117
  196. package/skills/data360-secondary-index-mcp-configure/SKILL.md +0 -126
  197. package/skills/data360-segment-mcp-configure/SKILL.md +0 -159
  198. package/skills/data360-semantic-calculated-dimension-mcp-configure/SKILL.md +0 -93
  199. package/skills/data360-semantic-calculated-measurement-mcp-configure/SKILL.md +0 -93
  200. package/skills/data360-semantic-data-object-mcp-configure/SKILL.md +0 -93
  201. package/skills/data360-semantic-dimension-mcp-configure/SKILL.md +0 -38
  202. package/skills/data360-semantic-engine-mcp-configure/SKILL.md +0 -62
  203. package/skills/data360-semantic-measurement-mcp-configure/SKILL.md +0 -38
  204. package/skills/data360-semantic-metric-mcp-configure/SKILL.md +0 -93
  205. package/skills/data360-semantic-model-mcp-configure/SKILL.md +0 -115
  206. package/skills/data360-standard-mapping-mcp-configure/SKILL.md +0 -38
  207. package/skills/data360-tenant-lifecycle-mcp-configure/SKILL.md +0 -73
  208. package/skills/experience-afv-query/SKILL.md +0 -234
  209. package/skills/experience-agentforce-vibes-in-react-configure/SKILL.md +0 -63
  210. package/skills/experience-apex-components-configure/SKILL.md +0 -69
  211. package/skills/experience-apex-pages-configure/SKILL.md +0 -107
  212. package/skills/experience-app-home-configure/SKILL.md +0 -76
  213. package/skills/experience-aura-lightning-out-access-configure/SKILL.md +0 -58
  214. package/skills/experience-briefcase-configure/SKILL.md +0 -287
  215. package/skills/experience-community-flexi-page-list-create/SKILL.md +0 -74
  216. package/skills/experience-community-template-definition-list-query/SKILL.md +0 -48
  217. package/skills/experience-community-theme-definition-list-query/SKILL.md +0 -38
  218. package/skills/experience-content-assets-configure/SKILL.md +0 -86
  219. package/skills/experience-custom-domain-create/SKILL.md +0 -727
  220. package/skills/experience-defer-rendering-workspace-page-setup-configure/SKILL.md +0 -41
  221. package/skills/experience-field-service-app-builder-configure/SKILL.md +0 -187
  222. package/skills/experience-flow-category-configure/SKILL.md +0 -117
  223. package/skills/experience-formula-configure/SKILL.md +0 -358
  224. package/skills/experience-global-actions-configure/SKILL.md +0 -69
  225. package/skills/experience-global-publisher-layouts-configure/SKILL.md +0 -79
  226. package/skills/experience-instrumentation-configure/SKILL.md +0 -64
  227. package/skills/experience-lex-engagement-configure/SKILL.md +0 -50
  228. package/skills/experience-lightning-bolt-open/SKILL.md +0 -12
  229. package/skills/experience-lightning-out-configure/SKILL.md +0 -129
  230. package/skills/experience-lightning-preview-configure/SKILL.md +0 -67
  231. package/skills/experience-lightning-types-query/SKILL.md +0 -98
  232. package/skills/experience-malware-scan-configure/SKILL.md +0 -71
  233. package/skills/experience-my-salesforce-configure/SKILL.md +0 -126
  234. package/skills/experience-navigation-menus-configure/SKILL.md +0 -235
  235. package/skills/experience-notification-types-configure/SKILL.md +0 -206
  236. package/skills/experience-notifications-configure/SKILL.md +0 -75
  237. package/skills/experience-record-discovery-query/SKILL.md +0 -227
  238. package/skills/experience-regenerate-previews-open/SKILL.md +0 -94
  239. package/skills/experience-sales-cloud-mab-configure/SKILL.md +0 -254
  240. package/skills/experience-schema-builder-open/SKILL.md +0 -38
  241. package/skills/experience-simple-record-home-configure/SKILL.md +0 -110
  242. package/skills/experience-static-resources-configure/SKILL.md +0 -74
  243. package/skills/field-service-setup-coordinate/SKILL.md +0 -62
  244. package/skills/field-service-work-plan-configure/SKILL.md +0 -253
  245. package/skills/fsc-actionable-segmentation-settings-configure/SKILL.md +0 -180
  246. package/skills/fsc-digital-origination-bre-decision-matrix-foundation-create/SKILL.md +0 -196
  247. package/skills/fsc-digital-origination-bre-disclosures-consent-configure/SKILL.md +0 -106
  248. package/skills/fsc-digital-origination-bre-document-upload-configure/SKILL.md +0 -96
  249. package/skills/fsc-digital-origination-bre-permissions-assign/SKILL.md +0 -111
  250. package/skills/fsc-digital-origination-bre-setup-coordinate/SKILL.md +0 -250
  251. package/skills/fsc-digital-origination-bre-stp-eligibility-configure/SKILL.md +0 -122
  252. package/skills/fsc-digital-origination-coordinate/SKILL.md +0 -653
  253. package/skills/fsc-digital-origination-demo-run/SKILL.md +0 -225
  254. package/skills/fsc-digital-origination-execution-guardrails-validate/SKILL.md +0 -112
  255. package/skills/fsc-digital-origination-initial-setup-configure/SKILL.md +0 -396
  256. package/skills/fsc-digital-origination-pricing-setup-coordinate/SKILL.md +0 -336
  257. package/skills/fsc-digital-origination-pricing-setup-data-foundation-create/SKILL.md +0 -208
  258. package/skills/fsc-digital-origination-pricing-setup-procedure-create/SKILL.md +0 -375
  259. package/skills/fsc-digital-origination-product-setup-act1-permissions-assign/SKILL.md +0 -83
  260. package/skills/fsc-digital-origination-product-setup-coordinate/SKILL.md +0 -248
  261. package/skills/fsc-digital-origination-sample-data-create/SKILL.md +0 -206
  262. package/skills/fsc-document-checklist-settings-configure/SKILL.md +0 -57
  263. package/skills/fsc-flexible-hierarchy-configure/SKILL.md +0 -148
  264. package/skills/fsc-flexible-hierarchy-foundation-configure/SKILL.md +0 -1430
  265. package/skills/fsc-flexible-hierarchy-graph-config-create/SKILL.md +0 -471
  266. package/skills/fsc-flexible-hierarchy-rule-based-graph-deploy/SKILL.md +0 -429
  267. package/skills/fsc-pricing-product-configurator-configure/SKILL.md +0 -150
  268. package/skills/fsc-pricing-salesforce-omnistudio-switch/SKILL.md +0 -123
  269. package/skills/fsc-product-act2-catalog-categories-create/SKILL.md +0 -82
  270. package/skills/fsc-product-act3-attributes-create/SKILL.md +0 -249
  271. package/skills/fsc-product-act4-classification-assignment-create/SKILL.md +0 -196
  272. package/skills/fsc-product-act5-considerations-get/SKILL.md +0 -44
  273. package/skills/fsc-stage-management-apex-flow-deploy/SKILL.md +0 -384
  274. package/skills/fsc-stage-management-compliant-data-sharing-configure/SKILL.md +0 -144
  275. package/skills/fsc-stage-management-decision-matrices-create/SKILL.md +0 -107
  276. package/skills/fsc-stage-management-definition-assignments-create/SKILL.md +0 -189
  277. package/skills/fsc-stage-management-definition-create/SKILL.md +0 -108
  278. package/skills/fsc-stage-management-permissions-assign/SKILL.md +0 -143
  279. package/skills/fsc-stage-management-transitions-configure/SKILL.md +0 -139
  280. package/skills/health-cloud-appt-booking-config-configure/SKILL.md +0 -135
  281. package/skills/health-cloud-appt-booking-url-config-configure/SKILL.md +0 -134
  282. package/skills/health-cloud-care-provider-affl-role-config-configure/SKILL.md +0 -136
  283. package/skills/health-cloud-care-provider-search-config-configure/SKILL.md +0 -134
  284. package/skills/health-cloud-care-requests-create/SKILL.md +0 -178
  285. package/skills/health-cloud-initial-configure/SKILL.md +0 -511
  286. package/skills/health-cloud-patient-appointment-scheduling-configure/SKILL.md +0 -1374
  287. package/skills/health-cloud-provider-search-settings-configure/SKILL.md +0 -924
  288. package/skills/health-cloud-referral-management-coordinate/SKILL.md +0 -513
  289. package/skills/health-cloud-timeline-configure/SKILL.md +0 -622
  290. package/skills/health-cloud-virtual-visit-config-configure/SKILL.md +0 -135
  291. package/skills/industries-account-score-settings-query/SKILL.md +0 -78
  292. package/skills/industries-actionable-list-data-sources-dmo-configure/SKILL.md +0 -177
  293. package/skills/industries-ad-product-availability-search/SKILL.md +0 -399
  294. package/skills/industries-advanced-account-forecast-settings-configure/SKILL.md +0 -628
  295. package/skills/industries-advanced-therapy-management-settings-configure/SKILL.md +0 -73
  296. package/skills/industries-atm-settings-starter-configure/SKILL.md +0 -76
  297. package/skills/industries-batch-document-ai-configure/SKILL.md +0 -196
  298. package/skills/industries-behavioral-health-app-settings-configure/SKILL.md +0 -71
  299. package/skills/industries-branch-management-settings-configure/SKILL.md +0 -89
  300. package/skills/industries-bre-decision-table-access-configure/SKILL.md +0 -367
  301. package/skills/industries-brokerage-settings-configure/SKILL.md +0 -41
  302. package/skills/industries-calendar-sync-settings-configure/SKILL.md +0 -89
  303. package/skills/industries-care-request-settings-configure/SKILL.md +0 -218
  304. package/skills/industries-case-management-intelligence-settings-configure/SKILL.md +0 -54
  305. package/skills/industries-catalog-process-attributes-products-configure/SKILL.md +0 -380
  306. package/skills/industries-catalog-process-fulfillment-configure/SKILL.md +0 -216
  307. package/skills/industries-catalog-process-intake-configure/SKILL.md +0 -219
  308. package/skills/industries-catalog-process-knowledge-configure/SKILL.md +0 -153
  309. package/skills/industries-catalog-process-preprocessor-configure/SKILL.md +0 -168
  310. package/skills/industries-cds-general-settings-configure/SKILL.md +0 -69
  311. package/skills/industries-claim-financial-settings-configure/SKILL.md +0 -169
  312. package/skills/industries-clinical-data-model-settings-configure/SKILL.md +0 -136
  313. package/skills/industries-clinical-data-model-settings-starter-configure/SKILL.md +0 -105
  314. package/skills/industries-collection-plan-settings-configure/SKILL.md +0 -132
  315. package/skills/industries-comms-service-console-settings-configure/SKILL.md +0 -159
  316. package/skills/industries-compliance-configure/SKILL.md +0 -102
  317. package/skills/industries-compliance-document-extraction-setup-configure/SKILL.md +0 -76
  318. package/skills/industries-contact-center-app-layout-configure/SKILL.md +0 -88
  319. package/skills/industries-contact-center-components-configure/SKILL.md +0 -96
  320. package/skills/industries-contact-center-path-knowledge-configure/SKILL.md +0 -95
  321. package/skills/industries-contact-center-user-access-assign/SKILL.md +0 -96
  322. package/skills/industries-course-waitlist-config-configure/SKILL.md +0 -162
  323. package/skills/industries-crisis-center-settings-configure/SKILL.md +0 -84
  324. package/skills/industries-custom-object-settings-configure/SKILL.md +0 -94
  325. package/skills/industries-data-cloud-integration-configure/SKILL.md +0 -88
  326. package/skills/industries-data-space-feature-mappings-configure/SKILL.md +0 -245
  327. package/skills/industries-decision-matrix-builder-configure/SKILL.md +0 -78
  328. package/skills/industries-decision-table-hbase-configure/SKILL.md +0 -87
  329. package/skills/industries-decision-table-version-configure/SKILL.md +0 -74
  330. package/skills/industries-decision-tables-builder-configure/SKILL.md +0 -253
  331. package/skills/industries-decision-tables-configure/SKILL.md +0 -439
  332. package/skills/industries-energy-utilities-configure/SKILL.md +0 -251
  333. package/skills/industries-eu-cloud-multisite-configure/SKILL.md +0 -1008
  334. package/skills/industries-eu-new-connections-configure/SKILL.md +0 -30
  335. package/skills/industries-explainability-msg-template-configure/SKILL.md +0 -135
  336. package/skills/industries-expression-set-message-token-configure/SKILL.md +0 -135
  337. package/skills/industries-field-service-settings-configure/SKILL.md +0 -82
  338. package/skills/industries-form-framework-settings-configure/SKILL.md +0 -30
  339. package/skills/industries-fsc-ai-settings-configure/SKILL.md +0 -57
  340. package/skills/industries-fsc-association-engine-settings-configure/SKILL.md +0 -172
  341. package/skills/industries-fsc-b2b-settings-configure/SKILL.md +0 -61
  342. package/skills/industries-fsc-insurance-settings-configure/SKILL.md +0 -58
  343. package/skills/industries-fsc-visa-fulfillment-setup-configure/SKILL.md +0 -103
  344. package/skills/industries-fsc-wealth-agent-settings-configure/SKILL.md +0 -117
  345. package/skills/industries-fsc-wealth-settings-configure/SKILL.md +0 -99
  346. package/skills/industries-fundraising-gift-entry-settings-configure/SKILL.md +0 -120
  347. package/skills/industries-fundraising-rfm-configure/SKILL.md +0 -128
  348. package/skills/industries-fundraising-settings-configure/SKILL.md +0 -145
  349. package/skills/industries-fundraising-source-code-gen-configure/SKILL.md +0 -299
  350. package/skills/industries-google-maps-api-key-settings-configure/SKILL.md +0 -87
  351. package/skills/industries-grantmaking-intelligence-settings-open/SKILL.md +0 -58
  352. package/skills/industries-hc-score-category-settings-configure/SKILL.md +0 -167
  353. package/skills/industries-health-engagement-settings-configure/SKILL.md +0 -218
  354. package/skills/industries-home-health-agentforce-setup-configure/SKILL.md +0 -131
  355. package/skills/industries-home-health-bundling-policy-create/SKILL.md +0 -50
  356. package/skills/industries-home-health-entity-labels-configure/SKILL.md +0 -29
  357. package/skills/industries-home-health-fsl-package-deploy/SKILL.md +0 -71
  358. package/skills/industries-home-health-fsl-settings-validate/SKILL.md +0 -27
  359. package/skills/industries-home-health-guided-setup-care-and-skill-get/SKILL.md +0 -80
  360. package/skills/industries-home-health-guided-setup-configure/SKILL.md +0 -836
  361. package/skills/industries-home-health-guided-setup-enable-org-fsl-get/SKILL.md +0 -55
  362. package/skills/industries-home-health-guided-setup-get-org-ready-get/SKILL.md +0 -61
  363. package/skills/industries-home-health-licenses-assign/SKILL.md +0 -27
  364. package/skills/industries-home-health-operating-hours-create/SKILL.md +0 -40
  365. package/skills/industries-home-health-scheduling-policy-create/SKILL.md +0 -41
  366. package/skills/industries-home-health-service-objective-create/SKILL.md +0 -22
  367. package/skills/industries-home-health-skills-create/SKILL.md +0 -31
  368. package/skills/industries-home-health-users-create/SKILL.md +0 -29
  369. package/skills/industries-icm-act3-toggles-configure/SKILL.md +0 -198
  370. package/skills/industries-icm-act5-genai-suggested-assessments-configure/SKILL.md +0 -361
  371. package/skills/industries-icm-act6-mcg-integration-configure/SKILL.md +0 -550
  372. package/skills/industries-integrated-care-management-configure/SKILL.md +0 -168
  373. package/skills/industries-object-enablement-configure/SKILL.md +0 -86
  374. package/skills/industries-tpm-system-processing-service-configure/SKILL.md +0 -64
  375. package/skills/integration-apex-settings-configure/SKILL.md +0 -61
  376. package/skills/marketing-e360-email-archiving-configure/SKILL.md +0 -73
  377. package/skills/platform-custom-permissions-configure/SKILL.md +0 -687
  378. package/skills/platform-label-workbench-import-create/SKILL.md +0 -67
  379. package/skills/platform-privacy-agent-settings-configure/SKILL.md +0 -752
@@ -2,17 +2,16 @@
2
2
  name: platform-widget-generate
3
3
  description: "Use this skill to author a complete HXL WidgetBundle (UEM body + schema.json + -meta.xml). TRIGGER when: user asks for a widget, mosaic, fragment, card, or rich UI surface for any subject, domain, feature, or entity noun; the prompt names only an entity or data shape without invoking Lightning Types, CLTs, or Apex-backed types. DO NOT TRIGGER when: the prompt explicitly says 'Lightning Type', 'CLT', 'Custom Lightning Type', 'Apex-backed type', or references '@apexClassType/...' (use platform-lightning-type-widget-coordinate); authoring a custom-LWC renderer for a Custom Lightning Type (use platform-custom-lightning-type-generate); or editing only an LWC component."
4
4
  metadata:
5
- version: "1.4"
5
+ version: "1.5"
6
6
  domains: ["Platform", "Agentforce"]
7
7
  minApiVersion: "68.0"
8
+ cliTools:
9
+ - tool: ["sf"]
10
+ semver: ">=2.0.0"
8
11
  relatedSkills:
9
12
  - "platform-apex-generate"
10
13
  - "platform-custom-lightning-type-generate"
11
14
  - "platform-lightning-type-widget-coordinate"
12
- mcpTools:
13
- metadata-experts:
14
- tools: ["execute_metadata_action"]
15
- semver: ">=1.0.0"
16
15
  ---
17
16
 
18
17
  # Generating a Widget Bundle
@@ -67,23 +66,49 @@ The first child of `tile/widget.children` SHOULD be a single `tile/column`. All
67
66
 
68
67
  ---
69
68
 
70
- ## Available Metadata Actions
69
+ ## Available Invocable Actions
70
+
71
+ Both are standard invocable actions on the target org.
72
+
73
+ ### Calling Convention
74
+
75
+ Fire each action with whichever mechanism is available: the H360 MCP `dispatch` tool (a `POST` to the endpoint path with the request body) or `sf api request rest`. Use `v{version}` = this skill's `minApiVersion`. Never use `curl`, and never extract the org's access token.
76
+
77
+ ```bash
78
+ sf api request rest '/services/data/v{version}/actions/standard/<actionName>' --method POST --body '<request body>' --target-org <org>
79
+ ```
80
+
81
+ ### Response Handling
82
+
83
+ Each response is an array with one envelope (`dispatch` nests it under `body`). Check three failure layers, in order:
84
+
85
+ | Layer | Signal | Action |
86
+ |---|---|---|
87
+ | Transport / auth | `dispatch` `status_code` is not 200, or CLI exits non-zero | Surface the error |
88
+ | Action | `[0].isSuccess` is `false`, or `[0].errors` is non-empty | Surface `errors[].message` |
89
+ | Per-entry (`getUiComponentSchemas` only) | any `componentSchemas[].success` is `false`, even when `[0].isSuccess` is `true` | Treat that block as unavailable |
90
+
91
+ On success, read `[0].outputValues`.
71
92
 
72
93
  ### discoverUiComponents
73
94
 
74
95
  **Purpose:** Discover the palette of blocks available for composition.
75
96
 
76
- **Required parameters:** `actionName: "discoverUiComponents"`, `metadataType: "FRAGMENT"`, `parameters.pageType: "FRAGMENT"`. Optional: `searchQuery` to filter by name/description.
97
+ **Endpoint:** `POST /services/data/v{version}/actions/standard/discoverUiComponents`
98
+
99
+ **Request body:** `{"inputs":[{"pageType":"FRAGMENT"}]}`
77
100
 
78
- **Returns:** list of `{ definition, description, label, attributes? }`.
101
+ **Returns:** `outputValues.componentDefinitions[]` — list of `{ definition, description, label }`.
79
102
 
80
103
  ### getUiComponentSchemas
81
104
 
82
- **Purpose:** Fetch JSON schemas (property types, required vs optional, validation) for selected blocks.
105
+ **Purpose:** Fetch schemas (property types, required vs optional, validation) for selected blocks.
83
106
 
84
- **Required parameters:** `actionName: "getUiComponentSchemas"`, `metadataType: "FRAGMENT"`, `parameters.pageType: "FRAGMENT"`, `parameters.componentDefinitions: ["namespace/definition", ...]`. Optional: `includeKnowledge` (default `true`).
107
+ **Endpoint:** `POST /services/data/v{version}/actions/standard/getUiComponentSchemas`
85
108
 
86
- **Returns:** `componentSchemas[]` — success entries carry the JSON schema, failure entries carry an error message. Partial failures are supported.
109
+ **Request body:** `{"inputs":[{"pageType":"FRAGMENT","componentDefinitions":["namespace/definition", ...]}]}`
110
+
111
+ **Returns:** `outputValues.componentSchemas[]` — list of `{ definition, success, schema }` (`schema` is a YAML string). Partial failures are supported.
87
112
 
88
113
  > Never pass `tile/widget` to `getUiComponentSchemas` — it is a fixed wrapper, not a queryable component.
89
114
 
@@ -169,11 +194,11 @@ Widgets express *intent*, not pixels. Each surface provides a default look and f
169
194
  - If `lightningTypeSchema` was passed by the orchestrator → derive per `references/schema-from-lightning-type.md`.
170
195
  - Otherwise → infer the list directly from the user prompt (pasted JSON payload, enumerated field list, or descriptive prose).
171
196
 
172
- 2. **Discover blocks (REQUIRED — do NOT skip).** Call the `discoverUiComponents` metadata action via `execute_metadata_action`. Use property types from the widget spec to seed `searchQuery` (text → `"text"`, number → `"number"`). **If `discoverUiComponents` returns `success: false`, an error, or an empty list, STOP and surface the error verbatim — do not improvise block names from memory, prior runs, or training data. Re-run discover with a different `searchQuery` only if the failure is search-query-specific.**
197
+ 2. **Discover blocks (REQUIRED — do NOT skip).** Call the `discoverUiComponents` invocable action (see *Available Invocable Actions*) and match widget-spec property types against the returned `label`/`description` values. **If `isSuccess` is `false`, `errors` is non-empty, or `componentDefinitions` is empty, STOP and surface the error verbatim — do not improvise block names from memory, prior runs, or training data.**
173
198
 
174
199
  3. **Select blocks.** Choose one block per widget-spec property, plus structural primitives from *Layout Best Practices*.
175
200
 
176
- 4. **Get block schemas (REQUIRED — do NOT skip).** Call the `getUiComponentSchemas` metadata action via `execute_metadata_action` for the selected blocks. Review property metadata. **If `componentSchemas` returns all-failure or empty, STOP and surface the error — do not improvise from existing widgets in the project.**
201
+ 4. **Get block schemas (REQUIRED — do NOT skip).** Call the `getUiComponentSchemas` invocable action for the selected blocks. Review property metadata. **If `isSuccess` is `false`, `componentSchemas` is empty, or any entry has `success: false`, do not use that block — re-select a different one from step 2's results; if none works, STOP and surface the error. Never improvise from existing widgets in the project.**
177
202
 
178
203
  5. **Build the UEM tree (example reads REQUIRED — do NOT skip).** First, identify which patterns match the widget spec and read each matching example file from this skill's own `examples/` directory (`<skill-root>/examples/`):
179
204
 
@@ -236,17 +261,8 @@ Widgets express *intent*, not pixels. Each surface provides a default look and f
236
261
 
237
262
  Write all three before proceeding to self-validation.
238
263
 
239
- 9. **Self-validate.** Before reporting, confirm each check below and report each result individually (`pass` or `fail (<reason>)`). Do **not** summarize as a single "all passed" line — list every check so a reviewer can spot a silent skip.
240
- - **`schema-parses`** — `<pkgDir>/uiWidgets/<widgetName>/schema.json` parses as JSON.
241
- - **`schema-root-keys`** — root has `title` (string), `type: "object"`, and `properties.attributes` (object) — where `properties.attributes` carries `lightning:type: "lightning__objectType"` and a nested `properties` map. No `unevaluatedProperties: false`.
242
- - **`schema-leaf-types`** — every leaf under `properties.attributes.properties` carries a `lightning:type`. Singular nested inner-class fields carry `lightning:type` set to the inner Apex class reference (`@apexClassType/<namespace>__<OuterClass>$<InnerClass>`); the nested shape is not redeclared. `List<InnerClass>` fields carry `lightning:type: "lightning__listType"` with `items.lightning:type` set to the inner Apex class reference (`@apexClassType/<namespace>__<OuterClass>$<InnerClass>`), not a redeclared field map — see `references/schema-from-lightning-type.md`. **When the list has no Apex-backed type** (schema inferred from the prompt), `items.lightning:type: "lightning__objectType"` MUST carry an inline nested `properties` map for every item field the body binds via `{!$item.X}`.
243
- - **`bindings-resolve`** — every `{!$attrs.X}` (or `{!$attrs.<outerField>.<innerField>}` for nested objects) in `<widgetName>.json` resolves to a property under `schema.json` `properties.attributes.properties`, and every `{!$item.X}` resolves to a `forItem` loop variable defined upstream. This applies to `$attrs`/`$item` references **inside formula expressions** too.
244
- - **`formulas-supported`** — every function name used inside a `{!...}` expression appears in the *Supported functions* list in `references/widget-formulas.md`.
245
- - **`body-envelope`** — `<widgetName>.json` root has `type: "lightning__agentforceWidget"` and a `contentBody` object whose `widgetBody` carries the UEM tree rooted at `tile/widget`. No node in the tree — root or non-root — carries a `type` key.
246
- - **`metaxml-wellformed`** — `<widgetName>.uiwidget-meta.xml` parses as well-formed XML.
247
- - **`metaxml-elements`** — `<widgetName>.uiwidget-meta.xml` has root `<UiWidgetBundle>` and contains `<masterLabel>` (non-empty), `<description>` (non-empty), and `<widgetType>JSON</widgetType>`.
248
- - **`files-present`** — all three files exist at the resolved `<pkgDir>/uiWidgets/<widgetName>/` path.
249
- - **`button-actions-present`** — every `tile/button` in `<widgetName>.json` has an `actions.click` action node whose `definition` is `action/openLink` or `action/sendMessage`.
264
+ 9. **Self-validate.** Before reporting, run the checks and report each result individually (`pass` or `fail (<reason>)`). Do **not** summarize as a single "all passed" line — list every check so a reviewer can spot a silent skip.
265
+ Run every check in `references/widget-bundle-validation.md`.
250
266
 
251
267
  ---
252
268
 
@@ -256,7 +272,7 @@ Widgets express *intent*, not pixels. Each surface provides a default look and f
256
272
  |---|---|
257
273
  | Block definitions follow `{namespace}/{blockName}` and must match `discoverUiComponents` output | Runtime resolves blocks by exact definition string |
258
274
  | Never pass `tile/widget` to `getUiComponentSchemas` | It is a fixed wrapper, not a queryable component |
259
- | Always supply `parameters` (with required keys) when calling `execute_metadata_action` | Missing parameters cause hard failure, not partial result |
275
+ | Read `references/` and `examples/` files only at the step that names them | Upfront reads waste context and precede the discovery result that determines which files are needed |
260
276
  | Every `{!$attrs.X}` in the body resolves to a property in the widget `schema.json` | No invented fields |
261
277
  | Every `tile/button` carries an `actions.click` entry using `action/openLink` or `action/sendMessage` only | These are the only two supported tile action definitions; an action-less button renders disabled |
262
278
  | No `$(…)`, backticks, `<(…)`, brace expansion `{a,b,c}`, or `eval`/`exec` in any Bash tool call | Vibes' safe-shell filter forces manual approval on these patterns even in Bypass mode. Emit separate commands (`mkdir -p a && mkdir -p b`) or print each value with its own command and reason about the output — do not capture into a shell variable |
@@ -265,26 +281,27 @@ Widgets express *intent*, not pixels. Each surface provides a default look and f
265
281
 
266
282
  ## Gotchas
267
283
 
268
- | Issue | Resolution |
269
- |---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
270
- | `getUiComponentSchemas` returns a partial-failure entry | Pick a different block from `discoverUiComponents`; do not silently continue without a schema |
271
- | Body references `{!$attrs.foo}` but `foo` is not under `schema.json` `properties.attributes.properties` | Add `foo` to `schema.json` `properties.attributes.properties` OR remove the body reference |
284
+ | Issue | Resolution|
285
+ |---|---|
286
+ | `getUiComponentSchemas` returns a partial-failure entry | Pick a different block from `discoverUiComponents`; do not silently continue without a schema|
287
+ | Body references `{!$attrs.foo}` but `foo` is not under `schema.json` `properties.attributes.properties` | Add `foo` to `schema.json` `properties.attributes.properties` OR remove the body reference|
272
288
  | Output written outside `<pkgDir>/uiWidgets/<widgetName>/` | `<pkgDir>` = `<packageDirectories[].path>/main/default` (see `references/widget-bundle-layout.md`). Dropping the `main/default/` segment is the common cause of widgets landing at `force-app/uiWidgets/...` instead of `force-app/main/default/uiWidgets/...` |
273
- | `if` bound directly to a raw string or number relies on truthiness and is unreliable | Bind to a `lightning__booleanType` property, or use a formula comparison that evaluates to boolean |
274
- | `tile/button` renders but does nothing when clicked | No `actions.click` entry was set — an action-less button renders disabled by design. Add one (see *Actions* above) |
275
- | Using `action/sendMessage` for pure navigation, or `action/openLink` when the agent should respond | `action/openLink` is synchronous and does not consume a turn; `action/sendMessage` is asynchronous and earns a fresh turn. Pick the one matching the intended UX |
289
+ | `if` bound directly to a raw string or number relies on truthiness and is unreliable | Bind to a `lightning__booleanType` property, or use a formula comparison that evaluates to boolean|
290
+ | `tile/button` renders but does nothing when clicked | No `actions.click` entry was set — an action-less button renders disabled by design. Add one (see *Actions* above)|
291
+ | Using `action/sendMessage` for pure navigation, or `action/openLink` when the agent should respond | `action/openLink` is synchronous and does not consume a turn; `action/sendMessage` is asynchronous and earns a fresh turn. Pick the one matching the intended UX|
276
292
 
277
293
  ---
278
294
 
279
295
  ## Reference File Index
280
296
 
281
- | File | When to read |
282
- |---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
283
- | `references/widget-meta-directives.md` | For `forEach` / `forItem` (iteration) and `if` (conditional rendering), including nested loops |
284
- | `references/schema-from-lightning-type.md` | When `lightningTypeSchema` is provided; how to derive the widget `schema.json` from an Apex-backed Lightning Type |
285
- | `references/widget-bundle-layout.md` | Folder layout, `-meta.xml` shape, `<pkgDir>` resolution rules |
286
- | `references/widget-formulas.md` | Supported formula functions and operators |
287
- | `examples/single-object.json` | Single-object pattern (root binding via `{!$attrs.X}`, no iteration) |
297
+ | File | When to read|
298
+ |---|---|
299
+ | `references/widget-meta-directives.md` | For `forEach` / `forItem` (iteration) and `if` (conditional rendering), including nested loops|
300
+ | `references/schema-from-lightning-type.md` | When `lightningTypeSchema` is provided; how to derive the widget `schema.json` from an Apex-backed Lightning Type|
301
+ | `references/widget-bundle-layout.md` | Folder layout, `-meta.xml` shape, `<pkgDir>` resolution rules|
302
+ | `references/widget-bundle-validation.md` | Step 9 — the checks to run before reporting |
303
+ | `references/widget-formulas.md` | Supported formula functions and operators|
304
+ | `examples/single-object.json` | Single-object pattern (root binding via `{!$attrs.X}`, no iteration)|
288
305
  | `examples/list-with-foreach.json` | Any list-iteration case — root-level collections, nested lists, and lists embedded inside a single-object widget (e.g. iterating a `List<InnerClass>` inside an outer Apex payload) |
289
- | `examples/conditional.json` | Conditional pattern (`if` on `meta`, including `if` + `forEach` together) |
290
- | `examples/formulas.json` | Formula usage — text/arithmetic/date transforms, `IF`/`AND`/`NOT` driving both a `tile/text` and `meta.if` |
306
+ | `examples/conditional.json` | Conditional pattern (`if` on `meta`, including `if` + `forEach` together)|
307
+ | `examples/formulas.json` | Formula usage — text/arithmetic/date transforms, `IF`/`AND`/`NOT` driving both a `tile/text` and `meta.if`|
@@ -0,0 +1,14 @@
1
+ # Widget Bundle Validation Checks
2
+
3
+ Report each check individually as `pass` or `fail (<reason>)`.
4
+
5
+ - **`schema-parses`** — `<pkgDir>/uiWidgets/<widgetName>/schema.json` parses as JSON.
6
+ - **`schema-root-keys`** — root has `title` (string), `type: "object"`, and `properties.attributes` (object) — where `properties.attributes` carries `lightning:type: "lightning__objectType"` and a nested `properties` map. No `unevaluatedProperties: false`.
7
+ - **`schema-leaf-types`** — every leaf under `properties.attributes.properties` carries a `lightning:type`. Singular nested inner-class fields carry `lightning:type` set to the inner Apex class reference (`@apexClassType/<namespace>__<OuterClass>$<InnerClass>`); the nested shape is not redeclared. `List<InnerClass>` fields carry `lightning:type: "lightning__listType"` with `items.lightning:type` set to the inner Apex class reference (`@apexClassType/<namespace>__<OuterClass>$<InnerClass>`), not a redeclared field map — see `references/schema-from-lightning-type.md`. **When the list has no Apex-backed type** (schema inferred from the prompt), `items.lightning:type: "lightning__objectType"` MUST carry an inline nested `properties` map for every item field the body binds via `{!$item.X}`.
8
+ - **`bindings-resolve`** — every `{!$attrs.X}` (or `{!$attrs.<outerField>.<innerField>}` for nested objects) in `<widgetName>.json` resolves to a property under `schema.json` `properties.attributes.properties`, and every `{!$item.X}` resolves to a `forItem` loop variable defined upstream. This applies to `$attrs`/`$item` references **inside formula expressions** too.
9
+ - **`formulas-supported`** — every function name used inside a `{!...}` expression appears in the *Supported functions* list in `references/widget-formulas.md`.
10
+ - **`body-envelope`** — `<widgetName>.json` root has `type: "lightning__agentforceWidget"` and a `contentBody` object whose `widgetBody` carries the UEM tree rooted at `tile/widget`. No node in the tree — root or non-root — carries a `type` key.
11
+ - **`metaxml-wellformed`** — `<widgetName>.uiwidget-meta.xml` parses as well-formed XML.
12
+ - **`metaxml-elements`** — `<widgetName>.uiwidget-meta.xml` has root `<UiWidgetBundle>` and contains `<masterLabel>` (non-empty), `<description>` (non-empty), and `<widgetType>JSON</widgetType>`.
13
+ - **`files-present`** — all three files exist at the resolved `<pkgDir>/uiWidgets/<widgetName>/` path.
14
+ - **`button-actions-present`** — every `tile/button` in `<widgetName>.json` has an `actions.click` action node whose `definition` is `action/openLink` or `action/sendMessage`.
@@ -55,7 +55,7 @@ All steps are sequential. If a step fails, stop and report the error rather than
55
55
 
56
56
  2. **Gather configuration** — use `AskUserQuestion` to collect **Country** (`US`/`CA`) and **Phone Number Type** (`10DLC`/`Toll Free`). Do not mark any option as recommended or default — present the choices neutrally. Wait for both before continuing.
57
57
 
58
- 3. **Fetch available numbers** — read `references/number_management_api.md` for the endpoint contract, then run `scripts/fetch-numbers.sh <alias> <country> <phoneType>`. Present the returned numbers as a numbered list and ask the user to select one — do not mark any number as recommended or default.
58
+ 3. **Fetch available numbers** — read `references/number_management_api.md` for the endpoint contract. Before fetching, use `AskUserQuestion` to offer an **optional** way to narrow results: ask whether the user wants numbers for a specific **area code** (when the type is `10DLC`) or **prefix** (when the type is `Toll Free`), or to list all available numbers. Present this neutrally with no recommended/default option; leaving it blank (or choosing to list all) preserves the unfiltered fetch. Then run `scripts/fetch-numbers.sh <alias> <country> <phoneType> [searchParam]`, passing the area code / prefix as the optional fourth argument only when the user supplied one. Present the returned numbers as a numbered list and ask the user to select one — do not mark any number as recommended or default. If a narrowed fetch returns no numbers, tell the user and offer to retry with a different area code / prefix or to list all available numbers.
59
59
 
60
60
  4. **Procure the selected number** — run `scripts/procure-number.sh <alias> <country> <phoneType> <number>`. On a non-2xx response, map the status via `references/number_management_api.md` and stop with a clear message.
61
61
 
@@ -21,11 +21,18 @@ Query parameters:
21
21
  |-------|--------|-------|
22
22
  | `countryCode` | `US`, `CA` | |
23
23
  | `phoneNumberType` | `10DLC`, `Toll Free` | URL-encode the space in `Toll Free` as `%20` |
24
+ | `searchParam` | area code (`10DLC`) or prefix (`Toll Free`) | **Optional.** Narrows results to numbers matching the area code / prefix. Omit to list all available numbers for the type. Passed through as-is (the API returns `400 BAD_REQUEST` on an invalid value). |
24
25
 
25
26
  ```bash
27
+ # All available Toll Free numbers for US
26
28
  sf api request rest \
27
29
  "/services/data/v68.0/connect/number-management/v1/numbers?countryCode=US&phoneNumberType=Toll%20Free" \
28
30
  --target-org <alias>
31
+
32
+ # Optional: narrow 10DLC numbers to a specific area code via searchParam
33
+ sf api request rest \
34
+ "/services/data/v68.0/connect/number-management/v1/numbers?countryCode=US&phoneNumberType=10DLC&searchParam=415" \
35
+ --target-org <alias>
29
36
  ```
30
37
 
31
38
  Response:
@@ -42,10 +49,13 @@ Response:
42
49
  sf api request rest \
43
50
  "/services/data/v68.0/connect/number-management/v1/number" \
44
51
  --method POST \
45
- --body '{"phoneNumberType":"Toll Free","country":"US","phoneNumber":"+14155551234"}' \
52
+ --body '{"phoneNumberType":"Toll Free","country":"US","phoneNumber":"+14155551234","contactCenterType":"Agentforce Contact Center"}' \
46
53
  --target-org <alias>
47
54
  ```
48
55
 
56
+ `contactCenterType` is a fixed internal value (`Agentforce Contact Center`) — always sent,
57
+ never gathered from the user.
58
+
49
59
  Success (`201`):
50
60
 
51
61
  ```json
@@ -1,8 +1,11 @@
1
1
  #!/usr/bin/env bash
2
2
  # Fetch available default phone numbers for a country + phone-number type.
3
- # Usage: fetch-numbers.sh <org-alias> <country> <phone-type>
4
- # country: US | CA
5
- # phone-type: 10DLC | "Toll Free"
3
+ # Usage: fetch-numbers.sh <org-alias> <country> <phone-type> [search-param]
4
+ # country: US | CA
5
+ # phone-type: 10DLC | "Toll Free"
6
+ # search-param: optional — area code (10DLC) or prefix (Toll Free) to narrow
7
+ # results. Appended as the API's `searchParam` query param. Omit
8
+ # (or pass empty) to list all available numbers for the type.
6
9
  # Output: JSON { "phoneNumbers": [...] } on stdout.
7
10
 
8
11
  set -euo pipefail
@@ -10,12 +13,15 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10
13
  source "$SCRIPT_DIR/lib.sh"
11
14
 
12
15
  if [[ "${1:-}" == "--help" || $# -lt 3 ]]; then
13
- echo "Usage: fetch-numbers.sh <org-alias> <country> <phone-type>" >&2
16
+ echo "Usage: fetch-numbers.sh <org-alias> <country> <phone-type> [search-param]" >&2
14
17
  [[ "${1:-}" == "--help" ]] && exit 0 || exit 2
15
18
  fi
16
19
 
17
- ALIAS="$1"; COUNTRY="$2"; PHONE_TYPE="$3"
20
+ ALIAS="$1"; COUNTRY="$2"; PHONE_TYPE="$3"; SEARCH_PARAM="${4:-}"
21
+
22
+ QUERY="countryCode=${COUNTRY}&phoneNumberType=$(urlenc_spaces "$PHONE_TYPE")"
23
+ [[ -n "$SEARCH_PARAM" ]] && QUERY="${QUERY}&searchParam=$(urlenc "$SEARCH_PARAM")"
18
24
 
19
25
  sf api request rest \
20
- "/${NM_BASE}/numbers?countryCode=${COUNTRY}&phoneNumberType=$(urlenc_spaces "$PHONE_TYPE")" \
26
+ "/${NM_BASE}/numbers?${QUERY}" \
21
27
  --target-org "$ALIAS"
@@ -13,6 +13,22 @@ NM_BASE="services/data/${API_VERSION}/connect/number-management/v1"
13
13
  # URL-encode a value's spaces (sufficient for country/phoneType query params).
14
14
  urlenc_spaces() { printf '%s' "${1// /%20}"; }
15
15
 
16
+ # Percent-encode a full value for safe use as a URL query-parameter value: only
17
+ # the RFC 3986 unreserved set stays literal, everything else becomes %XX. Needed
18
+ # for free-text values (e.g. a user-supplied area code / prefix) so reserved
19
+ # characters like & or = can't inject extra query parameters into the request.
20
+ urlenc() {
21
+ local s="$1" i c out=""
22
+ for (( i=0; i<${#s}; i++ )); do
23
+ c="${s:i:1}"
24
+ case "$c" in
25
+ [a-zA-Z0-9.~_-]) out+="$c" ;;
26
+ *) printf -v c '%%%02X' "'$c"; out+="$c" ;;
27
+ esac
28
+ done
29
+ printf '%s' "$out"
30
+ }
31
+
16
32
  # XML-escape a value for safe interpolation into flow-template stringValue/label nodes.
17
33
  # Free-text org data (queue names, agent labels) can contain &, <, >, ", ' — unescaped
18
34
  # they produce malformed XML and an opaque `sf project deploy start` parse error.
@@ -14,8 +14,9 @@ fi
14
14
 
15
15
  ALIAS="$1"; COUNTRY="$2"; PHONE_TYPE="$3"; NUMBER="$4"
16
16
 
17
+ # contactCenterType is a fixed internal value, not a user-supplied input.
17
18
  BODY=$(jq -n --arg t "$PHONE_TYPE" --arg c "$COUNTRY" --arg p "$NUMBER" \
18
- '{phoneNumberType:$t, country:$c, phoneNumber:$p}')
19
+ '{phoneNumberType:$t, country:$c, phoneNumber:$p, contactCenterType:"Agentforce Contact Center"}')
19
20
 
20
21
  sf api request rest \
21
22
  "/${NM_BASE}/number" \
@@ -6,9 +6,9 @@ Help Portal deploys an **Agentforce Concierge experience** on an LWR Experience
6
6
 
7
7
  The agent script does **not** change here — this is channel/site metadata around the agent.
8
8
 
9
- ## Execution model — headless with one operator pause
9
+ ## Execution model — Headless first, UI fallback
10
10
 
11
- Every step in §A–§S below is executed headlessly via `sf` CLI + Data API + Metadata API + Tooling API. There is exactly **one** step that requires the operator to click a Setup toggle: enabling the **Agentforce Orchestrator** OrgPerm (see §F.4). When the flow reaches that step, pause, present the operator with a direct Setup URL and clear instructions, and wait for them to reply `done` before continuing. Every other Setup-URL fallback in this document is a *last resort* — attempt the headless path first, and only fall back to UI if the headless path returns an unrecoverable error.
11
+ Every step in §A–§S below is executed headlessly via `sf` CLI + Data API + Metadata API + Tooling API. The Agentforce Orchestrator OrgPerm (§F.4) is enabled via a Connect API POST — no operator UI pause is required. Every Setup-URL fallback in this document is a *last resort* — attempt the headless path first, and only fall back to UI if the headless path returns an unrecoverable error.
12
12
 
13
13
  If a non-critical step fails (branding polish, suggestion themes, progressive-rendering toggle), log the failure, continue, and surface the gap to the operator at the end. Do NOT abort the deploy for cosmetic gaps.
14
14
 
@@ -50,7 +50,7 @@ At the end of the run, print the live customer-facing portal URL for the operato
50
50
  > | 4 | Channel + routing + escalation | §E — `sf agent activate` first; if `MESSAGING_CHANNEL_DEV_NAME` not passed in, delegate to `service-digital-engagement-channel-configure` to create the channel (deploy XML with `<sessionHandlerType>AgentforceServiceAgent</sessionHandlerType>` + `<sessionHandlerQueue>` only — `sessionHandlerAsa` is not accepted by the v67 Metadata API); then delegate to `service-agentforce-channel-configure` (Phase 1: queue, Phase 2: Data API PATCH of `SessionHandlerId` + `FallbackQueueId` on the MessagingChannel, Phase 3: escalation question) | SOQL confirms `SessionHandlerId=$BOT_ID`, `FallbackQueueId` set; `BotVersion.Status=Active`; escalation answered by operator |
51
51
  > | 6 | Retrieve + edit + deploy bundle | §F.0 — retrieve `DigitalExperienceBundle:site/$BUNDLE_NAME`; **edit `sfdc_cms__brandingSet/*/content.json` with the four colors from §A (§D)**; replace home placeholder with 4 Concierge components (empty `attributes: {}`); add `Conversation__c` route + `conversation` view (§F.0.a); flip `authenticationType`; deploy | Retrieve confirms components + route; branding JSON contains user-specified hex values |
52
52
  > | 7 | Wire Concierge runtime binding | §F.3.a–d — create `EmbeddedServiceConfig` via Connect API `POST /connect/embeddedmessaging/deployment/setup` (same as Web Chat §C.4, omit `hostDomain`; auto-generates `ESW_*` site + test page), insert NSSE, **deploy AND assign** guest permset to Site's `GuestUserId` | `/webruntime/api/…/concierge/config` returns `deploymentName + siteUrl + scrtUrl` **AND** `SELECT PermissionSet.Name FROM PermissionSetAssignment WHERE AssigneeId=<GuestUserId>` returns the `<Bundle>_Guest_Concierge` row |
53
- > | 8 | **⏸ Enable Agentforce Orchestrator (operator pause)** | §F.4 — preflight SOQL on `AgenticCtxtDecorDefinition`; if not supported, pause and ask operator to flip the toggle at the printed Setup URL; wait for `done` reply; then `POST /connect/self-service/setup/agentOrchestrator {name, developerName, agentId}` | Connect GET returns orchestrator with agentId |
53
+ > | 8 | Enable Agentforce Orchestrator + create orchestrator binding | §F.4 — `POST /connect/self-service/setup/agentforceOrchestratorEnablement?includeAgentforceOrchestratorPerms=false` (headless, no operator pause); verify SOQL probe; then `POST /connect/self-service/setup/agentOrchestrator {name, developerName, agentId}` | Connect GET returns orchestrator with agentId |
54
54
  > | 9 | Deploy the bundle | §G — `sf project deploy start -m DigitalExperienceBundle:site/$BUNDLE_NAME` | Status: Succeeded |
55
55
  > | 10 | Publish the site | §I — `POST /connect/communities/$NETWORK_ID/publish`; PATCH `Network.Status=Live` | Site loads at `PUBLISHED_PORTAL_URL` |
56
56
  > | 11 | Network guest flags | §L.0 — PATCH `Network.OptionsGuestChatterEnabled=true AND OptionsGuestMemberVisibility=true` (single Data API call). ALSO verify auth ESC `AreGuestUsersAllowed=true` — flip via mdapi + republish if false. | `/concierge/config?asGuest=true` returns 200; SOQL confirms both Network flags + ESC flag true |
@@ -712,13 +712,13 @@ curl -sS "$PUBLISHED_PORTAL_URL/webruntime/api/services/data/v67.0/connect/self-
712
712
 
713
713
  All three fields must be non-null. If `deploymentName` is null, the bound ESC references a different site or MessagingChannel — verify the `<site>` in the ESC metadata is the LWR site (F.3.a).
714
714
 
715
- ### F.4 — Wire the Agentforce Orchestrator *(one operator pause, then fully headless)*
715
+ ### F.4 — Wire the Agentforce Orchestrator *(Headless first, UI fallback)*
716
716
 
717
- The Agentforce Orchestrator provides the personalized greeting, Action/Object recommendations, and Concierge proactive routing. The "Enable Agentforce Orchestrator" OrgPerm gates the agent-binding surfaces (Connect POST, Data API sObject, SOQL). Detect the toggle state with a SOQL write-probe, prompt one manual click if off, then continue fully headless.
717
+ The Agentforce Orchestrator provides the personalized greeting, Action/Object recommendations, and Concierge proactive routing. The "Enable Agentforce Orchestrator" OrgPerm gates the agent-binding surfaces (Connect POST, Data API sObject, SOQL). Enable it headlessly via `POST /connect/self-service/setup/agentforceOrchestratorEnablement`, verify with the SOQL probe, then create the orchestrator binding.
718
718
 
719
719
  **F.4.0 — Detection preflight.**
720
720
 
721
- Run the probe up to **2 times** before concluding the toggle is off. The `sf` CLI occasionally mixes warning output into stdout on the first call, which causes a false "not supported" parse. Re-running the identical query without waiting resolves the issue — no org state changes between attempts.
721
+ Run the SOQL probe up to **2 times** before concluding the toggle is off. The `sf` CLI occasionally mixes warning output into stdout on the first call causing a false "not supported" parse. Re-running the identical query without waiting resolves the issue — no org state changes between attempts.
722
722
 
723
723
  ```bash
724
724
  TOGGLE_STATE="UNKNOWN"
@@ -735,11 +735,24 @@ done
735
735
  ```
736
736
 
737
737
  - ✅ `TOGGLE_STATE=ON` → proceed with §F.4.2.
738
- - ❌ `TOGGLE_STATE=OFF` (both attempts) → toggle is genuinely OFF, **pause and prompt the operator**.
738
+ - ❌ `TOGGLE_STATE=OFF` (both attempts) → toggle is genuinely OFF → proceed to §F.4.1 (headless enable).
739
739
 
740
- **F.4.1 — ⏸ OPERATOR PAUSE: enable the Orchestrator OrgPerm.**
740
+ **F.4.1 — Headless enable via Connect API (fully headless — no operator pause).**
741
741
 
742
- If the SOQL probe returned "not supported", send this message verbatim to the operator, then wait for their reply:
742
+ Enable Agentforce Orchestrator headlessly:
743
+
744
+ > **`min_api_version: 68.0`** — this endpoint is only available on API v68.0+. On v67 orgs the POST returns `NOT_FOUND`; fall through to the UI path below.
745
+
746
+ ```bash
747
+ sf api request rest -o "$ORG" --method POST \
748
+ "/services/data/v68.0/connect/self-service/setup/agentforceOrchestratorEnablement?includeAgentforceOrchestratorPerms=false" \
749
+ --body '{}'
750
+ # → {"isSuccess": true}
751
+ ```
752
+
753
+ After the POST, re-run the §F.4.0 SOQL probe to confirm `TOGGLE_STATE=ON`. If the probe still returns "not supported" after a successful POST (can happen on a slow pod), wait 10 seconds and re-probe once more. If the probe is still off after that re-probe, fall back to the UI step below — do not continue to §F.4.2.
754
+
755
+ If the org **genuinely does not have this surface** (the POST itself returns `NOT_FOUND` or `UNSUPPORTED_OPERATION`), fall through to the legacy UI path as a last resort:
743
756
 
744
757
  > **One manual step needed.** Please open this URL and enable Agentforce Orchestrator:
745
758
  >
@@ -749,7 +762,7 @@ If the SOQL probe returned "not supported", send this message verbatim to the op
749
762
  > 2. Wait for the confirmation banner.
750
763
  > 3. Reply `done` here and I'll continue.
751
764
 
752
- When the operator replies `done`, re-run the F.4.0 SOQL probe. If it still returns "not supported", either the toggle wasn't flipped or there's an org-shape gap. Ask them to double-check, then re-probe. If the org genuinely does not have this surface (older-API pod), fall through to the F.4 skip: continue the deploy without the Orchestrator, and log the gap in the operator handoff.
765
+ If the org cannot enable this at all, skip §F.4 entirely and log the gap in the operator handoff.
753
766
 
754
767
  **F.4.2 — Bot prerequisite check.**
755
768
 
@@ -1419,7 +1432,7 @@ sf org open --target-org $ORG --path "/<url-path>/"
1419
1432
  | Guest curl to `/webruntime/api/.../connect/self-service/*` returns `HTTP 401 UNAUTHORIZED` | `Network.OptionsGuestChatterEnabled = False` on target | Run §L.0 diagnostic; PATCH to True via Data API — no republish required |
1420
1433
  | Portal loads, `/concierge/config` returns 200, prompt bar renders but says **"Agents are not available. Try again later."** | Bot-routing wiring missing. Typical gaps: `PresenceUserConfigUser`, `GroupMember`, `Group.QueueRoutingConfigId` | Run §N — three Data-API writes |
1421
1434
  | §N writes all succeed but chat *still* shows "Agents are not available" immediately | Automated-Process pickup path needs to spin up after routing wiring changes | Re-activate the BotVersion via CLI (`sf agent deactivate` + `sf agent activate`). Wait a few minutes. Do NOT rely on `UserServicePresence` COUNT as the readiness signal |
1422
- | Prompt bar responses are ungrounded / navigate to `/error` on newer-API orgs | Agentforce Orchestrator not wired | See §F.4 — enable the OrgPerm (operator pause) then `POST /connect/self-service/setup/agentOrchestrator` |
1435
+ | Prompt bar responses are ungrounded / navigate to `/error` on newer-API orgs | Agentforce Orchestrator not wired | See §F.4 — `POST /connect/self-service/setup/agentforceOrchestratorEnablement?includeAgentforceOrchestratorPerms=false`, verify SOQL probe, then `POST /connect/self-service/setup/agentOrchestrator` |
1423
1436
  | Agentforce Orchestrator's "Add Tool → Agent" picker is empty | `BotDefinition.AgentTemplate` is `null` — Bot was created via headless Metadata deploy, not the Setup wizard | Delete the Bot and recreate via Setup → Agentforce Agents → New Agent → From Template → Agentforce Service Agent |
1424
1437
 
1425
1438
  ---
@@ -28,9 +28,18 @@ Creates `MessagingChannel` metadata XML for Salesforce Messaging for In-App and
28
28
 
29
29
  ---
30
30
 
31
+ ## Entry points and transport
32
+
33
+ - **Delegated** (`context.calledFrom == "service-onboarding"`): use the approved `values`, ask nothing, and return `failed` naming any missing required key. **Standalone** (no `context`): run Clarifying Questions.
34
+ - **Transport A** (primary): headless-360 MCP `dispatch` / `dispatch_readonly` on `/headless/metadata`. **Transport B**: the `sf` commands below, only where a probe shows Transport A unavailable.
35
+
36
+ Details: `references/onboarding_contract.md` (§1 entry points, §2 transport, §3 pre-scan, §5 result).
37
+
38
+ ---
39
+
31
40
  ## Clarifying Questions
32
41
 
33
- Before generating, ask the user if not already clear:
42
+ Before generating, ask the user if not already clear (standalone only):
34
43
 
35
44
  - What is the channel name / label? (used for `masterLabel` and file name)
36
45
  - What routing type? (Omni-Channel Flow, Omni-Channel Queue, User, or Agentforce Service Agent)
@@ -80,19 +89,21 @@ All steps are sequential. Do not skip or reorder.
80
89
 
81
90
  1. **Verify org API version** — run `scripts/check-api-version.sh 67.0 <org-alias>` and report any errors it returns. If the script fails, generate a `sfdx-project.json` in the metadata output folder with `"sourceApiVersion": "67.0"`.
82
91
 
83
- 2. **Collect inputs** — confirm the channel label, routing type, routing target, and verification settings from the user per Clarifying Questions above.
92
+ 2. **Collect inputs** — standalone: per Clarifying Questions. Delegated: from `values`. Then probe transport with a read-only `GET` of `MessagingChannel` (contract §2).
84
93
 
85
94
  3. **Determine file name** — run `scripts/normalize-channel-name.sh "<LABEL>"` and surface any errors it returns.
86
95
 
87
- 4. **Verify routing target exists** — query the org to confirm the referenced routing target exists:
96
+ 3a. **Pre-scan** — `GET` `MessagingChannel` by the step 3 name (contract §3): none → create; matches and active → no write, `already-configured`, skip to Phase 4; matches but inactive → activate only (step 15); differs → announce each change, then write the full document (standalone: ask first).
97
+
98
+ 4. **Verify routing target exists** — skip when step 3a ended in `already-configured` or activate-only, so a re-run never creates a queue. Query the org to confirm the referenced routing target exists:
88
99
  - For Queue: `sf data query --query "SELECT Id, DeveloperName FROM Group WHERE Type='Queue' AND DeveloperName='<QUEUE_NAME>'" --target-org <org-alias>`
89
100
  - For Flow: `sf data query --query "SELECT Id, ApiName FROM FlowDefinitionView WHERE ApiName='<FLOW_NAME>' AND IsActive=true" --target-org <org-alias>`
90
101
  - For User: `sf data query --query "SELECT Id, Username FROM User WHERE Id='<USER_ID>' AND IsActive=true" --target-org <org-alias>`
91
102
  - For ASA: `sf data query --query "SELECT Id, DeveloperName FROM BotDefinition WHERE DeveloperName='<BOT_NAME>'" --target-org <org-alias>`
92
103
  - Also verify the fallback queue exists (required for Flow, User, and ASA routing)
93
104
 
94
- If any target is not found, inform the user and ask whether to create it. If the user confirms:
95
- - For Queue: generate a `.queue-meta.xml` with `MessagingSession` as the `queueSobject` type and deploy it before the channel. **A new queue is unusable for routing without a `QueueRoutingConfig` — a channel deployed against a queue with none fails at session-start with "Agents are not available. Try again later," even though the channel itself deploys and activates cleanly.** Immediately after the queue deploys, resolve or create its routing config by following `service-agentforce-channel-configure`'s `references/queue-resolution.md` Step 4 — do not defer this to a later skill invocation, since this may be the only place a newly created queue is ever touched.
105
+ If any target is not found: standalone — inform the user and ask whether to create it. Delegated — return `failed` naming the missing target; never create it. If the standalone user confirms creating:
106
+ - For Queue: generate a `.queue-meta.xml` with `MessagingSession` as the `queueSobject` type and deploy it before the channel. **A new queue needs a `QueueRoutingConfig`, or sessions fail with "Agents are not available. Try again later" even though the channel deploys and activates.** Right after the queue deploys, resolve or create one per `service-agentforce-channel-configure`'s `references/queue-resolution.md` Step 4 — do not defer it.
96
107
  - For Flow/User/ASA: inform the user that the flow, user, or bot must be created separately (out of scope for this skill)
97
108
 
98
109
  5. **Read the channel settings reference** — load `references/channel_settings.md` to understand all available configuration options and their valid values.
@@ -110,10 +121,7 @@ All steps are sequential. Do not skip or reorder.
110
121
  | User | `User` | `sessionHandlerUser` + `sessionHandlerQueue` (fallback) |
111
122
  | Agentforce Service Agent | `AgentforceServiceAgent` | `sessionHandlerQueue` (fallback) + `sessionHandlerAsa` (bot dev name — required, see v67 note below) |
112
123
 
113
- > **v67 note — `<sessionHandlerAsa>` is required in the XML, not rejected.** Confirmed on a v67.0 org: omitting `<sessionHandlerAsa>` causes the deploy to fail with "Missing required Agentforce Service Agent." Include it and the deploy binds `SessionHandlerId` automatically — no post-deploy Data API PATCH needed.
114
- > 1. **Verify the bot is Active before channel creation.** The Metadata API rejects binding with "Only active Agentforce Service Agents are supported." Run `sf agent activate -o <org> --api-name <BotDevName>` and confirm `BotVersion.Status = Active` first.
115
- > 2. Deploy the XML with `<sessionHandlerType>AgentforceServiceAgent</sessionHandlerType>`, `<sessionHandlerQueue>` (fallback), and `<sessionHandlerAsa>{BotDevName}</sessionHandlerAsa>`.
116
- > 3. Verify: `sf data query -o <org> -q "SELECT SessionHandlerId, FallbackQueueId FROM MessagingChannel WHERE DeveloperName='<ChannelDevName>'" --json` — both must be non-null after the deploy, with no separate PATCH step.
124
+ > **v67 note — `<sessionHandlerAsa>` is required** (omitting it fails with "Missing required Agentforce Service Agent"); the deploy then binds `SessionHandlerId`, no PATCH needed. The bot must be Active first: run `sf agent activate -o <org> --api-name <BotDevName>` and confirm `BotVersion.Status = Active`.
117
125
 
118
126
  8. **Apply user verification** — if enabled, set `embeddedConfig.authMode` to `Auth` and include `<messagingAuthorizations>`. If not enabled, set `embeddedConfig.authMode` to `UnAuth` and omit `<messagingAuthorizations>`.
119
127
 
@@ -142,21 +150,21 @@ All steps are sequential. Do not skip or reorder.
142
150
 
143
151
  ### Phase 3 — Deploy and Activate
144
152
 
145
- 14. **Deploy the channel** — deploy the generated `.messagingChannel-meta.xml` file to the target org:
153
+ 14. **Write the channel** — Transport A: `POST` to create, `PUT` the **full** document to update (a minimal PUT drops `embeddedConfig`); check `results[].success`, then re-`GET`. Transport B:
146
154
  ```bash
147
155
  sf project deploy start --source-dir <path-to-messagingChannels-folder> --target-org <org-alias>
148
156
  ```
149
157
 
150
- 15a. **ASA routing only — verify the bind landed.** Skip this step for Queue, Flow, and User routing types. Because `<sessionHandlerAsa>` was included in the deployed XML (step 7), the deploy itself binds `SessionHandlerId` — no separate Data API PATCH is needed.
158
+ 15a. **ASA routing only — verify the bind landed** (skip for Queue, Flow, User):
151
159
 
152
160
  ```bash
153
161
  sf data query -o <org> --json \
154
162
  -q "SELECT SessionHandlerId, FallbackQueueId FROM MessagingChannel WHERE DeveloperName='<CHANNEL_DEV_NAME>'"
155
163
  ```
156
164
 
157
- Both `SessionHandlerId` and `FallbackQueueId` must be non-null. If either is null, confirm `<sessionHandlerAsa>` and `<sessionHandlerQueue>` were both present in the deployed XML and that the bot was Active before the deploy.
165
+ Both must be non-null; if not, check both handler elements were in the XML and the bot was Active before the deploy.
158
166
 
159
- 15. **Activate the channel** — after successful deployment, activate the messaging channel:
167
+ 15. **Activate the channel** — after a successful write, activate the messaging channel (`IsActive` is not part of the metadata). Transport A: sObject update `{"IsActive": true}` through `dispatch`. Transport B:
160
168
  ```bash
161
169
  sf data update record --sobject MessagingChannel --where "DeveloperName='<CHANNEL_NAME>'" --values "IsActive=true" --target-org <org-alias>
162
170
  ```
@@ -165,7 +173,9 @@ All steps are sequential. Do not skip or reorder.
165
173
 
166
174
  16. **Verify against checklist** — confirm all items in the Verification Checklist below pass before presenting output.
167
175
 
168
- 17. **Present output** — show the generated file to the user with a summary of configured settings and confirm activation status. Offer next steps:
176
+ 17. **Report** — delegated: return the contract §5 result and stop. Standalone: continue.
177
+
178
+ 18. **Present output** (standalone) — show the generated file to the user with a summary of configured settings and confirm activation status. Offer next steps:
169
179
  - **Automated responses** — ask if the user wants to configure `<automatedResponses>` (OptOutConfirmation, HelpResponse). If yes, generate elements with `autoResponseContentType: TextResponse`, `language`, and XML-escaped `response` text, then redeploy.
170
180
 
171
181
  ---
@@ -278,6 +288,7 @@ File structure follows the template in `assets/messaging_channel_template.xml`.
278
288
 
279
289
  | File | When to read |
280
290
  |------|-------------|
291
+ | `references/onboarding_contract.md` | Delegated mode (`context.calledFrom == "service-onboarding"`), org writes (transport), module registration |
281
292
  | `assets/messaging_channel_template.xml` | Before generating — use as the starting structure |
282
293
  | `references/channel_settings.md` | When configuring channel options beyond defaults |
283
294
  | `scripts/check-api-version.sh` | Phase 1 — verify org API version meets the passed minimum (67.0) |