@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.
- package/package.json +1 -1
- package/skills/agentforce-gpt-email-generation-configure/SKILL.md +312 -0
- package/skills/agentforce-offline-experimentation-run/SKILL.md +253 -0
- package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +796 -0
- package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +111 -0
- package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +1053 -0
- package/skills/agentforce-wizard-ui-forecasting-analytics-components-configure/SKILL.md +64 -0
- package/skills/agentforce-wizard-ui-sales-einstein-components-configure/SKILL.md +46 -0
- package/skills/automation-company-profile-info-query/SKILL.md +51 -0
- package/skills/automation-digital-wallet-configure/SKILL.md +689 -0
- package/skills/automation-flow-coordinate/SKILL.md +95 -0
- package/skills/automation-flow-coordinate/references/elements/action-call/action-call.md +1569 -0
- package/skills/automation-flow-coordinate/references/elements/action-call/conversation-messaging.md +96 -0
- package/skills/automation-flow-coordinate/references/elements/action-call/examples/send-sms-message.json +23 -0
- package/skills/automation-flow-coordinate/references/elements/action-call/examples/send-to-journey-no-fields.json +31 -0
- package/skills/automation-flow-coordinate/references/elements/action-call/send-to-journey.md +179 -0
- package/skills/automation-flow-coordinate/references/elements/exit-rule/examples/event-email-link-click.json +13 -0
- package/skills/automation-flow-coordinate/references/elements/exit-rule/exit-rule.md +83 -0
- package/skills/automation-flow-coordinate/references/elements/forward-to-bot-or-agent/examples/forward-to-bot-or-agent.json +69 -0
- package/skills/automation-flow-coordinate/references/elements/forward-to-bot-or-agent/forward-to-bot-or-agent.md +274 -0
- package/skills/automation-flow-coordinate/references/elements/start/audience-common.md +192 -0
- package/skills/automation-flow-coordinate/references/elements/start/automation-event-triggered.md +130 -0
- package/skills/automation-flow-coordinate/references/elements/start/data-cloud-data-change-triggered.md +92 -0
- package/skills/automation-flow-coordinate/references/elements/start/form-submission-triggered.md +88 -0
- package/skills/automation-flow-coordinate/references/elements/start/segment-triggered.md +152 -0
- package/skills/automation-flow-coordinate/references/elements/start/start.md +539 -0
- package/skills/automation-flow-coordinate/references/elements/subflow/subflow.md +152 -0
- package/skills/automation-flow-coordinate/references/elements/wait/wait.md +497 -0
- package/skills/automation-flow-coordinate/references/recipes/author/author.md +868 -0
- package/skills/automation-flow-coordinate/references/recipes/summarize/element-generic.md +300 -0
- package/skills/automation-flow-coordinate/references/recipes/summarize/reference-resolution.md +292 -0
- package/skills/automation-flow-coordinate/references/recipes/summarize/summarize.md +323 -0
- package/skills/automation-flow-coordinate/references/recipes/testing/examples/debug-output-template.md +109 -0
- package/skills/automation-flow-coordinate/references/recipes/testing/shape.md +219 -0
- package/skills/automation-flow-coordinate/references/recipes/testing/shared-stages/intent-analyzer.md +180 -0
- package/skills/automation-flow-coordinate/references/recipes/testing/workflows/debug.md +175 -0
- package/skills/automation-flow-coordinate/references/recipes/testing/workflows/promote.md +255 -0
- package/skills/automation-flow-coordinate/references/recipes/testing/workflows/save-debug.md +212 -0
- package/skills/automation-flow-coordinate/references/resources/variable/variable.md +171 -0
- package/skills/automation-flow-coordinate/references/shared/anti-patterns.md +786 -0
- package/skills/automation-flow-coordinate/references/shared/end/end.md +267 -0
- package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/eval/README.md +69 -0
- package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/eval/predictions.jsonl +80 -0
- package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/eval/prompts.jsonl +116 -0
- package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/flow-type-resolver.md +321 -0
- package/skills/automation-flow-coordinate/references/shared/flow-type-resolver/taxonomy.json +320 -0
- package/skills/automation-flow-coordinate/references/shared/server-functions.md +597 -0
- package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +21 -11
- package/skills/automation-sandbox-post-copy-config-generate/assets/config_template.json +10 -0
- package/skills/automation-sandbox-post-copy-config-generate/assets/json_schema.json +33 -1
- package/skills/automation-sandbox-post-copy-config-generate/references/configuration_catalog.md +44 -1
- package/skills/automation-sandbox-post-copy-configure/SKILL.md +132 -124
- package/skills/automation-sandbox-post-copy-configure/references/flow_activation_path.md +151 -0
- package/skills/automation-sandbox-post-copy-configure/references/scheduled_apex_path.md +55 -9
- package/skills/automotive-cloud-appraisal-management-settings-configure/SKILL.md +69 -0
- package/skills/automotive-cloud-dealer-essentials-configure/SKILL.md +78 -0
- package/skills/automotive-cloud-ground-agent-data-pipelines-configure/SKILL.md +373 -0
- package/skills/automotive-cloud-ground-mfg-agent-data-pipelines-configure/SKILL.md +273 -0
- package/skills/automotive-cloud-mfg-agent-data-pipelines-configure/SKILL.md +259 -0
- package/skills/automotive-cloud-mfg-sales-concierge-agent-create/SKILL.md +369 -0
- package/skills/automotive-cloud-mfg-sales-concierge-foundation-configure/SKILL.md +542 -0
- package/skills/automotive-cloud-mfg-sales-concierge-foundation-coordinate/SKILL.md +159 -0
- package/skills/automotive-cloud-mfg-sales-concierge-orchestrator-agent-create/SKILL.md +349 -0
- package/skills/automotive-cloud-mfg-sales-concierge-orchestrator-configure/SKILL.md +505 -0
- package/skills/automotive-cloud-sales-concierge-agent-create/SKILL.md +380 -0
- package/skills/automotive-cloud-sales-concierge-foundation-configure/SKILL.md +567 -0
- package/skills/automotive-cloud-sales-concierge-foundation-coordinate/SKILL.md +159 -0
- package/skills/automotive-cloud-sales-concierge-orchestrator-agent-create/SKILL.md +360 -0
- package/skills/automotive-cloud-sales-concierge-orchestrator-configure/SKILL.md +539 -0
- package/skills/automotive-cloud-sales-concierge-search-grounding-configure/SKILL.md +358 -0
- package/skills/commerce-b2b-merchant-quote-configure/SKILL.md +602 -0
- package/skills/commerce-b2b-store-configure/SKILL.md +251 -0
- package/skills/commerce-credit-memo-create/SKILL.md +139 -0
- package/skills/commerce-delivery-business-hours-configure/SKILL.md +277 -0
- package/skills/commerce-delivery-estimation-apply/SKILL.md +155 -0
- package/skills/commerce-delivery-estimation-configure/SKILL.md +377 -0
- package/skills/commerce-delivery-routing-specs-integrate/SKILL.md +174 -0
- package/skills/commerce-estimate-bopis-query/SKILL.md +279 -0
- package/skills/commerce-estimate-delivery-date-query/SKILL.md +349 -0
- package/skills/commerce-fees-apply/SKILL.md +227 -0
- package/skills/commerce-fulfillment-routing-analyze/SKILL.md +200 -0
- package/skills/commerce-guest-buyer-create/SKILL.md +173 -0
- package/skills/commerce-location-bopis-configure/SKILL.md +378 -0
- package/skills/commerce-location-business-hours-configure/SKILL.md +235 -0
- package/skills/commerce-location-delivery-processing-time-configure/SKILL.md +309 -0
- package/skills/commerce-location-graph-integrate/SKILL.md +131 -0
- package/skills/commerce-location-shipping-carrier-method-configure/SKILL.md +755 -0
- package/skills/commerce-location-temporary-operating-hours-configure/SKILL.md +331 -0
- package/skills/commerce-merchant-buyer-groups-configure/SKILL.md +579 -0
- package/skills/commerce-merchant-buyer-user-onboarding-create/SKILL.md +626 -0
- package/skills/commerce-merchant-catalog-configure/SKILL.md +614 -0
- package/skills/commerce-merchant-extension-provider-configure/SKILL.md +368 -0
- package/skills/commerce-merchant-insights-account-health-churn-analyze/SKILL.md +118 -0
- package/skills/commerce-merchant-insights-inventory-returns-analyze/SKILL.md +65 -0
- package/skills/commerce-merchant-insights-order-shopper-get/SKILL.md +90 -0
- package/skills/commerce-merchant-insights-product-performance-analyze/SKILL.md +72 -0
- package/skills/commerce-merchant-insights-query/SKILL.md +279 -0
- package/skills/commerce-merchant-storefront-guest-access-configure/SKILL.md +656 -0
- package/skills/commerce-order-summary-change-apply/SKILL.md +375 -0
- package/skills/commerce-product-details-get/SKILL.md +363 -0
- package/skills/commerce-product-search/SKILL.md +563 -0
- package/skills/commerce-react-storefront-create/SKILL.md +350 -0
- package/skills/commerce-return-order-summary-create/SKILL.md +513 -0
- package/skills/commerce-search-relevance-analyze/SKILL.md +757 -0
- package/skills/commerce-temporary-processing-time-override-create/SKILL.md +274 -0
- package/skills/communications-initial-setup-configure/SKILL.md +630 -0
- package/skills/communications-multisite-configure/SKILL.md +571 -0
- package/skills/communications-revenue-cloud-settings-configure/SKILL.md +74 -0
- package/skills/communications-smb-fiber-catalog-create/SKILL.md +413 -0
- package/skills/communications-tmf-integrate/SKILL.md +1368 -0
- package/skills/consumer-goods-promotion-bo-api-deploy/SKILL.md +54 -107
- package/skills/consumer-goods-promotion-bo-api-deploy/assets/set-comment-value/payloads/copy.json +1 -1
- package/skills/consumer-goods-promotion-bo-api-deploy/references/conventions-and-payload-rules.md +82 -5
- package/skills/consumer-goods-promotion-bo-api-deploy/references/generate-and-wire.md +35 -2
- package/skills/consumer-goods-promotion-bo-api-deploy/references/preflight-and-seed-queries.md +149 -0
- package/skills/consumer-goods-promotion-bo-api-deploy/references/smoke-and-verify.md +17 -1
- package/skills/consumer-goods-visit-activity-act4-questions-assign/SKILL.md +448 -0
- package/skills/consumer-goods-visit-activity-act5-standard-create/SKILL.md +269 -0
- package/skills/consumer-goods-visit-activity-act6-assortment-configure/SKILL.md +271 -0
- package/skills/consumer-goods-visit-activity-act7-account-scoping-create/SKILL.md +382 -0
- package/skills/consumer-goods-visit-activity-act8-plan-attach-create/SKILL.md +373 -0
- package/skills/consumer-goods-visit-activity-act9-proof-validate/SKILL.md +389 -0
- package/skills/consumer-goods-visit-and-activity-act1-specification-create/SKILL.md +338 -0
- package/skills/consumer-goods-visit-and-activity-act2-template-create/SKILL.md +547 -0
- package/skills/consumer-goods-visit-and-activity-act3-definition-create/SKILL.md +346 -0
- package/skills/consumer-goods-visit-and-activity-configure/SKILL.md +1110 -0
- package/skills/crm-analytics-adoption-insights-configure/SKILL.md +224 -0
- package/skills/crm-analytics-custom-report-type-lightning-configure/SKILL.md +418 -0
- package/skills/crm-analytics-dashboards-configure/SKILL.md +731 -0
- package/skills/crm-analytics-operational-analytics-metadata-bridge-migrate/SKILL.md +233 -0
- package/skills/crm-analytics-report-notifications-ui-configure/SKILL.md +184 -0
- package/skills/crm-analytics-sharing-inheritance-coverage-analyze/SKILL.md +167 -0
- package/skills/crm-analytics-sonic-getting-started-configure/SKILL.md +55 -0
- package/skills/crm-analytics-tableau-next-app-deploy/SKILL.md +1350 -0
- package/skills/crm-analytics-tableau-next-c360-basemodel-validate/SKILL.md +1862 -0
- package/skills/crm-analytics-tableau-next-datacloud-validate/SKILL.md +83 -0
- package/skills/crm-analytics-tableau-next-provisioning-validate/SKILL.md +81 -0
- package/skills/data360-activation-create/SKILL.md +104 -0
- package/skills/data360-activation-external-platform-get/SKILL.md +49 -0
- package/skills/data360-activation-target-create/SKILL.md +93 -0
- package/skills/data360-activation-v2-create/SKILL.md +456 -0
- package/skills/data360-audience-dmo-get/SKILL.md +38 -0
- package/skills/data360-calculated-affinity-create/SKILL.md +82 -0
- package/skills/data360-calculated-insight-create/SKILL.md +148 -0
- package/skills/data360-catalog-metadata-create/SKILL.md +183 -0
- package/skills/data360-code-extension-create/SKILL.md +115 -0
- package/skills/data360-communication-capping-create/SKILL.md +227 -0
- package/skills/data360-connection-create/SKILL.md +491 -0
- package/skills/data360-content-lens-create/SKILL.md +181 -0
- package/skills/data360-data-action-create/SKILL.md +126 -0
- package/skills/data360-data-action-target-create/SKILL.md +181 -0
- package/skills/data360-data-clean-room-create/SKILL.md +238 -0
- package/skills/data360-data-governance-create/SKILL.md +746 -0
- package/skills/data360-data-graph-create/SKILL.md +82 -0
- package/skills/data360-data-harmonized-model-object-reference-create/SKILL.md +38 -0
- package/skills/data360-data-lake-object-create/SKILL.md +207 -0
- package/skills/data360-data-model-object-catalog-get/SKILL.md +49 -0
- package/skills/data360-data-model-object-create/SKILL.md +128 -0
- package/skills/data360-data-model-object-mapping-create/SKILL.md +106 -0
- package/skills/data360-data-space-create/SKILL.md +161 -0
- package/skills/data360-data-streams-create/SKILL.md +324 -0
- package/skills/data360-engagement-signal-get/SKILL.md +38 -0
- package/skills/data360-experiment-create/SKILL.md +82 -0
- package/skills/data360-goal-based-campaign-create/SKILL.md +192 -0
- package/skills/data360-harmonization-process-history-get/SKILL.md +38 -0
- package/skills/data360-harmonized-unstructured-dmo-create/SKILL.md +84 -0
- package/skills/data360-identity-resolution-create/SKILL.md +115 -0
- package/skills/data360-intelligent-document-processing-create/SKILL.md +148 -0
- package/skills/data360-knowledge-graph-construction-create/SKILL.md +93 -0
- package/skills/data360-knowledge-graph-create/SKILL.md +216 -0
- package/skills/data360-knowledge-space-mcp-configure/SKILL.md +475 -0
- package/skills/data360-machine-learning-mcp-configure/SKILL.md +697 -0
- package/skills/data360-multi-org-mcp-configure/SKILL.md +117 -0
- package/skills/data360-secondary-index-mcp-configure/SKILL.md +126 -0
- package/skills/data360-segment-mcp-configure/SKILL.md +159 -0
- package/skills/data360-semantic-calculated-dimension-mcp-configure/SKILL.md +93 -0
- package/skills/data360-semantic-calculated-measurement-mcp-configure/SKILL.md +93 -0
- package/skills/data360-semantic-data-object-mcp-configure/SKILL.md +93 -0
- package/skills/data360-semantic-dimension-mcp-configure/SKILL.md +38 -0
- package/skills/data360-semantic-engine-mcp-configure/SKILL.md +62 -0
- package/skills/data360-semantic-measurement-mcp-configure/SKILL.md +38 -0
- package/skills/data360-semantic-metric-mcp-configure/SKILL.md +93 -0
- package/skills/data360-semantic-model-mcp-configure/SKILL.md +115 -0
- package/skills/data360-standard-mapping-mcp-configure/SKILL.md +38 -0
- package/skills/data360-tenant-lifecycle-mcp-configure/SKILL.md +73 -0
- package/skills/dx-devops-conflict-resolve/SKILL.md +1 -5
- package/skills/dx-devops-pipeline-manage/SKILL.md +1 -5
- package/skills/dx-devops-project-manage/SKILL.md +1 -5
- package/skills/dx-devops-promote/SKILL.md +1 -5
- package/skills/dx-devops-request-status/SKILL.md +1 -5
- package/skills/dx-lifecycle-center/SKILL.md +120 -0
- package/skills/dx-lifecycle-center/examples/workflows.md +175 -0
- package/skills/dx-lifecycle-center/references/connect-api.md +123 -0
- package/skills/dx-lifecycle-center/references/connect-org.md +184 -0
- package/skills/dx-lifecycle-center/references/deploy.md +153 -0
- package/skills/dx-lifecycle-center/references/error-handling.md +21 -0
- package/skills/dx-lifecycle-center/references/hub-org.md +37 -0
- package/skills/dx-lifecycle-center/references/list-orgs.md +99 -0
- package/skills/dx-lifecycle-center/references/request-body.md +75 -0
- package/skills/dx-lifecycle-center/references/troubleshooting.md +31 -0
- package/skills/dx-lifecycle-center/scripts/poll-deploy-status.sh +200 -0
- package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +120 -0
- package/skills/dx-org-devhub-configure/SKILL.md +1 -3
- package/skills/dx-org-shape-manage/SKILL.md +1 -5
- package/skills/dx-org-snapshot-manage/SKILL.md +1 -3
- package/skills/education-cloud-academic-calendar-generate/SKILL.md +1 -3
- package/skills/education-cloud-course-catalog-migrate/SKILL.md +1 -3
- package/skills/education-cloud-domain-configure/SKILL.md +1 -3
- package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -3
- package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +1 -5
- package/skills/experience-afv-query/SKILL.md +234 -0
- package/skills/experience-agentforce-vibes-in-react-configure/SKILL.md +63 -0
- package/skills/experience-apex-components-configure/SKILL.md +69 -0
- package/skills/experience-apex-pages-configure/SKILL.md +107 -0
- package/skills/experience-app-home-configure/SKILL.md +76 -0
- package/skills/experience-aura-lightning-out-access-configure/SKILL.md +58 -0
- package/skills/experience-briefcase-configure/SKILL.md +287 -0
- package/skills/experience-community-flexi-page-list-create/SKILL.md +74 -0
- package/skills/experience-community-template-definition-list-query/SKILL.md +48 -0
- package/skills/experience-community-theme-definition-list-query/SKILL.md +38 -0
- package/skills/experience-content-assets-configure/SKILL.md +86 -0
- package/skills/experience-custom-domain-create/SKILL.md +727 -0
- package/skills/experience-defer-rendering-workspace-page-setup-configure/SKILL.md +41 -0
- package/skills/experience-field-service-app-builder-configure/SKILL.md +187 -0
- package/skills/experience-flow-category-configure/SKILL.md +117 -0
- package/skills/experience-formula-configure/SKILL.md +358 -0
- package/skills/experience-global-actions-configure/SKILL.md +69 -0
- package/skills/experience-global-publisher-layouts-configure/SKILL.md +79 -0
- package/skills/experience-instrumentation-configure/SKILL.md +64 -0
- package/skills/experience-lex-engagement-configure/SKILL.md +50 -0
- package/skills/experience-lightning-bolt-open/SKILL.md +12 -0
- package/skills/experience-lightning-out-configure/SKILL.md +129 -0
- package/skills/experience-lightning-preview-configure/SKILL.md +67 -0
- package/skills/experience-lightning-types-query/SKILL.md +98 -0
- package/skills/experience-malware-scan-configure/SKILL.md +71 -0
- package/skills/experience-my-salesforce-configure/SKILL.md +126 -0
- package/skills/experience-navigation-menus-configure/SKILL.md +235 -0
- package/skills/experience-notification-types-configure/SKILL.md +206 -0
- package/skills/experience-notifications-configure/SKILL.md +75 -0
- package/skills/experience-record-discovery-query/SKILL.md +227 -0
- package/skills/experience-regenerate-previews-open/SKILL.md +94 -0
- package/skills/experience-sales-cloud-mab-configure/SKILL.md +254 -0
- package/skills/experience-schema-builder-open/SKILL.md +38 -0
- package/skills/experience-simple-record-home-configure/SKILL.md +110 -0
- package/skills/experience-static-resources-configure/SKILL.md +74 -0
- package/skills/experience-ui-bundle-2gp-deploy/SKILL.md +1 -3
- package/skills/experience-ui-bundle-features-generate/SKILL.md +1 -5
- package/skills/experience-ui-bundle-mfa-configure/SKILL.md +1 -3
- package/skills/field-service-data-capture-form-deployer-configure/SKILL.md +23 -2
- package/skills/field-service-data-capture-form-designer-configure/SKILL.md +13 -3
- package/skills/field-service-data-capture-migrate/SKILL.md +1 -3
- package/skills/field-service-mobile-branding-configure/SKILL.md +17 -3
- package/skills/field-service-objective-designer-configure/SKILL.md +72 -379
- package/skills/field-service-prework-brief-deployer-configure/SKILL.md +10 -537
- package/skills/field-service-scheduling-policy-designer-query/SKILL.md +65 -1093
- package/skills/{field-service-setup-orchestrator-get → field-service-setup-coordinate}/SKILL.md +18 -3
- package/skills/field-service-sobject-create-configure/SKILL.md +13 -213
- package/skills/field-service-voice-to-form-configure/SKILL.md +40 -11
- package/skills/field-service-work-plan-configure/SKILL.md +253 -0
- package/skills/field-service-work-rule-designer-configure/SKILL.md +121 -95
- package/skills/fsc-actionable-segmentation-settings-configure/SKILL.md +180 -0
- package/skills/fsc-digital-origination-bre-decision-matrix-foundation-create/SKILL.md +196 -0
- package/skills/fsc-digital-origination-bre-disclosures-consent-configure/SKILL.md +106 -0
- package/skills/fsc-digital-origination-bre-document-upload-configure/SKILL.md +96 -0
- package/skills/fsc-digital-origination-bre-permissions-assign/SKILL.md +111 -0
- package/skills/fsc-digital-origination-bre-setup-coordinate/SKILL.md +250 -0
- package/skills/fsc-digital-origination-bre-stp-eligibility-configure/SKILL.md +122 -0
- package/skills/fsc-digital-origination-coordinate/SKILL.md +653 -0
- package/skills/fsc-digital-origination-demo-run/SKILL.md +225 -0
- package/skills/fsc-digital-origination-execution-guardrails-validate/SKILL.md +112 -0
- package/skills/fsc-digital-origination-initial-setup-configure/SKILL.md +396 -0
- package/skills/fsc-digital-origination-pricing-setup-coordinate/SKILL.md +336 -0
- package/skills/fsc-digital-origination-pricing-setup-data-foundation-create/SKILL.md +208 -0
- package/skills/fsc-digital-origination-pricing-setup-procedure-create/SKILL.md +375 -0
- package/skills/fsc-digital-origination-product-setup-act1-permissions-assign/SKILL.md +83 -0
- package/skills/fsc-digital-origination-product-setup-coordinate/SKILL.md +248 -0
- package/skills/fsc-digital-origination-sample-data-create/SKILL.md +206 -0
- package/skills/fsc-document-checklist-settings-configure/SKILL.md +57 -0
- package/skills/fsc-flexible-hierarchy-configure/SKILL.md +148 -0
- package/skills/fsc-flexible-hierarchy-foundation-configure/SKILL.md +1430 -0
- package/skills/fsc-flexible-hierarchy-graph-config-create/SKILL.md +471 -0
- package/skills/fsc-flexible-hierarchy-rule-based-graph-deploy/SKILL.md +429 -0
- package/skills/fsc-pricing-product-configurator-configure/SKILL.md +150 -0
- package/skills/fsc-pricing-salesforce-omnistudio-switch/SKILL.md +123 -0
- package/skills/fsc-product-act2-catalog-categories-create/SKILL.md +82 -0
- package/skills/fsc-product-act3-attributes-create/SKILL.md +249 -0
- package/skills/fsc-product-act4-classification-assignment-create/SKILL.md +196 -0
- package/skills/fsc-product-act5-considerations-get/SKILL.md +44 -0
- package/skills/fsc-stage-management-apex-flow-deploy/SKILL.md +384 -0
- package/skills/fsc-stage-management-compliant-data-sharing-configure/SKILL.md +144 -0
- package/skills/fsc-stage-management-decision-matrices-create/SKILL.md +107 -0
- package/skills/fsc-stage-management-definition-assignments-create/SKILL.md +189 -0
- package/skills/fsc-stage-management-definition-create/SKILL.md +108 -0
- package/skills/fsc-stage-management-permissions-assign/SKILL.md +143 -0
- package/skills/fsc-stage-management-transitions-configure/SKILL.md +139 -0
- package/skills/health-cloud-appt-booking-config-configure/SKILL.md +135 -0
- package/skills/health-cloud-appt-booking-url-config-configure/SKILL.md +134 -0
- package/skills/health-cloud-care-provider-affl-role-config-configure/SKILL.md +136 -0
- package/skills/health-cloud-care-provider-search-config-configure/SKILL.md +134 -0
- package/skills/health-cloud-care-requests-create/SKILL.md +178 -0
- package/skills/health-cloud-initial-configure/SKILL.md +511 -0
- package/skills/health-cloud-patient-appointment-scheduling-configure/SKILL.md +1374 -0
- package/skills/health-cloud-provider-search-settings-configure/SKILL.md +924 -0
- package/skills/health-cloud-referral-management-coordinate/SKILL.md +513 -0
- package/skills/health-cloud-timeline-configure/SKILL.md +622 -0
- package/skills/health-cloud-virtual-visit-config-configure/SKILL.md +135 -0
- package/skills/industries-account-score-settings-query/SKILL.md +78 -0
- package/skills/industries-actionable-list-data-sources-dmo-configure/SKILL.md +177 -0
- package/skills/industries-ad-product-availability-search/SKILL.md +399 -0
- package/skills/industries-advanced-account-forecast-settings-configure/SKILL.md +628 -0
- package/skills/industries-advanced-therapy-management-settings-configure/SKILL.md +73 -0
- package/skills/industries-atm-settings-starter-configure/SKILL.md +76 -0
- package/skills/industries-batch-document-ai-configure/SKILL.md +196 -0
- package/skills/industries-behavioral-health-app-settings-configure/SKILL.md +71 -0
- package/skills/industries-branch-management-settings-configure/SKILL.md +89 -0
- package/skills/industries-bre-decision-table-access-configure/SKILL.md +367 -0
- package/skills/industries-brokerage-settings-configure/SKILL.md +41 -0
- package/skills/industries-calendar-sync-settings-configure/SKILL.md +89 -0
- package/skills/industries-care-request-settings-configure/SKILL.md +218 -0
- package/skills/industries-case-management-intelligence-settings-configure/SKILL.md +54 -0
- package/skills/industries-catalog-process-attributes-products-configure/SKILL.md +380 -0
- package/skills/industries-catalog-process-fulfillment-configure/SKILL.md +216 -0
- package/skills/industries-catalog-process-intake-configure/SKILL.md +219 -0
- package/skills/industries-catalog-process-knowledge-configure/SKILL.md +153 -0
- package/skills/industries-catalog-process-preprocessor-configure/SKILL.md +168 -0
- package/skills/industries-cds-general-settings-configure/SKILL.md +69 -0
- package/skills/industries-claim-financial-settings-configure/SKILL.md +169 -0
- package/skills/industries-clinical-data-model-settings-configure/SKILL.md +136 -0
- package/skills/industries-clinical-data-model-settings-starter-configure/SKILL.md +105 -0
- package/skills/industries-collection-plan-settings-configure/SKILL.md +132 -0
- package/skills/industries-comms-service-console-settings-configure/SKILL.md +159 -0
- package/skills/industries-compliance-configure/SKILL.md +102 -0
- package/skills/industries-compliance-document-extraction-setup-configure/SKILL.md +76 -0
- package/skills/industries-contact-center-app-layout-configure/SKILL.md +88 -0
- package/skills/industries-contact-center-components-configure/SKILL.md +96 -0
- package/skills/industries-contact-center-path-knowledge-configure/SKILL.md +95 -0
- package/skills/industries-contact-center-user-access-assign/SKILL.md +96 -0
- package/skills/industries-course-waitlist-config-configure/SKILL.md +162 -0
- package/skills/industries-crisis-center-settings-configure/SKILL.md +84 -0
- package/skills/industries-custom-object-settings-configure/SKILL.md +94 -0
- package/skills/industries-data-cloud-integration-configure/SKILL.md +88 -0
- package/skills/industries-data-space-feature-mappings-configure/SKILL.md +245 -0
- package/skills/industries-decision-matrix-builder-configure/SKILL.md +78 -0
- package/skills/industries-decision-table-hbase-configure/SKILL.md +87 -0
- package/skills/industries-decision-table-version-configure/SKILL.md +74 -0
- package/skills/industries-decision-tables-builder-configure/SKILL.md +253 -0
- package/skills/industries-decision-tables-configure/SKILL.md +439 -0
- package/skills/industries-energy-utilities-configure/SKILL.md +251 -0
- package/skills/industries-eu-cloud-multisite-configure/SKILL.md +1008 -0
- package/skills/industries-eu-new-connections-configure/SKILL.md +30 -0
- package/skills/industries-explainability-msg-template-configure/SKILL.md +135 -0
- package/skills/industries-expression-set-message-token-configure/SKILL.md +135 -0
- package/skills/industries-field-service-settings-configure/SKILL.md +82 -0
- package/skills/industries-form-framework-settings-configure/SKILL.md +30 -0
- package/skills/industries-fsc-ai-settings-configure/SKILL.md +57 -0
- package/skills/industries-fsc-association-engine-settings-configure/SKILL.md +172 -0
- package/skills/industries-fsc-b2b-settings-configure/SKILL.md +61 -0
- package/skills/industries-fsc-insurance-settings-configure/SKILL.md +58 -0
- package/skills/industries-fsc-visa-fulfillment-setup-configure/SKILL.md +103 -0
- package/skills/industries-fsc-wealth-agent-settings-configure/SKILL.md +117 -0
- package/skills/industries-fsc-wealth-settings-configure/SKILL.md +99 -0
- package/skills/industries-fundraising-gift-entry-settings-configure/SKILL.md +120 -0
- package/skills/industries-fundraising-rfm-configure/SKILL.md +128 -0
- package/skills/industries-fundraising-settings-configure/SKILL.md +145 -0
- package/skills/industries-fundraising-source-code-gen-configure/SKILL.md +299 -0
- package/skills/industries-google-maps-api-key-settings-configure/SKILL.md +87 -0
- package/skills/industries-grantmaking-intelligence-settings-open/SKILL.md +58 -0
- package/skills/industries-hc-score-category-settings-configure/SKILL.md +167 -0
- package/skills/industries-health-engagement-settings-configure/SKILL.md +218 -0
- package/skills/industries-home-health-agentforce-setup-configure/SKILL.md +131 -0
- package/skills/industries-home-health-bundling-policy-create/SKILL.md +50 -0
- package/skills/industries-home-health-entity-labels-configure/SKILL.md +29 -0
- package/skills/industries-home-health-fsl-package-deploy/SKILL.md +71 -0
- package/skills/industries-home-health-fsl-settings-validate/SKILL.md +27 -0
- package/skills/industries-home-health-guided-setup-care-and-skill-get/SKILL.md +80 -0
- package/skills/industries-home-health-guided-setup-configure/SKILL.md +836 -0
- package/skills/industries-home-health-guided-setup-enable-org-fsl-get/SKILL.md +55 -0
- package/skills/industries-home-health-guided-setup-get-org-ready-get/SKILL.md +61 -0
- package/skills/industries-home-health-licenses-assign/SKILL.md +27 -0
- package/skills/industries-home-health-operating-hours-create/SKILL.md +40 -0
- package/skills/industries-home-health-scheduling-policy-create/SKILL.md +41 -0
- package/skills/industries-home-health-service-objective-create/SKILL.md +22 -0
- package/skills/industries-home-health-skills-create/SKILL.md +31 -0
- package/skills/industries-home-health-users-create/SKILL.md +29 -0
- package/skills/industries-icm-act3-toggles-configure/SKILL.md +198 -0
- package/skills/industries-icm-act5-genai-suggested-assessments-configure/SKILL.md +361 -0
- package/skills/industries-icm-act6-mcg-integration-configure/SKILL.md +550 -0
- package/skills/industries-integrated-care-management-configure/SKILL.md +168 -0
- package/skills/industries-object-enablement-configure/SKILL.md +86 -0
- package/skills/industries-tpm-system-processing-service-configure/SKILL.md +64 -0
- package/skills/insurance-brokerage-agency-billing-configure/SKILL.md +1 -3
- package/skills/integration-apex-settings-configure/SKILL.md +61 -0
- package/skills/marketing-e360-email-archiving-configure/SKILL.md +73 -0
- package/skills/marketing-message-test/SKILL.md +1 -3
- package/skills/nonprofit-fundraising-configure/SKILL.md +240 -0
- package/skills/nonprofit-fundraising-configure/references/gotchas.md +26 -0
- package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +678 -0
- package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +35 -0
- package/skills/nonprofit-volunteer-management-model-get/SKILL.md +166 -0
- package/skills/nonprofit-volunteer-management-model-get/references/entities.md +315 -0
- package/skills/nonprofit-volunteer-management-model-get/references/relationships.md +175 -0
- package/skills/nonprofit-volunteer-management-model-get/references/themes.md +143 -0
- package/skills/nonprofit-volunteer-management-records-create/SKILL.md +121 -0
- package/skills/nonprofit-volunteer-management-records-create/references/field-guide.md +284 -0
- package/skills/nonprofit-volunteer-management-records-create/references/mcp-invocation.md +248 -0
- package/skills/nonprofit-volunteer-management-records-create/references/review-format.md +140 -0
- package/skills/nonprofit-volunteer-management-records-create/scripts/expand-series.py +632 -0
- package/skills/nonprofit-volunteer-management-records-create/scripts/render-review-table.py +419 -0
- package/skills/nonprofit-volunteer-management-records-create/scripts/tests/test_expand_series.py +690 -0
- package/skills/nonprofit-volunteer-management-records-create/scripts/tests/test_render_review_table.py +421 -0
- package/skills/nonprofit-volunteer-management-structure-generate/SKILL.md +119 -0
- package/skills/nonprofit-volunteer-management-structure-generate/references/configuration-decisions.md +159 -0
- package/skills/nonprofit-volunteer-management-structure-generate/references/discovery-interview.md +137 -0
- package/skills/nonprofit-volunteer-management-structure-generate/references/edge-cases.md +48 -0
- package/skills/nonprofit-volunteer-management-structure-generate/references/mcp-invocation.md +75 -0
- package/skills/nonprofit-volunteer-management-structure-generate/references/plan-output.md +141 -0
- package/skills/platform-custom-field-generate/SKILL.md +1 -0
- package/skills/platform-custom-field-generate/references/advanced-picklists.md +5 -5
- package/skills/platform-custom-metadata-type-generate/SKILL.md +3 -0
- package/skills/platform-custom-object-generate/SKILL.md +4 -0
- package/skills/platform-custom-permissions-configure/SKILL.md +687 -0
- package/skills/platform-custom-setting-generate/SKILL.md +3 -0
- package/skills/platform-datamask-run/SKILL.md +1 -5
- package/skills/platform-label-workbench-import-create/SKILL.md +67 -0
- package/skills/platform-permission-set-generate/SKILL.md +3 -0
- package/skills/platform-privacy-agent-settings-configure/SKILL.md +752 -0
- package/skills/platform-salesforce-connect-adapter-generate/SKILL.md +1 -3
- package/skills/platform-sandbox-configure/SKILL.md +1 -3
- package/skills/platform-value-set-generate/SKILL.md +3 -0
- package/skills/sales-call-scoring-configure/SKILL.md +1 -5
- package/skills/service-agentforce-channel-configure/SKILL.md +1 -3
- package/skills/service-agentforce-human-escalation-configure/SKILL.md +1 -3
- package/skills/service-catalog-template-coordinate/SKILL.md +1 -3
- package/skills/service-concierge-portal-generate/SKILL.md +1 -3
- package/skills/service-email-to-case-configure/SKILL.md +1 -5
- package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +1 -5
- package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +1 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -3
- package/skills/service-itsm-agentic-setup-uel-user-create/SKILL.md +1 -9
- package/skills/service-itsm-incident-mgmt-configure/SKILL.md +1 -5
- package/skills/service-itsm-incident-priority-configure/SKILL.md +1 -3
- package/skills/service-itsm-slack-itservice-configure/SKILL.md +1 -3
- package/skills/service-itsm-swarming-configure/SKILL.md +1 -3
- package/skills/service-itsm-teams-configure/SKILL.md +1 -3
- package/skills/service-itsm-teams-debug/SKILL.md +1 -3
- package/skills/service-itsm-teams-employee-agent-configure/SKILL.md +1 -3
- package/skills/service-itsm-teams-itdesk-configure/SKILL.md +1 -3
- package/skills/service-itsm-teams-itservice-configure/SKILL.md +1 -3
- package/skills/service-native-voice-recording-transcription-configure/SKILL.md +1 -3
- package/skills/service-omni-agent-users-create/SKILL.md +1 -3
- package/skills/service-omni-agent-work-sharing-configure/SKILL.md +1 -3
- package/skills/service-omni-attribute-routing-configure/SKILL.md +1 -3
- package/skills/service-omni-base-settings-configure/SKILL.md +1 -3
- package/skills/service-omni-channel-inventory-analyze/SKILL.md +1 -3
- package/skills/service-omni-channel-limits-analyze/SKILL.md +1 -3
- package/skills/service-omni-channel-setup-coordinate/SKILL.md +1 -3
- package/skills/service-omni-command-center-analyze/SKILL.md +1 -3
- package/skills/service-omni-command-center-configure/SKILL.md +1 -3
- package/skills/service-omni-permission-set-assign/SKILL.md +1 -3
- package/skills/service-omni-presence-status-deploy/SKILL.md +1 -3
- package/skills/service-omni-presence-user-config-deploy/SKILL.md +1 -3
- package/skills/service-omni-queue-deploy/SKILL.md +1 -3
- package/skills/service-omni-queue-members-assign/SKILL.md +1 -3
- package/skills/service-omni-queue-routing-config-deploy/SKILL.md +1 -3
- package/skills/service-omni-routing-flow-deploy/SKILL.md +1 -3
- package/skills/service-omni-service-channel-configure/SKILL.md +1 -3
- package/skills/service-omni-sidebar-configure/SKILL.md +1 -3
- package/skills/service-omni-skills-based-routing-configure/SKILL.md +1 -3
- package/skills/service-omni-supervisor-config-deploy/SKILL.md +1 -3
- package/skills/service-omni-supervisor-permset-assign/SKILL.md +1 -3
- package/skills/service-omni-supervisor-surface-deploy/SKILL.md +1 -3
- package/skills/service-omni-supervisor-users-create/SKILL.md +1 -3
- package/skills/service-omni-work-skill-routing-configure/SKILL.md +1 -3
- package/skills/tableau-next-asset-create/README.md +0 -65
|
@@ -12,9 +12,7 @@ metadata:
|
|
|
12
12
|
semver: ">=20.17.0"
|
|
13
13
|
- tool: ["sf"]
|
|
14
14
|
semver: ">=2.0.0"
|
|
15
|
-
accessCheck:
|
|
16
|
-
- type: license
|
|
17
|
-
value: "CGCRetailAndTPMMgmtPsl"
|
|
15
|
+
accessCheck: "License.CGCRetailAndTPMMgmtPsl"
|
|
18
16
|
---
|
|
19
17
|
|
|
20
18
|
# Deploy the Promotion BO API
|
|
@@ -32,16 +30,13 @@ three REST endpoints:
|
|
|
32
30
|
- `POST /services/apexrest/<prefix>/promotions/ingest`
|
|
33
31
|
- `GET /services/apexrest/<prefix>/promotions/status?importId=...`
|
|
34
32
|
|
|
35
|
-
It is meant for **headless delivery**: point it at an org, answer the interview,
|
|
36
|
-
and the skill installs the step and verifies it. The Promotion BO API ships in
|
|
37
|
-
the CGCloud **managed package** (namespace `cgcloud` released, `cgcloud_dev`
|
|
38
|
-
dev/beta). Every Apex identifier, object/field API name, and REST URL is derived
|
|
39
|
-
from the detected package prefix at runtime — this skill never hard-codes it.
|
|
33
|
+
It is meant for **headless delivery**: point it at an org, answer the interview, the skill installs and verifies the step. The Promotion BO API ships in the CGCloud **managed package** (`cgcloud` released, `cgcloud_dev` dev/beta). Every Apex identifier, object/field API name, and REST URL is derived from the detected package prefix at runtime.
|
|
40
34
|
|
|
41
35
|
`derive` is out of scope here (a follow-up skill covers it). Detailed runbooks
|
|
42
36
|
for the write and smoke phases live under `references/`:
|
|
43
37
|
|
|
44
|
-
- `references/
|
|
38
|
+
- `references/preflight-and-seed-queries.md` — Phase 1/2/3 SOQL (TPM entitlement, permset gate, framework-state verification, static-resource retrieve recipe, batch-chain polling).
|
|
39
|
+
- `references/conventions-and-payload-rules.md` — sales-org partitioning, schema-first contract derivation, and the nine cross-workflow payload rules R1–R9.
|
|
45
40
|
- `references/generate-and-wire.md` — Phase 5a (generate + deploy the class) and Phase 5b (register + wire the step), with the full `register-step.apex`.
|
|
46
41
|
- `references/smoke-and-verify.md` — Phase 6 (contract derivation, payload materialization, create/update/copy legs + verification).
|
|
47
42
|
- `references/reference-example-set-comment-value.md` — the shipped `SetCommentValue` preset (assets at `assets/set-comment-value/`).
|
|
@@ -83,50 +78,19 @@ Every Apex call is `${PREFIX_DOT}ClassName.method(...)`; every SOQL object/field
|
|
|
83
78
|
Run these and stop on the first failure.
|
|
84
79
|
|
|
85
80
|
1. `sf --version`; `node --version` (only if running shipped scripts).
|
|
86
|
-
2. `sf org display --target-org <alias> --json` — confirm reachable
|
|
87
|
-
3. Validate
|
|
88
|
-
4. **TPM entitlement (Permission Set License)** — the
|
|
89
|
-
|
|
90
|
-
SELECT Id FROM PermissionSetLicenseAssign
|
|
91
|
-
WHERE Assignee.Username = '<running-user-name>'
|
|
92
|
-
AND PermissionSetLicense.DeveloperName = 'CGCRetailAndTPMMgmtPsl'
|
|
93
|
-
```
|
|
94
|
-
On scratch/dev-hub the PSL may be legitimately unassigned; detect env with `SELECT OrganizationType, IsSandbox FROM Organization`:
|
|
95
|
-
- `OrganizationType = 'Developer Edition'` OR `IsSandbox = true` and empty → **warn** ("permset gate below is the real check"), continue.
|
|
96
|
-
- Any other org shape and empty → **stop** ("TPM Permission Set License `CGCRetailAndTPMMgmtPsl` not assigned to the running user").
|
|
97
|
-
5. **Running-user permission set (TPM Admin persona)** — the setup needs a permission set granting the *TPM Master Data Admin* persona. The shipped permset is `TPM_Master_Data_Admin` (packaged; `PermissionSet.Name` is the bare name regardless of namespace), but **customers frequently clone it** under their own name — so treat a miss as "ask", not "fail". Take `<running-user-name>` from `sf org display ... .result.username`:
|
|
98
|
-
```sql
|
|
99
|
-
SELECT PermissionSet.Name, PermissionSet.Label FROM PermissionSetAssignment
|
|
100
|
-
WHERE Assignee.Username = '<running-user-name>'
|
|
101
|
-
AND (PermissionSet.Name = 'TPM_Master_Data_Admin'
|
|
102
|
-
OR PermissionSet.Label LIKE '%TPM%Master Data Admin%')
|
|
103
|
-
```
|
|
104
|
-
Match → proceed. No match → **do not hard-fail on the name**: show `sf org assign permset --name TPM_Master_Data_Admin --target-org <alias>` as the default option, but also ask the user to confirm whether they already hold an equivalent (possibly cloned/renamed) permission set for the TPM admin persona. Pause, wait for a cloned-permset confirmation or the assignment, then re-query. Proceed only once admin access is confirmed.
|
|
81
|
+
2. `sf org display --target-org <alias> --json` — confirm reachable; capture `instanceUrl` + org id (display/logging only). REST calls use `sf api request rest` on the CLI's stored session — the skill never extracts the access token.
|
|
82
|
+
3. Validate sales org locally: length 4, uppercase, non-blank (mirrors `TPMSetupData.validateSalesOrg`). Fail fast.
|
|
83
|
+
4. **TPM entitlement (Permission Set License)** — the `CGCRetailAndTPMMgmtPsl` PSL assignment on the running user. SOQL + warn/stop routing in `references/preflight-and-seed-queries.md` Step 4.
|
|
84
|
+
5. **Running-user permission set (TPM Admin persona)** — the running user must hold `TPM_Master_Data_Admin` (or a clone matching `%TPM%Master Data Admin%`); if missing, offer `sf org assign permset --name TPM_Master_Data_Admin --target-org <alias>` and wait. SOQL in `references/preflight-and-seed-queries.md` Step 5. Proceed only once admin access is confirmed.
|
|
105
85
|
6. Namespace discovery (above).
|
|
86
|
+
7. **Running user's `${PREFIX_UNDER}Sales_Org__c` equals `<salesOrg>`.** Blank throws `SOU0003`; mismatch surfaces as "not found" (create/update) or `TransformationError` (copy). SOQL in `references/preflight-and-seed-queries.md` Step 7. Blank or `!= '<salesOrg>'` → stop; fix on the user record only. See `references/conventions-and-payload-rules.md` R6; category access is preflighted in Phase 6 per R9.
|
|
106
87
|
|
|
107
88
|
## Phase 2 — Verify BO API framework state
|
|
108
89
|
|
|
109
|
-
Read-only; tells you whether Phase 3 needs to run.
|
|
110
|
-
scoped
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
# 1. Workflow rows for this sales org (expect 4: create/update/copy/derive)
|
|
114
|
-
sf data query --target-org <alias> --json --query "
|
|
115
|
-
SELECT Name FROM ${PREFIX_UNDER}BO_API_Workflow__c
|
|
116
|
-
WHERE ${PREFIX_UNDER}BO_API__r.Name = 'Promotion'
|
|
117
|
-
AND ${PREFIX_UNDER}BO_API__r.${PREFIX_UNDER}Sales_Org__c = '<salesOrg>'"
|
|
118
|
-
|
|
119
|
-
# 2. Step rows for this sales org
|
|
120
|
-
sf data query --target-org <alias> --json --query "
|
|
121
|
-
SELECT COUNT(Id) FROM ${PREFIX_UNDER}BO_API_Workflow_Step__c
|
|
122
|
-
WHERE ${PREFIX_UNDER}Sales_Org__c = '<salesOrg>'"
|
|
123
|
-
|
|
124
|
-
# 3. Junction rows whose parent workflow belongs to a Promotion BO API for this sales org
|
|
125
|
-
sf data query --target-org <alias> --json --query "
|
|
126
|
-
SELECT COUNT(Id) FROM ${PREFIX_UNDER}BO_API_Workflow_Workflow_Step__c
|
|
127
|
-
WHERE ${PREFIX_UNDER}BO_API_Workflow__r.${PREFIX_UNDER}BO_API__r.Name = 'Promotion'
|
|
128
|
-
AND ${PREFIX_UNDER}BO_API_Workflow__r.${PREFIX_UNDER}BO_API__r.${PREFIX_UNDER}Sales_Org__c = '<salesOrg>'"
|
|
129
|
-
```
|
|
90
|
+
Read-only; tells you whether Phase 3 needs to run. Run the three
|
|
91
|
+
sales-org-scoped SOQL queries in `references/preflight-and-seed-queries.md`
|
|
92
|
+
("Phase 2 — Verify BO API framework state"): workflow rows, step row count,
|
|
93
|
+
junction row count — all scoped to `<salesOrg>`.
|
|
130
94
|
|
|
131
95
|
- Zero workflow rows → fresh for this sales org, Phase 3 will seed.
|
|
132
96
|
- Full state (4 workflow rows `create/update/copy/derive`; >0 step + junction rows) → Phase 3 is a no-op for this sales org (still run for idempotency; 3a shows zero net-new).
|
|
@@ -138,27 +102,10 @@ The workflows/steps/junctions/entities/input-structures ship as CSVs inside the
|
|
|
138
102
|
packaged `TPMSetupData` static resource; `TPMSetupData.setupBOApi` reads and
|
|
139
103
|
upserts them. Before running it, show the user what will land.
|
|
140
104
|
|
|
141
|
-
1. Locate the resource
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
FROM StaticResource WHERE Name = 'TPMSetupData'"
|
|
146
|
-
```
|
|
147
|
-
Zero rows → stop ("TPMSetupData static resource not found — is the CGCloud package installed?"). Multiple rows → prefer the one whose `NamespacePrefix` matches Phase 1; if prefixes disagree, stop and ask.
|
|
148
|
-
2. **Retrieve + expand the resource cross-platform via SFDX** — use `sf project retrieve`, which unpacks a zip StaticResource into a folder on every OS (no `curl`, no `unzip` — `unzip` isn't present on Windows by default). Retrieve into a **dedicated `setup-data/` subproject** so the read-only managed resource never mixes into the Phase-5a deploy tree (`./.promotion-bo-api-deploy/force-app`, which is what gets deployed back):
|
|
149
|
-
```bash
|
|
150
|
-
mkdir -p ./.promotion-bo-api-deploy/setup-data/force-app/main/default
|
|
151
|
-
printf '{ "packageDirectories": [{ "path": "force-app", "default": true }], "sourceApiVersion": "60.0" }' \
|
|
152
|
-
> ./.promotion-bo-api-deploy/setup-data/sfdx-project.json
|
|
153
|
-
( cd ./.promotion-bo-api-deploy/setup-data && sf project retrieve start \
|
|
154
|
-
--metadata "StaticResource:${PREFIX_UNDER}TPMSetupData" --target-org <alias> --json )
|
|
155
|
-
```
|
|
156
|
-
Non-success → stop, print `result` errors.
|
|
157
|
-
3. SFDX expands the zip to `./.promotion-bo-api-deploy/setup-data/force-app/main/default/staticresources/${PREFIX_UNDER}TPMSetupData/BOApi/`. `ls` it. Expected: `0_BO_API__c.csv`, `0_BO_API_Entity__c.csv`, `0_BO_API_Output_Entity__c.csv`, `0_BO_API_Workflow__c.csv`, `0_BO_API_Workflow_Entity__c.csv`, `0_BO_API_Workflow_Step__c.csv`, `0_BO_API_Workflow_Workflow_Step__c.csv`, `0_BO_API_Step_Input_Structure__c.csv`, `import.json`. Any missing → stop, print the delta.
|
|
158
|
-
4. Confirm each target sObject exists: `sf sobject describe --sobject '${PREFIX_UNDER}BO_API_Workflow__c' --target-org <alias> > /dev/null` (etc.). Any describe failure → stop (package partially installed).
|
|
159
|
-
5. Show a summary (row counts per object; total ~232 rows across 8 objects; "upsert on Unique_Key__c — re-running is idempotent"), plus the first 3 rows of `0_BO_API_Workflow__c.csv` and `0_BO_API_Workflow_Step__c.csv` with `{{NS}}`/`{{SALES_ORG}}` substituted.
|
|
160
|
-
6. Wait for confirmation unless `--yes`. "no"/blank → abort clean, point at `./.promotion-bo-api-deploy/setup-data/force-app/main/default/staticresources/${PREFIX_UNDER}TPMSetupData/BOApi/`.
|
|
161
|
-
7. On `--dry-run` → stop here; do not run 3b.
|
|
105
|
+
1. Locate + retrieve the `TPMSetupData` static resource into a dedicated `setup-data/` subproject (keeps the read-only managed resource out of the Phase-5a deploy tree at `./.promotion-bo-api-deploy/force-app`), then confirm each target sObject exists. SOQL + the full retrieve recipe + 8-CSV manifest + describe loop are in `references/preflight-and-seed-queries.md` ("Phase 3a — Retrieve the packaged seed"). Any step failing → stop with the printed delta/error.
|
|
106
|
+
2. Show row counts per object (total ~232 rows across 8 objects; "upsert on `Unique_Key__c` — idempotent") + first 3 rows of `0_BO_API_Workflow__c.csv` and `0_BO_API_Workflow_Step__c.csv` with `{{NS}}`/`{{SALES_ORG}}` substituted.
|
|
107
|
+
3. Wait for confirmation unless `--yes`. "no"/blank → abort clean, point at the retrieved BOApi/ directory.
|
|
108
|
+
4. On `--dry-run` → stop here; do not run 3b.
|
|
162
109
|
|
|
163
110
|
## Phase 3b — Apply the default seed
|
|
164
111
|
|
|
@@ -166,17 +113,8 @@ Only after 3a confirmation.
|
|
|
166
113
|
|
|
167
114
|
1. `PHASE3_START=$(date -u +%FT%TZ)`.
|
|
168
115
|
2. Run metadata-wizard setup via anon Apex: `${PREFIX_DOT}TPMSetupData.setupMetadataWizard('<salesOrg>');` → `sf apex run --target-org <alias> --file ./.promotion-bo-api-deploy/setup-metadata-wizard.apex`.
|
|
169
|
-
3. Wait for the
|
|
170
|
-
|
|
171
|
-
sf data query --target-org <alias> --json --query "
|
|
172
|
-
SELECT COUNT() FROM AsyncApexJob
|
|
173
|
-
WHERE ApexClass.Name = 'GenericDemoSetupDataBatch'
|
|
174
|
-
AND CreatedDate >= ${PHASE3_START}
|
|
175
|
-
AND Status NOT IN ('Completed','Failed','Aborted')"
|
|
176
|
-
```
|
|
177
|
-
Sleep 5s between polls; break when count is zero for **two consecutive** polls (covers the gap between a parent's `finish()` and the child's `AsyncApexJob` row appearing).
|
|
178
|
-
4. Final check — every child succeeded (`SELECT Id, Status, NumberOfErrors, ExtendedStatus FROM AsyncApexJob WHERE ApexClass.Name = 'GenericDemoSetupDataBatch' AND CreatedDate >= ${PHASE3_START}`). Any `Failed`/`Aborted`/`NumberOfErrors > 0` → stop, print `ExtendedStatus`.
|
|
179
|
-
5. Repeat 2–4 for `${PREFIX_DOT}TPMSetupData.setupBOApi('<salesOrg>');`.
|
|
116
|
+
3. Wait for the batch chain. `GenericDemoSetupDataBatch` self-chains via `finish()`, so poll by class with the two-consecutive-zero break pattern + run the final `NumberOfErrors`/`ExtendedStatus` check. SOQL in `references/preflight-and-seed-queries.md` ("Phase 3b — Poll the batch chain"). Any `Failed`/`Aborted`/`NumberOfErrors > 0` → stop.
|
|
117
|
+
4. Repeat 2–3 for `${PREFIX_DOT}TPMSetupData.setupBOApi('<salesOrg>');`.
|
|
180
118
|
|
|
181
119
|
## Phase 4 — Verify the BO API framework is on
|
|
182
120
|
|
|
@@ -189,17 +127,16 @@ component failed.
|
|
|
189
127
|
## Phase 5 — Interview: what does the user want to customize?
|
|
190
128
|
|
|
191
129
|
The framework is now on. The customization is **user-supplied** — do not skip
|
|
192
|
-
the interview
|
|
130
|
+
the interview or invent an answer. Print:
|
|
193
131
|
|
|
194
132
|
```text
|
|
195
133
|
The Promotion BO API framework is installed. To add a custom step, tell me:
|
|
196
|
-
- Which BO API entity does it target? (e.g. Promotion
|
|
134
|
+
- Which BO API entity does it target? (e.g. Promotion/Tactic — I'll list registered entities)
|
|
197
135
|
- Which workflows should it fire in? (create, update, copy)
|
|
198
136
|
- What does it read from the ingest input?
|
|
199
137
|
- What does it write on the SObject or elsewhere?
|
|
200
|
-
- Any preconditions or side effects
|
|
201
|
-
|
|
202
|
-
it copies the tactic input Comment onto Tactic.Comment__c.
|
|
138
|
+
- Any preconditions or side effects?
|
|
139
|
+
Say "use the SetCommentValue reference" for a worked example.
|
|
203
140
|
```
|
|
204
141
|
|
|
205
142
|
### 5.1 — Answers to collect
|
|
@@ -207,11 +144,12 @@ it copies the tactic input Comment onto Tactic.Comment__c.
|
|
|
207
144
|
| Field | Required | Notes |
|
|
208
145
|
|---|---|---|
|
|
209
146
|
| `stepName` | yes | PascalCase Apex class name + BO API Workflow Step `Name`. Unique across `ApexClass`. |
|
|
210
|
-
| `entity` | yes | BO API entity `Name` — MUST match a row queried live from `${PREFIX_UNDER}BO_API_Entity__c` (shared, not sales-org-partitioned)
|
|
147
|
+
| `entity` | yes | BO API entity `Name` — MUST match a row queried live from `${PREFIX_UNDER}BO_API_Entity__c` (shared, not sales-org-partitioned). Typical rows include `Promotion`, `Tactic`, `ProductFilter`, `ManualInputs`, `CustomState`. Query the org — don't assume a fixed list. |
|
|
211
148
|
| `workflows` | yes | Non-empty subset of `{create, update, copy}`. `derive` is out of scope. |
|
|
212
149
|
| `actionName` | yes | Symbolic action string the class receives in `call(String action, ...)`. Convention: lowerCamelCase of `stepName`. |
|
|
213
150
|
| `inputPaths` | yes (≥1) | JSON paths to read from `currentInput`, e.g. `["Comment"]`. |
|
|
214
151
|
| `inputPathType` | yes | JSON type of the input paths — `String`, `Array`, `Boolean`, `Number`, `Object`. Drives the `RecordType` on each SIS row; a wrong value causes `TransformationError: Expected <Type>` at ingest. Different types → run Phase 5b once per type group. |
|
|
152
|
+
| `inputPathRequired` | optional | Whether `inputPaths` must appear on the ingest payload. Defaults to `false`. Drives `BO_API_Step_Input_Structure__c.Required__c` (platform default is `true` — skill always writes explicitly). See `references/generate-and-wire.md`. |
|
|
215
153
|
| `outputWrites` | yes (≥1) | `{field, source}` pairs; `field` is the target API name **without** the namespace prefix (skill adds `${PREFIX_UNDER}`), `source` references an `inputPaths` value / literal / computed expression. |
|
|
216
154
|
| `description` | yes | One-sentence step description → `${PREFIX_UNDER}Description__c` + class docstring. |
|
|
217
155
|
| `preconditions` | optional | Free-text guards before writing. |
|
|
@@ -219,33 +157,38 @@ it copies the tactic input Comment onto Tactic.Comment__c.
|
|
|
219
157
|
|
|
220
158
|
### 5.2 — Interview flow
|
|
221
159
|
|
|
222
|
-
1. **Preset shortcut.**
|
|
223
|
-
2. **Ask the questions** one at a time (or as a block); do not proceed until every required field has a
|
|
160
|
+
1. **Preset shortcut.** `--preset set-comment-value` (or "use the SetCommentValue reference") loads answers from `references/reference-example-set-comment-value.md` (`assets/set-comment-value/interview-answers.json`) and skips the interactive interview. `--interview-file <path>` loads a JSON mirroring the 5.1 table (wins over `--preset`).
|
|
161
|
+
2. **Ask the questions** one at a time (or as a block); do not proceed until every required field has a value.
|
|
224
162
|
3. **Show the entity's writeable fields** after the user names the entity:
|
|
225
163
|
```bash
|
|
226
164
|
sf sobject describe --target-org <alias> --sobject '${PREFIX_UNDER}<Entity>__c' --json \
|
|
227
165
|
| jq -r '.fields[] | select(.updateable == true and .createable == true) | .name'
|
|
228
166
|
```
|
|
229
167
|
Any `outputWrites` field must appear here; otherwise stop and ask for a different one (FLS is caller-scoped).
|
|
230
|
-
4. **Confirm the plan** (recap Class/Entity/Workflows/Reads/Writes/Sort/Description → "Deploy + wire? [y/N]"). `n`/blank → save answers to `./.promotion-bo-api-deploy/interview.json` and exit. `y` → Phase 5a.
|
|
168
|
+
4. **Confirm the plan** (recap Class/Entity/Workflows/Reads/Writes/Sort/Description → "Deploy + wire? [y/N]"). If `workflows` includes `copy`, flag that per-child input values come from the source promotion — `outputWrites` still fires but `<inputPaths>` values are ignored (only top-level fields like `Slogan` propagate). `n`/blank → save answers to `./.promotion-bo-api-deploy/interview.json` and exit. `y` → Phase 5a.
|
|
231
169
|
|
|
232
170
|
## Phases 5a / 5b — Generate + deploy, register + wire
|
|
233
171
|
|
|
234
|
-
Runbook in `references/generate-and-wire.md`. In short: guard the class name
|
|
235
|
-
idempotency; confirm target-field writeability;
|
|
236
|
-
`
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
`
|
|
172
|
+
Runbook in `references/generate-and-wire.md`. In short: guard the class name
|
|
173
|
+
for idempotency; confirm target-field writeability; clean any stale
|
|
174
|
+
`.cls`/`.cls-meta.xml` from
|
|
175
|
+
`./.promotion-bo-api-deploy/force-app/main/default/classes/` (leftovers cause a
|
|
176
|
+
silent MDAPI full-batch rollback); generate a namespace-agnostic `Callable`
|
|
177
|
+
from the interview — class **and** `call` method must be `global` (packaged
|
|
178
|
+
`CallableManager` resolves via `Type.forName` across the namespace boundary;
|
|
179
|
+
`public` fails at runtime on managed installs — see runbook); show + confirm;
|
|
180
|
+
`sf project deploy start`. Then, in one anon-Apex transaction, upsert one
|
|
181
|
+
`BO_API_Workflow_Step__c` (bare class name in `Classname__c`), one
|
|
182
|
+
`BO_API_Workflow_Workflow_Step__c` junction per chosen workflow (`derive`
|
|
183
|
+
dropped), and the `BO_API_Step_Input_Structure__c` rows (RecordType per
|
|
184
|
+
`inputPathType`, `Required__c` set explicitly from `inputPathRequired`). Both
|
|
242
185
|
upserts key on `Unique_Key__c` (idempotent).
|
|
243
186
|
|
|
244
187
|
## Phase 6 — Smoke test through the REST endpoints
|
|
245
188
|
|
|
246
189
|
Runbook in `references/smoke-and-verify.md`. Derive the payload contract per
|
|
247
190
|
invoked workflow from `BO_API_Step_Input_Structure__c` (schema-first), apply
|
|
248
|
-
rules R1–
|
|
191
|
+
rules R1–R9 from `references/conventions-and-payload-rules.md`, resolve every
|
|
249
192
|
reference in-sales-org, materialize `./out/smoke/{create,update,copy}.json`, then
|
|
250
193
|
run `initialize → ingest → poll status` for each chosen workflow. Verify via a
|
|
251
194
|
direct `BO_API_Transaction_Log__c` query (any row `!= 'Calculated'` → fail) plus
|
|
@@ -254,12 +197,11 @@ copy legs run only if the interview included them.
|
|
|
254
197
|
|
|
255
198
|
## Phase 7 — Report
|
|
256
199
|
|
|
257
|
-
Short status: org, sales org, dry-run flag; namespace prefix;
|
|
258
|
-
before/after (Phases 2 & 4); interview
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
`
|
|
262
|
-
expected, actual); manual follow-ups (`none` if clean).
|
|
200
|
+
Short status: org, sales org, dry-run flag; namespace prefix; seed rows
|
|
201
|
+
before/after (Phases 2 & 4); interview summary; deploy result + workflow-step
|
|
202
|
+
id + junction ids; smoke import ids per invoked workflow — all `Calculated`
|
|
203
|
+
with matching assertions, or exactly which failed (SOQL, expected, actual);
|
|
204
|
+
manual follow-ups (`none` if clean).
|
|
263
205
|
|
|
264
206
|
## Rules
|
|
265
207
|
|
|
@@ -269,7 +211,12 @@ expected, actual); manual follow-ups (`none` if clean).
|
|
|
269
211
|
- Never hard-code the namespace prefix — compose every Apex/SOQL/REST reference from the Phase-1 detection.
|
|
270
212
|
- Never invent Apex method signatures — use what the packaged `TPMSetupData` / `BO_API_*` objects and the shipping REST endpoints declare.
|
|
271
213
|
- The seeded BO API metadata is packaged content — preview it and get user confirmation before invoking `TPMSetupData.setupBOApi`.
|
|
272
|
-
- Never invent an interview answer. Absent a user and
|
|
273
|
-
- Never wire a workflow the interview did not include. `create`/`update`/`copy` are
|
|
214
|
+
- Never invent an interview answer. Absent a user and `--preset`/`--interview-file`, stop and print the questions.
|
|
215
|
+
- Never wire a workflow the interview did not include. `create`/`update`/`copy` are opt-in; `derive` is always excluded.
|
|
274
216
|
- Never compose a smoke payload from a hard-coded template — derive accepted paths per workflow from `BO_API_Step_Input_Structure__c` and validate user input against that contract first.
|
|
275
217
|
- Never resolve a reference value without the sales-org filter. A record under a different sales org is not valid for this invocation.
|
|
218
|
+
- Never generate a `Callable` step class with `public` visibility — declare the class and the `call` method `global`. `public` works only on same-namespace dev orgs and fails on managed installs with `Type "<stepName>" does not exist`; the transaction log shows a generic `Error`. See `references/generate-and-wire.md`.
|
|
219
|
+
- Never re-use `./.promotion-bo-api-deploy/force-app/main/default/classes/` across step deploys — remove the prior step's `.cls`/`.cls-meta.xml` first. A stale file triggers a silent MDAPI full-batch rollback while the CLI still reports `"created": true`.
|
|
220
|
+
- Never insert a `BO_API_Step_Input_Structure__c` row without setting `Required__c` explicitly. The platform defaults it to `true`; the skill defaults `false` and only opts in when `inputPathRequired` is set. Omitting the field silently makes every optional path mandatory.
|
|
221
|
+
- Never proceed past Phase 1 without confirming the running user's `${PREFIX_UNDER}Sales_Org__c` equals `<salesOrg>` — blank throws `SOU0003`; mismatch surfaces as "not found" (create/update) or `TransformationError` (copy). Fix on the user record only. See `references/conventions-and-payload-rules.md` R6.
|
|
222
|
+
- Never ingest a payload whose `ProductFilter.Criteria.<level>` references categories the running user lacks `Product_Category_Share__c` `Access_Level__c='ReadWrite'` on — Phase 6 preflight per `references/conventions-and-payload-rules.md` R9. Do not silently insert share rows.
|
package/skills/consumer-goods-promotion-bo-api-deploy/references/conventions-and-payload-rules.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Conventions & payload rules (Promotion BO API)
|
|
2
2
|
|
|
3
|
-
Load-bearing conventions and the
|
|
3
|
+
Load-bearing conventions and the nine cross-workflow payload rules the
|
|
4
4
|
`BO_API_Step_Input_Structure__c` schema alone cannot express. The main
|
|
5
5
|
`SKILL.md` references this file from Phase 5b (registering input paths) and
|
|
6
6
|
Phase 6 (composing/validating smoke payloads).
|
|
@@ -33,8 +33,8 @@ subscriber orgs, or the dev-package prefix).
|
|
|
33
33
|
| `PromotionTemplate` | `<prefix>__Promotion_Template__c` | `Name = <val> AND <prefix>__Sales_Org__c = <sales-org>` |
|
|
34
34
|
| `Tactics[*].TacticTemplate` | `<prefix>__Tactic_Template__c` | `Name = <val> AND <prefix>__Sales_Org__c = <sales-org>` (and linked to the chosen PromotionTemplate via `<prefix>__Promotion_Template_Tactic_Template__c`) |
|
|
35
35
|
| `AnchorAccount` | `Account` | `<prefix>__ExternalId__c = <val> AND <prefix>__Sales_Org__c = <sales-org>` |
|
|
36
|
-
| `ProductFilter.Criteria.Brand[*]`, `.Category[*]`, `.Subcategory[*]`, `.Flavor[*]`, `.Package[*]` | `<prefix>__Product_Attribute__c` (or Category equivalents) |
|
|
37
|
-
| `ProductFilter.{Included,Excluded}Products[*]` | `Product2` |
|
|
36
|
+
| `ProductFilter.Criteria.Brand[*]`, `.Category[*]`, `.Subcategory[*]`, `.Flavor[*]`, `.Package[*]` | `<prefix>__Product_Attribute__c` (or Category equivalents) | `<prefix>__Consumer_Goods_External_Product_Id__c = <val> AND <prefix>__Sales_Org__c = <sales-org>` — resolve against external id, NOT `Name`/label (see R3b). |
|
|
37
|
+
| `ProductFilter.{Included,Excluded}Products[*]` | `Product2` | `<prefix>__Consumer_Goods_External_Product_Id__c = <val> AND <prefix>__Sales_Org__c = <sales-org>` |
|
|
38
38
|
| `PromotionAccountSet` / `AnchorAccountSet` | `<prefix>__Account_Set__c` | `Name = <val> AND <prefix>__Sales_Org__c = <sales-org>` |
|
|
39
39
|
|
|
40
40
|
Fail-fast — before any REST call — if any user-supplied reference does not
|
|
@@ -81,7 +81,7 @@ required columns).
|
|
|
81
81
|
## Promotion payload — cross-workflow rules the schema cannot express
|
|
82
82
|
|
|
83
83
|
The `BO_API_Step_Input_Structure__c` contract declares WHICH keys the workflow
|
|
84
|
-
accepts and which are `Required__c=true`, but
|
|
84
|
+
accepts and which are `Required__c=true`, but nine additional constraints govern
|
|
85
85
|
whether a create/update/copy/derive call will actually succeed. Enforce them
|
|
86
86
|
BEFORE the REST call — otherwise the request 202s, then dies asynchronously
|
|
87
87
|
inside a workflow step with a `BO_API_Transaction_Log__c.Status__c = 'Error'`.
|
|
@@ -124,10 +124,45 @@ translate. Sending a Product2 field API name (e.g. `<prefix>__Criterion_1_Produc
|
|
|
124
124
|
as a key fails schema validation with `"Properties other than those defined were
|
|
125
125
|
not expected at #.ProductFilter.Criteria.<key>"`.
|
|
126
126
|
|
|
127
|
+
Two placement/identifier constraints the schema alone cannot express:
|
|
128
|
+
|
|
129
|
+
**R3a. `ProductFilter` is a top-level promotion field, NOT nested under `Tactics[]`.**
|
|
130
|
+
Every entry in `promotions[]` may carry a `ProductFilter` sibling to
|
|
131
|
+
`Slogan`/`DateFrom`/`Tactics`. Nesting the block under `Tactics[i]` is
|
|
132
|
+
schema-valid at ingest but fails downstream with
|
|
133
|
+
`"You must select at least one Category to the Promotion"` — the same error a
|
|
134
|
+
missing block produces. Trial-and-error empirically discovers this;
|
|
135
|
+
document once here so the skill never emits the wrong shape:
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
"promotions": [{
|
|
139
|
+
"PromotionTemplate": "Customer Promotion",
|
|
140
|
+
"DateFrom": "2026-08-01",
|
|
141
|
+
"DateThru": "2026-08-31",
|
|
142
|
+
"Slogan": "...",
|
|
143
|
+
"ProductFilter": {
|
|
144
|
+
"Criteria": { "Category": ["<external-id>"] }
|
|
145
|
+
},
|
|
146
|
+
"Tactics": [ /* no ProductFilter here */ ]
|
|
147
|
+
}]
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**R3b. Criteria values are `<prefix>__Consumer_Goods_External_Product_Id__c` external ids, NOT `Name`/label.**
|
|
151
|
+
Every value inside `ProductFilter.Criteria.<level>[]` is resolved against the
|
|
152
|
+
category/attribute record's *external id* — the packaged
|
|
153
|
+
`<prefix>__Consumer_Goods_External_Product_Id__c` field — NOT the display
|
|
154
|
+
`Name` or label. Passing a Name (e.g. `"Chips (Canada Food)"`) yields
|
|
155
|
+
`TransformationError: Could not find Products: <Name>` at ingest, and the
|
|
156
|
+
misleading message suggests the underlying products are inactive when the real
|
|
157
|
+
defect is the identifier field. The correct value for the same record is its
|
|
158
|
+
external id (e.g. `Chips_Canada_Food`). Resolve every criteria value against
|
|
159
|
+
external ids in the sales org before emitting the payload; if the user typed a
|
|
160
|
+
Name, offer the external-id match(es) and ask to confirm.
|
|
161
|
+
|
|
127
162
|
```json
|
|
128
163
|
"ProductFilter": {
|
|
129
164
|
"Criteria": {
|
|
130
|
-
"Category": ["
|
|
165
|
+
"Category": ["Chips_Canada_Food"],
|
|
131
166
|
"Brand": ["YetiBar"]
|
|
132
167
|
}
|
|
133
168
|
}
|
|
@@ -216,6 +251,12 @@ then layer the Apex-only preconditions:
|
|
|
216
251
|
**Copy:**
|
|
217
252
|
- Schema-required: `.Id` (source promotion).
|
|
218
253
|
- Apex-only: source promotion's template must have `Is_Copyable__c = true`; template `Promotion_Type__c` must equal `'Promotion'`; if template `Anchor_Type__c = 'Customer'`, `.AnchorAccount` must resolve in the sales org; if `'CustomerSet'`, `.AnchorAccountSet` must resolve.
|
|
254
|
+
- Apex-only: **the running `User.Sales_Org__c` MUST equal the source PromotionTemplate's `Sales_Org__c`.** `Promotion2BoApiCoreCommon.loadPromotion` (invoked with `Operation.Copy`; the legacy shim `PromotionBoApiCopyCoreWorkflowSteps.loadPromotionBOForCopy2` delegates into the same method) throws `TransformationError: The User and the Promotion Template must have the same Sales org` when they differ, with no hint that the running user is the fix path. Create/update do not enforce this specific check, but they still resolve the operating sales org from the running user's `Sales_Org__c` via `SalesOrganizationUtil.getUserSalesOrganizationName` — a blank or mismatched value there fails every workflow, just less loudly (with `SOU0003` or misleading "not found" errors). SKILL.md Phase 1 step 7 gates the whole invocation on this match before any workflow runs; also verify at Phase 6 immediately before every ingest in case the user's `Sales_Org__c` drifted between phases. Zero-cost SOQL:
|
|
255
|
+
```sql
|
|
256
|
+
SELECT Id, Username, ${PREFIX_UNDER}Sales_Org__c FROM User WHERE Username = '<running-user-name>' LIMIT 1
|
|
257
|
+
```
|
|
258
|
+
If it does not match, do not silently mutate the user record — refuse and print the fix options.
|
|
259
|
+
- **Copy ignores per-child input values on `Tactics[]`.** On `copy`, the framework sources per-child values from the source record's children — the payload's `Tactics[i].<field>` is accepted by the schema but has no effect on the cloned children. Custom step `outputWrites` still fire, but their input values come from the source child, not the copy payload. Only top-level promotion fields (e.g. `Slogan`) propagate from the copy payload. This is intentional and documented; the skill's confirm banner in SKILL.md Phase 5.5 must call this out so users do not expect a `create`-style customization to apply.
|
|
219
260
|
|
|
220
261
|
**Derive:**
|
|
221
262
|
- Schema-required: `.Id`, `.PromotionTemplate`, `.AnchorAccount` — all at the derive input root (`currentInput`), not nested (`PBACWS_REQUIRED_PROP_MISSING` fires against `Path__c` verbatim).
|
|
@@ -266,6 +307,42 @@ SELECT Id, Name, <prefix>__Promotion_Type__c
|
|
|
266
307
|
Reject any row where `Promotion_Type__c != 'Promotion'` with:
|
|
267
308
|
`"Promotion template <name> has Promotion_Type__c='<type>'; this workflow only supports templates with Promotion_Type__c='Promotion'. Sellable Promotions belong to the retail path."`
|
|
268
309
|
|
|
310
|
+
### R9. Running user must hold `Product_Category_Share__c` ReadWrite on every referenced category
|
|
311
|
+
|
|
312
|
+
`Promotion2BoApiCoreCommon.setPromotionAnchor` (invoked by every workflow that
|
|
313
|
+
resolves a promotion anchor) calls `ProductCategoryShareService.getCategoryAccessBySalesOrgUserAnchorCategory`
|
|
314
|
+
and hard-fails when the running user does not have a `<prefix>__Product_Category_Share__c`
|
|
315
|
+
row with `<prefix>__Access_Level__c = 'ReadWrite'` for each category the payload
|
|
316
|
+
references — either via the promotion template's anchor category, via
|
|
317
|
+
`ProductFilter.Criteria.Category`, or via `Included/ExcludedProducts` whose
|
|
318
|
+
category rolls up to a share-guarded category in the sales org. The error surfaces
|
|
319
|
+
at ingest as `Access Denied` / `TransformationError: You do not have access to
|
|
320
|
+
the category '<name>'` and does not identify the missing share row.
|
|
321
|
+
|
|
322
|
+
Fail-fast before any REST call:
|
|
323
|
+
|
|
324
|
+
`<userId>` comes from `sf org display --target-org <alias> --json` (`result.userId`); `<id1>`, `<id2>`, … are the category record ids resolved from the payload's criteria values in-sales-org.
|
|
325
|
+
|
|
326
|
+
```sql
|
|
327
|
+
SELECT <prefix>__Category__c, <prefix>__Access_Level__c
|
|
328
|
+
FROM <prefix>__Product_Category_Share__c
|
|
329
|
+
WHERE <prefix>__Sales_Org__c = '<salesOrg>'
|
|
330
|
+
AND <prefix>__User__c = '<userId>'
|
|
331
|
+
AND <prefix>__Category__c IN ('<id1>','<id2>')
|
|
332
|
+
AND <prefix>__Access_Level__c = 'ReadWrite'
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
`categoryIds` is the union of:
|
|
336
|
+
1. The chosen `PromotionTemplate`'s `<prefix>__Anchor_Category__c` (if any).
|
|
337
|
+
2. Every category external id in the payload's `ProductFilter.Criteria.Category`, resolved to `<prefix>__Product_Attribute__c.Id` (or the tenant's Category equivalent) in the sales org.
|
|
338
|
+
|
|
339
|
+
Any missing row → stop and print:
|
|
340
|
+
`"Running user <username> lacks ReadWrite Product_Category_Share on category <name> (<external-id>) in sales org <salesOrg>. Grant a Product_Category_Share__c row with Access_Level__c='ReadWrite', or re-run as a user who already has this access. Do not proceed."`
|
|
341
|
+
|
|
342
|
+
Never silently insert share rows on behalf of the running user — that mutates
|
|
343
|
+
sharing configuration invisibly and can leak read/write access to other
|
|
344
|
+
categories via the same user in future runs.
|
|
345
|
+
|
|
269
346
|
## Wire-format quirks
|
|
270
347
|
|
|
271
348
|
- `POST /promotions/initialize` deserializes lowercase `salesorg` / `nrofitems`. Always emit lowercase.
|
|
@@ -50,6 +50,20 @@ Both phases run only on a green Phase 4 and a confirmed Phase 5 interview.
|
|
|
50
50
|
<stepName>.cls-meta.xml
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
**Deploy-directory hygiene — clean stale `.cls` files before writing the new
|
|
54
|
+
step.** When the skill is invoked more than once against the same working
|
|
55
|
+
tree (a second custom step, an interview re-run), any prior step's `.cls` /
|
|
56
|
+
`.cls-meta.xml` left behind in `force-app/main/default/classes/` is picked
|
|
57
|
+
up by `sf project deploy start` in step 5 below. If that stale file is no
|
|
58
|
+
longer known to the source-tracking manifest, MDAPI evaluates the deploy
|
|
59
|
+
with `rollbackOnError: true` and rolls back the *entire* batch — including
|
|
60
|
+
the new class — while the CLI still surfaces `"created": true` for the
|
|
61
|
+
intended component. The user sees an apparent success; the class is not
|
|
62
|
+
actually in the org. Before writing the new step, delete every
|
|
63
|
+
`*.cls`/`*.cls-meta.xml` under `./.promotion-bo-api-deploy/force-app/main/default/classes/`
|
|
64
|
+
that is not the class about to be generated. Do NOT wipe `setup-data/`
|
|
65
|
+
(Phase 3a's retrieved read-only static resource lives there).
|
|
66
|
+
|
|
53
67
|
`sfdx-project.json`:
|
|
54
68
|
```json
|
|
55
69
|
{
|
|
@@ -188,6 +202,15 @@ for (String wf : workflows) {
|
|
|
188
202
|
// pre-check. SIS uses RecordType to declare the JSON type (String, Array,
|
|
189
203
|
// Boolean, Number, Object) — a missing RecordTypeId defaults to Array,
|
|
190
204
|
// which produces "Expected List<Object>" at runtime.
|
|
205
|
+
//
|
|
206
|
+
// `Required__c` MUST be set explicitly. The field defaults to `true` at
|
|
207
|
+
// the platform level, so omitting it silently promotes every optional
|
|
208
|
+
// input path to mandatory org-wide for that workflow — every subsequent
|
|
209
|
+
// ingest of a promotion that does not carry the path fails with
|
|
210
|
+
// `Required property missing at #.<path>`. Default the SIS insert to
|
|
211
|
+
// `false`; only set `true` for paths the interview explicitly flagged
|
|
212
|
+
// as required (interview field `inputPathRequired`, defaults to `false`).
|
|
213
|
+
Boolean inputPathRequired = <inputPathRequired>; // interview answer; defaults to false
|
|
191
214
|
Id sisRecordTypeId = [
|
|
192
215
|
SELECT Id FROM RecordType
|
|
193
216
|
WHERE SobjectType = '${PREFIX_UNDER}BO_API_Step_Input_Structure__c'
|
|
@@ -203,11 +226,21 @@ for (${PREFIX_DOT}BO_API_Step_Input_Structure__c s : [
|
|
|
203
226
|
}
|
|
204
227
|
List<${PREFIX_DOT}BO_API_Step_Input_Structure__c> sisRows =
|
|
205
228
|
new List<${PREFIX_DOT}BO_API_Step_Input_Structure__c>();
|
|
229
|
+
// `Path__c` carries a packaged validation rule requiring JSON-path form
|
|
230
|
+
// (leading `.` or `$`). Interview values from the user typically omit the
|
|
231
|
+
// leading dot (e.g. `Comment`); normalize before insert or the row rejects
|
|
232
|
+
// with `FIELD_CUSTOM_VALIDATION_EXCEPTION: The Path must represent a
|
|
233
|
+
// valid JSON path.: [${PREFIX_UNDER}Path__c]`. Existing-path comparison
|
|
234
|
+
// also uses the normalized value so a re-run does not double-insert.
|
|
206
235
|
for (String inputPath : inputPaths) {
|
|
207
|
-
|
|
236
|
+
String normalizedPath = (inputPath.startsWith('.') || inputPath.startsWith('$'))
|
|
237
|
+
? inputPath
|
|
238
|
+
: '.' + inputPath;
|
|
239
|
+
if (existingPaths.contains(normalizedPath)) continue;
|
|
208
240
|
sisRows.add(new ${PREFIX_DOT}BO_API_Step_Input_Structure__c(
|
|
209
241
|
${PREFIX_DOT}BO_API_Workflow_Step__c = step.Id,
|
|
210
|
-
${PREFIX_DOT}Path__c =
|
|
242
|
+
${PREFIX_DOT}Path__c = normalizedPath,
|
|
243
|
+
${PREFIX_DOT}Required__c = inputPathRequired,
|
|
211
244
|
RecordTypeId = sisRecordTypeId
|
|
212
245
|
));
|
|
213
246
|
}
|
package/skills/consumer-goods-promotion-bo-api-deploy/references/preflight-and-seed-queries.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Preflight + seed queries (Phases 1–3b)
|
|
2
|
+
|
|
3
|
+
Load-bearing SOQL and shell recipes that `SKILL.md` Phases 1–3b hand off to.
|
|
4
|
+
`PREFIX_DOT` / `PREFIX_UNDER` / `URL_NS` come from `SKILL.md` "Find the
|
|
5
|
+
namespace first". Every query is **sales-org-scoped** where the underlying
|
|
6
|
+
object is partitioned.
|
|
7
|
+
|
|
8
|
+
## Phase 1 — Preflight queries
|
|
9
|
+
|
|
10
|
+
### Step 4: TPM entitlement (Permission Set License)
|
|
11
|
+
|
|
12
|
+
TPM is licensed via the `CGCRetailAndTPMMgmtPsl` PSL (no `TPM App`
|
|
13
|
+
UserLicense):
|
|
14
|
+
|
|
15
|
+
```sql
|
|
16
|
+
SELECT Id FROM PermissionSetLicenseAssign
|
|
17
|
+
WHERE Assignee.Username = '<running-user-name>'
|
|
18
|
+
AND PermissionSetLicense.DeveloperName = 'CGCRetailAndTPMMgmtPsl'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Empty + `OrganizationType = 'Developer Edition'` or `IsSandbox = true` →
|
|
22
|
+
**warn** (the permset gate below is the real check); any other org shape +
|
|
23
|
+
empty → **stop**.
|
|
24
|
+
|
|
25
|
+
### Step 5: Running-user permission set (TPM Admin persona)
|
|
26
|
+
|
|
27
|
+
Need a permset granting the *TPM Master Data Admin* persona. The shipped name
|
|
28
|
+
is `TPM_Master_Data_Admin` (bare, non-namespaced), but customers frequently
|
|
29
|
+
clone it; treat a miss as "ask", not "fail":
|
|
30
|
+
|
|
31
|
+
```sql
|
|
32
|
+
SELECT PermissionSet.Name, PermissionSet.Label FROM PermissionSetAssignment
|
|
33
|
+
WHERE Assignee.Username = '<running-user-name>'
|
|
34
|
+
AND (PermissionSet.Name = 'TPM_Master_Data_Admin'
|
|
35
|
+
OR PermissionSet.Label LIKE '%TPM%Master Data Admin%')
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Match → proceed. No match → offer
|
|
39
|
+
`sf org assign permset --name TPM_Master_Data_Admin --target-org <alias>` AND
|
|
40
|
+
ask if the user holds an equivalent (cloned/renamed) permset; wait for
|
|
41
|
+
confirmation or assignment, then re-query. Proceed only once admin access is
|
|
42
|
+
confirmed.
|
|
43
|
+
|
|
44
|
+
### Step 7: Running user's `Sales_Org__c` matches `<salesOrg>`
|
|
45
|
+
|
|
46
|
+
```sql
|
|
47
|
+
SELECT Id, Username, ${PREFIX_UNDER}Sales_Org__c FROM User WHERE Username = '<running-user-name>'
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Blank or `!= '<salesOrg>'` → stop; fix on the user record (confirm before
|
|
51
|
+
mutating). This gate is R6 of `conventions-and-payload-rules.md` — blank
|
|
52
|
+
throws `SOU0003`, mismatch surfaces as "not found" (create/update) or
|
|
53
|
+
`TransformationError` (copy). Category access is preflighted in Phase 6 per
|
|
54
|
+
R9.
|
|
55
|
+
|
|
56
|
+
## Phase 2 — Verify BO API framework state
|
|
57
|
+
|
|
58
|
+
Read-only. All three counts MUST be scoped to `<salesOrg>` — the framework
|
|
59
|
+
rows are sales-org-partitioned.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# 1. Workflow rows for this sales org (expect 4: create/update/copy/derive)
|
|
63
|
+
sf data query --target-org <alias> --json --query "
|
|
64
|
+
SELECT Name FROM ${PREFIX_UNDER}BO_API_Workflow__c
|
|
65
|
+
WHERE ${PREFIX_UNDER}BO_API__r.Name = 'Promotion'
|
|
66
|
+
AND ${PREFIX_UNDER}BO_API__r.${PREFIX_UNDER}Sales_Org__c = '<salesOrg>'"
|
|
67
|
+
|
|
68
|
+
# 2. Step rows for this sales org
|
|
69
|
+
sf data query --target-org <alias> --json --query "
|
|
70
|
+
SELECT COUNT(Id) FROM ${PREFIX_UNDER}BO_API_Workflow_Step__c
|
|
71
|
+
WHERE ${PREFIX_UNDER}Sales_Org__c = '<salesOrg>'"
|
|
72
|
+
|
|
73
|
+
# 3. Junction rows whose parent workflow belongs to a Promotion BO API for this sales org
|
|
74
|
+
sf data query --target-org <alias> --json --query "
|
|
75
|
+
SELECT COUNT(Id) FROM ${PREFIX_UNDER}BO_API_Workflow_Workflow_Step__c
|
|
76
|
+
WHERE ${PREFIX_UNDER}BO_API_Workflow__r.${PREFIX_UNDER}BO_API__r.Name = 'Promotion'
|
|
77
|
+
AND ${PREFIX_UNDER}BO_API_Workflow__r.${PREFIX_UNDER}BO_API__r.${PREFIX_UNDER}Sales_Org__c = '<salesOrg>'"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Outcome routing:
|
|
81
|
+
- Zero workflow rows → fresh for this sales org, Phase 3 will seed.
|
|
82
|
+
- Full state (4 workflow rows `create/update/copy/derive`; >0 step + junction
|
|
83
|
+
rows) → Phase 3 is a no-op for this sales org (still run for idempotency;
|
|
84
|
+
3a shows zero net-new).
|
|
85
|
+
- Partial state → **error**; stop, report which rows are missing. A human
|
|
86
|
+
inspects first.
|
|
87
|
+
|
|
88
|
+
## Phase 3a — Retrieve the packaged seed
|
|
89
|
+
|
|
90
|
+
Fetch the `TPMSetupData` static resource into a dedicated `setup-data/`
|
|
91
|
+
subproject (keeps the read-only managed resource out of the Phase-5a deploy
|
|
92
|
+
tree at `./.promotion-bo-api-deploy/force-app`).
|
|
93
|
+
|
|
94
|
+
1. Locate the resource:
|
|
95
|
+
```bash
|
|
96
|
+
sf data query --target-org <alias> --json --query "
|
|
97
|
+
SELECT Id, Name, NamespacePrefix, SystemModStamp, BodyLength
|
|
98
|
+
FROM StaticResource WHERE Name = 'TPMSetupData'"
|
|
99
|
+
```
|
|
100
|
+
Zero rows → stop ("TPMSetupData static resource not found — is the CGCloud
|
|
101
|
+
package installed?"). Multiple rows → prefer the one whose
|
|
102
|
+
`NamespacePrefix` matches Phase 1; if prefixes disagree, stop and ask.
|
|
103
|
+
2. Retrieve into the dedicated subproject:
|
|
104
|
+
```bash
|
|
105
|
+
mkdir -p ./.promotion-bo-api-deploy/setup-data/force-app/main/default
|
|
106
|
+
printf '{ "packageDirectories": [{ "path": "force-app", "default": true }], "sourceApiVersion": "60.0" }' \
|
|
107
|
+
> ./.promotion-bo-api-deploy/setup-data/sfdx-project.json
|
|
108
|
+
( cd ./.promotion-bo-api-deploy/setup-data && sf project retrieve start \
|
|
109
|
+
--metadata "StaticResource:${PREFIX_UNDER}TPMSetupData" --target-org <alias> --json )
|
|
110
|
+
```
|
|
111
|
+
Non-success → stop, print `result` errors. (`sf project retrieve` works
|
|
112
|
+
cross-platform; no `unzip` needed.)
|
|
113
|
+
3. SFDX expands the zip to
|
|
114
|
+
`./.promotion-bo-api-deploy/setup-data/force-app/main/default/staticresources/${PREFIX_UNDER}TPMSetupData/BOApi/`.
|
|
115
|
+
Expected 8 CSVs — `0_BO_API__c.csv`, `0_BO_API_Entity__c.csv`,
|
|
116
|
+
`0_BO_API_Output_Entity__c.csv`, `0_BO_API_Workflow__c.csv`,
|
|
117
|
+
`0_BO_API_Workflow_Entity__c.csv`, `0_BO_API_Workflow_Step__c.csv`,
|
|
118
|
+
`0_BO_API_Workflow_Workflow_Step__c.csv`,
|
|
119
|
+
`0_BO_API_Step_Input_Structure__c.csv` — plus `import.json`. Any missing →
|
|
120
|
+
stop, print the delta.
|
|
121
|
+
4. Confirm each target sObject exists:
|
|
122
|
+
`sf sobject describe --sobject '${PREFIX_UNDER}BO_API_Workflow__c' --target-org <alias> > /dev/null`
|
|
123
|
+
(etc.). Any describe failure → stop (package partially installed).
|
|
124
|
+
|
|
125
|
+
## Phase 3b — Poll the batch chain
|
|
126
|
+
|
|
127
|
+
`GenericDemoSetupDataBatch` self-chains via `finish()`, so poll by class (not
|
|
128
|
+
by a single job id):
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
sf data query --target-org <alias> --json --query "
|
|
132
|
+
SELECT COUNT() FROM AsyncApexJob
|
|
133
|
+
WHERE ApexClass.Name = 'GenericDemoSetupDataBatch'
|
|
134
|
+
AND CreatedDate >= ${PHASE3_START}
|
|
135
|
+
AND Status NOT IN ('Completed','Failed','Aborted')"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Sleep 5s between polls; break when count is zero for **two consecutive** polls
|
|
139
|
+
(covers the gap between a parent's `finish()` and a child's `AsyncApexJob` row
|
|
140
|
+
appearing).
|
|
141
|
+
|
|
142
|
+
Final check — every child succeeded:
|
|
143
|
+
|
|
144
|
+
```sql
|
|
145
|
+
SELECT Id, Status, NumberOfErrors, ExtendedStatus FROM AsyncApexJob
|
|
146
|
+
WHERE ApexClass.Name = 'GenericDemoSetupDataBatch' AND CreatedDate >= ${PHASE3_START}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Any `Failed`/`Aborted`/`NumberOfErrors > 0` → stop, print `ExtendedStatus`.
|