@salesforce/afv-skills 1.63.0 → 1.65.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 (484) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-gpt-email-generation-configure/SKILL.md +312 -0
  3. package/skills/agentforce-offline-experimentation-run/SKILL.md +253 -0
  4. package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +796 -0
  5. package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +111 -0
  6. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +1053 -0
  7. package/skills/agentforce-wizard-ui-forecasting-analytics-components-configure/SKILL.md +64 -0
  8. package/skills/agentforce-wizard-ui-sales-einstein-components-configure/SKILL.md +46 -0
  9. package/skills/automation-company-profile-info-query/SKILL.md +51 -0
  10. package/skills/automation-digital-wallet-configure/SKILL.md +689 -0
  11. package/skills/automation-flow-coordinate/SKILL.md +95 -0
  12. package/skills/automation-flow-coordinate/references/elements/action-call/action-call.md +1569 -0
  13. package/skills/automation-flow-coordinate/references/elements/action-call/conversation-messaging.md +96 -0
  14. package/skills/automation-flow-coordinate/references/elements/action-call/examples/send-sms-message.json +23 -0
  15. package/skills/automation-flow-coordinate/references/elements/action-call/examples/send-to-journey-no-fields.json +31 -0
  16. package/skills/automation-flow-coordinate/references/elements/action-call/send-to-journey.md +179 -0
  17. package/skills/automation-flow-coordinate/references/elements/exit-rule/examples/event-email-link-click.json +13 -0
  18. package/skills/automation-flow-coordinate/references/elements/exit-rule/exit-rule.md +83 -0
  19. package/skills/automation-flow-coordinate/references/elements/forward-to-bot-or-agent/examples/forward-to-bot-or-agent.json +69 -0
  20. package/skills/automation-flow-coordinate/references/elements/forward-to-bot-or-agent/forward-to-bot-or-agent.md +274 -0
  21. package/skills/automation-flow-coordinate/references/elements/start/audience-common.md +192 -0
  22. package/skills/automation-flow-coordinate/references/elements/start/automation-event-triggered.md +130 -0
  23. package/skills/automation-flow-coordinate/references/elements/start/data-cloud-data-change-triggered.md +92 -0
  24. package/skills/automation-flow-coordinate/references/elements/start/form-submission-triggered.md +88 -0
  25. package/skills/automation-flow-coordinate/references/elements/start/segment-triggered.md +152 -0
  26. package/skills/automation-flow-coordinate/references/elements/start/start.md +539 -0
  27. package/skills/automation-flow-coordinate/references/elements/subflow/subflow.md +152 -0
  28. package/skills/automation-flow-coordinate/references/elements/wait/wait.md +497 -0
  29. package/skills/automation-flow-coordinate/references/recipes/author/author.md +868 -0
  30. package/skills/automation-flow-coordinate/references/recipes/summarize/element-generic.md +300 -0
  31. package/skills/automation-flow-coordinate/references/recipes/summarize/reference-resolution.md +292 -0
  32. package/skills/automation-flow-coordinate/references/recipes/summarize/summarize.md +323 -0
  33. package/skills/automation-flow-coordinate/references/recipes/testing/examples/debug-output-template.md +109 -0
  34. package/skills/automation-flow-coordinate/references/recipes/testing/shape.md +219 -0
  35. package/skills/automation-flow-coordinate/references/recipes/testing/shared-stages/intent-analyzer.md +180 -0
  36. package/skills/automation-flow-coordinate/references/recipes/testing/workflows/debug.md +175 -0
  37. package/skills/automation-flow-coordinate/references/recipes/testing/workflows/promote.md +255 -0
  38. package/skills/automation-flow-coordinate/references/recipes/testing/workflows/save-debug.md +212 -0
  39. package/skills/automation-flow-coordinate/references/resources/variable/variable.md +171 -0
  40. package/skills/automation-flow-coordinate/references/shared/anti-patterns.md +786 -0
  41. package/skills/automation-flow-coordinate/references/shared/end/end.md +267 -0
  42. package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/eval/README.md +69 -0
  43. package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/eval/predictions.jsonl +80 -0
  44. package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/eval/prompts.jsonl +116 -0
  45. package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/flow-type-resolver.md +321 -0
  46. package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/taxonomy.json +320 -0
  47. package/skills/automation-flow-coordinate/references/shared/server-functions.md +597 -0
  48. package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +21 -11
  49. package/skills/automation-sandbox-post-copy-config-generate/assets/config_template.json +10 -0
  50. package/skills/automation-sandbox-post-copy-config-generate/assets/json_schema.json +33 -1
  51. package/skills/automation-sandbox-post-copy-config-generate/references/configuration_catalog.md +44 -1
  52. package/skills/automation-sandbox-post-copy-configure/SKILL.md +132 -124
  53. package/skills/automation-sandbox-post-copy-configure/references/flow_activation_path.md +151 -0
  54. package/skills/automation-sandbox-post-copy-configure/references/scheduled_apex_path.md +55 -9
  55. package/skills/automotive-cloud-appraisal-management-settings-configure/SKILL.md +69 -0
  56. package/skills/automotive-cloud-dealer-essentials-configure/SKILL.md +78 -0
  57. package/skills/automotive-cloud-ground-agent-data-pipelines-configure/SKILL.md +373 -0
  58. package/skills/automotive-cloud-ground-mfg-agent-data-pipelines-configure/SKILL.md +273 -0
  59. package/skills/automotive-cloud-mfg-agent-data-pipelines-configure/SKILL.md +259 -0
  60. package/skills/automotive-cloud-mfg-sales-concierge-agent-create/SKILL.md +369 -0
  61. package/skills/automotive-cloud-mfg-sales-concierge-foundation-configure/SKILL.md +542 -0
  62. package/skills/automotive-cloud-mfg-sales-concierge-foundation-coordinate/SKILL.md +159 -0
  63. package/skills/automotive-cloud-mfg-sales-concierge-orchestrator-agent-create/SKILL.md +349 -0
  64. package/skills/automotive-cloud-mfg-sales-concierge-orchestrator-configure/SKILL.md +505 -0
  65. package/skills/automotive-cloud-sales-concierge-agent-create/SKILL.md +380 -0
  66. package/skills/automotive-cloud-sales-concierge-foundation-configure/SKILL.md +567 -0
  67. package/skills/automotive-cloud-sales-concierge-foundation-coordinate/SKILL.md +159 -0
  68. package/skills/automotive-cloud-sales-concierge-orchestrator-agent-create/SKILL.md +360 -0
  69. package/skills/automotive-cloud-sales-concierge-orchestrator-configure/SKILL.md +539 -0
  70. package/skills/automotive-cloud-sales-concierge-search-grounding-configure/SKILL.md +358 -0
  71. package/skills/commerce-b2b-merchant-quote-configure/SKILL.md +602 -0
  72. package/skills/commerce-b2b-store-configure/SKILL.md +251 -0
  73. package/skills/commerce-credit-memo-create/SKILL.md +139 -0
  74. package/skills/commerce-delivery-business-hours-configure/SKILL.md +277 -0
  75. package/skills/commerce-delivery-estimation-apply/SKILL.md +155 -0
  76. package/skills/commerce-delivery-estimation-configure/SKILL.md +377 -0
  77. package/skills/commerce-delivery-routing-specs-integrate/SKILL.md +174 -0
  78. package/skills/commerce-estimate-bopis-query/SKILL.md +279 -0
  79. package/skills/commerce-estimate-delivery-date-query/SKILL.md +349 -0
  80. package/skills/commerce-fees-apply/SKILL.md +227 -0
  81. package/skills/commerce-fulfillment-routing-analyze/SKILL.md +200 -0
  82. package/skills/commerce-guest-buyer-create/SKILL.md +173 -0
  83. package/skills/commerce-location-bopis-configure/SKILL.md +378 -0
  84. package/skills/commerce-location-business-hours-configure/SKILL.md +235 -0
  85. package/skills/commerce-location-delivery-processing-time-configure/SKILL.md +309 -0
  86. package/skills/commerce-location-graph-integrate/SKILL.md +131 -0
  87. package/skills/commerce-location-shipping-carrier-method-configure/SKILL.md +755 -0
  88. package/skills/commerce-location-temporary-operating-hours-configure/SKILL.md +331 -0
  89. package/skills/commerce-merchant-buyer-groups-configure/SKILL.md +579 -0
  90. package/skills/commerce-merchant-buyer-user-onboarding-create/SKILL.md +626 -0
  91. package/skills/commerce-merchant-catalog-configure/SKILL.md +614 -0
  92. package/skills/commerce-merchant-extension-provider-configure/SKILL.md +368 -0
  93. package/skills/commerce-merchant-insights-account-health-churn-analyze/SKILL.md +118 -0
  94. package/skills/commerce-merchant-insights-inventory-returns-analyze/SKILL.md +65 -0
  95. package/skills/commerce-merchant-insights-order-shopper-get/SKILL.md +90 -0
  96. package/skills/commerce-merchant-insights-product-performance-analyze/SKILL.md +72 -0
  97. package/skills/commerce-merchant-insights-query/SKILL.md +279 -0
  98. package/skills/commerce-merchant-storefront-guest-access-configure/SKILL.md +656 -0
  99. package/skills/commerce-order-summary-change-apply/SKILL.md +375 -0
  100. package/skills/commerce-product-details-get/SKILL.md +363 -0
  101. package/skills/commerce-product-search/SKILL.md +563 -0
  102. package/skills/commerce-react-storefront-create/SKILL.md +350 -0
  103. package/skills/commerce-return-order-summary-create/SKILL.md +513 -0
  104. package/skills/commerce-search-relevance-analyze/SKILL.md +757 -0
  105. package/skills/commerce-temporary-processing-time-override-create/SKILL.md +274 -0
  106. package/skills/communications-initial-setup-configure/SKILL.md +630 -0
  107. package/skills/communications-multisite-configure/SKILL.md +571 -0
  108. package/skills/communications-revenue-cloud-settings-configure/SKILL.md +74 -0
  109. package/skills/communications-smb-fiber-catalog-create/SKILL.md +413 -0
  110. package/skills/communications-tmf-integrate/SKILL.md +1368 -0
  111. package/skills/consumer-goods-promotion-bo-api-deploy/SKILL.md +54 -107
  112. package/skills/consumer-goods-promotion-bo-api-deploy/assets/set-comment-value/payloads/copy.json +1 -1
  113. package/skills/consumer-goods-promotion-bo-api-deploy/references/conventions-and-payload-rules.md +82 -5
  114. package/skills/consumer-goods-promotion-bo-api-deploy/references/generate-and-wire.md +35 -2
  115. package/skills/consumer-goods-promotion-bo-api-deploy/references/preflight-and-seed-queries.md +149 -0
  116. package/skills/consumer-goods-promotion-bo-api-deploy/references/smoke-and-verify.md +17 -1
  117. package/skills/consumer-goods-visit-activity-act4-questions-assign/SKILL.md +448 -0
  118. package/skills/consumer-goods-visit-activity-act5-standard-create/SKILL.md +269 -0
  119. package/skills/consumer-goods-visit-activity-act6-assortment-configure/SKILL.md +271 -0
  120. package/skills/consumer-goods-visit-activity-act7-account-scoping-create/SKILL.md +382 -0
  121. package/skills/consumer-goods-visit-activity-act8-plan-attach-create/SKILL.md +373 -0
  122. package/skills/consumer-goods-visit-activity-act9-proof-validate/SKILL.md +389 -0
  123. package/skills/consumer-goods-visit-and-activity-act1-specification-create/SKILL.md +338 -0
  124. package/skills/consumer-goods-visit-and-activity-act2-template-create/SKILL.md +547 -0
  125. package/skills/consumer-goods-visit-and-activity-act3-definition-create/SKILL.md +346 -0
  126. package/skills/consumer-goods-visit-and-activity-configure/SKILL.md +1110 -0
  127. package/skills/crm-analytics-adoption-insights-configure/SKILL.md +224 -0
  128. package/skills/crm-analytics-custom-report-type-lightning-configure/SKILL.md +418 -0
  129. package/skills/crm-analytics-dashboards-configure/SKILL.md +731 -0
  130. package/skills/crm-analytics-operational-analytics-metadata-bridge-migrate/SKILL.md +233 -0
  131. package/skills/crm-analytics-report-notifications-ui-configure/SKILL.md +184 -0
  132. package/skills/crm-analytics-sharing-inheritance-coverage-analyze/SKILL.md +167 -0
  133. package/skills/crm-analytics-sonic-getting-started-configure/SKILL.md +55 -0
  134. package/skills/crm-analytics-tableau-next-app-deploy/SKILL.md +1350 -0
  135. package/skills/crm-analytics-tableau-next-c360-basemodel-validate/SKILL.md +1862 -0
  136. package/skills/crm-analytics-tableau-next-datacloud-validate/SKILL.md +83 -0
  137. package/skills/crm-analytics-tableau-next-provisioning-validate/SKILL.md +81 -0
  138. package/skills/data360-activation-create/SKILL.md +104 -0
  139. package/skills/data360-activation-external-platform-get/SKILL.md +49 -0
  140. package/skills/data360-activation-target-create/SKILL.md +93 -0
  141. package/skills/data360-activation-v2-create/SKILL.md +456 -0
  142. package/skills/data360-audience-dmo-get/SKILL.md +38 -0
  143. package/skills/data360-calculated-affinity-create/SKILL.md +82 -0
  144. package/skills/data360-calculated-insight-create/SKILL.md +148 -0
  145. package/skills/data360-catalog-metadata-create/SKILL.md +183 -0
  146. package/skills/data360-code-extension-create/SKILL.md +115 -0
  147. package/skills/data360-communication-capping-create/SKILL.md +227 -0
  148. package/skills/data360-connection-create/SKILL.md +491 -0
  149. package/skills/data360-content-lens-create/SKILL.md +181 -0
  150. package/skills/data360-data-action-create/SKILL.md +126 -0
  151. package/skills/data360-data-action-target-create/SKILL.md +181 -0
  152. package/skills/data360-data-clean-room-create/SKILL.md +238 -0
  153. package/skills/data360-data-governance-create/SKILL.md +746 -0
  154. package/skills/data360-data-graph-create/SKILL.md +82 -0
  155. package/skills/data360-data-harmonized-model-object-reference-create/SKILL.md +38 -0
  156. package/skills/data360-data-lake-object-create/SKILL.md +207 -0
  157. package/skills/data360-data-model-object-catalog-get/SKILL.md +49 -0
  158. package/skills/data360-data-model-object-create/SKILL.md +128 -0
  159. package/skills/data360-data-model-object-mapping-create/SKILL.md +106 -0
  160. package/skills/data360-data-space-create/SKILL.md +161 -0
  161. package/skills/data360-data-streams-create/SKILL.md +324 -0
  162. package/skills/data360-engagement-signal-get/SKILL.md +38 -0
  163. package/skills/data360-experiment-create/SKILL.md +82 -0
  164. package/skills/data360-goal-based-campaign-create/SKILL.md +192 -0
  165. package/skills/data360-harmonization-process-history-get/SKILL.md +38 -0
  166. package/skills/data360-harmonized-unstructured-dmo-create/SKILL.md +84 -0
  167. package/skills/data360-identity-resolution-create/SKILL.md +115 -0
  168. package/skills/data360-intelligent-document-processing-create/SKILL.md +148 -0
  169. package/skills/data360-knowledge-graph-construction-create/SKILL.md +93 -0
  170. package/skills/data360-knowledge-graph-create/SKILL.md +216 -0
  171. package/skills/data360-knowledge-space-mcp-configure/SKILL.md +475 -0
  172. package/skills/data360-machine-learning-mcp-configure/SKILL.md +697 -0
  173. package/skills/data360-multi-org-mcp-configure/SKILL.md +117 -0
  174. package/skills/data360-secondary-index-mcp-configure/SKILL.md +126 -0
  175. package/skills/data360-segment-mcp-configure/SKILL.md +159 -0
  176. package/skills/data360-semantic-calculated-dimension-mcp-configure/SKILL.md +93 -0
  177. package/skills/data360-semantic-calculated-measurement-mcp-configure/SKILL.md +93 -0
  178. package/skills/data360-semantic-data-object-mcp-configure/SKILL.md +93 -0
  179. package/skills/data360-semantic-dimension-mcp-configure/SKILL.md +38 -0
  180. package/skills/data360-semantic-engine-mcp-configure/SKILL.md +62 -0
  181. package/skills/data360-semantic-measurement-mcp-configure/SKILL.md +38 -0
  182. package/skills/data360-semantic-metric-mcp-configure/SKILL.md +93 -0
  183. package/skills/data360-semantic-model-mcp-configure/SKILL.md +115 -0
  184. package/skills/data360-standard-mapping-mcp-configure/SKILL.md +38 -0
  185. package/skills/data360-tenant-lifecycle-mcp-configure/SKILL.md +73 -0
  186. package/skills/dx-devops-conflict-resolve/SKILL.md +1 -5
  187. package/skills/dx-devops-pipeline-manage/SKILL.md +1 -5
  188. package/skills/dx-devops-project-manage/SKILL.md +1 -5
  189. package/skills/dx-devops-promote/SKILL.md +1 -5
  190. package/skills/dx-devops-request-status/SKILL.md +1 -5
  191. package/skills/dx-lifecycle-center/SKILL.md +120 -0
  192. package/skills/dx-lifecycle-center/examples/workflows.md +175 -0
  193. package/skills/dx-lifecycle-center/references/connect-api.md +123 -0
  194. package/skills/dx-lifecycle-center/references/connect-org.md +184 -0
  195. package/skills/dx-lifecycle-center/references/deploy.md +153 -0
  196. package/skills/dx-lifecycle-center/references/error-handling.md +21 -0
  197. package/skills/dx-lifecycle-center/references/hub-org.md +37 -0
  198. package/skills/dx-lifecycle-center/references/list-orgs.md +99 -0
  199. package/skills/dx-lifecycle-center/references/request-body.md +75 -0
  200. package/skills/dx-lifecycle-center/references/troubleshooting.md +31 -0
  201. package/skills/dx-lifecycle-center/scripts/poll-deploy-status.sh +200 -0
  202. package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +120 -0
  203. package/skills/dx-org-devhub-configure/SKILL.md +1 -3
  204. package/skills/dx-org-shape-manage/SKILL.md +1 -5
  205. package/skills/dx-org-snapshot-manage/SKILL.md +1 -3
  206. package/skills/education-cloud-academic-calendar-generate/SKILL.md +1 -3
  207. package/skills/education-cloud-course-catalog-migrate/SKILL.md +1 -3
  208. package/skills/education-cloud-domain-configure/SKILL.md +1 -3
  209. package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -3
  210. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +1 -5
  211. package/skills/experience-afv-query/SKILL.md +234 -0
  212. package/skills/experience-agentforce-vibes-in-react-configure/SKILL.md +63 -0
  213. package/skills/experience-apex-components-configure/SKILL.md +69 -0
  214. package/skills/experience-apex-pages-configure/SKILL.md +107 -0
  215. package/skills/experience-app-home-configure/SKILL.md +76 -0
  216. package/skills/experience-aura-lightning-out-access-configure/SKILL.md +58 -0
  217. package/skills/experience-briefcase-configure/SKILL.md +287 -0
  218. package/skills/experience-community-flexi-page-list-create/SKILL.md +74 -0
  219. package/skills/experience-community-template-definition-list-query/SKILL.md +48 -0
  220. package/skills/experience-community-theme-definition-list-query/SKILL.md +38 -0
  221. package/skills/experience-content-assets-configure/SKILL.md +86 -0
  222. package/skills/experience-custom-domain-create/SKILL.md +727 -0
  223. package/skills/experience-defer-rendering-workspace-page-setup-configure/SKILL.md +41 -0
  224. package/skills/experience-field-service-app-builder-configure/SKILL.md +187 -0
  225. package/skills/experience-flow-category-configure/SKILL.md +117 -0
  226. package/skills/experience-formula-configure/SKILL.md +358 -0
  227. package/skills/experience-global-actions-configure/SKILL.md +69 -0
  228. package/skills/experience-global-publisher-layouts-configure/SKILL.md +79 -0
  229. package/skills/experience-instrumentation-configure/SKILL.md +64 -0
  230. package/skills/experience-lex-engagement-configure/SKILL.md +50 -0
  231. package/skills/experience-lightning-bolt-open/SKILL.md +12 -0
  232. package/skills/experience-lightning-out-configure/SKILL.md +129 -0
  233. package/skills/experience-lightning-preview-configure/SKILL.md +67 -0
  234. package/skills/experience-lightning-types-query/SKILL.md +98 -0
  235. package/skills/experience-malware-scan-configure/SKILL.md +71 -0
  236. package/skills/experience-my-salesforce-configure/SKILL.md +126 -0
  237. package/skills/experience-navigation-menus-configure/SKILL.md +235 -0
  238. package/skills/experience-notification-types-configure/SKILL.md +206 -0
  239. package/skills/experience-notifications-configure/SKILL.md +75 -0
  240. package/skills/experience-record-discovery-query/SKILL.md +227 -0
  241. package/skills/experience-regenerate-previews-open/SKILL.md +94 -0
  242. package/skills/experience-sales-cloud-mab-configure/SKILL.md +254 -0
  243. package/skills/experience-schema-builder-open/SKILL.md +38 -0
  244. package/skills/experience-simple-record-home-configure/SKILL.md +110 -0
  245. package/skills/experience-static-resources-configure/SKILL.md +74 -0
  246. package/skills/experience-ui-bundle-2gp-deploy/SKILL.md +1 -3
  247. package/skills/experience-ui-bundle-features-generate/SKILL.md +1 -5
  248. package/skills/experience-ui-bundle-mfa-configure/SKILL.md +1 -3
  249. package/skills/field-service-data-capture-form-deployer-configure/SKILL.md +23 -2
  250. package/skills/field-service-data-capture-form-designer-configure/SKILL.md +13 -3
  251. package/skills/field-service-data-capture-migrate/SKILL.md +1 -3
  252. package/skills/field-service-mobile-branding-configure/SKILL.md +17 -3
  253. package/skills/field-service-objective-designer-configure/SKILL.md +72 -379
  254. package/skills/field-service-prework-brief-deployer-configure/SKILL.md +10 -537
  255. package/skills/field-service-scheduling-policy-designer-query/SKILL.md +65 -1093
  256. package/skills/{field-service-setup-orchestrator-get → field-service-setup-coordinate}/SKILL.md +18 -3
  257. package/skills/field-service-sobject-create-configure/SKILL.md +13 -213
  258. package/skills/field-service-voice-to-form-configure/SKILL.md +40 -11
  259. package/skills/field-service-work-plan-configure/SKILL.md +253 -0
  260. package/skills/field-service-work-rule-designer-configure/SKILL.md +121 -95
  261. package/skills/fsc-actionable-segmentation-settings-configure/SKILL.md +180 -0
  262. package/skills/fsc-digital-origination-bre-decision-matrix-foundation-create/SKILL.md +196 -0
  263. package/skills/fsc-digital-origination-bre-disclosures-consent-configure/SKILL.md +106 -0
  264. package/skills/fsc-digital-origination-bre-document-upload-configure/SKILL.md +96 -0
  265. package/skills/fsc-digital-origination-bre-permissions-assign/SKILL.md +111 -0
  266. package/skills/fsc-digital-origination-bre-setup-coordinate/SKILL.md +250 -0
  267. package/skills/fsc-digital-origination-bre-stp-eligibility-configure/SKILL.md +122 -0
  268. package/skills/fsc-digital-origination-coordinate/SKILL.md +653 -0
  269. package/skills/fsc-digital-origination-demo-run/SKILL.md +225 -0
  270. package/skills/fsc-digital-origination-execution-guardrails-validate/SKILL.md +112 -0
  271. package/skills/fsc-digital-origination-initial-setup-configure/SKILL.md +396 -0
  272. package/skills/fsc-digital-origination-pricing-setup-coordinate/SKILL.md +336 -0
  273. package/skills/fsc-digital-origination-pricing-setup-data-foundation-create/SKILL.md +208 -0
  274. package/skills/fsc-digital-origination-pricing-setup-procedure-create/SKILL.md +375 -0
  275. package/skills/fsc-digital-origination-product-setup-act1-permissions-assign/SKILL.md +83 -0
  276. package/skills/fsc-digital-origination-product-setup-coordinate/SKILL.md +248 -0
  277. package/skills/fsc-digital-origination-sample-data-create/SKILL.md +206 -0
  278. package/skills/fsc-document-checklist-settings-configure/SKILL.md +57 -0
  279. package/skills/fsc-flexible-hierarchy-configure/SKILL.md +148 -0
  280. package/skills/fsc-flexible-hierarchy-foundation-configure/SKILL.md +1430 -0
  281. package/skills/fsc-flexible-hierarchy-graph-config-create/SKILL.md +471 -0
  282. package/skills/fsc-flexible-hierarchy-rule-based-graph-deploy/SKILL.md +429 -0
  283. package/skills/fsc-pricing-product-configurator-configure/SKILL.md +150 -0
  284. package/skills/fsc-pricing-salesforce-omnistudio-switch/SKILL.md +123 -0
  285. package/skills/fsc-product-act2-catalog-categories-create/SKILL.md +82 -0
  286. package/skills/fsc-product-act3-attributes-create/SKILL.md +249 -0
  287. package/skills/fsc-product-act4-classification-assignment-create/SKILL.md +196 -0
  288. package/skills/fsc-product-act5-considerations-get/SKILL.md +44 -0
  289. package/skills/fsc-stage-management-apex-flow-deploy/SKILL.md +384 -0
  290. package/skills/fsc-stage-management-compliant-data-sharing-configure/SKILL.md +144 -0
  291. package/skills/fsc-stage-management-decision-matrices-create/SKILL.md +107 -0
  292. package/skills/fsc-stage-management-definition-assignments-create/SKILL.md +189 -0
  293. package/skills/fsc-stage-management-definition-create/SKILL.md +108 -0
  294. package/skills/fsc-stage-management-permissions-assign/SKILL.md +143 -0
  295. package/skills/fsc-stage-management-transitions-configure/SKILL.md +139 -0
  296. package/skills/health-cloud-appt-booking-config-configure/SKILL.md +135 -0
  297. package/skills/health-cloud-appt-booking-url-config-configure/SKILL.md +134 -0
  298. package/skills/health-cloud-care-provider-affl-role-config-configure/SKILL.md +136 -0
  299. package/skills/health-cloud-care-provider-search-config-configure/SKILL.md +134 -0
  300. package/skills/health-cloud-care-requests-create/SKILL.md +178 -0
  301. package/skills/health-cloud-initial-configure/SKILL.md +511 -0
  302. package/skills/health-cloud-patient-appointment-scheduling-configure/SKILL.md +1374 -0
  303. package/skills/health-cloud-provider-search-settings-configure/SKILL.md +924 -0
  304. package/skills/health-cloud-referral-management-coordinate/SKILL.md +513 -0
  305. package/skills/health-cloud-timeline-configure/SKILL.md +622 -0
  306. package/skills/health-cloud-virtual-visit-config-configure/SKILL.md +135 -0
  307. package/skills/industries-account-score-settings-query/SKILL.md +78 -0
  308. package/skills/industries-actionable-list-data-sources-dmo-configure/SKILL.md +177 -0
  309. package/skills/industries-ad-product-availability-search/SKILL.md +399 -0
  310. package/skills/industries-advanced-account-forecast-settings-configure/SKILL.md +628 -0
  311. package/skills/industries-advanced-therapy-management-settings-configure/SKILL.md +73 -0
  312. package/skills/industries-atm-settings-starter-configure/SKILL.md +76 -0
  313. package/skills/industries-batch-document-ai-configure/SKILL.md +196 -0
  314. package/skills/industries-behavioral-health-app-settings-configure/SKILL.md +71 -0
  315. package/skills/industries-branch-management-settings-configure/SKILL.md +89 -0
  316. package/skills/industries-bre-decision-table-access-configure/SKILL.md +367 -0
  317. package/skills/industries-brokerage-settings-configure/SKILL.md +41 -0
  318. package/skills/industries-calendar-sync-settings-configure/SKILL.md +89 -0
  319. package/skills/industries-care-request-settings-configure/SKILL.md +218 -0
  320. package/skills/industries-case-management-intelligence-settings-configure/SKILL.md +54 -0
  321. package/skills/industries-catalog-process-attributes-products-configure/SKILL.md +380 -0
  322. package/skills/industries-catalog-process-fulfillment-configure/SKILL.md +216 -0
  323. package/skills/industries-catalog-process-intake-configure/SKILL.md +219 -0
  324. package/skills/industries-catalog-process-knowledge-configure/SKILL.md +153 -0
  325. package/skills/industries-catalog-process-preprocessor-configure/SKILL.md +168 -0
  326. package/skills/industries-cds-general-settings-configure/SKILL.md +69 -0
  327. package/skills/industries-claim-financial-settings-configure/SKILL.md +169 -0
  328. package/skills/industries-clinical-data-model-settings-configure/SKILL.md +136 -0
  329. package/skills/industries-clinical-data-model-settings-starter-configure/SKILL.md +105 -0
  330. package/skills/industries-collection-plan-settings-configure/SKILL.md +132 -0
  331. package/skills/industries-comms-service-console-settings-configure/SKILL.md +159 -0
  332. package/skills/industries-compliance-configure/SKILL.md +102 -0
  333. package/skills/industries-compliance-document-extraction-setup-configure/SKILL.md +76 -0
  334. package/skills/industries-contact-center-app-layout-configure/SKILL.md +88 -0
  335. package/skills/industries-contact-center-components-configure/SKILL.md +96 -0
  336. package/skills/industries-contact-center-path-knowledge-configure/SKILL.md +95 -0
  337. package/skills/industries-contact-center-user-access-assign/SKILL.md +96 -0
  338. package/skills/industries-course-waitlist-config-configure/SKILL.md +162 -0
  339. package/skills/industries-crisis-center-settings-configure/SKILL.md +84 -0
  340. package/skills/industries-custom-object-settings-configure/SKILL.md +94 -0
  341. package/skills/industries-data-cloud-integration-configure/SKILL.md +88 -0
  342. package/skills/industries-data-space-feature-mappings-configure/SKILL.md +245 -0
  343. package/skills/industries-decision-matrix-builder-configure/SKILL.md +78 -0
  344. package/skills/industries-decision-table-hbase-configure/SKILL.md +87 -0
  345. package/skills/industries-decision-table-version-configure/SKILL.md +74 -0
  346. package/skills/industries-decision-tables-builder-configure/SKILL.md +253 -0
  347. package/skills/industries-decision-tables-configure/SKILL.md +439 -0
  348. package/skills/industries-energy-utilities-configure/SKILL.md +251 -0
  349. package/skills/industries-eu-cloud-multisite-configure/SKILL.md +1008 -0
  350. package/skills/industries-eu-new-connections-configure/SKILL.md +30 -0
  351. package/skills/industries-explainability-msg-template-configure/SKILL.md +135 -0
  352. package/skills/industries-expression-set-message-token-configure/SKILL.md +135 -0
  353. package/skills/industries-field-service-settings-configure/SKILL.md +82 -0
  354. package/skills/industries-form-framework-settings-configure/SKILL.md +30 -0
  355. package/skills/industries-fsc-ai-settings-configure/SKILL.md +57 -0
  356. package/skills/industries-fsc-association-engine-settings-configure/SKILL.md +172 -0
  357. package/skills/industries-fsc-b2b-settings-configure/SKILL.md +61 -0
  358. package/skills/industries-fsc-insurance-settings-configure/SKILL.md +58 -0
  359. package/skills/industries-fsc-visa-fulfillment-setup-configure/SKILL.md +103 -0
  360. package/skills/industries-fsc-wealth-agent-settings-configure/SKILL.md +117 -0
  361. package/skills/industries-fsc-wealth-settings-configure/SKILL.md +99 -0
  362. package/skills/industries-fundraising-gift-entry-settings-configure/SKILL.md +120 -0
  363. package/skills/industries-fundraising-rfm-configure/SKILL.md +128 -0
  364. package/skills/industries-fundraising-settings-configure/SKILL.md +145 -0
  365. package/skills/industries-fundraising-source-code-gen-configure/SKILL.md +299 -0
  366. package/skills/industries-google-maps-api-key-settings-configure/SKILL.md +87 -0
  367. package/skills/industries-grantmaking-intelligence-settings-open/SKILL.md +58 -0
  368. package/skills/industries-hc-score-category-settings-configure/SKILL.md +167 -0
  369. package/skills/industries-health-engagement-settings-configure/SKILL.md +218 -0
  370. package/skills/industries-home-health-agentforce-setup-configure/SKILL.md +131 -0
  371. package/skills/industries-home-health-bundling-policy-create/SKILL.md +50 -0
  372. package/skills/industries-home-health-entity-labels-configure/SKILL.md +29 -0
  373. package/skills/industries-home-health-fsl-package-deploy/SKILL.md +71 -0
  374. package/skills/industries-home-health-fsl-settings-validate/SKILL.md +27 -0
  375. package/skills/industries-home-health-guided-setup-care-and-skill-get/SKILL.md +80 -0
  376. package/skills/industries-home-health-guided-setup-configure/SKILL.md +836 -0
  377. package/skills/industries-home-health-guided-setup-enable-org-fsl-get/SKILL.md +55 -0
  378. package/skills/industries-home-health-guided-setup-get-org-ready-get/SKILL.md +61 -0
  379. package/skills/industries-home-health-licenses-assign/SKILL.md +27 -0
  380. package/skills/industries-home-health-operating-hours-create/SKILL.md +40 -0
  381. package/skills/industries-home-health-scheduling-policy-create/SKILL.md +41 -0
  382. package/skills/industries-home-health-service-objective-create/SKILL.md +22 -0
  383. package/skills/industries-home-health-skills-create/SKILL.md +31 -0
  384. package/skills/industries-home-health-users-create/SKILL.md +29 -0
  385. package/skills/industries-icm-act3-toggles-configure/SKILL.md +198 -0
  386. package/skills/industries-icm-act5-genai-suggested-assessments-configure/SKILL.md +361 -0
  387. package/skills/industries-icm-act6-mcg-integration-configure/SKILL.md +550 -0
  388. package/skills/industries-integrated-care-management-configure/SKILL.md +168 -0
  389. package/skills/industries-object-enablement-configure/SKILL.md +86 -0
  390. package/skills/industries-tpm-system-processing-service-configure/SKILL.md +64 -0
  391. package/skills/insurance-brokerage-agency-billing-configure/SKILL.md +1 -3
  392. package/skills/integration-apex-settings-configure/SKILL.md +61 -0
  393. package/skills/marketing-e360-email-archiving-configure/SKILL.md +73 -0
  394. package/skills/marketing-message-test/SKILL.md +1 -3
  395. package/skills/nonprofit-fundraising-configure/SKILL.md +240 -0
  396. package/skills/nonprofit-fundraising-configure/references/gotchas.md +26 -0
  397. package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +678 -0
  398. package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +35 -0
  399. package/skills/nonprofit-volunteer-management-model-get/SKILL.md +166 -0
  400. package/skills/nonprofit-volunteer-management-model-get/references/entities.md +315 -0
  401. package/skills/nonprofit-volunteer-management-model-get/references/relationships.md +175 -0
  402. package/skills/nonprofit-volunteer-management-model-get/references/themes.md +143 -0
  403. package/skills/nonprofit-volunteer-management-records-create/SKILL.md +121 -0
  404. package/skills/nonprofit-volunteer-management-records-create/references/field-guide.md +284 -0
  405. package/skills/nonprofit-volunteer-management-records-create/references/mcp-invocation.md +248 -0
  406. package/skills/nonprofit-volunteer-management-records-create/references/review-format.md +140 -0
  407. package/skills/nonprofit-volunteer-management-records-create/scripts/expand-series.py +632 -0
  408. package/skills/nonprofit-volunteer-management-records-create/scripts/render-review-table.py +419 -0
  409. package/skills/nonprofit-volunteer-management-records-create/scripts/tests/test_expand_series.py +690 -0
  410. package/skills/nonprofit-volunteer-management-records-create/scripts/tests/test_render_review_table.py +421 -0
  411. package/skills/nonprofit-volunteer-management-structure-generate/SKILL.md +119 -0
  412. package/skills/nonprofit-volunteer-management-structure-generate/references/configuration-decisions.md +159 -0
  413. package/skills/nonprofit-volunteer-management-structure-generate/references/discovery-interview.md +137 -0
  414. package/skills/nonprofit-volunteer-management-structure-generate/references/edge-cases.md +48 -0
  415. package/skills/nonprofit-volunteer-management-structure-generate/references/mcp-invocation.md +75 -0
  416. package/skills/nonprofit-volunteer-management-structure-generate/references/plan-output.md +141 -0
  417. package/skills/platform-custom-field-generate/SKILL.md +1 -0
  418. package/skills/platform-custom-field-generate/references/advanced-picklists.md +5 -5
  419. package/skills/platform-custom-metadata-type-generate/SKILL.md +3 -0
  420. package/skills/platform-custom-object-generate/SKILL.md +4 -0
  421. package/skills/platform-custom-permissions-configure/SKILL.md +687 -0
  422. package/skills/platform-custom-setting-generate/SKILL.md +3 -0
  423. package/skills/platform-datamask-run/SKILL.md +1 -5
  424. package/skills/platform-label-workbench-import-create/SKILL.md +67 -0
  425. package/skills/platform-permission-set-generate/SKILL.md +3 -0
  426. package/skills/platform-privacy-agent-settings-configure/SKILL.md +752 -0
  427. package/skills/platform-salesforce-connect-adapter-generate/SKILL.md +1 -3
  428. package/skills/platform-sandbox-configure/SKILL.md +1 -3
  429. package/skills/platform-value-set-generate/SKILL.md +3 -0
  430. package/skills/sales-call-scoring-configure/SKILL.md +1 -5
  431. package/skills/service-agentforce-channel-configure/SKILL.md +1 -3
  432. package/skills/service-agentforce-human-escalation-configure/SKILL.md +1 -3
  433. package/skills/service-catalog-template-coordinate/SKILL.md +1 -3
  434. package/skills/service-concierge-portal-generate/SKILL.md +1 -3
  435. package/skills/service-email-to-case-configure/SKILL.md +1 -5
  436. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -3
  437. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -3
  438. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -3
  439. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -3
  440. package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +1 -3
  441. package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +1 -5
  442. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +1 -3
  443. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +1 -3
  444. package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +1 -3
  445. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -3
  446. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -3
  447. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +1 -0
  448. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -3
  449. package/skills/service-itsm-agentic-setup-uel-user-create/SKILL.md +1 -9
  450. package/skills/service-itsm-incident-mgmt-configure/SKILL.md +1 -5
  451. package/skills/service-itsm-incident-priority-configure/SKILL.md +1 -3
  452. package/skills/service-itsm-slack-itservice-configure/SKILL.md +1 -3
  453. package/skills/service-itsm-swarming-configure/SKILL.md +1 -3
  454. package/skills/service-itsm-teams-configure/SKILL.md +1 -3
  455. package/skills/service-itsm-teams-debug/SKILL.md +1 -3
  456. package/skills/service-itsm-teams-employee-agent-configure/SKILL.md +1 -3
  457. package/skills/service-itsm-teams-itdesk-configure/SKILL.md +1 -3
  458. package/skills/service-itsm-teams-itservice-configure/SKILL.md +1 -3
  459. package/skills/service-native-voice-recording-transcription-configure/SKILL.md +1 -3
  460. package/skills/service-omni-agent-users-create/SKILL.md +1 -3
  461. package/skills/service-omni-agent-work-sharing-configure/SKILL.md +1 -3
  462. package/skills/service-omni-attribute-routing-configure/SKILL.md +1 -3
  463. package/skills/service-omni-base-settings-configure/SKILL.md +1 -3
  464. package/skills/service-omni-channel-inventory-analyze/SKILL.md +1 -3
  465. package/skills/service-omni-channel-limits-analyze/SKILL.md +1 -3
  466. package/skills/service-omni-channel-setup-coordinate/SKILL.md +1 -3
  467. package/skills/service-omni-command-center-analyze/SKILL.md +1 -3
  468. package/skills/service-omni-command-center-configure/SKILL.md +1 -3
  469. package/skills/service-omni-permission-set-assign/SKILL.md +1 -3
  470. package/skills/service-omni-presence-status-deploy/SKILL.md +1 -3
  471. package/skills/service-omni-presence-user-config-deploy/SKILL.md +1 -3
  472. package/skills/service-omni-queue-deploy/SKILL.md +1 -3
  473. package/skills/service-omni-queue-members-assign/SKILL.md +1 -3
  474. package/skills/service-omni-queue-routing-config-deploy/SKILL.md +1 -3
  475. package/skills/service-omni-routing-flow-deploy/SKILL.md +1 -3
  476. package/skills/service-omni-service-channel-configure/SKILL.md +1 -3
  477. package/skills/service-omni-sidebar-configure/SKILL.md +1 -3
  478. package/skills/service-omni-skills-based-routing-configure/SKILL.md +1 -3
  479. package/skills/service-omni-supervisor-config-deploy/SKILL.md +1 -3
  480. package/skills/service-omni-supervisor-permset-assign/SKILL.md +1 -3
  481. package/skills/service-omni-supervisor-surface-deploy/SKILL.md +1 -3
  482. package/skills/service-omni-supervisor-users-create/SKILL.md +1 -3
  483. package/skills/service-omni-work-skill-routing-configure/SKILL.md +1 -3
  484. package/skills/tableau-next-asset-create/README.md +0 -65
@@ -0,0 +1,513 @@
1
+ ---
2
+ name: commerce-return-order-summary-create
3
+ description: "Use this skill when users want to use when a customer needs to return one or more items on an order that has already been fulfilled or delivered, via a preview-then-submit flow that submits only after explicit customer confirmation. Also use when a customer needs to return one or more items on an order that has already been fulfilled or delivered, via a preview-then-submit flow that submits only after explicit customer confirmation. Trigger when users mention return, order, summary."
4
+ metadata:
5
+ version: "1.0"
6
+ accessCheck: "(OrderItemSummary.QuantityAvailableToReturn) || (OrderManagement.orgHasOrderManagementConnectAPIEnabled) || (UserPermissions.ORDER_ITEM_SUMMARY_RETURN_API_ACCESS)"
7
+ ---
8
+
9
+ # Managing Return Order Summary
10
+
11
+ ## When to Use This Skill
12
+
13
+ Use when a customer needs to return one or more items on an order that has already been fulfilled or delivered, via a preview-then-submit flow that submits only after explicit customer confirmation. Returns are always per-item — there is no full-order-return path (the core API exposes only preview-return / submit-return, not a *ReturnAll variant).
14
+
15
+ ## Workflow
16
+
17
+ ╔══════════════════════════════════════════════════════════════════════════╗
18
+ ║ HARD STOP between preview-return-items and submit-return-items. ║
19
+ ║ ║
20
+ ║ The agent MUST NOT invoke submit-return-items without ALL of: ║
21
+ ║ 1. preview-return-items invoked in THIS conversation, success: true. ║
22
+ ║ 2. preview's changeBalances surfaced to the customer in plain language ║
23
+ ║ (lines, quantities, credit amount). ║
24
+ ║ 3. Customer's verbatim affirmative reply received in this conversation.║
25
+ ║ 4. That verbatim reply passed into submit-return-items's required ║
26
+ ║ `customer_confirmation` input (NOT a value the agent supplies). ║
27
+ ║ ║
28
+ ║ A `success: true` from preview is NOT consent. Ambiguous customer ║
29
+ ║ replies ("ok", "sure", "I think so", a question back) are NOT consent — ║
30
+ ║ ask again plainly. Re-read submit-return-items's REFUSAL PROTOCOL ║
31
+ ║ before calling it. ║
32
+ ╚══════════════════════════════════════════════════════════════════════════╝
33
+
34
+ return-order-summary has a single linear execution path (preview → submit) —
35
+ Return has NO full-order variant (only OrderSummaryPreviewReturnResource +
36
+ OrderSummarySubmitReturnResource exist in core-264, no *ReturnAllResource).
37
+ Per-step agent_guidance is authoritative for each step's contract; this is
38
+ the orchestration map + entry decision tree + contract index.
39
+
40
+ 1. `reason` is REQUIRED on every changeItems[] entry, and its allowed values come from
41
+ the org-tenant's OrderItemSummaryChange.Reason picklist (the SAME picklist cancel uses
42
+ — the controller validates Return and Cancel reasons against one enum). Send a value
43
+ not in that picklist → 400 INVALID_API_INPUT "No matching reason found." Resolve the
44
+ live picklist via the resolve-return-reasons step before previewing; do NOT hard-code
45
+ the enum across orgs.
46
+
47
+ 2. The target line item must have `OrderItemSummary.QuantityAvailableToReturn > 0`. An
48
+ item that hasn't shipped yet (or has already been returned) returns 400
49
+ INVALID_API_INPUT before the financial preview runs. Run the verify-returnable-quantity
50
+ step (or an equivalent SOQL) before previewing so the agent fails fast with a clear
51
+ customer-facing message instead of cascading into a 400.
52
+
53
+ 3. `shippingReductionFlag` is REQUIRED on every changeItems[] entry. Wire-verified against
54
+ pbtest-ws on 2026-06-29: omitting the flag on preview-return returns HTTP 500 with
55
+ errorCode UNKNOWN_EXCEPTION (response envelope: enhancedErrorType=RecordError,
56
+ output.errors[0] carries the UNKNOWN_EXCEPTION + a "contact Salesforce Support" string
57
+ with an error ID). Sending the flag (true or false) is accepted and the request
58
+ progresses to business-rule validation. Always send the flag explicitly (false unless
59
+ the customer asks to also credit shipping). This parity-with-cancel finding holds for
60
+ return as well.
61
+
62
+ ## Critical Constraints
63
+
64
+ **Preconditions:**
65
+
66
+ - Org must have Order Management Connect API enabled (check: `Order Management API enabled`)
67
+ - User must have access to Order Management Return features. Service-level access is gated by the ORDER_ITEM_SUMMARY_RETURN_API_ACCESS permission (verified in core-264 OrderSummaryPreviewReturnResource + OrderSummarySubmitReturnResource impl). Users without it get a 403 INSUFFICIENT_ACCESS on both preview and submit. (check: `UserPermissions.ORDER_ITEM_SUMMARY_RETURN_API_ACCESS`)
68
+ - Each line item being returned must have OrderItemSummary.QuantityAvailableToReturn > 0.
69
+ Items not yet shipped or already returned have QuantityAvailableToReturn == 0 and will
70
+ fail preview with 400 INVALID_API_INPUT. Verify via SOQL before invoking preview-return-items. (check: `OrderItemSummary.QuantityAvailableToReturn`)
71
+ - Each `reason` value sent in changeItems[] must match the org's
72
+ OrderItemSummaryChange.Reason picklist (org-tenant-specific). The OAS
73
+ types `reason` as a free-form string; the controller validates it as
74
+ an enum. Resolve the picklist via resolve-return-reasons before previewing.
75
+ Cancel and Return share this same picklist. (check: `OrderItemSummaryChange.Reason picklist`)
76
+ - OrderSummary must be a MANAGED order (i.e. an order the OMS workflow can
77
+ modify). The old flow stops UNMANAGED orders up-front with a friendly
78
+ message; this SOR should do the same rather than let submit-return fail
79
+ late with an opaque 400/500. TODO(W-23144076-followup): source the exact
80
+ field name (candidates: `OrderSummary.IsManaged`, an OrderLifeCycleType
81
+ check, or a service-level `OrderManagement.isManaged(orderSummary)` call)
82
+ from the OMS legacy Aura flow that today gates the "Return Order" button.
83
+ Cancel has the SAME gap — track under the same followup and land in both
84
+ SORs together. No `check:` here until the real field name is sourced; the
85
+ gate is prose-only for now (evaluated by the agent per step 0's
86
+ ELIGIBILITY GATE), not machine-checkable.
87
+ - OrderSummary must not be LOCKED by an in-progress cancellation. The old
88
+ flow refuses to open the return workflow if a cancel is already running
89
+ against the same OrderSummary — otherwise the two ChangeOrders race and
90
+ the outcome is inconsistent. This SOR should surface the same friendly
91
+ "there's an active cancellation on this order — please try again in a
92
+ moment" message rather than let the API decide. TODO(W-23144076-followup):
93
+ source the exact discriminator from the old flow (candidates: an
94
+ OrderSummary status field, an OrderChangeLog / AsyncOperationLog probe on
95
+ the parent, or a service-level lock check). Cancel has the SAME gap —
96
+ track and land in both together. No `check:` here until the real
97
+ discriminator is sourced; the gate is prose-only for now (evaluated by
98
+ the agent per step 0's ELIGIBILITY GATE), not machine-checkable.
99
+
100
+ **Operational rules:**
101
+
102
+ - ENTRY DECISION TREE (drive the conversation in this order):
103
+ 0. resolve-order-summary-by-number → OrderNumber → 1Os... Id. NOT unique;
104
+ disambiguate when totalSize > 1. Skip if the caller already has the Id.
105
+ AFTER confirming the specific order, run the ELIGIBILITY GATE from
106
+ step 0's agent_guidance:
107
+ - unmanaged order → friendly stop, END
108
+ - cancellation already in progress → friendly stop, END
109
+ (TODO: field names pending — see step 0's ELIGIBILITY GATE.)
110
+ 1. resolve-return-reasons → fetch the org's Reason picklist (map the
111
+ customer's reason internally; never show raw tokens). Same picklist as cancel.
112
+ 2. verify-returnable-quantity → read the returnable lines. If none are
113
+ returnable, short-circuit with the friendly already-returned / not-shipped
114
+ wording (do NOT proceed). Otherwise SHOW the customer the returnable
115
+ line items and let them pick which to return.
116
+ 3. For EACH line the customer chose, collect two things before previewing:
117
+ a. QUANTITY — if that line's QuantityAvailableToReturn > 1, ASK how
118
+ many units (1..available, whole units). If == 1, use 1 without asking.
119
+ b. SHIPPING — ask whether to also credit that line's delivery/shipping
120
+ charge → shippingReductionFlag (false = keep, true = credit).
121
+ Build one changeItems[] entry per chosen line from these answers, then
122
+ go to preview-return-items → (confirm) → submit-return-items → verify.
123
+ - CORE FLOW:
124
+ 4. preview-return-items → financial impact. HARD STOP for confirmation.
125
+ 5. submit-return-items → execute with the SAME payload. SYNC — returns
126
+ changeOrderId in the response (no async polling).
127
+ 6. fetch-change-order-record → internal verification of the ChangeOrder row.
128
+ 7. verify-return-items → two reads; don't trust OrderSummary.Status.
129
+ - CUSTOMER-FACING WORDING (mandatory — this is a user-facing workflow):
130
+ - NO MONEY / CREDIT / REFUND MESSAGING. When a return submit completes,
131
+ confirm it in one short sentence and END (e.g. "Done — that return is
132
+ processed." / "Done — those returns are processed."). Do NOT tell the
133
+ customer about a credit, a change order, a refund, a billing follow-up,
134
+ an order total, or any dollar/amount figure — not even to say a refund
135
+ is "handled separately." The customer asked to return items; confirm
136
+ the return and stop. (Financial records like the ChangeOrder still
137
+ exist server-side and may be read for internal verification, but they
138
+ are NOT surfaced to the customer.) NOTE: actual refund issuance DOES run
139
+ inside this SOR — the refund-return-credit step delegates to
140
+ ensure-order-refund (credit memo + ensure-refunds-async) after submit.
141
+ That refund is SERVER-SIDE and SILENT: its existence does NOT license a
142
+ credit/refund sentence in the customer reply. The success wording above is
143
+ the complete customer response regardless of the refund delegation.
144
+ - CURRENCY: never hard-code a currency symbol (no "$"); amounts are in the
145
+ OrderSummary's own currency, which is NOT always USD. The OrderSummary
146
+ reads use SELECT FIELDS(STANDARD), so the currency is handled without a
147
+ hard-coded column or a per-org query variant:
148
+ • Multicurrency org: CurrencyIsoCode is a standard field, so it comes
149
+ back in the record (e.g. "USD", "EUR") — use it.
150
+ • Single-currency org: CurrencyIsoCode does not exist, so it simply
151
+ won't be in the record. Fall back to the org/user default currency
152
+ (Apex UserInfo.getDefaultCurrency(); the CurrencyType sObject does not
153
+ exist on single-currency orgs).
154
+ Present money as the amount followed by its ISO code (e.g. "129.00 USD",
155
+ "129.00 EUR") or the locale-formatted value — never assume dollars.
156
+ "zero" is currency-agnostic and fine for a fully-credited total.
157
+ - NO INTERNAL JARGON OR TELEMETRY. The friendly templates are the COMPLETE
158
+ customer response. Never surface step names, Connect API operation names,
159
+ field / response-shape names, sObject type names, raw 18-char Ids, or
160
+ the words "SOR"/"workflow". Do NOT append a verification recap / audit
161
+ trail after the success message — that belongs in logs.
162
+ - CONTRACT INDEX (full detail in each step's agent_guidance):
163
+ - reason REQUIRED + enum-validated against OrderItemSummaryChange.Reason
164
+ (same picklist as cancel) → resolve-return-reasons
165
+ - shippingReductionFlag REQUIRED on every entry (wire-verified against
166
+ pbtest-ws: omit → 500 UNKNOWN_EXCEPTION) → preview-return-items
167
+ - QuantityAvailableToReturn > 0 precondition → verify-returnable-quantity
168
+ - HARD STOP between preview and submit (no auto-chain)
169
+ - submit reuses the exact preview payload → submit-return-items
170
+ - submit is SYNC — returns changeOrderId directly (no async polling,
171
+ unlike full-cancel) → submit-return-items
172
+ - ChangeOrder lives in the Order sObject (RelatedOrderType='ChangeOrder',
173
+ negative TotalAmount) → fetch-change-order-record
174
+ - OrderSummary.Status does not change on return (expected, mirrors cancel)
175
+ → verify-return-items
176
+ - Refund issuance (credit memo + ensure-refunds-async) IS reproduced here
177
+ by delegating to ensure-order-refund → refund-return-credit; it runs
178
+ server-side and is NOT surfaced to the customer
179
+ - SOQL INPUT SAFETY (consumer contract — no runtime gate). Steps
180
+ resolve-order-summary-by-number ({orderNumber}), verify-returnable-quantity
181
+ ({orderSummaryId}), resolve-bundle-structure ({orderSummaryId}),
182
+ fetch-change-order-on-timeout ({orderSummaryId} + {originalOrderId}),
183
+ and verify-return-items ({orderSummaryId} + the IN-list) each splice
184
+ an untrusted value into a SOQL WHERE clause. The per-input `pattern:`
185
+ / `validation:` fields are NOT enforced by any runtime in this repo:
186
+ MCP `dispatch` takes an already-rendered query string, and the
187
+ Salesforce REST `/query` endpoint has no bind-variable form (bind vars
188
+ exist only in Apex `Database.query`, not at REST). The caller building
189
+ the tool call is the only enforcement point. Validate every
190
+ interpolated value against its declared pattern before splicing and
191
+ reject on mismatch — do NOT escape-and-retry. The declared patterns
192
+ already exclude every SOQL metacharacter, so a matching value cannot
193
+ inject; the injection risk is entirely in skipping the check.
194
+ - EMPIRICAL CONTRACTS (OAS-uncaptured; relocated from the discover-surfaced summary;
195
+ inherited from the cancel-order-summary workflow's wire-validated findings against the
196
+ shared ChangeInputRepresentation + OrderItemSummaryChange.Reason picklist):
197
+
198
+ ## Verification Checklist
199
+
200
+ After every write operation, confirm the effect by re-reading state:
201
+
202
+ - After `submit-return-items`, `verify-returnable-quantity`: call `verify-return-items`
203
+
204
+ ## Operations Reference
205
+
206
+ Operations grouped by purpose. Use these as the building blocks for the workflows above.
207
+
208
+ ### Summary
209
+
210
+ | Operation | Purpose | Status | Call | Depends on |
211
+ |-----------|---------|--------|------|------------|
212
+ | `resolve-order-summary-by-number` | read | implemented | `querySoql` | — |
213
+ | `resolve-return-reasons` | read | implemented | `describeOrderItemSummaryChange` | — |
214
+ | `verify-returnable-quantity` | read | implemented | `querySoql` | — |
215
+ | `resolve-bundle-structure` | read | implemented | `querySoql` | `verify-returnable-quantity` |
216
+ | `ask-to-apply-fee` | read | implemented | `interactive_prompt` | `verify-returnable-quantity` |
217
+ | `collect-per-item-return-fees` | read | implemented | `interactive_prompt` | `verify-returnable-quantity` |
218
+ | `preview-return-items` | read | implemented | `postOrderSummaryPreviewReturn` | `resolve-return-reasons`, `verify-returnable-quantity`, `ask-to-apply-fee`, `collect-per-item-return-fees` |
219
+ | `submit-return-items` | write | implemented | `postOrderSummarySubmitReturn` | `preview-return-items` |
220
+ | `fetch-change-order-record` | read | implemented | `getOrder` | `submit-return-items` |
221
+ | `fetch-change-order-on-timeout` | read | implemented | `querySoql` | `submit-return-items` |
222
+ | `verify-return-items` | verify | implemented | `querySoql` | `submit-return-items`, `verify-returnable-quantity` |
223
+ | `refund-return-credit` | write | — | → `cc-om-fast-and-furious/ensure-order-refund` | `submit-return-items` |
224
+
225
+ ### Dependency graph
226
+
227
+ ```mermaid
228
+ graph TD
229
+ resolve_order_summary_by_number["resolve-order-summary-by-number (read)"]
230
+ resolve_return_reasons["resolve-return-reasons (read)"]
231
+ verify_returnable_quantity["verify-returnable-quantity (read)"]
232
+ resolve_bundle_structure["resolve-bundle-structure (read)"]
233
+ ask_to_apply_fee["ask-to-apply-fee (read)"]
234
+ collect_per_item_return_fees["collect-per-item-return-fees (read)"]
235
+ preview_return_items["preview-return-items (read)"]
236
+ submit_return_items["submit-return-items (write)"]
237
+ fetch_change_order_record["fetch-change-order-record (read)"]
238
+ fetch_change_order_on_timeout["fetch-change-order-on-timeout (read)"]
239
+ verify_return_items["verify-return-items (verify)"]
240
+ refund_return_credit["refund-return-credit (write)"]
241
+ verify_returnable_quantity --> resolve_bundle_structure
242
+ verify_returnable_quantity --> ask_to_apply_fee
243
+ verify_returnable_quantity --> collect_per_item_return_fees
244
+ resolve_return_reasons --> preview_return_items
245
+ verify_returnable_quantity --> preview_return_items
246
+ ask_to_apply_fee --> preview_return_items
247
+ collect_per_item_return_fees --> preview_return_items
248
+ preview_return_items --> submit_return_items
249
+ submit_return_items --> fetch_change_order_record
250
+ submit_return_items --> fetch_change_order_on_timeout
251
+ submit_return_items --> verify_return_items
252
+ verify_returnable_quantity --> verify_return_items
253
+ submit_return_items --> refund_return_credit
254
+ ```
255
+
256
+ ### Read operations
257
+
258
+ #### `resolve-order-summary-by-number`
259
+
260
+ Resolve a customer-provided OrderNumber to its OrderSummary Id.
261
+ Customers and CSRs work with OrderNumber (the printed order number on
262
+ receipts/email); the return APIs require the internal Id (1Os...).
263
+
264
+ IMPORTANT: OrderNumber is NOT unique on this sObject — a single
265
+ OrderNumber can resolve to multiple OrderSummaries (orgs reuse it across
266
+ storefronts/locales). When this step returns more than one row, the agent
267
+ MUST surface the candidates (date, total, line count) and ask the customer
268
+ which one they meant before proceeding. Do NOT auto-pick by OrderedDate or
269
+ any heuristic — the wrong order is the worst outcome in a return workflow.
270
+
271
+ **Call:** `querySoql` — status: `implemented`
272
+
273
+ **Inputs:**
274
+
275
+ - `orderNumber` *(`String`)* — Customer-facing OrderNumber (the printed order number from the
276
+ receipt/confirmation email). Skip this step entirely if the caller
277
+ already has the OrderSummary Id (starts with '1Os') — pass that
278
+ directly into downstream steps.
279
+
280
+ #### `resolve-return-reasons`
281
+
282
+ Resolve the org's allowed return reasons from the live
283
+ OrderItemSummaryChange.Reason picklist. Required because the
284
+ controller validates `reason` against this picklist on both preview
285
+ and submit; sending an unrecognized value returns 400
286
+ INVALID_API_INPUT "No matching reason found." Cancel and Return share
287
+ the same Reason picklist (one enum on OrderItemSummaryChange).
288
+
289
+ **Call:** `describeOrderItemSummaryChange` — status: `implemented`
290
+
291
+ #### `verify-returnable-quantity`
292
+
293
+ Confirm each target OrderItemSummary has QuantityAvailableToReturn > 0
294
+ before invoking preview-return. Items that haven't shipped (or have
295
+ already been returned) will fail preview with 400 INVALID_API_INPUT.
296
+
297
+ **Call:** `querySoql` — status: `implemented`
298
+
299
+ **Inputs:**
300
+
301
+ - `orderSummaryId` *(`String`)* — ID of the order summary (starts with 1Os)
302
+
303
+ #### `resolve-bundle-structure`
304
+
305
+ Fetch and present the bundle structure for an order that contains a bundle
306
+ (detected in verify-returnable-quantity via a non-null MainOrderItemSummaryId
307
+ on any line). Bundle structure lives in OrderItemSummaryRelationship, which
308
+ links a MainOrderItemSummary (the bundle parent) to each
309
+ AssociatedOrderItemSummary (a component / add-on), with roles and a
310
+ ProductRelationshipType. Run this only when a bundle was detected; skip for
311
+ orders with no bundle. Return uses the same OrderItemSummaryRelationship
312
+ schema as cancel — bundle structure is a property of the order, not of the
313
+ action being performed on it.
314
+
315
+ **Call:** `querySoql` — status: `implemented`
316
+
317
+ **Inputs:**
318
+
319
+ - `orderSummaryId` *(`String`)* — OrderSummary Id (1Os...). Source: output of verify-returnable-quantity.
320
+
321
+ **Depends on:** `verify-returnable-quantity`
322
+
323
+ #### `ask-to-apply-fee`
324
+
325
+ Ask whether the customer wants to add a return fee (restocking fee, processing fee, etc.).
326
+ If they choose YES, delegate to fees-support to collect fee product, description, amount,
327
+ and fee-input representation. If NO, proceed directly to preview-return-items with zero fees.
328
+
329
+ **Call:** `interactive_prompt` — status: `implemented`
330
+
331
+ **Depends on:** `verify-returnable-quantity`
332
+
333
+ #### `collect-per-item-return-fees`
334
+
335
+ Collect separate fee for each returned item
336
+
337
+ **Call:** `interactive_prompt` — status: `implemented`
338
+
339
+ **Depends on:** `verify-returnable-quantity`
340
+
341
+ #### `preview-return-items`
342
+
343
+ Preview the expected financial impact of returning specific order items
344
+
345
+ **Call:** `postOrderSummaryPreviewReturn` — status: `implemented`
346
+
347
+ **Inputs:**
348
+
349
+ - `orderSummaryId` *(`String`)* — ID of the order summary (1Os...).
350
+ Source: `order_summary_id` output of resolve-order-summary-by-number
351
+ (only valid when `match_count == 1`; on multi-match cases, source it
352
+ from the customer's disambiguation reply per step 0's agent_guidance).
353
+ A caller that already holds the 1Os Id can pass it in directly and skip
354
+ step 0.
355
+ - `changeItems` *(`Array`)* — List of order items to return with quantities. Each entry pairs an
356
+ OrderItemSummary Id (from verify-returnable-quantity's returnable_items)
357
+ with a customer-confirmed quantity, a resolved picklist reason (from
358
+ resolve-return-reasons.allowed_reasons), and shippingReductionFlag.
359
+ Source: verify-returnable-quantity (line Ids + QuantityAvailableToReturn)
360
+ + resolve-return-reasons (allowed picklist values) + the customer's
361
+ quantity / shipping-credit answers per the entry decision tree.
362
+ - schema: `{'items': {'type': 'object', 'required': ['orderItemSummaryId', 'quantity', 'reason', 'shippingReductionFlag'], 'properties': {'orderItemSummaryId': {'type': 'string', 'description': 'ID of the OrderItemSummary to return (must have QuantityAvailableToReturn > 0)'}, 'quantity': {'type': 'number', 'description': "Number of units to return for this line. Must be a whole number with 1 <= quantity <= OrderItemSummary.QuantityAvailableToReturn. When that line's QuantityAvailableToReturn > 1, this value MUST come from an explicit customer choice (see verify-returnable-quantity QUANTITY CONFIRMATION) — do not default to 1 or to all-available."}, 'reason': {'type': 'string', 'description': 'Return reason. REQUIRED. Must be a value from the org\'s\nOrderItemSummaryChange.Reason picklist (see resolve-return-reasons).\nSending a string that isn\'t in the picklist returns 400\nINVALID_API_INPUT "No matching reason found." Cancel and Return\nshare the same picklist.', 'x-codey-enum-source': 'OrderItemSummaryChange.Reason', 'x-codey-enum-resolver-step': 'resolve-return-reasons'}, 'reasonForChangeText': {'type': 'string', 'description': 'Free-form description of the reason for change'}, 'shippingReductionFlag': {'type': 'boolean', 'description': 'REQUIRED — wire-verified against pbtest-ws on 2026-06-29: omitting it returns HTTP 500 UNKNOWN_EXCEPTION on preview-return (parity with cancel via the same ChangeInputRepresentation). Always send it explicitly: false keeps the delivery/shipping charge, true also credits shipping (affects totalAdjustedDeliveryAmount). Send false unless the customer asks to also credit shipping.'}, 'changeItemFees': {'type': 'array', 'description': 'Optional fee adjustments accompanying the return'}}}}`
363
+ - **Source:** output of `verify-returnable-quantity`
364
+
365
+ **Depends on:** `resolve-return-reasons`, `verify-returnable-quantity`, `ask-to-apply-fee`, `collect-per-item-return-fees`
366
+
367
+ #### `fetch-change-order-record`
368
+
369
+ Optional: read the ChangeOrder record produced by submit-return-items.
370
+ ChangeOrders live in the standard `Order` sObject (NOT a separate
371
+ `ChangeOrder` sObject — that does not exist). Discriminate via
372
+ `RelatedOrderType = 'ChangeOrder'` and `RelatedOrderId` pointing at
373
+ the parent Order. `TotalAmount` is NEGATIVE on returns (it represents
374
+ the reduction). `IsReductionOrder` is unreliable (false on cancels —
375
+ expected same on returns); the reduction signal is the
376
+ `RelatedOrderType` + negative-amount combination, not that flag.
377
+
378
+ **Call:** `getOrder` — status: `implemented`
379
+
380
+ **Inputs:**
381
+
382
+ - `changeOrderId` *(`String`)* — changeOrderId returned by submit-return-items
383
+
384
+ **Depends on:** `submit-return-items`
385
+
386
+ #### `fetch-change-order-on-timeout`
387
+
388
+ Optional recovery step. Run ONLY when submit-return-items returned an
389
+ ambiguous failure (timeout / 5xx after sending) and the per-line
390
+ QuantityReturned re-read was inconclusive. Locates a freshly-created
391
+ ChangeOrder for this OrderSummary so the agent can distinguish "landed
392
+ but response lost" from "never applied" before deciding to retry.
393
+ Return's submit is SYNCHRONOUS — on the happy path submit's response
394
+ already carries changeOrderId, so fetch-change-order-record (path lookup)
395
+ is the normal read; this step exists only for the response-lost case.
396
+
397
+ Two-step query mirroring cancel's async recovery: first fetch
398
+ OriginalOrderId from OrderSummary; then query Order filtered by
399
+ RelatedOrderId = OriginalOrderId AND RelatedOrderType='ChangeOrder',
400
+ newest first. Do NOT rely on IsReductionOrder (stays false on returns).
401
+ A no-match result means the return did NOT land — safe to retry.
402
+
403
+ **Call:** `querySoql` — status: `implemented`
404
+
405
+ **Inputs:**
406
+
407
+ - `orderSummaryId` *(`String`)* — OrderSummary Id; used to look up OriginalOrderId.
408
+ Source: input of submit-return-items.
409
+
410
+ **Depends on:** `submit-return-items`
411
+
412
+ ### Write operations
413
+
414
+ #### `submit-return-items`
415
+
416
+ Irreversibly process the customer's return on the order. Must run AFTER preview-return-items
417
+ AND after the customer has been shown the preview's changeBalances output AND has explicitly
418
+ confirmed (a verbatim yes-equivalent reply). The agent MUST NOT call this step from its own
419
+ inference of consent — if no preview output has been surfaced to the customer in this
420
+ conversation, or if no explicit affirmative reply has been received in response, REFUSE this
421
+ call and route back to preview-return-items instead. A `success: true` from preview is NOT
422
+ consent.
423
+
424
+ **Call:** `postOrderSummarySubmitReturn` — status: `implemented`
425
+
426
+ **Inputs:**
427
+
428
+ - `customer_confirmation` *(`String`)* — The customer's VERBATIM affirmative reply, captured AFTER preview-return-items has been
429
+ invoked AND its changeBalances output has been read back to the customer in plain language
430
+ (line names, quantities, credit amount). Must be the unmodified customer-typed/spoken
431
+ response (e.g. "yes", "yes please go ahead", "confirm", "do it"). The agent MUST NOT
432
+ synthesize, paraphrase, or supply this value from its own reasoning; that is the bug class
433
+ this field exists to block. If you (the agent) do not have such a reply in the conversation
434
+ transcript, STOP — route back to preview-return-items, surface the preview to the customer,
435
+ and ask. A `success: true` from preview is NOT a substitute for the customer's reply. An
436
+ agent-supplied value here is a guardrail violation reportable as W-23144076 followup.
437
+ - `orderSummaryId` *(`String`)* — Same order summary ID from preview step
438
+ - `changeItems` *(`Array`)* — Same changeItems array used in preview (MUST match exactly,
439
+ including BOTH the resolved reason values AND shippingReductionFlag
440
+ (true|false) on every entry). Submit shares cancel's contract: HTTP
441
+ 500 UNKNOWN_EXCEPTION if shippingReductionFlag is omitted (verified
442
+ against pbtest-ws 2026-06-29) — do NOT strip it when reusing the
443
+ preview payload.
444
+ Source: output of preview-return-items.
445
+
446
+ **Depends on:** `preview-return-items`
447
+
448
+ #### `refund-return-credit`
449
+
450
+ Move money back to the customer after the return's ChangeOrder is created.
451
+ submit-return-items only records the financial reduction (the ChangeOrder);
452
+ it does NOT itself return any money. This step delegates to the
453
+ ensure-order-refund SOR for the credit-memo + refund money movement.
454
+
455
+ It mirrors the shipped Core OMS Return flow — Return_Item-1.flow (in
456
+ core/ui-commerce-ordermanagement-components/flows/runtime_commerce_oms/) — which
457
+ runs ONE refund pipeline after Return_Order_Item_Summaries_Submit: the
458
+ CREDIT-MEMO path (return has no excess-funds branch like cancel/adjust have),
459
+ in this exact element order:
460
+ • Fee_Change_Order_Id_Exists — [if submitReturnOutput.feeChangeOrderId not null]
461
+ Create_An_Invoice → createInvoiceFromChangeOrders(feeChangeOrderId) → invoicesToPay
462
+ • createCreditMemoId → createCreditMemoOrderSummary(changeOrderIds = [return
463
+ changeOrderId]) [UNCONDITIONAL — runs on every return]
464
+ • Is_Refund_Needed — submitReturnOutput.changeBalances.totalRefundableAmount > 0
465
+ • Ensure_Payment_Credit_Required — [if paymentCredit.amount > 0 AND
466
+ paymentCreditSequence non-empty] Ensure_Payment_Credit → ensurePaymentCredit
467
+ • Credit_Memo_Balance — Credit_Memo.Balance == 0 → done (nothing to refund);
468
+ else → ensureRefund
469
+ • ensureRefund → ensureRefundsOrderSummaryAsync(creditMemoId, invoicesToPay, sequences)
470
+ ensure-order-refund performs every one of these; return-order-summary only
471
+ produces the ChangeOrder — the identical division of labor as
472
+ cancel-order-summary / adjust-order-summary → ensure-order-refund.
473
+
474
+ **Delegates to:** `cc-om-fast-and-furious/ensure-order-refund`
475
+
476
+ **Depends on:** `submit-return-items`
477
+
478
+ ### Verify operations
479
+
480
+ #### `verify-return-items`
481
+
482
+ Verify the return landed by reading back BOTH the OrderSummary
483
+ (for the GrandTotalAmount delta) and each returned OrderItemSummary
484
+ (for QuantityReturned and QuantityAvailableToReturn transitions).
485
+ One read is not enough — see assertions and agent_guidance below.
486
+
487
+ **Call:** `querySoql` — status: `implemented`
488
+
489
+ **Inputs:**
490
+
491
+ - `orderSummaryId` *(`String`)* — Source: output of submit-return-items.
492
+ - `orderItemSummaryIds` *(`Array`)* — IDs of the returned lines, sourced from submit-return-items.output
493
+ .order_item_summary_ids (which projects $.changeItems[*]
494
+ .orderItemSummaryId). Used to scope the line-item read-back so the
495
+ assertion checks the exact set the agent returned. The follow_up_query
496
+ references these via the {orderItemSummaryIdsInClause} placeholder —
497
+ see agent_guidance for the rendering rule. Every element MUST match
498
+ the per-item pattern below before it's rendered into the IN-list; the
499
+ IN-list join is a raw string splice into SOQL.
500
+ - schema: `{'minItems': 1, 'items': {'type': 'string', 'pattern': '^10u[a-zA-Z0-9]{12,15}$'}}`
501
+ - **Source:** output of `submit-return-items`
502
+ - `preReturnSnapshot` *(`Array`)* — Per-line pre-submit snapshot captured from verify-returnable-quantity's
503
+ `pre_return_snapshot` output, filtered to just the lines being returned
504
+ AND paired with the returned quantity for each. Each entry is an object:
505
+ {orderItemSummaryId, quantityReturnedBefore, quantityAvailableToReturnBefore, returnedQty}
506
+ The assertion uses these pre-values to compute the exact delta — without
507
+ them the verify cannot distinguish "return landed" from "no-op". Build
508
+ this by joining verify-returnable-quantity's records to the changeItems[]
509
+ the agent sent to submit-return-items (matching on Id, quantity → returnedQty).
510
+ - schema: `{'minItems': 1, 'items': {'type': 'object', 'required': ['orderItemSummaryId', 'quantityReturnedBefore', 'quantityAvailableToReturnBefore', 'returnedQty'], 'properties': {'orderItemSummaryId': {'type': 'string', 'pattern': '^10u[a-zA-Z0-9]{12,15}$'}, 'quantityReturnedBefore': {'type': 'number'}, 'quantityAvailableToReturnBefore': {'type': 'number'}, 'returnedQty': {'type': 'number'}}}}`
511
+ - **Source:** output of `verify-returnable-quantity`
512
+
513
+ **Depends on:** `submit-return-items`, `verify-returnable-quantity`