@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
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commerce-return-order-summary-create
|
|
3
|
+
description: "Use this skill when users want to use when a customer needs to return one or more items on an order that has already been fulfilled or delivered, via a preview-then-submit flow that submits only after explicit customer confirmation. Also use when a customer needs to return one or more items on an order that has already been fulfilled or delivered, via a preview-then-submit flow that submits only after explicit customer confirmation. Trigger when users mention return, order, summary."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "1.0"
|
|
6
|
+
accessCheck: "(OrderItemSummary.QuantityAvailableToReturn) || (OrderManagement.orgHasOrderManagementConnectAPIEnabled) || (UserPermissions.ORDER_ITEM_SUMMARY_RETURN_API_ACCESS)"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Managing Return Order Summary
|
|
10
|
+
|
|
11
|
+
## When to Use This Skill
|
|
12
|
+
|
|
13
|
+
Use when a customer needs to return one or more items on an order that has already been fulfilled or delivered, via a preview-then-submit flow that submits only after explicit customer confirmation. Returns are always per-item — there is no full-order-return path (the core API exposes only preview-return / submit-return, not a *ReturnAll variant).
|
|
14
|
+
|
|
15
|
+
## Workflow
|
|
16
|
+
|
|
17
|
+
╔══════════════════════════════════════════════════════════════════════════╗
|
|
18
|
+
║ HARD STOP between preview-return-items and submit-return-items. ║
|
|
19
|
+
║ ║
|
|
20
|
+
║ The agent MUST NOT invoke submit-return-items without ALL of: ║
|
|
21
|
+
║ 1. preview-return-items invoked in THIS conversation, success: true. ║
|
|
22
|
+
║ 2. preview's changeBalances surfaced to the customer in plain language ║
|
|
23
|
+
║ (lines, quantities, credit amount). ║
|
|
24
|
+
║ 3. Customer's verbatim affirmative reply received in this conversation.║
|
|
25
|
+
║ 4. That verbatim reply passed into submit-return-items's required ║
|
|
26
|
+
║ `customer_confirmation` input (NOT a value the agent supplies). ║
|
|
27
|
+
║ ║
|
|
28
|
+
║ A `success: true` from preview is NOT consent. Ambiguous customer ║
|
|
29
|
+
║ replies ("ok", "sure", "I think so", a question back) are NOT consent — ║
|
|
30
|
+
║ ask again plainly. Re-read submit-return-items's REFUSAL PROTOCOL ║
|
|
31
|
+
║ before calling it. ║
|
|
32
|
+
╚══════════════════════════════════════════════════════════════════════════╝
|
|
33
|
+
|
|
34
|
+
return-order-summary has a single linear execution path (preview → submit) —
|
|
35
|
+
Return has NO full-order variant (only OrderSummaryPreviewReturnResource +
|
|
36
|
+
OrderSummarySubmitReturnResource exist in core-264, no *ReturnAllResource).
|
|
37
|
+
Per-step agent_guidance is authoritative for each step's contract; this is
|
|
38
|
+
the orchestration map + entry decision tree + contract index.
|
|
39
|
+
|
|
40
|
+
1. `reason` is REQUIRED on every changeItems[] entry, and its allowed values come from
|
|
41
|
+
the org-tenant's OrderItemSummaryChange.Reason picklist (the SAME picklist cancel uses
|
|
42
|
+
— the controller validates Return and Cancel reasons against one enum). Send a value
|
|
43
|
+
not in that picklist → 400 INVALID_API_INPUT "No matching reason found." Resolve the
|
|
44
|
+
live picklist via the resolve-return-reasons step before previewing; do NOT hard-code
|
|
45
|
+
the enum across orgs.
|
|
46
|
+
|
|
47
|
+
2. The target line item must have `OrderItemSummary.QuantityAvailableToReturn > 0`. An
|
|
48
|
+
item that hasn't shipped yet (or has already been returned) returns 400
|
|
49
|
+
INVALID_API_INPUT before the financial preview runs. Run the verify-returnable-quantity
|
|
50
|
+
step (or an equivalent SOQL) before previewing so the agent fails fast with a clear
|
|
51
|
+
customer-facing message instead of cascading into a 400.
|
|
52
|
+
|
|
53
|
+
3. `shippingReductionFlag` is REQUIRED on every changeItems[] entry. Wire-verified against
|
|
54
|
+
pbtest-ws on 2026-06-29: omitting the flag on preview-return returns HTTP 500 with
|
|
55
|
+
errorCode UNKNOWN_EXCEPTION (response envelope: enhancedErrorType=RecordError,
|
|
56
|
+
output.errors[0] carries the UNKNOWN_EXCEPTION + a "contact Salesforce Support" string
|
|
57
|
+
with an error ID). Sending the flag (true or false) is accepted and the request
|
|
58
|
+
progresses to business-rule validation. Always send the flag explicitly (false unless
|
|
59
|
+
the customer asks to also credit shipping). This parity-with-cancel finding holds for
|
|
60
|
+
return as well.
|
|
61
|
+
|
|
62
|
+
## Critical Constraints
|
|
63
|
+
|
|
64
|
+
**Preconditions:**
|
|
65
|
+
|
|
66
|
+
- Org must have Order Management Connect API enabled (check: `Order Management API enabled`)
|
|
67
|
+
- User must have access to Order Management Return features. Service-level access is gated by the ORDER_ITEM_SUMMARY_RETURN_API_ACCESS permission (verified in core-264 OrderSummaryPreviewReturnResource + OrderSummarySubmitReturnResource impl). Users without it get a 403 INSUFFICIENT_ACCESS on both preview and submit. (check: `UserPermissions.ORDER_ITEM_SUMMARY_RETURN_API_ACCESS`)
|
|
68
|
+
- Each line item being returned must have OrderItemSummary.QuantityAvailableToReturn > 0.
|
|
69
|
+
Items not yet shipped or already returned have QuantityAvailableToReturn == 0 and will
|
|
70
|
+
fail preview with 400 INVALID_API_INPUT. Verify via SOQL before invoking preview-return-items. (check: `OrderItemSummary.QuantityAvailableToReturn`)
|
|
71
|
+
- Each `reason` value sent in changeItems[] must match the org's
|
|
72
|
+
OrderItemSummaryChange.Reason picklist (org-tenant-specific). The OAS
|
|
73
|
+
types `reason` as a free-form string; the controller validates it as
|
|
74
|
+
an enum. Resolve the picklist via resolve-return-reasons before previewing.
|
|
75
|
+
Cancel and Return share this same picklist. (check: `OrderItemSummaryChange.Reason picklist`)
|
|
76
|
+
- OrderSummary must be a MANAGED order (i.e. an order the OMS workflow can
|
|
77
|
+
modify). The old flow stops UNMANAGED orders up-front with a friendly
|
|
78
|
+
message; this SOR should do the same rather than let submit-return fail
|
|
79
|
+
late with an opaque 400/500. TODO(W-23144076-followup): source the exact
|
|
80
|
+
field name (candidates: `OrderSummary.IsManaged`, an OrderLifeCycleType
|
|
81
|
+
check, or a service-level `OrderManagement.isManaged(orderSummary)` call)
|
|
82
|
+
from the OMS legacy Aura flow that today gates the "Return Order" button.
|
|
83
|
+
Cancel has the SAME gap — track under the same followup and land in both
|
|
84
|
+
SORs together. No `check:` here until the real field name is sourced; the
|
|
85
|
+
gate is prose-only for now (evaluated by the agent per step 0's
|
|
86
|
+
ELIGIBILITY GATE), not machine-checkable.
|
|
87
|
+
- OrderSummary must not be LOCKED by an in-progress cancellation. The old
|
|
88
|
+
flow refuses to open the return workflow if a cancel is already running
|
|
89
|
+
against the same OrderSummary — otherwise the two ChangeOrders race and
|
|
90
|
+
the outcome is inconsistent. This SOR should surface the same friendly
|
|
91
|
+
"there's an active cancellation on this order — please try again in a
|
|
92
|
+
moment" message rather than let the API decide. TODO(W-23144076-followup):
|
|
93
|
+
source the exact discriminator from the old flow (candidates: an
|
|
94
|
+
OrderSummary status field, an OrderChangeLog / AsyncOperationLog probe on
|
|
95
|
+
the parent, or a service-level lock check). Cancel has the SAME gap —
|
|
96
|
+
track and land in both together. No `check:` here until the real
|
|
97
|
+
discriminator is sourced; the gate is prose-only for now (evaluated by
|
|
98
|
+
the agent per step 0's ELIGIBILITY GATE), not machine-checkable.
|
|
99
|
+
|
|
100
|
+
**Operational rules:**
|
|
101
|
+
|
|
102
|
+
- ENTRY DECISION TREE (drive the conversation in this order):
|
|
103
|
+
0. resolve-order-summary-by-number → OrderNumber → 1Os... Id. NOT unique;
|
|
104
|
+
disambiguate when totalSize > 1. Skip if the caller already has the Id.
|
|
105
|
+
AFTER confirming the specific order, run the ELIGIBILITY GATE from
|
|
106
|
+
step 0's agent_guidance:
|
|
107
|
+
- unmanaged order → friendly stop, END
|
|
108
|
+
- cancellation already in progress → friendly stop, END
|
|
109
|
+
(TODO: field names pending — see step 0's ELIGIBILITY GATE.)
|
|
110
|
+
1. resolve-return-reasons → fetch the org's Reason picklist (map the
|
|
111
|
+
customer's reason internally; never show raw tokens). Same picklist as cancel.
|
|
112
|
+
2. verify-returnable-quantity → read the returnable lines. If none are
|
|
113
|
+
returnable, short-circuit with the friendly already-returned / not-shipped
|
|
114
|
+
wording (do NOT proceed). Otherwise SHOW the customer the returnable
|
|
115
|
+
line items and let them pick which to return.
|
|
116
|
+
3. For EACH line the customer chose, collect two things before previewing:
|
|
117
|
+
a. QUANTITY — if that line's QuantityAvailableToReturn > 1, ASK how
|
|
118
|
+
many units (1..available, whole units). If == 1, use 1 without asking.
|
|
119
|
+
b. SHIPPING — ask whether to also credit that line's delivery/shipping
|
|
120
|
+
charge → shippingReductionFlag (false = keep, true = credit).
|
|
121
|
+
Build one changeItems[] entry per chosen line from these answers, then
|
|
122
|
+
go to preview-return-items → (confirm) → submit-return-items → verify.
|
|
123
|
+
- CORE FLOW:
|
|
124
|
+
4. preview-return-items → financial impact. HARD STOP for confirmation.
|
|
125
|
+
5. submit-return-items → execute with the SAME payload. SYNC — returns
|
|
126
|
+
changeOrderId in the response (no async polling).
|
|
127
|
+
6. fetch-change-order-record → internal verification of the ChangeOrder row.
|
|
128
|
+
7. verify-return-items → two reads; don't trust OrderSummary.Status.
|
|
129
|
+
- CUSTOMER-FACING WORDING (mandatory — this is a user-facing workflow):
|
|
130
|
+
- NO MONEY / CREDIT / REFUND MESSAGING. When a return submit completes,
|
|
131
|
+
confirm it in one short sentence and END (e.g. "Done — that return is
|
|
132
|
+
processed." / "Done — those returns are processed."). Do NOT tell the
|
|
133
|
+
customer about a credit, a change order, a refund, a billing follow-up,
|
|
134
|
+
an order total, or any dollar/amount figure — not even to say a refund
|
|
135
|
+
is "handled separately." The customer asked to return items; confirm
|
|
136
|
+
the return and stop. (Financial records like the ChangeOrder still
|
|
137
|
+
exist server-side and may be read for internal verification, but they
|
|
138
|
+
are NOT surfaced to the customer.) NOTE: actual refund issuance DOES run
|
|
139
|
+
inside this SOR — the refund-return-credit step delegates to
|
|
140
|
+
ensure-order-refund (credit memo + ensure-refunds-async) after submit.
|
|
141
|
+
That refund is SERVER-SIDE and SILENT: its existence does NOT license a
|
|
142
|
+
credit/refund sentence in the customer reply. The success wording above is
|
|
143
|
+
the complete customer response regardless of the refund delegation.
|
|
144
|
+
- CURRENCY: never hard-code a currency symbol (no "$"); amounts are in the
|
|
145
|
+
OrderSummary's own currency, which is NOT always USD. The OrderSummary
|
|
146
|
+
reads use SELECT FIELDS(STANDARD), so the currency is handled without a
|
|
147
|
+
hard-coded column or a per-org query variant:
|
|
148
|
+
• Multicurrency org: CurrencyIsoCode is a standard field, so it comes
|
|
149
|
+
back in the record (e.g. "USD", "EUR") — use it.
|
|
150
|
+
• Single-currency org: CurrencyIsoCode does not exist, so it simply
|
|
151
|
+
won't be in the record. Fall back to the org/user default currency
|
|
152
|
+
(Apex UserInfo.getDefaultCurrency(); the CurrencyType sObject does not
|
|
153
|
+
exist on single-currency orgs).
|
|
154
|
+
Present money as the amount followed by its ISO code (e.g. "129.00 USD",
|
|
155
|
+
"129.00 EUR") or the locale-formatted value — never assume dollars.
|
|
156
|
+
"zero" is currency-agnostic and fine for a fully-credited total.
|
|
157
|
+
- NO INTERNAL JARGON OR TELEMETRY. The friendly templates are the COMPLETE
|
|
158
|
+
customer response. Never surface step names, Connect API operation names,
|
|
159
|
+
field / response-shape names, sObject type names, raw 18-char Ids, or
|
|
160
|
+
the words "SOR"/"workflow". Do NOT append a verification recap / audit
|
|
161
|
+
trail after the success message — that belongs in logs.
|
|
162
|
+
- CONTRACT INDEX (full detail in each step's agent_guidance):
|
|
163
|
+
- reason REQUIRED + enum-validated against OrderItemSummaryChange.Reason
|
|
164
|
+
(same picklist as cancel) → resolve-return-reasons
|
|
165
|
+
- shippingReductionFlag REQUIRED on every entry (wire-verified against
|
|
166
|
+
pbtest-ws: omit → 500 UNKNOWN_EXCEPTION) → preview-return-items
|
|
167
|
+
- QuantityAvailableToReturn > 0 precondition → verify-returnable-quantity
|
|
168
|
+
- HARD STOP between preview and submit (no auto-chain)
|
|
169
|
+
- submit reuses the exact preview payload → submit-return-items
|
|
170
|
+
- submit is SYNC — returns changeOrderId directly (no async polling,
|
|
171
|
+
unlike full-cancel) → submit-return-items
|
|
172
|
+
- ChangeOrder lives in the Order sObject (RelatedOrderType='ChangeOrder',
|
|
173
|
+
negative TotalAmount) → fetch-change-order-record
|
|
174
|
+
- OrderSummary.Status does not change on return (expected, mirrors cancel)
|
|
175
|
+
→ verify-return-items
|
|
176
|
+
- Refund issuance (credit memo + ensure-refunds-async) IS reproduced here
|
|
177
|
+
by delegating to ensure-order-refund → refund-return-credit; it runs
|
|
178
|
+
server-side and is NOT surfaced to the customer
|
|
179
|
+
- SOQL INPUT SAFETY (consumer contract — no runtime gate). Steps
|
|
180
|
+
resolve-order-summary-by-number ({orderNumber}), verify-returnable-quantity
|
|
181
|
+
({orderSummaryId}), resolve-bundle-structure ({orderSummaryId}),
|
|
182
|
+
fetch-change-order-on-timeout ({orderSummaryId} + {originalOrderId}),
|
|
183
|
+
and verify-return-items ({orderSummaryId} + the IN-list) each splice
|
|
184
|
+
an untrusted value into a SOQL WHERE clause. The per-input `pattern:`
|
|
185
|
+
/ `validation:` fields are NOT enforced by any runtime in this repo:
|
|
186
|
+
MCP `dispatch` takes an already-rendered query string, and the
|
|
187
|
+
Salesforce REST `/query` endpoint has no bind-variable form (bind vars
|
|
188
|
+
exist only in Apex `Database.query`, not at REST). The caller building
|
|
189
|
+
the tool call is the only enforcement point. Validate every
|
|
190
|
+
interpolated value against its declared pattern before splicing and
|
|
191
|
+
reject on mismatch — do NOT escape-and-retry. The declared patterns
|
|
192
|
+
already exclude every SOQL metacharacter, so a matching value cannot
|
|
193
|
+
inject; the injection risk is entirely in skipping the check.
|
|
194
|
+
- EMPIRICAL CONTRACTS (OAS-uncaptured; relocated from the discover-surfaced summary;
|
|
195
|
+
inherited from the cancel-order-summary workflow's wire-validated findings against the
|
|
196
|
+
shared ChangeInputRepresentation + OrderItemSummaryChange.Reason picklist):
|
|
197
|
+
|
|
198
|
+
## Verification Checklist
|
|
199
|
+
|
|
200
|
+
After every write operation, confirm the effect by re-reading state:
|
|
201
|
+
|
|
202
|
+
- After `submit-return-items`, `verify-returnable-quantity`: call `verify-return-items`
|
|
203
|
+
|
|
204
|
+
## Operations Reference
|
|
205
|
+
|
|
206
|
+
Operations grouped by purpose. Use these as the building blocks for the workflows above.
|
|
207
|
+
|
|
208
|
+
### Summary
|
|
209
|
+
|
|
210
|
+
| Operation | Purpose | Status | Call | Depends on |
|
|
211
|
+
|-----------|---------|--------|------|------------|
|
|
212
|
+
| `resolve-order-summary-by-number` | read | implemented | `querySoql` | — |
|
|
213
|
+
| `resolve-return-reasons` | read | implemented | `describeOrderItemSummaryChange` | — |
|
|
214
|
+
| `verify-returnable-quantity` | read | implemented | `querySoql` | — |
|
|
215
|
+
| `resolve-bundle-structure` | read | implemented | `querySoql` | `verify-returnable-quantity` |
|
|
216
|
+
| `ask-to-apply-fee` | read | implemented | `interactive_prompt` | `verify-returnable-quantity` |
|
|
217
|
+
| `collect-per-item-return-fees` | read | implemented | `interactive_prompt` | `verify-returnable-quantity` |
|
|
218
|
+
| `preview-return-items` | read | implemented | `postOrderSummaryPreviewReturn` | `resolve-return-reasons`, `verify-returnable-quantity`, `ask-to-apply-fee`, `collect-per-item-return-fees` |
|
|
219
|
+
| `submit-return-items` | write | implemented | `postOrderSummarySubmitReturn` | `preview-return-items` |
|
|
220
|
+
| `fetch-change-order-record` | read | implemented | `getOrder` | `submit-return-items` |
|
|
221
|
+
| `fetch-change-order-on-timeout` | read | implemented | `querySoql` | `submit-return-items` |
|
|
222
|
+
| `verify-return-items` | verify | implemented | `querySoql` | `submit-return-items`, `verify-returnable-quantity` |
|
|
223
|
+
| `refund-return-credit` | write | — | → `cc-om-fast-and-furious/ensure-order-refund` | `submit-return-items` |
|
|
224
|
+
|
|
225
|
+
### Dependency graph
|
|
226
|
+
|
|
227
|
+
```mermaid
|
|
228
|
+
graph TD
|
|
229
|
+
resolve_order_summary_by_number["resolve-order-summary-by-number (read)"]
|
|
230
|
+
resolve_return_reasons["resolve-return-reasons (read)"]
|
|
231
|
+
verify_returnable_quantity["verify-returnable-quantity (read)"]
|
|
232
|
+
resolve_bundle_structure["resolve-bundle-structure (read)"]
|
|
233
|
+
ask_to_apply_fee["ask-to-apply-fee (read)"]
|
|
234
|
+
collect_per_item_return_fees["collect-per-item-return-fees (read)"]
|
|
235
|
+
preview_return_items["preview-return-items (read)"]
|
|
236
|
+
submit_return_items["submit-return-items (write)"]
|
|
237
|
+
fetch_change_order_record["fetch-change-order-record (read)"]
|
|
238
|
+
fetch_change_order_on_timeout["fetch-change-order-on-timeout (read)"]
|
|
239
|
+
verify_return_items["verify-return-items (verify)"]
|
|
240
|
+
refund_return_credit["refund-return-credit (write)"]
|
|
241
|
+
verify_returnable_quantity --> resolve_bundle_structure
|
|
242
|
+
verify_returnable_quantity --> ask_to_apply_fee
|
|
243
|
+
verify_returnable_quantity --> collect_per_item_return_fees
|
|
244
|
+
resolve_return_reasons --> preview_return_items
|
|
245
|
+
verify_returnable_quantity --> preview_return_items
|
|
246
|
+
ask_to_apply_fee --> preview_return_items
|
|
247
|
+
collect_per_item_return_fees --> preview_return_items
|
|
248
|
+
preview_return_items --> submit_return_items
|
|
249
|
+
submit_return_items --> fetch_change_order_record
|
|
250
|
+
submit_return_items --> fetch_change_order_on_timeout
|
|
251
|
+
submit_return_items --> verify_return_items
|
|
252
|
+
verify_returnable_quantity --> verify_return_items
|
|
253
|
+
submit_return_items --> refund_return_credit
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Read operations
|
|
257
|
+
|
|
258
|
+
#### `resolve-order-summary-by-number`
|
|
259
|
+
|
|
260
|
+
Resolve a customer-provided OrderNumber to its OrderSummary Id.
|
|
261
|
+
Customers and CSRs work with OrderNumber (the printed order number on
|
|
262
|
+
receipts/email); the return APIs require the internal Id (1Os...).
|
|
263
|
+
|
|
264
|
+
IMPORTANT: OrderNumber is NOT unique on this sObject — a single
|
|
265
|
+
OrderNumber can resolve to multiple OrderSummaries (orgs reuse it across
|
|
266
|
+
storefronts/locales). When this step returns more than one row, the agent
|
|
267
|
+
MUST surface the candidates (date, total, line count) and ask the customer
|
|
268
|
+
which one they meant before proceeding. Do NOT auto-pick by OrderedDate or
|
|
269
|
+
any heuristic — the wrong order is the worst outcome in a return workflow.
|
|
270
|
+
|
|
271
|
+
**Call:** `querySoql` — status: `implemented`
|
|
272
|
+
|
|
273
|
+
**Inputs:**
|
|
274
|
+
|
|
275
|
+
- `orderNumber` *(`String`)* — Customer-facing OrderNumber (the printed order number from the
|
|
276
|
+
receipt/confirmation email). Skip this step entirely if the caller
|
|
277
|
+
already has the OrderSummary Id (starts with '1Os') — pass that
|
|
278
|
+
directly into downstream steps.
|
|
279
|
+
|
|
280
|
+
#### `resolve-return-reasons`
|
|
281
|
+
|
|
282
|
+
Resolve the org's allowed return reasons from the live
|
|
283
|
+
OrderItemSummaryChange.Reason picklist. Required because the
|
|
284
|
+
controller validates `reason` against this picklist on both preview
|
|
285
|
+
and submit; sending an unrecognized value returns 400
|
|
286
|
+
INVALID_API_INPUT "No matching reason found." Cancel and Return share
|
|
287
|
+
the same Reason picklist (one enum on OrderItemSummaryChange).
|
|
288
|
+
|
|
289
|
+
**Call:** `describeOrderItemSummaryChange` — status: `implemented`
|
|
290
|
+
|
|
291
|
+
#### `verify-returnable-quantity`
|
|
292
|
+
|
|
293
|
+
Confirm each target OrderItemSummary has QuantityAvailableToReturn > 0
|
|
294
|
+
before invoking preview-return. Items that haven't shipped (or have
|
|
295
|
+
already been returned) will fail preview with 400 INVALID_API_INPUT.
|
|
296
|
+
|
|
297
|
+
**Call:** `querySoql` — status: `implemented`
|
|
298
|
+
|
|
299
|
+
**Inputs:**
|
|
300
|
+
|
|
301
|
+
- `orderSummaryId` *(`String`)* — ID of the order summary (starts with 1Os)
|
|
302
|
+
|
|
303
|
+
#### `resolve-bundle-structure`
|
|
304
|
+
|
|
305
|
+
Fetch and present the bundle structure for an order that contains a bundle
|
|
306
|
+
(detected in verify-returnable-quantity via a non-null MainOrderItemSummaryId
|
|
307
|
+
on any line). Bundle structure lives in OrderItemSummaryRelationship, which
|
|
308
|
+
links a MainOrderItemSummary (the bundle parent) to each
|
|
309
|
+
AssociatedOrderItemSummary (a component / add-on), with roles and a
|
|
310
|
+
ProductRelationshipType. Run this only when a bundle was detected; skip for
|
|
311
|
+
orders with no bundle. Return uses the same OrderItemSummaryRelationship
|
|
312
|
+
schema as cancel — bundle structure is a property of the order, not of the
|
|
313
|
+
action being performed on it.
|
|
314
|
+
|
|
315
|
+
**Call:** `querySoql` — status: `implemented`
|
|
316
|
+
|
|
317
|
+
**Inputs:**
|
|
318
|
+
|
|
319
|
+
- `orderSummaryId` *(`String`)* — OrderSummary Id (1Os...). Source: output of verify-returnable-quantity.
|
|
320
|
+
|
|
321
|
+
**Depends on:** `verify-returnable-quantity`
|
|
322
|
+
|
|
323
|
+
#### `ask-to-apply-fee`
|
|
324
|
+
|
|
325
|
+
Ask whether the customer wants to add a return fee (restocking fee, processing fee, etc.).
|
|
326
|
+
If they choose YES, delegate to fees-support to collect fee product, description, amount,
|
|
327
|
+
and fee-input representation. If NO, proceed directly to preview-return-items with zero fees.
|
|
328
|
+
|
|
329
|
+
**Call:** `interactive_prompt` — status: `implemented`
|
|
330
|
+
|
|
331
|
+
**Depends on:** `verify-returnable-quantity`
|
|
332
|
+
|
|
333
|
+
#### `collect-per-item-return-fees`
|
|
334
|
+
|
|
335
|
+
Collect separate fee for each returned item
|
|
336
|
+
|
|
337
|
+
**Call:** `interactive_prompt` — status: `implemented`
|
|
338
|
+
|
|
339
|
+
**Depends on:** `verify-returnable-quantity`
|
|
340
|
+
|
|
341
|
+
#### `preview-return-items`
|
|
342
|
+
|
|
343
|
+
Preview the expected financial impact of returning specific order items
|
|
344
|
+
|
|
345
|
+
**Call:** `postOrderSummaryPreviewReturn` — status: `implemented`
|
|
346
|
+
|
|
347
|
+
**Inputs:**
|
|
348
|
+
|
|
349
|
+
- `orderSummaryId` *(`String`)* — ID of the order summary (1Os...).
|
|
350
|
+
Source: `order_summary_id` output of resolve-order-summary-by-number
|
|
351
|
+
(only valid when `match_count == 1`; on multi-match cases, source it
|
|
352
|
+
from the customer's disambiguation reply per step 0's agent_guidance).
|
|
353
|
+
A caller that already holds the 1Os Id can pass it in directly and skip
|
|
354
|
+
step 0.
|
|
355
|
+
- `changeItems` *(`Array`)* — List of order items to return with quantities. Each entry pairs an
|
|
356
|
+
OrderItemSummary Id (from verify-returnable-quantity's returnable_items)
|
|
357
|
+
with a customer-confirmed quantity, a resolved picklist reason (from
|
|
358
|
+
resolve-return-reasons.allowed_reasons), and shippingReductionFlag.
|
|
359
|
+
Source: verify-returnable-quantity (line Ids + QuantityAvailableToReturn)
|
|
360
|
+
+ resolve-return-reasons (allowed picklist values) + the customer's
|
|
361
|
+
quantity / shipping-credit answers per the entry decision tree.
|
|
362
|
+
- schema: `{'items': {'type': 'object', 'required': ['orderItemSummaryId', 'quantity', 'reason', 'shippingReductionFlag'], 'properties': {'orderItemSummaryId': {'type': 'string', 'description': 'ID of the OrderItemSummary to return (must have QuantityAvailableToReturn > 0)'}, 'quantity': {'type': 'number', 'description': "Number of units to return for this line. Must be a whole number with 1 <= quantity <= OrderItemSummary.QuantityAvailableToReturn. When that line's QuantityAvailableToReturn > 1, this value MUST come from an explicit customer choice (see verify-returnable-quantity QUANTITY CONFIRMATION) — do not default to 1 or to all-available."}, 'reason': {'type': 'string', 'description': 'Return reason. REQUIRED. Must be a value from the org\'s\nOrderItemSummaryChange.Reason picklist (see resolve-return-reasons).\nSending a string that isn\'t in the picklist returns 400\nINVALID_API_INPUT "No matching reason found." Cancel and Return\nshare the same picklist.', 'x-codey-enum-source': 'OrderItemSummaryChange.Reason', 'x-codey-enum-resolver-step': 'resolve-return-reasons'}, 'reasonForChangeText': {'type': 'string', 'description': 'Free-form description of the reason for change'}, 'shippingReductionFlag': {'type': 'boolean', 'description': 'REQUIRED — wire-verified against pbtest-ws on 2026-06-29: omitting it returns HTTP 500 UNKNOWN_EXCEPTION on preview-return (parity with cancel via the same ChangeInputRepresentation). Always send it explicitly: false keeps the delivery/shipping charge, true also credits shipping (affects totalAdjustedDeliveryAmount). Send false unless the customer asks to also credit shipping.'}, 'changeItemFees': {'type': 'array', 'description': 'Optional fee adjustments accompanying the return'}}}}`
|
|
363
|
+
- **Source:** output of `verify-returnable-quantity`
|
|
364
|
+
|
|
365
|
+
**Depends on:** `resolve-return-reasons`, `verify-returnable-quantity`, `ask-to-apply-fee`, `collect-per-item-return-fees`
|
|
366
|
+
|
|
367
|
+
#### `fetch-change-order-record`
|
|
368
|
+
|
|
369
|
+
Optional: read the ChangeOrder record produced by submit-return-items.
|
|
370
|
+
ChangeOrders live in the standard `Order` sObject (NOT a separate
|
|
371
|
+
`ChangeOrder` sObject — that does not exist). Discriminate via
|
|
372
|
+
`RelatedOrderType = 'ChangeOrder'` and `RelatedOrderId` pointing at
|
|
373
|
+
the parent Order. `TotalAmount` is NEGATIVE on returns (it represents
|
|
374
|
+
the reduction). `IsReductionOrder` is unreliable (false on cancels —
|
|
375
|
+
expected same on returns); the reduction signal is the
|
|
376
|
+
`RelatedOrderType` + negative-amount combination, not that flag.
|
|
377
|
+
|
|
378
|
+
**Call:** `getOrder` — status: `implemented`
|
|
379
|
+
|
|
380
|
+
**Inputs:**
|
|
381
|
+
|
|
382
|
+
- `changeOrderId` *(`String`)* — changeOrderId returned by submit-return-items
|
|
383
|
+
|
|
384
|
+
**Depends on:** `submit-return-items`
|
|
385
|
+
|
|
386
|
+
#### `fetch-change-order-on-timeout`
|
|
387
|
+
|
|
388
|
+
Optional recovery step. Run ONLY when submit-return-items returned an
|
|
389
|
+
ambiguous failure (timeout / 5xx after sending) and the per-line
|
|
390
|
+
QuantityReturned re-read was inconclusive. Locates a freshly-created
|
|
391
|
+
ChangeOrder for this OrderSummary so the agent can distinguish "landed
|
|
392
|
+
but response lost" from "never applied" before deciding to retry.
|
|
393
|
+
Return's submit is SYNCHRONOUS — on the happy path submit's response
|
|
394
|
+
already carries changeOrderId, so fetch-change-order-record (path lookup)
|
|
395
|
+
is the normal read; this step exists only for the response-lost case.
|
|
396
|
+
|
|
397
|
+
Two-step query mirroring cancel's async recovery: first fetch
|
|
398
|
+
OriginalOrderId from OrderSummary; then query Order filtered by
|
|
399
|
+
RelatedOrderId = OriginalOrderId AND RelatedOrderType='ChangeOrder',
|
|
400
|
+
newest first. Do NOT rely on IsReductionOrder (stays false on returns).
|
|
401
|
+
A no-match result means the return did NOT land — safe to retry.
|
|
402
|
+
|
|
403
|
+
**Call:** `querySoql` — status: `implemented`
|
|
404
|
+
|
|
405
|
+
**Inputs:**
|
|
406
|
+
|
|
407
|
+
- `orderSummaryId` *(`String`)* — OrderSummary Id; used to look up OriginalOrderId.
|
|
408
|
+
Source: input of submit-return-items.
|
|
409
|
+
|
|
410
|
+
**Depends on:** `submit-return-items`
|
|
411
|
+
|
|
412
|
+
### Write operations
|
|
413
|
+
|
|
414
|
+
#### `submit-return-items`
|
|
415
|
+
|
|
416
|
+
Irreversibly process the customer's return on the order. Must run AFTER preview-return-items
|
|
417
|
+
AND after the customer has been shown the preview's changeBalances output AND has explicitly
|
|
418
|
+
confirmed (a verbatim yes-equivalent reply). The agent MUST NOT call this step from its own
|
|
419
|
+
inference of consent — if no preview output has been surfaced to the customer in this
|
|
420
|
+
conversation, or if no explicit affirmative reply has been received in response, REFUSE this
|
|
421
|
+
call and route back to preview-return-items instead. A `success: true` from preview is NOT
|
|
422
|
+
consent.
|
|
423
|
+
|
|
424
|
+
**Call:** `postOrderSummarySubmitReturn` — status: `implemented`
|
|
425
|
+
|
|
426
|
+
**Inputs:**
|
|
427
|
+
|
|
428
|
+
- `customer_confirmation` *(`String`)* — The customer's VERBATIM affirmative reply, captured AFTER preview-return-items has been
|
|
429
|
+
invoked AND its changeBalances output has been read back to the customer in plain language
|
|
430
|
+
(line names, quantities, credit amount). Must be the unmodified customer-typed/spoken
|
|
431
|
+
response (e.g. "yes", "yes please go ahead", "confirm", "do it"). The agent MUST NOT
|
|
432
|
+
synthesize, paraphrase, or supply this value from its own reasoning; that is the bug class
|
|
433
|
+
this field exists to block. If you (the agent) do not have such a reply in the conversation
|
|
434
|
+
transcript, STOP — route back to preview-return-items, surface the preview to the customer,
|
|
435
|
+
and ask. A `success: true` from preview is NOT a substitute for the customer's reply. An
|
|
436
|
+
agent-supplied value here is a guardrail violation reportable as W-23144076 followup.
|
|
437
|
+
- `orderSummaryId` *(`String`)* — Same order summary ID from preview step
|
|
438
|
+
- `changeItems` *(`Array`)* — Same changeItems array used in preview (MUST match exactly,
|
|
439
|
+
including BOTH the resolved reason values AND shippingReductionFlag
|
|
440
|
+
(true|false) on every entry). Submit shares cancel's contract: HTTP
|
|
441
|
+
500 UNKNOWN_EXCEPTION if shippingReductionFlag is omitted (verified
|
|
442
|
+
against pbtest-ws 2026-06-29) — do NOT strip it when reusing the
|
|
443
|
+
preview payload.
|
|
444
|
+
Source: output of preview-return-items.
|
|
445
|
+
|
|
446
|
+
**Depends on:** `preview-return-items`
|
|
447
|
+
|
|
448
|
+
#### `refund-return-credit`
|
|
449
|
+
|
|
450
|
+
Move money back to the customer after the return's ChangeOrder is created.
|
|
451
|
+
submit-return-items only records the financial reduction (the ChangeOrder);
|
|
452
|
+
it does NOT itself return any money. This step delegates to the
|
|
453
|
+
ensure-order-refund SOR for the credit-memo + refund money movement.
|
|
454
|
+
|
|
455
|
+
It mirrors the shipped Core OMS Return flow — Return_Item-1.flow (in
|
|
456
|
+
core/ui-commerce-ordermanagement-components/flows/runtime_commerce_oms/) — which
|
|
457
|
+
runs ONE refund pipeline after Return_Order_Item_Summaries_Submit: the
|
|
458
|
+
CREDIT-MEMO path (return has no excess-funds branch like cancel/adjust have),
|
|
459
|
+
in this exact element order:
|
|
460
|
+
• Fee_Change_Order_Id_Exists — [if submitReturnOutput.feeChangeOrderId not null]
|
|
461
|
+
Create_An_Invoice → createInvoiceFromChangeOrders(feeChangeOrderId) → invoicesToPay
|
|
462
|
+
• createCreditMemoId → createCreditMemoOrderSummary(changeOrderIds = [return
|
|
463
|
+
changeOrderId]) [UNCONDITIONAL — runs on every return]
|
|
464
|
+
• Is_Refund_Needed — submitReturnOutput.changeBalances.totalRefundableAmount > 0
|
|
465
|
+
• Ensure_Payment_Credit_Required — [if paymentCredit.amount > 0 AND
|
|
466
|
+
paymentCreditSequence non-empty] Ensure_Payment_Credit → ensurePaymentCredit
|
|
467
|
+
• Credit_Memo_Balance — Credit_Memo.Balance == 0 → done (nothing to refund);
|
|
468
|
+
else → ensureRefund
|
|
469
|
+
• ensureRefund → ensureRefundsOrderSummaryAsync(creditMemoId, invoicesToPay, sequences)
|
|
470
|
+
ensure-order-refund performs every one of these; return-order-summary only
|
|
471
|
+
produces the ChangeOrder — the identical division of labor as
|
|
472
|
+
cancel-order-summary / adjust-order-summary → ensure-order-refund.
|
|
473
|
+
|
|
474
|
+
**Delegates to:** `cc-om-fast-and-furious/ensure-order-refund`
|
|
475
|
+
|
|
476
|
+
**Depends on:** `submit-return-items`
|
|
477
|
+
|
|
478
|
+
### Verify operations
|
|
479
|
+
|
|
480
|
+
#### `verify-return-items`
|
|
481
|
+
|
|
482
|
+
Verify the return landed by reading back BOTH the OrderSummary
|
|
483
|
+
(for the GrandTotalAmount delta) and each returned OrderItemSummary
|
|
484
|
+
(for QuantityReturned and QuantityAvailableToReturn transitions).
|
|
485
|
+
One read is not enough — see assertions and agent_guidance below.
|
|
486
|
+
|
|
487
|
+
**Call:** `querySoql` — status: `implemented`
|
|
488
|
+
|
|
489
|
+
**Inputs:**
|
|
490
|
+
|
|
491
|
+
- `orderSummaryId` *(`String`)* — Source: output of submit-return-items.
|
|
492
|
+
- `orderItemSummaryIds` *(`Array`)* — IDs of the returned lines, sourced from submit-return-items.output
|
|
493
|
+
.order_item_summary_ids (which projects $.changeItems[*]
|
|
494
|
+
.orderItemSummaryId). Used to scope the line-item read-back so the
|
|
495
|
+
assertion checks the exact set the agent returned. The follow_up_query
|
|
496
|
+
references these via the {orderItemSummaryIdsInClause} placeholder —
|
|
497
|
+
see agent_guidance for the rendering rule. Every element MUST match
|
|
498
|
+
the per-item pattern below before it's rendered into the IN-list; the
|
|
499
|
+
IN-list join is a raw string splice into SOQL.
|
|
500
|
+
- schema: `{'minItems': 1, 'items': {'type': 'string', 'pattern': '^10u[a-zA-Z0-9]{12,15}$'}}`
|
|
501
|
+
- **Source:** output of `submit-return-items`
|
|
502
|
+
- `preReturnSnapshot` *(`Array`)* — Per-line pre-submit snapshot captured from verify-returnable-quantity's
|
|
503
|
+
`pre_return_snapshot` output, filtered to just the lines being returned
|
|
504
|
+
AND paired with the returned quantity for each. Each entry is an object:
|
|
505
|
+
{orderItemSummaryId, quantityReturnedBefore, quantityAvailableToReturnBefore, returnedQty}
|
|
506
|
+
The assertion uses these pre-values to compute the exact delta — without
|
|
507
|
+
them the verify cannot distinguish "return landed" from "no-op". Build
|
|
508
|
+
this by joining verify-returnable-quantity's records to the changeItems[]
|
|
509
|
+
the agent sent to submit-return-items (matching on Id, quantity → returnedQty).
|
|
510
|
+
- schema: `{'minItems': 1, 'items': {'type': 'object', 'required': ['orderItemSummaryId', 'quantityReturnedBefore', 'quantityAvailableToReturnBefore', 'returnedQty'], 'properties': {'orderItemSummaryId': {'type': 'string', 'pattern': '^10u[a-zA-Z0-9]{12,15}$'}, 'quantityReturnedBefore': {'type': 'number'}, 'quantityAvailableToReturnBefore': {'type': 'number'}, 'returnedQty': {'type': 'number'}}}}`
|
|
511
|
+
- **Source:** output of `verify-returnable-quantity`
|
|
512
|
+
|
|
513
|
+
**Depends on:** `submit-return-items`, `verify-returnable-quantity`
|