@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,786 @@
1
+ ---
2
+ id: flow.shared.anti-patterns
3
+ name: flow-anti-patterns
4
+ description: "Ruthless do-not-do list for flow generation. Load when auditing or generating flow metadata to catch the most common failure modes before they reach save-and-validate."
5
+ metadata:
6
+ version: "1.0"
7
+ related-skills: flow-fault-paths, flow-conditions
8
+ ---
9
+
10
+ # Flow Anti-Patterns — Do-Not-Do List
11
+
12
+ Each entry explains **what breaks** if the rule is ignored. Check this list before finalizing any flow skeleton and before calling save-and-validate.
13
+
14
+ ---
15
+
16
+ ## 1. CRUD inside a Loop
17
+
18
+ A **`recordCreates`** (Create Records), **`recordUpdates`** (Update Records), **`recordDeletes`** (Delete Records), or **`recordLookups`** (Get Records) element whose connector chain is reachable from a Loop's `nextValueConnector` path (i.e., inside the loop body).
19
+
20
+ **What breaks:** At N ≥ 200 records, you hit the 150-DML governor limit (or 100-SOQL limit for lookups). The flow throws a `LimitException` and rolls back partial writes. In production this manifests as silent failure for bulk loads.
21
+
22
+ **Specific concern for `recordLookups`:** The 100-SOQL-query governor limit is reached at only N≥200 records, making this easier to hit than the 150-DML limit. A Get Records inside a loop over 200 accounts will fail at runtime.
23
+
24
+ **Correct pattern depends on flow type and use case:**
25
+
26
+ ### For AutoLaunchedFlow with multi-level hierarchical data (PREFERRED)
27
+
28
+ **Use the HDM (Hierarchical Data Model) pattern:**
29
+
30
+ When your flow needs to traverse parent → child → grandchild relationships (e.g., Account → Opportunity → OpportunityLineItem, Case → CaseComment → Attachment), do NOT use nested loops with CRUD. Instead:
31
+
32
+ 1. **Query ALL records from each hierarchy level upfront** using relationship-based filters:
33
+ - Example: `Get Records: Opportunity WHERE StageName IN ('Negotiation/Review', 'Closed Won')`
34
+ - Then: `Get Records: OpportunityLineItem WHERE Opportunity.StageName IN ('Negotiation/Review', 'Closed Won')`
35
+
36
+ 2. **Use Collection Processor (Filter/Sort)** elements to organize data by relationship fields (`AccountId`, `OpportunityId`, etc.)
37
+
38
+ 3. **Use Assignment elements** to build the final report/data structure
39
+
40
+ 4. **NO loops with CRUD inside** — all queries happen upfront
41
+
42
+ **Result:** Only 2-3 SOQL queries total regardless of data volume (not N×M queries in nested loops)
43
+
44
+ **When to use:** AutoLaunchedFlow (Scheduled, Record-Triggered, Platform Event) where you can load all data upfront without user-facing latency concerns
45
+
46
+ **Example transformation:**
47
+
48
+ **Wrong (nested loops with CRUD):**
49
+ ```text
50
+ Loop over Accounts
51
+ └─ Get Records: Opportunities for current Account ← 100+ SOQL calls
52
+ └─ Loop over Opportunities
53
+ └─ Get Records: LineItems for current Opp ← 1000+ SOQL calls
54
+ ```
55
+
56
+ **Correct (HDM pattern):**
57
+ ```text
58
+ Get Records: All Opportunities (filtered by stage) ← 1 SOQL
59
+ Get Records: All OpportunityLineItems (filtered by Opp.stage) ← 1 SOQL
60
+ Collection Sort: Group by AccountId
61
+ Collection Filter: Organize by OpportunityId
62
+ Assignment: Build report structure
63
+ ```
64
+
65
+ ### For single-level accumulate-then-bulk operations
66
+
67
+ When you're NOT traversing hierarchies but need to transform data in a loop before a single bulk operation:
68
+
69
+ **Accumulate inside the loop, CRUD outside:**
70
+
71
+ 1. Build a collection variable inside the loop using **Assignment** with `operator: Add` to a collection variable declared `isCollection: true`
72
+ 2. Do NOT perform CRUD inside the loop body
73
+ 3. After the loop exits via `noMoreValuesConnector`, perform a **single bulk CRUD operation** on the accumulated collection
74
+
75
+ **Result:** 1 DML/SOQL per loop (not N)
76
+
77
+ **Example:**
78
+ ```text
79
+ Loop over input records
80
+ └─ Assignment: Add transformed record to varAccumulatedRecords ← No CRUD
81
+ Exit loop
82
+ └─ Create Records: varAccumulatedRecords ← 1 DML for all records
83
+ ```
84
+
85
+ ### For Screen Flow
86
+
87
+ In Screen Flows, user interaction and progressive disclosure often require showing interim results. The HDM approach (load everything upfront) may cause unacceptable latency. Balance these options:
88
+
89
+ - **Small datasets (< 50 records):** Use accumulate-then-bulk pattern
90
+ - **Large datasets:** Consider pagination, subflows, or platform events to offload to AutoLaunchedFlow
91
+ - **Never:** Put CRUD inside a loop without accumulation
92
+
93
+ ### When loops with CRUD are acceptable
94
+
95
+ - **Single-record operations** where max 1 iteration is architecturally guaranteed (e.g., loop over a screen-inputted list of 1-5 items)
96
+ - **Callouts to external systems** (not Salesforce CRUD) — different governor limits apply
97
+ - **Before-save flows** mutating the triggering record in-place (no DML counted in RecordBeforeSave)
98
+
99
+ ---
100
+
101
+ ---
102
+
103
+ ## 2. Missing `faultConnector` on a fault-capable element
104
+
105
+ Element types that can throw at runtime: `actionCalls`, `apexPluginCalls`, `recordLookups`, `recordCreates`, `recordUpdates`, `recordDeletes`, `waits`.
106
+
107
+ > **Marketing flows are the exception (check this first).** In a marketing
108
+ > flow, a missing `faultConnector` is **not** this anti-pattern. A marketing
109
+ > flow is one whose `start.triggerType` is on the list in
110
+ > `shared/fault-paths/fault-paths.md` § Marketing Flows — Fault Paths Only
111
+ > When Asked. Add fault paths there only when the user asks for error
112
+ > handling; otherwise emit none and don't flag their absence.
113
+
114
+ > **Action-specific exceptions:** Follow the action's dedicated guide when its
115
+ > persisted metadata omits `faultConnector`. LWC local actions have verified
116
+ > no-fault shapes. The `sendToJourney` and `sendSmsMessage` examples omit
117
+ > `faultConnector` because they come from Segment flows, which are marketing
118
+ > flows; the marketing-flow rule above covers them. Don't carry that omission
119
+ > into a non-marketing flow.
120
+
121
+ > **Note on Subflows:** Subflow elements do NOT support `faultConnector`. If a called subflow throws an unhandled exception, it propagates to the calling flow as an unhandled error. To catch errors from a subflow, add a `faultConnector` **inside the referenced (child) flow** itself. Never emit `faultConnector` on a `subflows[]` entry — it causes a save-time schema rejection. See `elements/subflow/subflow.md` § "No Fault Path".
122
+
123
+ > **Note on Autolaunched Flows:** `customErrors` is valid ONLY when `triggerType` is `RecordBeforeSave` or `RecordAfterSave`. If `triggerType` is absent (Autolaunched Flow, no trigger) — or is `Scheduled`, `PlatformEvent`, or any other non-record-triggered value — the flow must not contain any `customErrors[]` element at all, whether it's wired to a `faultConnector`, a regular `connector`, or left unconnected. Save fails with `TRIGGER_TYPE_ELEMENT_NOT_SUPPORTED` ("A flow can't include Custom Error elements when TriggerType is set to None"). Target a `Log_Error` actionCall or an Assignment capturing `$Flow.FaultMessage` instead (for observability, prefer a persisted/notified handler — a bare Assignment with no downstream consumer is in-memory-only; advisory, see the Observability note below). See `elements/custom-error/custom-error.md`.
124
+
125
+ **What breaks:** A runtime exception escapes to the user as the generic "An unhandled fault has occurred in this flow" screen. In an autolaunched flow with no UI, the exception silently aborts the interview and rolls back the transaction. In a record-triggered flow, the originating DML is rolled back — the user's UI tells them the save succeeded but it did not.
126
+
127
+ **Correct pattern:** Every fault-capable element gets a `faultConnector` to a Log_Error action (autolaunched flow), a `customErrors` element (record-triggered flow to block the save with a message), or an error screen (Screen Flow with a recoverable path). Apply the marketing-flow exception and the action-specific verified exceptions before this generic rule. See `shared/fault-paths/fault-paths.md`.
128
+
129
+ > **Observability (headless flows — advisory):** a fault path is only *complete* when the error leaves a durable trace. A `Log_Error` action here means an element that **persists or notifies** — a `recordCreate` to a log/error object, an admin email/notification, or a platform event — not a bare Assignment that only stores `$Flow.FaultMessage` in a variable. In a headless flow (any flow with no screen-rendering capability — Autolaunched, Scheduled, PlatformEvent, Segment, and other event-triggered types; screen-bearing types like Screen Flow, `UnifiedSchedulingFlow`, and `AgxScreenFlow` are **not** headless — route their faults to an error Screen instead), an Assignment-only fault path satisfies the `faultConnector` rule at save time but leaves failures **silently unlogged** — the value is discarded when the interview ends. Pair the Assignment with a persistence/notification element, or route the fault directly to one. **Exceptions:** an Assignment to an `isOutput` variable that a parent flow (Subflow) or Apex/REST caller consumes is observable (the caller handles it); Screen flows are exempt (the error Screen surfaces the message). This is **advisory** — the metadata is valid, not a save-time error. See `shared/fault-paths/fault-paths.md` § Observable vs. In-Memory-Only Fault Handling.
130
+
131
+ ---
132
+
133
+ ## 3. Hard-coded record IDs
134
+
135
+ Record IDs (`001...`, `005...`, `00G...`), `OrgWideEmailAddressId` literals, `RecordTypeId` literals, etc. embedded as literal string values in input parameters or assignment items.
136
+
137
+ **What breaks:** The flow ships fine but breaks the moment it is deployed to another org (sandbox to production, package install). The IDs do not exist there. Often discovered weeks later when a customer hits the broken path.
138
+
139
+ **Correct pattern:** Look up by name via `recordLookups`, use `$Label`, or use a `constants` resource that the customer can override per-org.
140
+
141
+ ---
142
+
143
+ ## 4. `variableAndFieldMapping` in flow metadata
144
+
145
+ Emitting `variableAndFieldMapping` field in flow element metadata.
146
+
147
+ **What breaks:** `variableAndFieldMapping` is a UI-only mode selector that tells the Flow Builder which configuration screen to show. It is NOT part of the flow metadata schema. Emitting it causes save validation to reject with "Unknown field" or silently ignore it, creating confusion about which output mode is active.
148
+
149
+ **Applies to:** Elements with output mode configuration:
150
+ - **`recordLookups`** (Get Records)
151
+ - **`actionCalls`** (Action/Invocable Action)
152
+ - **`subflows`** (Subflow)
153
+ - **`transforms`** (Transform)
154
+
155
+ **Correct pattern:** Never emit `variableAndFieldMapping` to metadata. Use only the documented output mode fields:
156
+
157
+ **For `recordLookups`:**
158
+ - `storeOutputAutomatically: true` (automatic mode, with or without `queriedFields`)
159
+ - `storeOutputAutomatically: false` + `outputReference: "varName"` (manual with variable)
160
+ - `storeOutputAutomatically: false` + `outputAssignments: [...]` (manual with field mapping)
161
+
162
+ **For `actionCalls`:**
163
+ - `storeOutputAutomatically: true` + `outputParameters: []` (automatic)
164
+ - `storeOutputAutomatically: false` + `outputParameters: [{ name, value }]` (manual)
165
+
166
+ **For `subflows`:**
167
+ - `storeOutputAutomatically: true` + `outputAssignments: []` (automatic)
168
+ - `storeOutputAutomatically: false` + `outputAssignments: [{ name, assignToReference }]` (manual)
169
+
170
+ **For `subflows`:**
171
+ - `storeOutputAutomatically: true` + `outputAssignments: []` (automatic)
172
+ - `storeOutputAutomatically: false` + `outputAssignments: [...]` (manual)
173
+
174
+ > `actionCalls` and `subflows` use **different** output array field names. Using `outputParameters` on a subflow (or `outputAssignments` on an action call) causes a save-time schema error.
175
+
176
+ **For `transforms`:**
177
+ - `storeOutputAutomatically: true` + `outputFieldApiName` in mappings (automatic)
178
+ - `storeOutputAutomatically: false` + `assignToReference` in targets (manual, requires org permission)
179
+
180
+ Output modes are mutually exclusive within each element type — you cannot mix automatic and manual output configurations.
181
+
182
+ ---
183
+
184
+ ## 5. `actionType: "flow"` in `actionCalls`
185
+
186
+ Calling a subflow via the legacy `actionCalls` form with `actionType: "flow"`.
187
+
188
+ **What breaks:** Appears to work but has subtly different bulk and fault-handling semantics from the supported `subflows` form. Future Salesforce upgrades may deprecate the legacy form.
189
+
190
+ **Correct pattern:** Put subflow calls in the top-level `subflows` array. The required field is `flowName` (not `actionName`). See `elements/subflow/subflow.md`.
191
+
192
+ ---
193
+
194
+ ## 6. Screen or Wait in the wrong process type
195
+
196
+ - A `Screen` element in any `AutoLaunchedFlow` (record-triggered, scheduled, platform-event, etc.).
197
+ - A `Wait` element in a `RecordBeforeSave` flow.
198
+
199
+ **What breaks:** Save validation returns an error like "Element type Screen is not supported for process type AutoLaunchedFlow with trigger type RecordAfterSave."
200
+
201
+ **Correct pattern:** Before drafting any skeleton, confirm the intended element types are supported for the chosen `(processType, triggerType)` pair. If the user wants both interactive screens and automation, propose a split-flow design: an AutoLaunchedFlow handles the automation and optionally publishes a platform event to a separate Screen Flow. *(Net-new / GENERATE only. In EVOLVE — editing a supplied flow — this is a process-type change: decline per `recipes/author/author.md` Phase 0; do not propose a separate flow.)*
202
+
203
+ ---
204
+
205
+ ## 7. Missing `defaultConnector` on a Decision element
206
+
207
+ A `decisions` element that has N outcome rules but no default branch.
208
+
209
+ **What breaks:** When no rule's conditions match, the interview has nowhere to go and aborts.
210
+
211
+ **Correct pattern:** Every `decisions` element must have either a `defaultConnector` pointing to the "no match" path (typically a Log_Error action or end node), or a `defaultConnectorLabel` that documents an intentional halt. *(In `AUTO_LAYOUT_CANVAS` at resolved `apiVersion` ≥ 68.0, a terminating default path reaches an explicit End — its own dedicated End or a shared End converged with other outcomes, both valid; below 68.0 omit the connector; item 38.)* See `elements/decision/decision.md`.
212
+
213
+ ---
214
+
215
+ ## 8. Missing `interviewLabel` or `apiVersion`
216
+
217
+ Top-level flow properties that are easy to omit.
218
+
219
+ **What breaks:**
220
+ - Missing `interviewLabel`: Save succeeds but debug logs show no identifying label, making post-mortem analysis impossible.
221
+ - Missing `apiVersion`: Save succeeds with a server default but the flow may behave differently across orgs running different API version defaults.
222
+
223
+ **Correct pattern:** Always emit both. Use the org's current API version for `apiVersion`.
224
+
225
+ ---
226
+
227
+ ## 9. `sortOrder: "NotSorted"` emitted as a literal string
228
+
229
+ On `recordLookups` and `dynamicChoiceSets`, the value `"NotSorted"` is an internal placeholder value meaning "no sort order is set."
230
+
231
+ **What breaks:** The server may interpret `"NotSorted"` as an invalid enum value, or silently fall back to alphabetical sort on a different field.
232
+
233
+ **Correct pattern:** When no sort is desired, omit both `sortOrder` and `sortField` entirely. Never emit the string `"NotSorted"` in saved metadata.
234
+
235
+ ---
236
+
237
+ ## 10. Relationship Traversal in Get Records Filters or queriedFields
238
+
239
+ Using relationship traversal syntax (field names containing `.` or `__r`) in `recordLookups[].filters[].field` or `recordLookups[].queriedFields[]` values.
240
+
241
+ **What breaks:** Field names silently corrupted to `"null__NotFound"` at save time. Flow saves but has activation-blocking errors: `"The field 'null__NotFound' for the object '[ObjectName]' doesn't exist."`
242
+
243
+ **Detection:** Scan filter and queriedFields for `.` or `__r` in field names
244
+
245
+ **Solution:** See `elements/record-lookup/patterns/basic-query.md` § "Relationship Traversal Limitations" for two-step query patterns, formula field alternatives, and Collection Processor approaches.
246
+
247
+ ---
248
+
249
+ ## 11. Merge Field Syntax in Assignment String Values
250
+
251
+ Using merge field template syntax (`{!...}`) directly inside assignment `stringValue` fields.
252
+
253
+ **What breaks:** Save-time validation error: `"The assignment uses a reference to '{![expression]}', which doesn't exist"`
254
+
255
+ **Detection:** Scan `assignments[].assignmentItems[].value.stringValue` for pattern `/\{!.+\}/`
256
+
257
+ **Solution:** See `elements/assignment/assignment.md` § "String Value Constraints" for Formula resource, Text Template resource, and sequential assignment patterns.
258
+
259
+ ---
260
+
261
+ ## 12. `"no_conditions"` internal placeholder value in saved metadata
262
+
263
+ When the UI's logic field equals `"no_conditions"`:
264
+ - The matching child array (`conditions` or `filters`) must be emitted as `[]`.
265
+ - The logic field itself (`conditionLogic` or `filterLogic`) must be **omitted** — not `null`, not the literal string.
266
+
267
+ **What breaks:** `"no_conditions"` is an internal UI placeholder that must never appear in saved metadata. On the `save_and_validate` path the server *normalizes* a stray `filterLogic: "no_conditions"` by stripping the key (not a hard rejection), but don't rely on that clean-up — emit the canonical omitted form. (Do NOT confuse this with a Decision outcome / Wait event that has `conditions: []`: that IS a hard save rejection, `RULE_MISSING_CONDITION`.)
268
+
269
+ **Correct pattern:** Applies to Decision outcomes, Wait events, Start, all Record* element filters, RecordChoiceSet filters, CollectionProcessor FILTER conditions, and FlowTest assertions. `shared/conditions/conditions.md` is authoritative for the exact save/normalize behavior.
270
+
271
+ ---
272
+
273
+ ## 13. Value field with two value keys, or a value key without its DataType sibling
274
+
275
+ A value field (`value`, `rightValue`, `defaultValue`, etc.) must emit **exactly one** value key (`stringValue`, `numberValue`, `booleanValue`, `dateValue`, `dateTimeValue`, `elementReference`, etc.) paired with its matching `*DataType` sibling.
276
+
277
+ **What breaks:**
278
+ - Two value keys: server picks one non-deterministically, producing hard-to-diagnose bugs.
279
+ - Value key without sibling `*DataType` (or vice versa): server rejects with a vague "invalid value field" validation error.
280
+
281
+ **Correct pattern:** Emit only the matching value key (`stringValue: "..."`, `numberValue: ...`, etc.) — no `valueDataType` companion in metadata. Never emit two value keys in the same value object. See `shared/value-rules.md`.
282
+
283
+ ---
284
+
285
+ ## 14. Connector `targetReference` pointing at a GUID instead of a dev-name
286
+
287
+ Connector `targetReference` values must be **dev-names** (the `name` field on the target element), not internal GUIDs.
288
+
289
+ **What breaks:** Save fails with "Element `<guid>` not found" because the runtime looks up elements by dev-name, not by GUID.
290
+
291
+ **Correct pattern:** Every `targetReference` matches the `name` field of the target element.
292
+
293
+ **Same failure, End targets — referential integrity between connectors and `ends[]`.** A connector (or `defaultConnector`, `nextValueConnector`, `noMoreValuesConnector`) whose `targetReference` is an **End name** requires a matching entry in the top-level `ends[]` array with that exact `name`. If the connector exists but the `ends[]` entry is missing, the save fails the same way — **"`<EndName>` not found"** (e.g. `End_Main not found`). This is the co-emission failure of the v68+ explicit-ends default: the terminating connector was wired but its `ends[]` entry was never emitted. **The fix is to ADD the missing `ends[]` entry, NOT to remove the connector** — removing the connector deletes the terminating branch and changes flow behavior. The invariant is bidirectional: every End-targeting connector resolves to an `ends[]` entry with that exact name, and every `ends[]` entry is targeted by at least one connector (a shared End — one entry targeted by 2+ non-fault connectors — is valid). See `shared/end/end.md` § Referential integrity and item 38.
294
+
295
+ ---
296
+
297
+ ## 15. `storeOutputAutomatically: true` with non-empty output assignments
298
+
299
+ When `storeOutputAutomatically: true`, the corresponding output array must be `[]` or omitted:
300
+ - `actionCalls` → `outputParameters: []`
301
+ - `recordLookups` → `outputAssignments: []`
302
+ - `subflows` → `outputAssignments: []`
303
+
304
+ Note: `actionCalls` uses `outputParameters`; `subflows` and `recordLookups` use `outputAssignments`. These field names are not interchangeable.
305
+
306
+ **What breaks:** Server returns a validation error saying the element has both automatic and manual output configured.
307
+
308
+ ---
309
+
310
+ ## 16. Element name exceeding 80 characters or containing non-ASCII characters
311
+
312
+ Element `name` (API/dev-name) rules:
313
+ - Maximum 80 characters.
314
+ - ASCII alphanumeric and underscore only.
315
+ - Must not start with a digit.
316
+ - Should not end with underscore.
317
+
318
+ **What breaks:** Save fails with "Invalid API name."
319
+
320
+ ---
321
+
322
+ ## 17. Duplicate element name within the same flow
323
+
324
+ Two elements in the same flow sharing the same `name` value.
325
+
326
+ **What breaks:** Save fails with "Duplicate element name."
327
+
328
+ ---
329
+
330
+ ## 18. Collection variable not declared `isCollection: true`
331
+
332
+ Assigning to a collection variable using `operator: Add` when the variable is not declared with `isCollection: true`.
333
+
334
+ **What breaks:** Runtime error "cannot use Add operator on a non-collection variable" on the first iteration.
335
+
336
+ **Correct pattern:** Every collection variable used in a Loop result must be declared with `isCollection: true` in `variables`.
337
+
338
+ ---
339
+
340
+ ## 19. Empty `filters` on a filter-based Record Delete
341
+
342
+ A `recordDeletes` element using filter-based mode (`object` is set, no `inputReference`) with empty `filters: []`.
343
+
344
+ **What breaks:** This would mass-delete every record on the object. The server rejects with "recordDeletes element has empty filters," but any agent building the flow should catch this before attempting to save.
345
+
346
+ ---
347
+
348
+ ## 20. DML on the triggering record in `RecordAfterSave` via `inputReference: "$Record"`
349
+
350
+ In an `RecordAfterSave` flow, updating `$Record` via `inputReference: "$Record"` on a `recordUpdates` element still fires as a separate DML statement. This is not the same as a before-save in-place update.
351
+
352
+ **What breaks:** Unexpected extra DML operation, potential infinite recursion if the flow entry criteria match after the update, and governor limit consumption.
353
+
354
+ **Correct pattern:** For in-place mutations on the triggering record without extra DML, use a `RecordBeforeSave` flow. For post-save side effects on related records, use `RecordAfterSave` with explicit filter-based record updates.
355
+
356
+ ---
357
+
358
+ ## 21. Handing off UI activation without confirming identity details
359
+
360
+ Directing the user to activate after saving a new version without first identifying the flow full name, version number, last-modified-by, last-modified-date, and target org.
361
+
362
+ **What breaks:** Wrong version may go Active in production. The user believes the right logic is now live but it is not.
363
+
364
+ **Correct pattern:** Report those details before directing the user to activate in Flow Builder UI. Never call `POST /services/data/vXX.0/flowbuilder/flow/{flowId}/actions/activate` (activateFlow) — quarantined, do not dispatch.
365
+
366
+ ---
367
+
368
+ ## 22. Skipping field discovery before building DML elements
369
+
370
+ Building a `recordCreates` or `recordUpdates` element with assumed field names without first verifying the object's field schema.
371
+
372
+ **What breaks:** Emitting a non-createable or non-updateable field (such as `Id` on create, or auto-managed fields like `CreatedDate`) causes save-time validation errors. Required-field violations only surface at runtime.
373
+
374
+ **Correct pattern:** Verify the object's field schema before emitting any `inputAssignments`. The current platform-family field descriptor must have `creatable: true` for creates and `editable: true` for updates. Fields with `required: true` must be included on create.
375
+
376
+ ---
377
+
378
+ ## 23. Re-probing the org for data already in context
379
+
380
+ Calling a schema-discovery tool with the same arguments when the result is already present in the conversation context.
381
+
382
+ **What breaks:** Wastes org API quota, burns context window tokens, and may return inconsistent data if the org schema changed mid-conversation.
383
+
384
+ **Correct pattern:** Treat prior probe results as a cache keyed on `(tool, arguments)`. Consult conversation history before making any read-only schema call. Only re-probe if the user indicates the org was modified between turns.
385
+
386
+ ---
387
+
388
+ ## 24. Uninitialized collection variable passed to an action
389
+
390
+ Passing a collection variable to a Loop element or collection operation without first initializing it.
391
+
392
+ **What breaks:** An unassigned (null) collection variable causes a `Missing required input parameter` runtime error — not a save-time error, so it won't be caught until the flow executes.
393
+
394
+ **Correct pattern:** Always pre-initialize collection variables (e.g., via an Assignment element that sets the variable to an empty collection or a known value) before passing them to Loop elements or any collection-aware operation.
395
+
396
+ ---
397
+
398
+ ## 25. Using record IDs for record type or template references
399
+
400
+ Embedding a hard-coded Record Type ID or Email Template ID as a literal value in flow metadata.
401
+
402
+ **What breaks:** Record IDs are org-specific. A flow that references an ID from sandbox will break when deployed to production because that ID does not exist in the target org. This is not caught at save time and only surfaces at runtime in the target environment.
403
+
404
+ **Correct pattern:** Use DeveloperName (not record ID) when referencing Record Types or Email Templates in flows. Look up the record by DeveloperName at runtime via a `recordLookups` element, or store DeveloperName in a flow constant that can be overridden per org.
405
+
406
+ ---
407
+
408
+ ## 26. Dot-notation reference to a screen InputField value
409
+
410
+ Using `{!ScreenName.fieldName}` (dot-notation) to reference the value of a screen field whose `fieldType` is `InputField` in any downstream element (`recordCreates.inputAssignments`, `decisions.rules[].conditions`, `assignments`, etc.).
411
+
412
+ **What breaks:** The platform does NOT expose `InputField` values via dot-notation. Emitting `elementReference: "ScreenName.fieldName"` or `leftValueReference: "ScreenName.fieldName"` causes a **`WARNING_BLOCK_ACTIVATION`** error at save time, blocking flow activation.
413
+
414
+ **Applies to:** All `fieldType: InputField` screen fields (Text Box, Number, Currency, Date, DateTime, Checkbox). This includes LargeTextArea and PasswordField as well — any screen field whose value is made available as a bare variable.
415
+
416
+ **Why the agent reaches for dot-notation:** The platform uses dot-notation for sObject fields (e.g., `{!myAccount.Name}`), which leads the agent to infer it also works for screen fields. It does not.
417
+
418
+ **Correct pattern:** A screen `InputField`'s value is automatically available in all downstream elements via `{!fieldApiName}`, where `fieldApiName` is the field's `name` property alone — **no screen name prefix, no dot**.
419
+
420
+ | Wrong | Correct |
421
+ |---|---|
422
+ | `elementReference: "Screen_Collect_Account_Info.varAccountName"` | `elementReference: "varAccountName"` |
423
+ | `leftValueReference: "Screen_Collect_Account_Info.varAccountName"` | `leftValueReference: "varAccountName"` |
424
+ | `{!MyScreen.myField}` in any value field | `{!myField}` |
425
+
426
+ **How to detect before saving:** Scan every `elementReference`, `leftValueReference`, `rightValueReference`, and `value.elementReference` in the flow for the pattern `ScreenElementName.fieldName`. Any match is a blocker — fix it before calling save-and-validate.
427
+
428
+ ---
429
+
430
+ ## 27. Retrying save-and-validate more than twice with the same error category
431
+
432
+ Making three or more save attempts that all return errors in the same category (e.g., repeated `DYNAMIC_TYPE_MAPPING_MISSING`, repeated `Unrecognized field`, repeated enum-value errors, repeated `WARNING_BLOCK_ACTIVATION` from dot-notation on screen InputField).
433
+
434
+ **What breaks:** No progress is made. Context window fills with redundant tool calls and the same error text. The user loses confidence.
435
+
436
+ **Correct pattern:** After two failed save attempts with the same error:
437
+ 1. **Stop retrying.** Paste the verbatim error to the user.
438
+ 2. **Pick a structurally different approach** — remove the offending field entirely, replace the component with a simpler alternative, or downgrade the feature.
439
+ 3. If no alternative is obvious, **ask the user** whether the requirement is achievable or should be dropped.
440
+
441
+ Never make a third attempt with the same shape or a minor variation of the same field placement.
442
+
443
+ ---
444
+
445
+ ## 28. Security posture not audited before save
446
+
447
+ The flow is saved without checking its run mode, data scope, or handling of untrusted input.
448
+
449
+ **What breaks:** Nothing at save time — but the flow may bypass sharing/CRUD/FLS (`SystemModeWithoutSharing`), leak sensitive fields via "store all fields" lookups, or accept un-sanitized guest input. These are multi-tenant security exposures, not validation errors, so `POST /services/data/vXX.0/flowbuilder/flow/actions/save` (saveFlow) never catches them.
450
+
451
+ **Correct pattern:** Run the security Auditor checks in `shared/security/security.md` (the single source of truth for the specific rules) on every save and surface any findings in the Plan-phase Security note. Unlike other items in this file, security findings are **advisory** — warn, recommend the safer default, and let the user decide. Do not block the save.
452
+
453
+ ---
454
+
455
+ ## 29. Emitting a metadata-valid element that has no canvas palette tile
456
+
457
+ An element type that `GET /services/data/vXX.0/flowbuilder/schema/flow-capabilities` (read `.elements`) returns but that Flow Builder offers no palette tile for. The server saves it via the API, so `POST /services/data/vXX.0/flowbuilder/flow/actions/save` (saveFlow) succeeds, but the user cannot create or cleanly edit it in the canvas.
458
+
459
+ **What breaks:** The saved element renders as an orphaned node the user can't edit in the canvas — the flow becomes un-maintainable in the builder. "Supported in metadata" ≠ "authorable in the canvas."
460
+
461
+ **Correct pattern:** Only emit **palette-authorable** entries. An entry is palette-authorable when it carries a `configComponent` (an editor component); palette entries also carry `icon` / `label` / `labelNew`. **Never emit** a bare entry with `"isElementSubtype": false`, `"attributes": null`, and no `configComponent`. The known trap is the **base `Wait`** (classic Wait) — default to a Wait *subtype* (`WaitDuration` / `WaitDate` / `WaitUntilEvent`); `elements/wait/wait.md` is the single source of truth for the Wait family, including the narrow "by Criteria" (01) / record-relative-date (04) exception where a classic Wait is the only expressible shape. Apply the same `configComponent` test to any element type before drafting it.
462
+
463
+ ---
464
+
465
+ ## 30. Redundant Get Records + filter-based Update Records with a duplicated filter
466
+
467
+ A `recordLookups` element retrieves a collection using filter F, and a later `recordUpdates` element re-applies the **same filter F** (Mode 1 / RecordLookup) to write new field values onto the same object — instead of updating the collection the Get Records already fetched.
468
+
469
+ **What breaks:** The flow issues a second, redundant SOQL query that returns the identical record set the Get Records element already holds. At best this wastes a SOQL statement (governor-limit pressure in bulk/HDM designs) and adds a maintenance trap — the two filters can silently drift out of sync on a future edit, since nothing enforces they stay identical. A `decisions` element checking `Get_Records IsNull = false` in between (a common "records exist?" guard) reinforces the appearance that the two steps are related, but does not actually connect them: the Update still re-derives its own record set from scratch.
470
+
471
+ **Detection:** A `recordLookups` element's `object` + `filters[]` match (same object, same field/operator/value filter set, ignoring order) a later `recordUpdates` element's `object` + `filters[]` (Mode 1, `inputReference: ""`), with no other DML on that object in between that would invalidate reusing the fetched collection. The `recordLookups` element must also be **unbounded** — `getFirstRecordOnly: false` and no `limit` — so its result set is provably the same records the Mode 1 Update would touch. A Get Records with `getFirstRecordOnly: true` or a `limit` may hold only a subset of the filter's full match set (Mode 1 Update re-runs the filter with no such cap), so collapsing to Mode 2 in that case would silently narrow which records get updated. If the lookup is bounded, do not flag this anti-pattern unless there is other proof the lookup result equals the update's full target set.
472
+
473
+ **Correct pattern:** Reuse the already-fetched collection instead of re-filtering — only when the Get Records is unbounded (no `getFirstRecordOnly: true`, no `limit`):
474
+ 1. Set the new field values onto the fetched records — via a `Loop` + `Assignment` (append each updated item to an output collection) or a `Transform` element, per `elements/collection-processor/collection-processor.md` / `elements/transform/transform.md`.
475
+ 2. Issue a single **Mode 2** (`inputReference` = the resulting sObject collection) `recordUpdates` element — no `object`, no `filters`, no `inputAssignments`. See `elements/record-update/record-update.md` § Mode 2.
476
+ 3. If the only purpose of the preceding `IsNull` Decision was to guard against updating on an empty result, drop it — a `Loop` over an empty collection, or a Mode 2 update on an empty collection, is already a no-op. Keep the Decision only if it drives a genuinely distinct business branch (e.g., an alternate path when nothing is found).
477
+
478
+ **Example transformation:**
479
+
480
+ Wrong (redundant filter):
481
+ ```text
482
+ Get_Overdue_Projects: Project WHERE Status = 'In Progress' AND EndDate__c < TODAY
483
+ Decision: Get_Overdue_Projects IsNull = false
484
+ Update_Overdue_Projects (Mode 1): Project WHERE Status = 'In Progress' AND EndDate__c < TODAY
485
+ SET Status__c = 'Overdue'
486
+ ```
487
+
488
+ Correct (reuse the collection):
489
+ ```text
490
+ Get_Overdue_Projects: Project WHERE Status = 'In Progress' AND EndDate__c < TODAY
491
+ Loop over Get_Overdue_Projects
492
+ └─ Assignment: set Status__c = 'Overdue' on current item, Add to varUpdatedProjects
493
+ Update_Overdue_Projects (Mode 2): inputReference = varUpdatedProjects
494
+ ```
495
+
496
+ This mirrors — and generalizes — the Mode 2 guidance in `elements/record-update/record-update.md` § Mode 2: reusing an already-fetched collection isn't limited to screen-edited Automatic Fields; it applies any time a preceding Get Records already holds the exact record set a downstream Update needs, even when the new values differ from what was read.
497
+
498
+ ---
499
+
500
+ ## 31. Screen with both `allowBack:false` and `allowFinish:false`
501
+
502
+ A `screens[]` element that hides both the Previous button (`allowBack: false`) and the Next/Finish button (`allowFinish: false`).
503
+
504
+ **What breaks:** Saves as a Draft, but the flow **fails activation** (the activation call → `InvalidDraft`). A dead end — the user has no way to move forward or back. See `elements/screen/examples/negative-patterns.json` `N1_both_nav_hidden`.
505
+
506
+ **Detection:** Any `screens[]` entry with the literal pair `allowBack: false` + `allowFinish: false`. Both default to `true` when omitted, so an omitted key never triggers this.
507
+
508
+ **Correct pattern:** Keep at least one of the two `true` (or omitted). `allowPause` doesn't count toward this rule. See `elements/screen/screen.md` § Navigation Button Settings and `elements/screen/examples/positive-patterns.json` P2 (Previous-only) for the valid single-button shapes.
509
+
510
+ ---
511
+
512
+ ## 32. Routing multiple fault paths to a shared error screen with fault-specific wording
513
+
514
+ Two or more elements' `faultConnector`s point at the same error screen in a Screen Flow, but that screen's fixed text names a cause specific to only one of the possible failures.
515
+
516
+ **What breaks:** Nothing at save or activation time — a runtime UX defect. Whenever a different fault fires, the user sees an explanation that doesn't apply to what actually happened.
517
+
518
+ **Detection:** For any error screen reachable from more than one `faultConnector`, check whether its fixed `fieldText` (apart from a generic `{!$Flow.FaultMessage}` interpolation) implies a cause specific to only one of the feeding elements.
519
+
520
+ **Correct pattern:** Share one error screen only when its message is genuinely generic (e.g. `"Something went wrong: {!$Flow.FaultMessage}"`). Give any fault needing business-specific wording its own screen — mixing a shared generic screen with dedicated specific ones on the same flow is normal. See `shared/fault-paths/fault-paths.md` § "Sharing One Error Screen Across Multiple Fault Paths". *(A shared error SCREEN is a continuing handler and stays legal; the auto-layout round-trip concern is about a shared END element — item 38, a different target type.)*
521
+
522
+ ## 33. `$Record__Prior` in Start entry criteria with `doesRequireRecordChangedToMeetCriteria: true`
523
+
524
+ A record-triggered `start` (`recordTriggerType` Update / CreateAndUpdate) whose entry criteria — `filters[]` or `filterFormula` — references `$Record__Prior.*` **while** `doesRequireRecordChangedToMeetCriteria: true`.
525
+
526
+ **What breaks:** The flag makes the platform re-evaluate the entry criteria against both prior and new state, so any `$Record__Prior` reference in the Start is undefined. Blocks activation with `FORMULA_EXPRESSION_INVALID` on `$Record`: *"The formula expression is invalid: The \"$Record__Prior.<Field>\" variable isn't valid because 'When to Run the Flow for Updated Records' in the Start element changed."* Surfaces as a `warnings[]` entry with `isSuccess: true` — the flow saves as an **InvalidDraft**, so inspect `warnings`, not just `isSuccess`. Verified live.
527
+
528
+ **Detection:** A Start (`RecordBeforeSave`/`RecordAfterSave`, `recordTriggerType` Update or CreateAndUpdate) with `doesRequireRecordChangedToMeetCriteria: true` AND a `$Record__Prior` reference anywhere in `filters[]` or `filterFormula`. See `elements/start/examples/negative-priorInEntryCriteria-doesRequire.json`.
529
+
530
+ **Correct pattern:** Either set `doesRequireRecordChangedToMeetCriteria: false` (or omit it) and keep the prior-vs-new comparison in `filterFormula`/`filters`, or — **preferred** — leave entry criteria change-agnostic and do the `$Record__Prior.Field` vs `$Record.Field` comparison in a **Decision** element in the flow body, where `$Record__Prior` is always valid. See `elements/decision/decision.md`.
531
+
532
+ ## 34. `faultConnector` pointing at the same target as the element's success `connector`
533
+
534
+ A fault-capable element (`recordUpdates`, `recordCreates`, `recordDeletes`, `recordLookups`, `actionCalls`, `waits`) whose `faultConnector.targetReference` equals its own `connector.targetReference`. The element has a fault path in name only — both success and failure route to the same next element.
535
+
536
+ **What breaks:** Nothing at save or activation time — a runtime correctness defect. When the operation fails, control still flows into the success continuation (a confirmation email, a "done" screen, a downstream DML). A silently failed write is reported as a success, and the rest of the flow runs on the false assumption that the operation succeeded. This is worse than a missing fault connector (item 2): the failure is not just unhandled, it is actively disguised as success.
537
+
538
+ **Detection:** For every element carrying both a `connector` and a `faultConnector`, compare `faultConnector.targetReference` against `connector.targetReference`. If they are equal, it is this anti-pattern. A fault path may still legitimately rejoin the flow — an intentional retry (a GoTo back to an earlier element, see `shared/fault-paths/fault-paths.md`) or a "log and continue" path that converges on a neutral terminal/End is fine. The defect is specifically routing the failure into a step that **assumes the operation succeeded** (the confirmation email/screen, or a downstream action that consumes the not-actually-written data) — flag that whether reached directly or through a chain, and do not flag convergence at a neutral end point. *(Layout note, `AUTO_LAYOUT_CANVAS` only, different axis from this runtime concern: a shared End across non-fault branches is valid, and a fault pointed directly at an End is silently dropped on reload — neither breaks the auto-layout round-trip. See item 38.)*
539
+
540
+ **Correct pattern:** Route the `faultConnector` to a *distinct* error-handling element that does not flow into the success continuation before completion — a `customErrors` element (record-triggered flows), a `Log_Error` action (autolaunched/scheduled flows), or a dedicated error screen (Screen Flows). See `shared/fault-paths/fault-paths.md` and `elements/record-update/record-update.md` § "Fault Connector Mandate".
541
+
542
+ ## 35. Empty or separator-only item appended to a text collection
543
+
544
+ An `assignments` element that `Add`s a bare separator or empty string (e.g. `{ "stringValue": "\n" }`, `{ "stringValue": "" }`, `{ "stringValue": ", " }`) to a text collection as its own item — typically alongside a real value inside a loop, in an attempt to delimit entries.
545
+
546
+ **What breaks:** Nothing at save time — a data defect. Each iteration appends the value *and* a standalone empty/separator item, so the collection accumulates blank entries (and a trailing one after the last iteration). Downstream, that surfaces as blank lines or dangling separators in summary text, extra empty rows, or off-by-one counts.
547
+
548
+ **Detection:** In an `assignmentItems[]` targeting an `isCollection: true` text variable with operator `Add`, look for a value that is a separator/whitespace/empty `stringValue` added as its own item rather than concatenated onto the content.
549
+
550
+ **Correct pattern:** Collect only real values into the collection, then join them with a separator where the text is consumed (e.g. a text template or formula). If a running text string is genuinely needed, build it in a scalar Text variable by concatenating value **and** separator in a single expression per iteration — never add the separator as a standalone collection item.
551
+
552
+ ## 36. Non-fault path targeting a fault-only error screen
553
+
554
+ An **error screen** — a terminal screen whose only content is a failure message, reached via a `faultConnector` — is *also* targeted by a non-fault connector: a success screen's `connector`, a Decision `defaultConnector`, or a Loop connector. The usual shape is a terminal success screen whose forward `connector` points at the error screen instead of ending the flow.
555
+
556
+ **What breaks:** Nothing at save or activation — the metadata is legal (a `faultConnector` target may also sit on a regular path; see `shared/fault-paths/fault-paths.md`). It's a runtime defect: a *successful* run dead-ends on the error screen, showing a failure message when nothing failed — and if that text interpolates `{!$Flow.FaultMessage}`, it renders blank, since the variable is empty off the fault path. Seen in W-23849872: `Get_All_Contacts.faultConnector → Error_Screen` (right) plus `Display_Contacts_Screen.connector → Error_Screen` (the defect), whose fixed error text showed on a successful run.
557
+
558
+ **Detection:** Find each terminal, error-message-only screen reached via a `faultConnector`. Flag it if any non-fault connector (`connector`, `defaultConnector`, `nextValueConnector`, `noMoreValuesConnector`, or a Decision rule `connector`) also targets it. A screen that instead *continues* the flow (has a forward connector) is a notify-and-continue screen, not this defect.
559
+
560
+ **Correct pattern:** Keep the error screen reachable only via fault connectors; make the last success screen terminal (omit its `connector`, or point it at a real continuation / a dedicated single-incoming End — not a shared End; item 38). See `elements/screen/screen.md` § Error/fault screen wiring and `elements/screen/examples/negative-patterns.json` N11 / `positive-patterns.json` P8.
561
+
562
+ > **Not item 32.** Sharing one error screen across several *fault* connectors is fine (item 32 only governs whether its wording fits every fault). A *non-fault* edge into it is the inverse mistake. **Not item 38** either: this item is about error *SCREENS* (a continuing handler); item 38 is about a shared *End* element.
563
+
564
+ ## 37. Net-new flow saved without a `CanvasMode` process metadata value
565
+
566
+ A net-new (GENERATE) flow serialized without a `CanvasMode` entry in top-level `metadata.processMetadataValues[]` — either the array is absent, empty (`[]`), or carries other entries but not `CanvasMode`.
567
+
568
+ **What breaks:** Nothing at save time — the save succeeds and returns clean. A silent UX defect: **absence is not neutral — the builder opens a canvas-mode-less flow in Free-Form.** Canvas mode is carried **only** by this PMV. W-23938668 added a *server-side* backfill that stamps `AUTO_LAYOUT_CANVAS` on the persisted `POST /services/data/vXX.0/flowbuilder/flow/actions/save` (saveFlow) **net-new** path (`createNewFlow` / `saveAsNewDefinition`) when the caller omitted it — but that backfill does **not** cover the paths this rule targets: the no-persist Flow Builder hand-off (which returns JSON and never calls `POST /services/data/vXX.0/flowbuilder/flow/actions/save`), the other save types (`saveAsNewVersion` / `saveDraft`), and the separate `execute_metadata_action` generation pipeline. On those, the emitted PMV is the only thing that sets canvas mode. So emit it explicitly on every net-new flow and never rely on the server backfill. The PMV is what sets canvas mode; end/fault topology does not undo it — a shared End across non-fault branches is valid, and a fault pointed directly at an End is silently dropped on reload (neither breaks the auto-layout round-trip); see item 38.
569
+
570
+ **Detection (GENERATE only):** On a net-new save, confirm `metadata.processMetadataValues[]` is non-empty and contains an entry `{ "name": "CanvasMode", "value": { "stringValue": "AUTO_LAYOUT_CANVAS" } }`. This is a hard gate — emit it independently of `BuilderType` (the two are separate PMVs; never condition emitting one on the other). **Exception — non-canvas process types:** do NOT emit a `CanvasMode` PMV for a process type that has no canvas (e.g. `CustomerLifecycle`) — the server rejects the save with `CLM_UNSUPPORTED_PROCESS_MD_VALUE`. The gate applies only to canvas-based flow types.
571
+
572
+ **Correct pattern:** For a net-new flow emit the `CanvasMode` PMV explicitly (default `AUTO_LAYOUT_CANVAS`). **EVOLVE never applies here:** on an edit, preserve the source's `processMetadataValues` **verbatim** — never inject, overwrite, or flip a canvas mode the source didn't carry. Stamping `AUTO_LAYOUT_CANVAS` onto an existing Free-Form flow silently re-lays-out (and can corrupt) it; canvas mode is the user's to change, never the agent's. Any hand-off surface that emits flow JSON without calling `POST /services/data/vXX.0/flowbuilder/flow/actions/save` (saveFlow) (e.g. the Flow Builder surface's no-persist output contract) carries the same obligation — the PMV must be present in the JSON handed back. See `shared/flow-properties/flow-properties.md` § "Canvas Mode and `processMetadataValues`".
573
+
574
+ ## 38. Pointing a fault at an End (silently dropped), and the myth that a shared End breaks auto-layout
575
+
576
+ **Applies to auto-layout flows** (`CanvasMode: AUTO_LAYOUT_CANVAS`; a flow with the PMV absent opens Free-Form — item 37 — and is exempt). Two shapes this item once prohibited are, in **current** Flow Builder, **not** round-trip breakers. Do not reshape a valid flow to satisfy the old rule, and do not flag either shape.
577
+
578
+ **1. A shared End is valid.** Two or more **non-fault** connectors converging on ONE explicit End (a single `ends[]` entry targeted N times) is a legal, Flow-Builder-native auto-layout shape — e.g. a Decision's default outcome and another outcome both terminating at one End. Flow Builder authors it and re-opens it in clean auto-layout. (Verified: `a_new_flow_to_test` — `Decision_2`'s `defaultConnector` and `Outcome_2` both target `END_ELEMENT_2`, and it round-trips into ALC cleanly.) One dedicated End per branch is equally valid. Neither form is mandated — never "split" a shared End, and never flag one as a defect.
579
+
580
+ **2. A fault targeting an End is silently dropped, not fatal.** A `faultConnector` whose direct target is an End — or an empty/unwired fault — is simply **removed on reload**; the flow stays `AUTO_LAYOUT_CANVAS` and does **not** fall back to Free-Form. (Verified current behavior: a flow whose `faultConnector` targets an `END_ELEMENT` directly round-trips with that fault removed and the flow still `AUTO_LAYOUT_CANVAS` — the direct fault→End case, captured explicitly; separately, `a_new_flow_to_test` opens cleanly with fault chains and five Ends, and an empty fault renders as a stub and drops on the next save.) A fault path may also validly **terminate at an End** through a handler. *(This corrects an earlier claim in this skill that a fault-into-End forces a Free-Form fallback via `compareState`, citing `@W-8249637`; that is not the observed current behavior — the fault is dropped, the flow stays auto-layout.)*
581
+
582
+ **The real (advisory) concern — silent loss.** Because an End-targeting or empty fault is dropped on reload, that error path vanishes with no error. If you want faults actually handled, route each `faultConnector` to a real handler element (a `Log_Error`/`Handle_Fault` Assignment, `customErrors` in a record-triggered flow, or an error screen) that then reaches its own End. This is a recommendation for observability, **not** a round-trip requirement. The orthogonal *runtime* defect — a fault rejoining a continuation that assumes the failed operation succeeded — is real and lives in **item 34**; keep that separation.
583
+
584
+ **Correct pattern:** On GENERATE with `AUTO_LAYOUT_CANVAS` at resolved `apiVersion` ≥ 68.0, every terminating branch reaches an explicit End (its connector + a matching `ends[]` entry, co-emitted) — this includes loop `noMoreValuesConnector` and `nextValueConnector` termini and Decision `defaultConnector`/outcome termini, which are easy to miss. Branches may each get their own End OR converge on a shared End; both are valid. Below 68.0 and on any Free-Form flow, omit the connector instead and never emit `ends[]` on Free-Form. Route faults to a handler when you want them kept.
585
+
586
+ **EVOLVE note:** preserve the source's `ends[]`; give each NEW terminating branch an explicit End (auto-layout sources only) — you may converge it on an existing End or give it its own, both valid. Never add ends to a retrieved Free-Form source.
587
+
588
+ See `shared/end/end.md`, `shared/connector/connector.md` § End topology, `shared/fault-paths/fault-paths.md`, and item 34.
589
+
590
+ ---
591
+
592
+ ## 39. Echoing a server read-back-only form on save (schedule and resume time/date fields)
593
+
594
+ A retrieved flow hands certain time/date fields back in a **read-back** shape that
595
+ `POST /services/data/vXX.0/flowbuilder/flow/actions/save` (saveFlow) does not accept: `Start.schedule.startTime` / `Start.schedule.endTime`
596
+ (Scheduled trigger) and `Wait` element `resumeTime` come back as
597
+ `{ "timeInMillis": N }` objects; `Start.schedule.startDate` / `Start.schedule.endDate`
598
+ and `resumeDate` come back as bare **epoch-millis integers** (all three dates are the
599
+ same `xsd:date` type, serialized as a numeric timestamp). The
600
+ agent echoes those retrieved objects/integers straight back on save instead of
601
+ converting them to the wire-string form `POST /services/data/vXX.0/flowbuilder/flow/actions/save` (saveFlow) requires.
602
+
603
+ **What breaks:** The save_flow call is rejected. For the Wait element's
604
+ `resumeTime`/`resumeDate`, the observed rejection is
605
+ `No suitable constructor found for type [...] com.sforce.ws.types.Time: can not
606
+ instantiate from JSON object` (see `elements/wait/wait.md`). For the Start
607
+ element's `schedule.startTime`/`schedule.endTime`/`schedule.startDate`/`schedule.endDate`,
608
+ the observed save_flow rejection is `ILLEGAL_QUERY_PARAMETER_VALUE` — do not treat
609
+ either string as the universal error for this class; report whichever
610
+ `validationErrors[]` text the server actually returns.
611
+
612
+ **Detection:** Scan the materialized payload for `schedule.startTime`,
613
+ `schedule.endTime`, `resumeTime` that are `{ "timeInMillis": ... }` objects rather
614
+ than time strings, and `schedule.startDate`, `schedule.endDate`, `resumeDate` that
615
+ are numbers rather than `"YYYY-MM-DD"` date strings.
616
+
617
+ **Correct pattern:** Convert every read-back form to its `POST /services/data/vXX.0/flowbuilder/flow/actions/save` (saveFlow) wire string
618
+ before saving. The time literal is a GMT wall-clock value; the server's canonical
619
+ serialized form carries a trailing `Z` (e.g. `"09:00:00.000Z"`) and the save
620
+ deserializer accepts it **with or without** the `Z`, so either `"09:00:00.000"` or
621
+ `"09:00:00.000Z"` saves cleanly.
622
+ - Time: `{ "timeInMillis": 32400000 }` → `"09:00:00.000"`; `{ "timeInMillis": 0 }` → `"00:00:00.000"`. `timeInMillis` is milliseconds past GMT midnight, so `32400000` = 9h → `"09:00:00.000"`.
623
+ - Date: reduce to the date-only string `"YYYY-MM-DD"`. **Render the epoch-millis instant with a UTC/GMT renderer — never local-time date formatting.** The dates the server hands back are midnight-UTC boundaries, so rendering the instant in any negative-UTC-offset local zone (e.g. US Pacific, UTC−7/−8) rolls the calendar day *back by one* — and because any valid `"YYYY-MM-DD"` saves, the wrong date is accepted **silently, with no error** (the flow then runs a day early, indefinitely). Compute the day in UTC — `floor(epochMillis / 86400000)` days past 1970-01-01, then format that — or if you use a date library, pass it an explicit UTC/GMT timezone. Do **not** feed the millis to a local `Date` / `toLocaleDateString` / `strftime`-without-`tz` and read the date off that.
624
+ - **Worked midnight-boundary example:** `1773532800000` is exactly `2026-03-15T00:00:00.000Z`. Rendered in UTC → `"2026-03-15"` (**correct**). The identical instant rendered in US Pacific is `2026-03-14T17:00` → `"2026-03-14"` (**wrong — off by one, and saved silently**). Likewise `1775001600000` = `2026-04-01T00:00:00.000Z` → `"2026-04-01"` in UTC, but `"2026-03-31"` in Pacific. Always take the **UTC** calendar day.
625
+ - **Defensive fallback:** these fields serialize as epoch-millis integers on the retrieve path, so the numeric case above is what you will actually see. If a build ever hands back a full datetime string instead, **normalize it to UTC first, then take the `YYYY-MM-DD`** — do **not** slice the leading component of a non-`Z`/`+0000` string verbatim. Example: `"2026-03-14T17:00:00.000-0700"` is the instant `2026-03-15T00:00:00Z`, so the correct date is `"2026-03-15"`, but a verbatim leading slice yields the wrong `"2026-03-14"` (a day early, saved silently).
626
+
627
+ This is the same read-back-echo failure class documented for the Wait
628
+ element's `resumeTime`/`resumeDate` (`elements/wait/wait.md`, and its sibling
629
+ `maxBatchSize` read-back caveat) and for the Start element's Scheduled-trigger
630
+ fields (`elements/start/start.md` § "Scheduled (Time-Based)"). It is also the
631
+ closest sibling to the strip-list in `shared/flow-metadata-schema.md` § "What Must
632
+ Never Be Emitted" — that list removes server-only fields outright, whereas this
633
+ one transforms a preserved field's shape before re-emitting it. Per
634
+ `recipes/author/author.md`'s EVOLVE surgical rule, this normalization is applied
635
+ to every affected element, touched or not, and is exempt from byte-for-byte
636
+ preservation.
637
+
638
+ ---
639
+
640
+ ## 40. Referencing a field that `GET /services/data/vXX.0/flowbuilder/platform/entity/{apiName}/fields` did not return
641
+
642
+ Emitting flow metadata that names a field which was not in the response of
643
+ `GET /services/data/vXX.0/flowbuilder/platform/entity/{apiName}/fields` for the target sObject — even a well-known standard
644
+ field like `DoNotCall`, `HasOptedOutOfFax`, or `HasOptedOutOfEmail`.
645
+
646
+ **What breaks:** `GET /services/data/vXX.0/flowbuilder/platform/entity/{apiName}/fields` is FLS-filtered by the MCP session's
647
+ authenticated Salesforce user. The tool returning field X and the running
648
+ user having FLS-read on X are the same event. If the field is absent, the
649
+ running user cannot read it — meaning either (a) it does not exist on this
650
+ org, or (b) FLS blocks it. Manufacturing knowledge of the field violates the
651
+ design invariant that *the skill should only know about fields that the user
652
+ would know* — a design-time describe that hides a field from the flow admin
653
+ in the UI must hide it from the skill too. Downstream: `sf project deploy
654
+ start` run as the same user fails the flow's field-existence check against
655
+ the metadata, and even a successful deploy produces a flow whose behavior
656
+ the user cannot audit or manage in Flow Builder (the field is invisible to
657
+ them in the UI too). Note: save-time validation is not guaranteed to enforce
658
+ user FLS on every field reference — do not treat the possibility of
659
+ save-time catch as a safety net. The blind spot is a design-time contract.
660
+
661
+ **Detection:** For each sObject the design references, hold the set of
662
+ `apiName` strings returned by the most recent `GET /services/data/vXX.0/flowbuilder/platform/entity/{apiName}/fields` call
663
+ for that sObject. Then walk every field-name-carrying position in the
664
+ emitted metadata and require every value to be in that set:
665
+ - `decisions[].rules[].conditions[].leftValueReference` — extract the field
666
+ name after any `$Record.` / `<sObjectVar>.` prefix.
667
+ - `recordLookups[].filters[].field` and `recordLookups[].queriedFields[]`.
668
+ - `recordLookups[].sortField` and `recordLookups[].outputAssignments[].field`.
669
+ - `recordCreates[].inputAssignments[].field` and `recordCreates[].outputAssignmentFieldReference`.
670
+ - `recordUpdates[].filters[].field` and `recordUpdates[].inputAssignments[].field`.
671
+ - `recordDeletes[].filters[].field`.
672
+ - `assignments[].assignmentItems[].assignToReference` when it resolves to
673
+ a field on an sObject variable.
674
+ - Any formula in `formulas[].expression` or `<element>.filterFormula` that
675
+ resolves a field via `$Record.<Field>` or `<sObjectVar>.<Field>`.
676
+ Any name not in the describe's field set — do not save.
677
+
678
+ **Correct pattern:** Treat the describe response as the complete and only
679
+ field inventory. When the user's requested behavior needs a field the skill
680
+ did not receive from `GET /services/data/vXX.0/flowbuilder/platform/entity/{apiName}/fields`, branch **before** the plan
681
+ gate and present the two acceptable outcomes:
682
+
683
+ 1. **Build without the missing field.** State the field is inaccessible:
684
+ *"I don't have access to a field named `DoNotCall` on Lead. This could
685
+ mean the field doesn't exist on your org, or your Salesforce admin has
686
+ restricted access to it via field-level security."* Enumerate the
687
+ accessible fields that could substitute (or say none exist). Ask the
688
+ user whether to proceed with the reduced flow.
689
+
690
+ **Rank the substitutes by how close they are to real data.** This also
691
+ applies when the user names a concept rather than a field (for example
692
+ "engaged" or "high-value") and no field matches it.
693
+ - **Look past the triggering object first.** Before listing
694
+ substitutes, check the related objects you can reach. For an audience
695
+ flow that means the data graph's related DMOs
696
+ (`elements/start/audience-common.md` § "Set the data graph"). For a
697
+ record flow it means objects reached through lookups. Include
698
+ engagement and calculated-insight fields. Also check records the flow
699
+ already reads or updates, and their lookups (for example the related
700
+ Contact and its Account).
701
+ - **Lead with the closest real data.** For example, an engagement date
702
+ or score for "engaged", or an order amount or annual revenue for
703
+ "high-value".
704
+ - **Never lead with a test-looking field.** A field whose name or label
705
+ suggests test or sample data (for example it contains Test, Sample,
706
+ Dummy or Placeholder) is never option 1 and never the "simplest"
707
+ option. If you list it at all, put it last and label it as looking
708
+ like test data. This covers examples in an open question too.
709
+ - Ranking doesn't replace the question. Still stop and ask before
710
+ building.
711
+
712
+ 2. **Halt and refer to the admin.** If no substitute works or the user
713
+ confirms the reduced flow is not acceptable, stop before any save call.
714
+ Instruct the user to contact their Salesforce administrator to grant
715
+ field-level security on the field, or to re-authenticate the MCP
716
+ session as a user with access. Do not proceed on any override phrase.
717
+
718
+ Never author metadata that names a field the skill cannot see. See
719
+ `recipes/author/author.md` Phase 2 § Probe schema for the design-time gate
720
+ that invokes this branch, and `shared/server-functions.md` §
721
+ `GET /services/data/vXX.0/flowbuilder/platform/entity/{apiName}/fields` for the tool-level caveat.
722
+
723
+ ---
724
+
725
+ ## MCP/Connect Lifecycle Security Invariants
726
+
727
+ **T-1. Presenting activation as something the agent performs**
728
+
729
+ W-23666862 security-quarantines `POST /services/data/vXX.0/flowbuilder/flow/{flowId}/actions/activate` (activateFlow) on every MCP/Connect surface and environment. MCP hides it from `tools/list`; direct Connect returns 404 through `FlowBuilderDisabled`. Never treat activation as a WRITE the agent can perform or imply that a saved flow is live.
730
+
731
+ **What breaks:** The call cannot succeed through the server, so any "activated" claim is false. Worse, if the skill leads the user to believe the agent activated the right version, the user trusts a state that never changed (and, were the tool ever re-enabled, could go live on the wrong version).
732
+
733
+ **Correct pattern:** The agent never activates. After a successful `POST /services/data/vXX.0/flowbuilder/flow/actions/save` (saveFlow), hand off to the user: append the "Open in Salesforce" deep link (`preview-renderer.md`) and tell them to review and activate the version themselves in Flow Builder / Setup. The version-confirmation discipline (flow full name, version number, `lastModifiedBy`, `lastModifiedDate`, org host) now belongs to that hand-off message so the user activates the right version. See `server-functions.md` Phase 4c.
734
+
735
+ ---
736
+
737
+ **T-2. Treating activation approval or deactivation as activation fallbacks**
738
+
739
+ Do not call `POST /services/data/vXX.0/flowbuilder/flow/{flowId}/actions/submit-for-activation` (submitFlowForActivation) or `POST /services/data/vXX.0/flowbuilder/flow/{flowId}/actions/deactivate` (deactivateFlow) as activation
740
+ fallbacks. `POST /services/data/vXX.0/flowbuilder/flow/{flowId}/actions/submit-for-activation` targets an
741
+ Orchestration activation-approval process; `POST /services/data/vXX.0/flowbuilder/flow/{flowId}/actions/deactivate` turns an Active
742
+ flow off. Neither activates a Draft.
743
+
744
+ **What breaks:** The agent converts a known endpoint-level restriction into a
745
+ false diagnosis about the flow's process type, ID form, or Segment activation
746
+ wiring, then calls unrelated state-changing endpoints.
747
+
748
+ **Correct pattern:** Do not call `POST /services/data/vXX.0/flowbuilder/flow/{flowId}/actions/activate` (activateFlow). If direct Connect returns 404,
749
+ treat it as the expected `FlowBuilderDisabled` behavior. Stop and hand the user
750
+ the Flow Builder deep link. Do not probe alternate lifecycle mutations.
751
+
752
+ ---
753
+
754
+ **T-3. Calling `POST /services/data/vXX.0/flowbuilder/flow/{flowId}/actions/deactivate` without the two-confirm gate**
755
+
756
+ `POST /services/data/vXX.0/flowbuilder/flow/{flowId}/actions/deactivate` (deactivateFlow) STOPS A PRODUCTION AUTOMATION. Highest-risk action.
757
+
758
+ **What breaks:** Business-critical automation halts. Customer-facing side effects (e.g. closed-won opps no longer create renewals).
759
+
760
+ **Correct pattern:**
761
+ 1. First confirm: "I'm about to deactivate `<flow>` version `<N>` in org `<host>`. The current Active version is `<N>`, last modified by `<user>` on `<date>`. Confirm?"
762
+ 2. Then ask about `cancelOnDeactivate`: "Should I also cancel any paused interviews on this flow? (yes/no)"
763
+ 3. Second confirm: "Confirming deactivation of `<flow>` v`<N>` in `<host>`, cancelOnDeactivate=`<bool>`. Proceed?"
764
+ 4. Only then call `dispatch(method: "POST", url: "/services/data/vXX.0/flowbuilder/flow/{flowId}/actions/deactivate")`.
765
+
766
+ ---
767
+
768
+ **T-4. Skipping schema/feasibility probing in Phase 2**
769
+
770
+ The agent reads the user's request and immediately drafts the flow without calling any read-only tool to verify the user's assertions against org state.
771
+
772
+ **What breaks:** The plan rests on assumptions instead of verified facts. The first `POST /services/data/vXX.0/flowbuilder/flow/actions/save` (saveFlow) call returns `errors[]` or `warnings[]` for things a probe would have caught (read-only field, non-existent action, unsupported element type for the trigger). Rework that a Phase 2 probe would have prevented gets thrown away.
773
+
774
+ **Correct pattern:** Every concrete user assertion gets a targeted probe call in Phase 2 step 4, verified per the "Verify each assertion" traps and the **Mandatory Probes by Element Type** table. Surface any failed assertion as Architecture Pushback in the plan summary before the approval gate. See `recipes/author/author.md` Phase 2.
775
+
776
+ ---
777
+
778
+ **T-5. Skipping the tool-result cache**
779
+
780
+ Later in Phase 2 (or in a follow-up EVOLVE), the agent re-calls an MCP tool it already called with the same arguments.
781
+
782
+ **What breaks:** Wastes MCP tool call budget and context window tokens, and may return DIFFERENT data if the org schema changed mid-conversation (rare but real failure mode in sandboxes with active developers).
783
+
784
+ **Correct pattern:** Conversation history is the cache. Before any read-only MCP tool call, check whether the same `(tool, args)` already exists in history and reuse the result. See `recipes/author/author.md` Phase 2 step 4 (cache-first probing).
785
+
786
+ **Cache discipline summary:** Cache key = `(tool, args)`. Five tiers: Tier 0 (just-call, cheap probes like `get_process_types`), Tier 1 (session-immutable — reuse forever), Tier 2 (flow-scoped — reuse within this flow), Tier 3 (query-scoped — distinct args = distinct entry, never duplicate), Tier 4 (volatile — always re-fetch). After any WRITE tool, treat version/metadata tool results as stale. When the user reports external changes ("I added a field"), invalidate matching cache entries.