@salesforce/afv-skills 1.68.0 → 1.70.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/afcc-setup-coordinate/SKILL.md +348 -0
- package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
- package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
- package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
- package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
- package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
- package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
- package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
- package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
- package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
- package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
- package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
- package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
- package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
- package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
- package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
- package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
- package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
- package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
- package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
- package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
- package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
- package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
- package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
- package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
- package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
- package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
- package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +23 -31
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +2 -1
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +118 -2
- package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +2 -2
- package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +9 -2
- package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +12 -1
- package/skills/commerce-react-storefront-create/SKILL.md +54 -21
- package/skills/data360-code-extension-generate/SKILL.md +160 -252
- package/skills/data360-code-extension-generate/references/README.md +34 -172
- package/skills/data360-code-extension-generate/references/environment-setup.md +198 -0
- package/skills/data360-code-extension-generate/references/mcp-integration.md +36 -0
- package/skills/data360-code-extension-generate/references/quick-reference.md +132 -202
- package/skills/data360-code-extension-generate/references/run-logs.md +31 -0
- package/skills/data360-code-extension-generate/references/schema-discovery.md +45 -0
- package/skills/data360-code-extension-generate/references/troubleshooting.md +45 -0
- package/skills/data360-code-extension-generate/scripts/check_env.sh +197 -0
- package/skills/data360-code-extension-generate/scripts/venv_hook.sh +22 -0
- package/skills/dx-devops-work-item-manage/SKILL.md +24 -8
- package/skills/dx-devops-work-item-manage/examples/common-workflows.md +32 -0
- package/skills/dx-devops-work-item-manage/references/review-api.md +95 -0
- package/skills/dx-lifecycle-center/SKILL.md +24 -18
- package/skills/dx-lifecycle-center/examples/workflows.md +57 -34
- package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
- package/skills/dx-lifecycle-center/references/connect-org.md +59 -28
- package/skills/dx-lifecycle-center/references/deploy.md +3 -3
- package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
- package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
- package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
- package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
- package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
- package/skills/dx-org-manage/SKILL.md +12 -12
- package/skills/dx-org-manage/examples/scratch-orgs/display_output.json +1 -3
- package/skills/dx-org-manage/examples/scratch-orgs/success_shape.json +1 -3
- package/skills/dx-org-manage/references/opening-org.md +1 -1
- package/skills/dx-org-manage/references/scratch-org-operations.md +15 -20
- package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
- package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
- package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +3 -4
- package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +10 -7
- package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
- package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
- package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
- package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
- package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
- package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
- package/skills/education-cloud-academic-calendar-generate/SKILL.md +2 -2
- package/skills/education-cloud-course-catalog-migrate/SKILL.md +1 -1
- package/skills/education-cloud-domain-configure/references/domain-features/recruitment-admissions.md +8 -7
- package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -0
- package/skills/education-cloud-multi-campus-configure/references/error_handling.md +7 -6
- package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +2 -0
- package/skills/education-cloud-student-recruitment-agent-configure/references/customer-narration.md +2 -0
- package/skills/education-cloud-student-recruitment-agent-configure/references/flows.md +1 -1
- package/skills/education-cloud-student-recruitment-agent-configure/references/grounding.md +5 -4
- package/skills/education-cloud-student-recruitment-agent-configure/references/permissions.md +1 -1
- package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +1 -1
- package/skills/education-cloud-student-recruitment-agent-configure/references/routing.md +1 -1
- package/skills/experience-afv-analytics-query/SKILL.md +239 -0
- package/skills/experience-afv-analytics-query/references/references.md +176 -0
- package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
- package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
- package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
- package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
- package/skills/experience-app-mcp-generate/SKILL.md +174 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
- package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
- package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
- package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
- package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
- package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
- package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
- package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
- package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
- package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
- package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
- package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
- package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
- package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
- package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
- package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
- package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
- package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
- package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
- package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
- package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
- package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
- package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
- package/skills/experience-cms-content-type-generate/SKILL.md +8 -7
- package/skills/experience-cms-content-type-generate/references/agent-checklist.md +3 -3
- package/skills/experience-cms-content-type-generate/references/anti-patterns.md +2 -2
- package/skills/experience-cms-content-type-generate/references/discovery-details.md +1 -1
- package/skills/experience-cms-content-type-generate/references/retrieve-and-reconcile.md +5 -9
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.mjs +10 -0
- package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +2 -2
- package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +2 -2
- package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +1 -1
- package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1 -1
- package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +2 -2
- package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +2 -2
- package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
- package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
- package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
- package/skills/platform-custom-application-generate/SKILL.md +97 -104
- package/skills/platform-custom-application-generate/references/app-properties.md +52 -0
- package/skills/platform-custom-application-generate/references/app-visibility.md +19 -0
- package/skills/platform-custom-application-generate/references/utility-bar.md +55 -0
- package/skills/platform-custom-field-generate/SKILL.md +24 -16
- package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
- package/skills/platform-custom-setting-generate/SKILL.md +1 -0
- package/skills/platform-datamask-run/SKILL.md +1 -1
- package/skills/platform-datamask-run/references/policy-authoring.md +41 -18
- package/skills/platform-dataspace-access-configure/SKILL.md +25 -10
- package/skills/platform-dsar-policy-manage/SKILL.md +7 -6
- package/skills/platform-dsar-policy-manage/references/export-and-history.md +10 -8
- package/skills/platform-dsar-policy-manage/references/report-format.md +4 -2
- package/skills/platform-flexipage-generate/SKILL.md +7 -10
- package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
- package/skills/platform-metadata-grounding-get/SKILL.md +7 -7
- package/skills/platform-policy-rule-generate/SKILL.md +9 -7
- package/skills/platform-policy-rule-generate/references/condition-model.md +3 -3
- package/skills/platform-policy-rule-generate/references/conjunction-expression.md +9 -1
- package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +9 -1
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +1 -0
- package/skills/platform-policy-rule-generate/references/headless-transport.md +2 -2
- package/skills/platform-policy-rule-generate/references/policy-schema-full.md +1 -1
- package/skills/platform-policy-rule-generate/references/policy-shapes.md +33 -0
- package/skills/platform-policy-rule-generate/references/templates-advanced.md +1 -1
- package/skills/platform-policy-rule-generate/references/ui-compatibility.md +5 -5
- package/skills/platform-report-generate/SKILL.md +29 -8
- package/skills/platform-report-generate/references/column-names.md +12 -1
- package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
- package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
- package/skills/platform-report-generate/references/verification-checklist.md +12 -0
- package/skills/platform-sharing-rules-generate/SKILL.md +12 -3
- package/skills/platform-sharing-rules-generate/references/rule-types.md +1 -0
- package/skills/service-agentforce-channel-configure/SKILL.md +6 -3
- package/skills/service-agentforce-channel-configure/references/agent-wiring.md +5 -3
- package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +24 -15
- package/skills/service-agentforce-channel-configure/references/input-validation.md +23 -0
- package/skills/service-agentforce-channel-configure/references/live-traffic-gate.md +13 -7
- package/skills/service-agentforce-channel-configure/references/queue-resolution.md +3 -1
- package/skills/service-agentforce-human-escalation-configure/references/_vendored/input-validation.md +23 -0
- package/skills/service-agentforce-human-escalation-configure/references/_vendored/queue-resolution.md +146 -0
- package/skills/service-agentforce-human-escalation-configure/references/escalation-mechanism.md +1 -1
- package/skills/service-agentforce-human-escalation-configure/scripts/tests/_bootstrap.py +42 -11
- package/skills/service-agentforce-human-escalation-configure/scripts/tests/test_escalation_contracts.py +45 -0
- package/skills/service-agentforce-human-escalation-configure/scripts/verify-and-configure.sh +23 -9
- package/skills/service-de-channel-activate/SKILL.md +10 -10
- package/skills/service-de-channel-activate/references/gotchas.md +4 -4
- package/skills/service-de-channel-activate/references/phone-verification.md +43 -19
- package/skills/service-de-channel-create/SKILL.md +1 -1
- package/skills/service-de-channel-create/references/facebook.md +1 -1
- package/skills/service-de-channel-create/references/whatsapp.md +33 -6
- package/skills/service-de-channel-routing-configure/SKILL.md +5 -1
- package/skills/service-de-channel-routing-configure/references/gotchas.md +3 -1
- package/skills/service-de-channel-routing-configure/references/named-queue.md +39 -0
- package/skills/service-de-channel-settings-configure/SKILL.md +3 -1
- package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +2 -2
- package/skills/service-de-channel-settings-configure/references/gotchas.md +12 -1
- package/skills/service-de-headless-channel-configure/SKILL.md +68 -74
- package/skills/service-de-headless-channel-configure/references/gotchas.md +6 -2
- package/skills/service-de-headless-channel-configure/references/inputs.md +19 -0
- package/skills/service-de-headless-channel-configure/references/output-envelopes.md +23 -1
- package/skills/service-de-headless-channel-configure/references/partial-success.md +1 -0
- package/skills/service-de-headless-channel-configure/references/requested-settings.md +55 -0
- package/skills/service-de-headless-channel-configure/references/worked-examples.md +35 -1
- package/skills/service-digital-engagement-channel-configure/SKILL.md +45 -108
- package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +2 -0
- package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
- package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
- package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
- package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +18 -14
- package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +17 -21
- package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
- package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
- package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
- package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
- package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
- package/skills/service-digital-engagement-deployment-configure/SKILL.md +2 -2
- package/skills/service-digital-engagement-deployment-configure/references/onboarding_contract.md +4 -2
- package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +1 -1
- package/skills/service-e911-configure/SKILL.md +242 -0
- package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
- package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
- package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
- package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
- package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
- package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
- package/skills/service-omni-command-center-configure/SKILL.md +1 -1
- package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
- package/skills/data360-schema-get/SKILL.md +0 -388
- package/skills/data360-schema-get/references/README.md +0 -191
- package/skills/data360-schema-get/scripts/get_dlo_schema.py +0 -244
- package/skills/data360-schema-get/scripts/get_dmo_schema.py +0 -233
- package/skills/dx-lifecycle-center/assets/widgets/connect-connected/connect-connected.json +0 -65
- package/skills/dx-lifecycle-center/assets/widgets/connect-connected/schema.json +0 -32
- package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/connect-sign-in.json +0 -57
- package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/schema.json +0 -21
- package/skills/dx-lifecycle-center/scripts/card-policy.jq +0 -71
- package/skills/dx-lifecycle-center/scripts/fill-widget.jq +0 -29
- package/skills/dx-lifecycle-center/scripts/widget.sh +0 -28
- package/skills/experience-content-media-image-generate/SKILL.md +0 -83
- package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
- package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
- package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
- package/skills/field-service-prework-brief-deployer-configure/SKILL.md +0 -646
- package/skills/field-service-voice-to-form-configure/SKILL.md +0 -650
|
@@ -1,335 +1,243 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: data360-code-extension-generate
|
|
3
|
-
description: "
|
|
3
|
+
description: "Create, develop, test, and deploy Data 360 (Data Cloud) Code Extensions with the sf CLI data-code-extension plugin and the salesforce-data-customcode Python SDK. Use this skill when creating or writing a code extension script or function (for example one that reads a DLO and writes a DLO), creating custom PySpark transformations for Data 360, editing an existing code extension payload/entrypoint.py, setting up a local code extension environment, scanning, running locally, deploying, or redeploying code extensions. Supports environment setup, init, scan, run, zip, and deploy for script and function packages."
|
|
4
4
|
metadata:
|
|
5
|
-
version: "
|
|
5
|
+
version: "2.0.0"
|
|
6
6
|
domains: ["Data 360", "Developer Experience"]
|
|
7
|
-
relatedSkills:
|
|
8
|
-
- "data360-schema-get"
|
|
9
7
|
cliTools:
|
|
10
8
|
- tool: ["docker"]
|
|
11
9
|
semver: ">=20.0.0"
|
|
12
|
-
- tool: ["
|
|
10
|
+
- tool: ["git"]
|
|
11
|
+
semver: ">=2.0.0"
|
|
12
|
+
- tool: ["java"]
|
|
13
|
+
semver: ">=11.0.0"
|
|
14
|
+
- tool: ["jq"]
|
|
15
|
+
semver: ">=1.6.0"
|
|
16
|
+
- tool: ["npm"]
|
|
17
|
+
semver: ">=8.0.0"
|
|
18
|
+
- tool: ["pip", "pip3"]
|
|
13
19
|
semver: ">=23.0.0"
|
|
14
|
-
- tool: ["
|
|
15
|
-
semver: ">=3.11.0"
|
|
16
|
-
- tool: ["python3"]
|
|
20
|
+
- tool: ["python3.11", "python3"]
|
|
17
21
|
semver: ">=3.11.0"
|
|
18
22
|
- tool: ["sf"]
|
|
19
23
|
semver: ">=2.0.0"
|
|
20
24
|
---
|
|
21
25
|
|
|
22
|
-
# data360-code-extension-generate
|
|
26
|
+
# data360-code-extension-generate
|
|
23
27
|
|
|
24
28
|
## Overview
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## When to Use
|
|
30
|
+
A Data 360 code extension is customer-owned Python (PySpark) that runs inside Data 360:
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- User is working with Data Cloud transformations
|
|
35
|
-
- User wants to read/write DLO or DMO data programmatically
|
|
32
|
+
| Type | Purpose | Local test |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| **script** | Batch transformation deployed as a **data transform**. Reads and writes DLOs or DMOs. | `script run` against real org data |
|
|
35
|
+
| **function** | Custom node for **Search Index Chunking** (`--use-in-feature SearchIndexChunking`). | `function run --test-with test.json` |
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Workflow: environment check → init → discover schemas → develop → scan → run locally → deploy → run the deployed transform. The skill needs only a shell, file editing, and the ability to ask the user questions. It works with a project venv or with a single system Python 3.11 (cloud workspaces, containers).
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Use it to set up a code extension environment, create a script or function package, change `payload/entrypoint.py`, scan, run locally, deploy, redeploy, or clean up.
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
sf plugins --core | grep data-code-extension
|
|
44
|
-
```
|
|
45
|
-
If not installed:
|
|
46
|
-
```bash
|
|
47
|
-
sf plugins install @salesforce/plugin-data-code-extension
|
|
48
|
-
```
|
|
41
|
+
## Agent Rules (apply to every phase)
|
|
49
42
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
1. **Pass `--target-org <ORG_ALIAS>` explicitly** to `run`, `deploy` and every `sf org` / `sf api` command, even when it's the CLI default. `init`, `scan` and `zip` reject it (`Nonexistent flag: --target-org`).
|
|
44
|
+
2. **Shell state doesn't persist.** Start every block that runs `sf data-code-extension`, `python3` or `pip` with the `<PY_ENV>` line from Phase 0b; other commands don't need it. Write `<ORG_ALIAS>`, `<PROJECT_DIR>`, `<API_VERSION>` and `<package_name>` literally. Never use `$(…)`, backticks or `eval`: some hosts (for example Code Builder) ask for approval on each one. Copy `PY_ENV` and `API_VERSION` exactly as `check_env.sh` prints them.
|
|
45
|
+
3. **Check before you install**, and skip anything already present.
|
|
46
|
+
4. **Confirm with the user before changing the org**: deploy, delete, or running a deployed transform.
|
|
47
|
+
5. **Hand interactive or privileged steps to the user**: `sf org login web`, enabling Code Extension, installing or starting Docker Desktop, `sudo`, installing Homebrew.
|
|
48
|
+
6. **Never print secrets** (access tokens, session IDs, OAuth client IDs or consumer keys).
|
|
49
|
+
7. **Resolve, print, proceed.** Don't ask for values the environment determines (Phase 0a). Ask only when a value is missing or ambiguous. If your shell can't prompt, ask in the conversation and write the files yourself.
|
|
50
|
+
8. **Schema first, then code** (Phase 2). Never write code first and ask the user to check the schema afterwards.
|
|
51
|
+
9. **Data 360 MCP server first for org lookups** (schemas, queries, runs, deletes). Do the MCP check (Phase 0b) once per session before the first lookup, even if Phase 0 was skipped. Fall back to `sf api` or the UI only when it isn't connected or a call fails, and say which you used. On `Session not found` (404), retry once before falling back. Details: [references/mcp-integration.md](references/mcp-integration.md).
|
|
52
|
+
10. **stderr:** when piping `sf … --json` into `jq`, use `2>/dev/null`, never `2>&1` (warnings break the JSON). Never redirect stderr on `scan`, `run` or `deploy`; their errors and tracebacks go there.
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
pip list | grep salesforce-data-customcode
|
|
58
|
-
```
|
|
59
|
-
If not installed:
|
|
60
|
-
```bash
|
|
61
|
-
pip install salesforce-data-customcode
|
|
62
|
-
```
|
|
54
|
+
## Phase 0: Environment and Org Readiness
|
|
63
55
|
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
docker ps
|
|
67
|
-
```
|
|
56
|
+
### 0a. Resolve parameters
|
|
68
57
|
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
sf org display --target-org <org_alias> --json
|
|
72
|
-
```
|
|
58
|
+
Take what the user already gave and pass `""` for the rest; `check_env.sh` (0b) resolves it:
|
|
73
59
|
|
|
74
|
-
|
|
60
|
+
| Parameter | Resolution order (first match wins) |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `PROJECT_DIR` | User value → `$D360_PROJECT_DIR` → `/home/codebuilder/dx-project` if it exists (Code Builder) → current folder |
|
|
63
|
+
| `ORG_ALIAS` | User value → `$D360_TARGET_ORG` → CLI default org if Connected → the only Connected org. Alias, or username if there's no alias |
|
|
64
|
+
| `<package_name>` | User value, else a snake_case name from the request (for example `employee_upper`) |
|
|
75
65
|
|
|
76
|
-
|
|
66
|
+
Tell the user the values in one line and continue without waiting ("Using org `…` and project `…`. Say so if you want different ones."). Stop and ask only if several orgs are Connected with no Connected default (show them), or if none is Connected (ask for the My Domain URL and hand the browser login to the user: environment-setup.md §2).
|
|
77
67
|
|
|
78
|
-
|
|
68
|
+
### 0b. Run the read-only check
|
|
79
69
|
|
|
80
|
-
**
|
|
70
|
+
The plugin needs **exactly Python 3.11** and uses whatever `python3` is on `PATH`. The check picks **system mode** (`python3` is 3.11 and pip isn't blocked; `<PY_ENV>` puts the user-base `bin` folder on `PATH`) or **venv mode** (`<PROJECT_DIR>/.venv`; `<PY_ENV>` activates it). An existing `.venv` always means venv mode. Details: [references/environment-setup.md](references/environment-setup.md) §3.
|
|
81
71
|
|
|
82
|
-
For **script-based** code extensions (batch transformations):
|
|
83
72
|
```bash
|
|
84
|
-
|
|
73
|
+
bash <SKILL_DIR>/scripts/check_env.sh "<PROJECT_DIR or empty>" "<ORG_ALIAS or empty>" # optional 3rd argument: system | venv
|
|
85
74
|
```
|
|
86
75
|
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
sf data-code-extension function init --package-dir <directory>
|
|
90
|
-
```
|
|
76
|
+
It changes nothing. It prints ✅/❌ for `sf` and the plugin, Python 3.11 (after `<PY_ENV>`), pip or venv state, `salesforce-data-customcode` and `pipreqs`, Java, Docker and the org connection, then `PROJECT_DIR=`, `ORG_ALIAS=`, `MODE=`, `PY_ENV=` and `API_VERSION=`. Use the printed `PY_ENV` and `API_VERSION` from here on.
|
|
91
77
|
|
|
92
|
-
|
|
93
|
-
- `--package-dir, -p` - Directory path where the package will be created
|
|
94
|
-
|
|
95
|
-
**What it creates:**
|
|
96
|
-
```text
|
|
97
|
-
my-transform/ # Project root
|
|
98
|
-
├── payload/ # CRITICAL: This is what --package-dir must point to for deploy
|
|
99
|
-
│ ├── entrypoint.py # Main transformation code
|
|
100
|
-
│ └── config.json # Code extension configuration
|
|
101
|
-
├── requirements.txt # Python dependencies
|
|
102
|
-
└── README.md
|
|
103
|
-
```
|
|
78
|
+
For each ❌, follow environment-setup.md in this order, then rerun the check:
|
|
104
79
|
|
|
105
|
-
|
|
80
|
+
1. `sf` can't run in this shell: your host's sandbox blocks it. Rerun with permission to run outside the sandbox; until then, ignore the other ❌s.
|
|
81
|
+
2. Venv mode: create the venv with `python3.11 -m venv .venv` (not `uv venv`), then run `bash <SKILL_DIR>/scripts/venv_hook.sh "<PROJECT_DIR>"`.
|
|
82
|
+
3. Install the SDK **and** `pipreqs` in one command with `python3 -m pip` (never bare `pip3`), as the check prints it. The first install downloads PySpark (about 300 MB); let it finish.
|
|
106
83
|
|
|
107
|
-
**
|
|
84
|
+
**Don't start Phase 1 until every ❌ except Docker (deploy only) is fixed.** If an install fails (for example, no network), stop and tell the user. Use only this project's Python; never borrow another project's venv. Java: JDK 17 is recommended (11 works); JDK 21 works except for `toPandas()` and pandas UDFs (environment-setup.md §Java).
|
|
108
85
|
|
|
109
|
-
**
|
|
86
|
+
**MCP check (once, here).** Look at your own tool list, including deferred tools listed by name only, for a server whose name contains `d360` or `data360` and whose tools end in `search`, `payload_examples` and `execute`. Load them if your host requires it, then print `MCP: available (<server>)` or `MCP: not connected`. Reuse this answer for the rest of the session.
|
|
110
87
|
|
|
111
|
-
|
|
112
|
-
|---------|----------|-------------------|
|
|
113
|
-
| `init` | Parent directory | `<project-name>` or `.` |
|
|
114
|
-
| `scan` | Project root | `./payload/entrypoint.py` |
|
|
115
|
-
| `run` | Project root | `./payload/entrypoint.py` |
|
|
116
|
-
| `deploy` | Project root | `--package-dir ./payload` (**REQUIRED**) |
|
|
88
|
+
### 0c. Enable Code Extension (manual, UI only)
|
|
117
89
|
|
|
118
|
-
|
|
90
|
+
There's no API or CLI for this. Before deploying, ask the user to turn on **Data Cloud Setup → Feature Manager → Code Extension** and confirm. The user also needs Data 360 admin permissions.
|
|
119
91
|
|
|
120
|
-
|
|
92
|
+
## Phase 1: Initialize
|
|
121
93
|
|
|
122
|
-
|
|
94
|
+
Use `script` unless the user asks for a function or mentions Search Index Chunking. Print the choice and continue.
|
|
123
95
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
96
|
+
```bash
|
|
97
|
+
<PY_ENV>
|
|
98
|
+
cd <PROJECT_DIR>
|
|
99
|
+
sf data-code-extension script init --package-dir <package_name>
|
|
100
|
+
# function: sf data-code-extension function init --package-dir <package_name> --use-in-feature SearchIndexChunking
|
|
101
|
+
```
|
|
127
102
|
|
|
128
|
-
|
|
103
|
+
The package root `<package_name>/` holds `payload/entrypoint.py`, `payload/config.json` (written by `scan`) and `requirements.txt`. Run `scan`, `run` and `deploy` from the package root (Command Reference). Full layout: [references/quick-reference.md](references/quick-reference.md).
|
|
129
104
|
|
|
130
|
-
|
|
131
|
-
df = client.read_dlo('Employee__dll')
|
|
105
|
+
**The stock entrypoint reads `Account_std__dll` and writes `Account_std_copy__dll`, which usually don't exist** (`table does not exist`). Replace them with real objects (Phase 2).
|
|
132
106
|
|
|
133
|
-
|
|
134
|
-
df['position_upper'] = df['position'].str.upper()
|
|
107
|
+
## Phase 2: Discover Source and Target Schemas (before writing code)
|
|
135
108
|
|
|
136
|
-
|
|
137
|
-
client.write_to_dlo('Employee_Upper__dll', df, 'overwrite')
|
|
138
|
-
```
|
|
109
|
+
Do this **every time before you write or edit `entrypoint.py`**, including follow-ups such as "update entrypoint.py to read X and write Y". You can reuse schemas already fetched in this session.
|
|
139
110
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
def transform(event, context):
|
|
145
|
-
client = FunctionClient(context)
|
|
146
|
-
input_data = event['data']
|
|
147
|
-
output = {
|
|
148
|
-
'name': input_data['name'].upper(),
|
|
149
|
-
'status': 'processed'
|
|
150
|
-
}
|
|
151
|
-
return output
|
|
152
|
-
```
|
|
111
|
+
1. Identify the source and target objects. If one isn't named, ask.
|
|
112
|
+
2. Get each object's fields and types. If MCP is available you must use it: `payload_examples` for `d360_dlo_get`, then `execute`, one DLO per call. Otherwise use the `sf api` fallback. Say which you used. Commands and response shapes: [references/schema-discovery.md](references/schema-discovery.md).
|
|
113
|
+
3. If the logic filters or joins, look at about 20 rows of input data first (MCP `d360_query_sql`, or the fallback in schema-discovery.md), especially for self-joins and root conditions (null vs `0`).
|
|
114
|
+
4. Print the field mapping, one line per target column: `<target column> ← <source field or expression>`. Then write the code.
|
|
153
115
|
|
|
154
|
-
**
|
|
155
|
-
- `client.read_dlo('DLO_Name__dll')` - Read from DLO
|
|
156
|
-
- `client.read_dmo('DMO_Name')` - Read from DMO
|
|
157
|
-
- `client.write_to_dlo('DLO_Name__dll', df, 'overwrite')` - Write to DLO
|
|
158
|
-
- `client.write_to_dmo('DMO_Name', df, 'upsert')` - Write to DMO
|
|
116
|
+
**Mapping rules:**
|
|
159
117
|
|
|
160
|
-
|
|
118
|
+
- Take column names from the **target schema**, not from the request wording. Match on the same or a similar name first, then on what the request asks for. Never invent a column.
|
|
119
|
+
- **Lowercase only.** The SDK lowercases the columns it reads, and writes accept only lowercase names. Leave out target fields with capitals, such as the standard ingestion fields `KQ_id__c`, `DataSource__c`, `DataSourceObject__c`, `InternalOrganization__c` and `cdp_sys_SourceVersion__c`, and say why. If the user needs one, they must add a lowercase field to the target DLO in Data Cloud.
|
|
120
|
+
- **Stop before writing code** if a DLO doesn't exist, if no target column can hold a requested value, or if the user named a column the target doesn't have. If several columns fit, ask. Offer the options (add the field in Data Cloud, use another column or DLO, change the logic). Never create or change DLOs yourself.
|
|
161
121
|
|
|
162
|
-
|
|
122
|
+
Checklist before Phase 3:
|
|
163
123
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
124
|
+
- [ ] Mapping printed; every read and write object and every field exists
|
|
125
|
+
- [ ] The code will end with a `select()` of lowercase target columns only
|
|
126
|
+
- [ ] Join keys have the same type. A Number reads as `1.0`, so cast it before comparing with Text: `F.col("<key>").cast("long").cast("string")`
|
|
127
|
+
- [ ] No other data transform writes to the output DLO
|
|
168
128
|
|
|
169
|
-
|
|
170
|
-
- Read permissions for DLOs/DMOs
|
|
171
|
-
- Write permissions for DLOs/DMOs
|
|
172
|
-
- Python package dependencies
|
|
173
|
-
- Updates `config.json` and `requirements.txt`
|
|
129
|
+
## Phase 3: Develop the Transformation
|
|
174
130
|
|
|
175
|
-
|
|
131
|
+
Write the code from the Phase 2 mapping, using only names it returned. `read_dlo` and `read_dmo` return **PySpark** DataFrames, not pandas.
|
|
176
132
|
|
|
177
|
-
|
|
133
|
+
```python
|
|
134
|
+
from pyspark.sql.functions import col, upper
|
|
178
135
|
|
|
179
|
-
|
|
136
|
+
from datacustomcode.client import Client
|
|
137
|
+
from datacustomcode.io.writer.base import WriteMode
|
|
180
138
|
|
|
181
|
-
After scanning, review the generated `config.json` to identify all DLOs:
|
|
182
139
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
```
|
|
140
|
+
def main():
|
|
141
|
+
client = Client()
|
|
186
142
|
|
|
187
|
-
|
|
143
|
+
df = client.read_dlo("<SOURCE_DLO>")
|
|
188
144
|
|
|
189
|
-
|
|
145
|
+
# One expression per target column, in the order of the Phase 2 mapping.
|
|
146
|
+
result = df.select(
|
|
147
|
+
col("<source_field_a>").alias("<target_column_a>"),
|
|
148
|
+
upper(col("<source_field_b>")).alias("<target_column_b>"),
|
|
149
|
+
)
|
|
190
150
|
|
|
191
|
-
|
|
151
|
+
client.write_to_dlo("<TARGET_DLO>", result, WriteMode.OVERWRITE)
|
|
192
152
|
|
|
193
|
-
1. **Verify DLO exists:**
|
|
194
|
-
```bash
|
|
195
|
-
python3 scripts/get_dlo_schema.py <org_alias> <dlo_name>
|
|
196
|
-
```
|
|
197
153
|
|
|
198
|
-
|
|
154
|
+
if __name__ == "__main__":
|
|
155
|
+
main()
|
|
156
|
+
```
|
|
199
157
|
|
|
200
|
-
|
|
201
|
-
- Validate all DLOs in `read` permissions
|
|
202
|
-
- Validate all DLOs in `write` permissions
|
|
203
|
-
- Check field names match exactly (case-sensitive)
|
|
204
|
-
- Verify data types are compatible with operations
|
|
158
|
+
**SDK rules (`scan` enforces them):** read DLOs **or** DMOs, never both; DLO→DLO or DMO→DMO only; at least one read, with the object name as a string literal; the output DLO must exist and match the columns you write.
|
|
205
159
|
|
|
206
|
-
|
|
160
|
+
Use `WriteMode.OVERWRITE` for a full recompute. `APPEND`, `MERGE` and `MERGE_UPSERT_DELETE` are also available; `OVERWRITE_PARTITIONS` raises an error. More patterns, write modes and the optional SDK helpers (LLM text generation, Einstein predictions, bundled files): [references/quick-reference.md](references/quick-reference.md). For a function, implement `function(request: SearchIndexChunkingV1Request, runtime: Runtime) -> SearchIndexChunkingV1Response` from the generated template.
|
|
207
161
|
|
|
208
|
-
|
|
162
|
+
## Phase 4: Scan
|
|
209
163
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
-
|
|
214
|
-
|
|
164
|
+
```bash
|
|
165
|
+
<PY_ENV>
|
|
166
|
+
cd <PROJECT_DIR>/<package_name>
|
|
167
|
+
sf data-code-extension script scan --entrypoint ./payload/entrypoint.py
|
|
168
|
+
```
|
|
215
169
|
|
|
216
|
-
|
|
170
|
+
`scan` rewrites `payload/config.json` (read and write permissions) and `requirements.txt` (with `pipreqs`). Rerun it after every code change, and check that `permissions.read` and `permissions.write` list exactly the Phase 2 objects. On `PipreqsScanError`, install `pipreqs` and rerun. **Don't use `--no-requirements`** unless the user asks: the deployed transform would be missing packages.
|
|
217
171
|
|
|
218
|
-
|
|
172
|
+
## Phase 5: Run Locally
|
|
219
173
|
|
|
220
|
-
**Command:**
|
|
221
174
|
```bash
|
|
222
|
-
|
|
175
|
+
<PY_ENV>
|
|
176
|
+
cd <PROJECT_DIR>/<package_name>
|
|
177
|
+
sf data-code-extension script run --entrypoint ./payload/entrypoint.py --target-org <ORG_ALIAS>
|
|
178
|
+
# function: sf data-code-extension function run --entrypoint ./payload/entrypoint.py --test-with ./payload/tests/test.json
|
|
223
179
|
```
|
|
224
180
|
|
|
225
|
-
**
|
|
226
|
-
-
|
|
227
|
-
-
|
|
181
|
+
- `run` reads real org data (1,000 rows per read) and **prints** the output instead of writing it, so the target DLO stays empty. That's expected.
|
|
182
|
+
- An empty printed table usually means the filter or join matched nothing. Check the input data (Phase 2) before changing the code.
|
|
183
|
+
- On Java 21, the `Arrow optimization ... DirectByteBuffer` `UserWarning` is harmless.
|
|
228
184
|
|
|
229
|
-
|
|
230
|
-
- Re-validate DLO schemas
|
|
231
|
-
- Check field names are exact matches
|
|
232
|
-
- Verify data types are compatible
|
|
233
|
-
- Review error messages for field/DLO issues
|
|
185
|
+
## Phase 6: Deploy
|
|
234
186
|
|
|
235
|
-
|
|
187
|
+
**This changes the org. Confirm with the user first.** Docker must be running (`docker info`), and Code Extension must be enabled (0c).
|
|
236
188
|
|
|
237
|
-
Deploy the code extension to Data Cloud for scheduled or on-demand execution.
|
|
238
|
-
|
|
239
|
-
**CRITICAL: You MUST specify `--package-dir ./payload` to point to the payload directory created by init.**
|
|
240
|
-
|
|
241
|
-
**Command:**
|
|
242
189
|
```bash
|
|
243
|
-
|
|
190
|
+
<PY_ENV>
|
|
191
|
+
cd <PROJECT_DIR>/<package_name>
|
|
192
|
+
sf data-code-extension script deploy \
|
|
193
|
+
--target-org <ORG_ALIAS> \
|
|
194
|
+
--name <name> \
|
|
195
|
+
--package-dir ./payload \
|
|
196
|
+
--package-version 0.0.1 \
|
|
197
|
+
--description "<description>" \
|
|
198
|
+
[--cpu-size CPU_L|CPU_XL|CPU_2XL|CPU_4XL]
|
|
244
199
|
```
|
|
245
200
|
|
|
246
|
-
|
|
247
|
-
- `--
|
|
248
|
-
-
|
|
249
|
-
- `--package-dir` - Path to payload directory (**REQUIRED** - must be `./payload` when running from project root)
|
|
250
|
-
- `--package-version` - Version string (default: 0.0.1)
|
|
251
|
-
- `--description` - Description of code extension
|
|
252
|
-
|
|
253
|
-
**Optional Options:**
|
|
254
|
-
- `--cpu-size` - CPU size: CPU_L, CPU_XL, CPU_2XL (default), CPU_4XL
|
|
255
|
-
- `--function-invoke-opt` - Function invoke options (for function type)
|
|
256
|
-
- `--network` - Docker network (default: default)
|
|
257
|
-
|
|
258
|
-
**After deployment:**
|
|
259
|
-
- Navigate to Data Cloud in Salesforce UI
|
|
260
|
-
- Go to Data Transforms section
|
|
261
|
-
- Find your deployment by name
|
|
262
|
-
- Click "Run Now" to execute
|
|
263
|
-
- Schedule for recurring execution
|
|
264
|
-
|
|
265
|
-
## Error Handling
|
|
266
|
-
|
|
267
|
-
### Common Issues and Solutions
|
|
268
|
-
|
|
269
|
-
| Error | Solution |
|
|
270
|
-
|-------|----------|
|
|
271
|
-
| `command data-code-extension not found` | `sf plugins install @salesforce/plugin-data-code-extension` |
|
|
272
|
-
| `datacustomcode CLI not found` | `pip install salesforce-data-customcode` |
|
|
273
|
-
| `Python version mismatch` | Use pyenv: `pyenv install 3.11.0 && pyenv local 3.11.0` |
|
|
274
|
-
| `Cannot connect to Docker daemon` | Start Docker Desktop |
|
|
275
|
-
| `No org found for alias` | `sf org login web --alias <org_alias>` |
|
|
276
|
-
| `config.json not found` | `sf data-code-extension script scan --entrypoint ./payload/entrypoint.py` |
|
|
277
|
-
| `DLO not found` | Verify DLO exists (use data360-schema-get skill), check spelling and `__dll` suffix |
|
|
278
|
-
| `Permission denied writing` | Re-run scan, verify target DLO exists and is writable |
|
|
279
|
-
| `Deploy fails - wrong directory` | Ensure `--package-dir` points to `payload/` directory, not project root |
|
|
280
|
-
|
|
281
|
-
## Best Practices
|
|
282
|
-
|
|
283
|
-
### Development
|
|
284
|
-
1. Always scan before testing — run scan after code changes
|
|
285
|
-
2. Test locally first — use `run` command before deploying
|
|
286
|
-
3. Use version control — git commit after each successful test
|
|
287
|
-
4. Version your deployments — use semantic versioning (1.0.0, 1.1.0, etc.)
|
|
288
|
-
5. Deploy from project root with `--package-dir ./payload`
|
|
289
|
-
|
|
290
|
-
### Performance
|
|
291
|
-
- **CPU_L**: Small datasets (< 1M records)
|
|
292
|
-
- **CPU_2XL**: Medium datasets (1M-10M records)
|
|
293
|
-
- **CPU_4XL**: Large datasets (> 10M records)
|
|
294
|
-
|
|
295
|
-
### Security
|
|
296
|
-
1. No hardcoded credentials — use SF CLI authentication only
|
|
297
|
-
2. Validate input data — check for nulls and data types
|
|
298
|
-
3. Limit write permissions — only grant necessary DLO/DMO access
|
|
299
|
-
|
|
300
|
-
## Integration with Other Skills
|
|
301
|
-
|
|
302
|
-
**Use with data360-schema-get skill (CRITICAL for validation):**
|
|
303
|
-
|
|
304
|
-
The `data360-schema-get` skill is **required** for validating DLOs before testing code extensions.
|
|
305
|
-
|
|
306
|
-
**Use with Datakit Workflow:**
|
|
307
|
-
1. Create DLO via code extension
|
|
308
|
-
2. Map DLO to DMO using datakit workflow
|
|
309
|
-
3. Use DMO in segments and activations
|
|
201
|
+
- `-d` is `--description`, not the directory. `--package-dir` is always `./payload`, never the package root. `--cpu-size` defaults to `CPU_2XL`. `function deploy` takes the same flags.
|
|
202
|
+
- **Redeploy:** a second `deploy` with the same `--name` fails with `DeploymentExists`, even with a new `--package-version`. Delete the **data transform**, then the **code extension** (UI or MCP, confirming each delete), then deploy again.
|
|
203
|
+
- An output DLO can belong to only one data transform (`Output objects ... are already in use`).
|
|
310
204
|
|
|
311
|
-
##
|
|
205
|
+
## Phase 7: Run the Deployed Transform and Verify
|
|
312
206
|
|
|
313
|
-
|
|
314
|
-
|---------|---------|---------------|
|
|
315
|
-
| `script init` | Create new script project | --package-dir |
|
|
316
|
-
| `function init` | Create new function project | --package-dir |
|
|
317
|
-
| `script scan` | Generate config | entrypoint file |
|
|
318
|
-
| `script run` | Test locally | entrypoint file, --target-org |
|
|
319
|
-
| `script deploy` | Deploy to Data Cloud | --target-org, --name, --package-dir, --package-version, --description |
|
|
207
|
+
Writing to the DLO happens only when the deployed transform runs. **Confirm with the user first.** Start it from Data Cloud → **Data Transforms** → `<name>` → **Run Now** (runs take about 10 minutes), or with the MCP transform tools. Then check the output DLO in the UI or with an MCP query.
|
|
320
208
|
|
|
321
|
-
|
|
209
|
+
After every run, successful or not, read the run's messages and tracebacks in the system DLO **`DataCustomCodeLogs__dll`**: filter on `DataCustomCodeName__c = '<name>'` and take the latest `ExecutionId__c`. The query and how to read the rows: [references/run-logs.md](references/run-logs.md). To trace a deployed run, add `print()` or `logging` calls and redeploy.
|
|
322
210
|
|
|
323
|
-
|
|
324
|
-
- Python SDK: https://github.com/forcedotcom/datacloud-customcode-python-sdk
|
|
325
|
-
- Data Cloud Docs: https://help.salesforce.com/s/articleView?id=sf.c360_a_intro.htm
|
|
326
|
-
- Python SDK PyPI: https://pypi.org/project/salesforce-data-customcode/
|
|
211
|
+
**Cleanup:** delete the data transform, then the code extension, confirming each delete with the user.
|
|
327
212
|
|
|
328
|
-
##
|
|
213
|
+
## Error Handling (most common)
|
|
214
|
+
|
|
215
|
+
| Error | Fix |
|
|
216
|
+
|---|---|
|
|
217
|
+
| `PythonVersionMismatch` / `PYTHON_VERSION_MISMATCH` | Start the block with `<PY_ENV>`. Venv mode: rerun `scripts/venv_hook.sh <PROJECT_DIR>` |
|
|
218
|
+
| `PipreqsScanError` | Install `pipreqs` with `python3 -m pip`, start the block with `<PY_ENV>`, and rerun `scan` |
|
|
219
|
+
| `table does not exist` | Wrong DLO name (for example the stock `Account_std__dll`). See Phase 2 |
|
|
220
|
+
| `ValueError: The following columns are not present in the DLO` | The listed columns have capital letters. Apply the lowercase rule (Phase 2) |
|
|
221
|
+
| `DeploymentExists` | Delete the transform, then the code extension, then redeploy |
|
|
222
|
+
| Deployed run fails or writes nothing | Read `DataCustomCodeLogs__dll` (Phase 7) |
|
|
223
|
+
|
|
224
|
+
Everything else: [references/troubleshooting.md](references/troubleshooting.md).
|
|
225
|
+
|
|
226
|
+
## Command Reference
|
|
227
|
+
|
|
228
|
+
| Command | Run from | Required flags | Optional flags |
|
|
229
|
+
|---|---|---|---|
|
|
230
|
+
| `script init` / `function init` | Parent folder | `-p/--package-dir <package_name>` | function: `-u/--use-in-feature SearchIndexChunking` |
|
|
231
|
+
| `script scan` / `function scan` | Package root | (`-e/--entrypoint ./payload/entrypoint.py`) | `-d/--dry-run`, `-n/--no-requirements`, `--config-file` |
|
|
232
|
+
| `script run` | Package root | `-e/--entrypoint`, `-o/--target-org` | `--config-file`, `--dependencies` |
|
|
233
|
+
| `function run` | Package root | `-e/--entrypoint`, `-t/--test-with` | `--target-org`, `--config-file`, `--dependencies` |
|
|
234
|
+
| `script zip` / `function zip` | Package root | `-p/--package-dir` | `-n/--network` |
|
|
235
|
+
| `script deploy` / `function deploy` | Package root | `-n/--name`, `--package-version`, `-d/--description`, `-p/--package-dir ./payload`, `-o/--target-org` | `--cpu-size`, `--network` (Jupyter packages only) |
|
|
236
|
+
|
|
237
|
+
Verified against plugin `data-code-extension` 1.4.1 and SDK `salesforce-data-customcode` 6.1.0. If the plugin version differs, check with `sf data-code-extension <type> <command> --help`.
|
|
238
|
+
|
|
239
|
+
## Resources
|
|
329
240
|
|
|
330
|
-
-
|
|
331
|
-
-
|
|
332
|
-
-
|
|
333
|
-
- Scan command auto-detects permissions from code
|
|
334
|
-
- Local run uses actual Data Cloud data (not mocked)
|
|
335
|
-
- Deployments are versioned and can be rolled back in UI
|
|
241
|
+
- SF CLI plugin: https://github.com/salesforcecli/plugin-data-code-extension
|
|
242
|
+
- Python SDK: https://github.com/forcedotcom/datacloud-customcode-python-sdk (PyPI: `salesforce-data-customcode`)
|
|
243
|
+
- Hosted MCP servers (optional setup): https://developer.salesforce.com/docs/platform/hosted-mcp-servers/overview
|