@salesforce/afv-skills 1.55.0 → 1.56.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-generate/SKILL.md +8 -0
- package/skills/agentforce-generate/references/actions-reference.md +2 -2
- package/skills/agentforce-generate/references/voice-modality-reference.md +51 -15
- package/skills/agentforce-generate/references/voice-telephony-cli.md +193 -0
- package/skills/agentforce-observe/SKILL.md +13 -9
- package/skills/agentforce-observe/references/ahm-alerts.md +193 -14
- package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +24 -15
- package/skills/automation-sandbox-post-copy-config-generate/assets/config_template.json +11 -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 +32 -1
- package/skills/automation-sandbox-post-copy-configure/SKILL.md +75 -71
- package/skills/automation-sandbox-post-copy-configure/assets/scheduled_apex_template.apex +13 -0
- package/skills/automation-sandbox-post-copy-configure/examples/sample_scheduled_apex_config.json +13 -0
- package/skills/automation-sandbox-post-copy-configure/references/scheduled_apex_path.md +155 -0
- package/skills/automation-sandbox-post-copy-configure/scripts/build-scheduled-apex.mjs +62 -0
- package/skills/automation-sandbox-post-copy-configure/scripts/soql-escape-job-name.mjs +28 -0
- package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +383 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +324 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +63 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +100 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +46 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/04-deploy-engine.js +198 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/05-deploy-tpm-accruals.js +231 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +82 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +517 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +416 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +514 -0
- package/skills/consumer-goods-sync-management-configure/SKILL.md +137 -0
- package/skills/consumer-goods-sync-management-configure/examples/scenarios.md +294 -0
- package/skills/consumer-goods-sync-management-configure/references/act1-setup-sync.md +333 -0
- package/skills/consumer-goods-sync-management-configure/references/act2-assign-users.md +324 -0
- package/skills/consumer-goods-sync-management-configure/references/act3-plan-verify.md +113 -0
- package/skills/consumer-goods-sync-management-configure/references/readiness-and-enablement.md +164 -0
- package/skills/consumer-goods-sync-management-configure/references/sync-management-app-install-backbone.md +159 -0
- package/skills/consumer-goods-sync-management-configure/references/transports-and-namespace.md +220 -0
- package/skills/consumer-goods-sync-management-configure/references/verify-and-smoke.md +175 -0
- package/skills/dx-org-analyze/SKILL.md +0 -1
- package/skills/dx-org-analyze/scripts/collect_org_data.py +2 -2
- package/skills/dx-org-analyze/scripts/compute_diff.py +2 -4
- package/skills/dx-org-analyze/scripts/introspect_org.py +4 -40
- package/skills/dx-org-manage/SKILL.md +6 -50
- package/skills/dx-org-manage/examples/README.md +10 -16
- package/skills/dx-org-manage/references/scratch-org-create.md +1 -1
- package/skills/dx-org-manage/references/scratch-org-operations.md +1 -1
- package/skills/dx-org-shape-manage/SKILL.md +4 -3
- package/skills/education-cloud-domain-configure/references/gotchas-extended.md +1 -0
- package/skills/experience-accessibility-validate/SKILL.md +8 -5
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-1-1-non-text-content.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-i-lists.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-ii-tables.md +20 -85
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iii-form-labels.md +4 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iv-regions.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-v-groups.md +2 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-5-identify-input.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-4-3-contrast.md +4 -14
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-1-1-keyboard.md +9 -5
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-4-link-purpose.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-6-headings-labels.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-1-pointer-gestures.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-2-pointer-cancellation.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-3-label-in-name.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-7-dragging-movement.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-1-on-focus.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-2-on-input.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-1-error-identification.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-2-labels-instructions.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-3-error-suggestion.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-i-name.md +4 -5
- package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-ii-role.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-iii-value.md +0 -4
- package/skills/experience-lwc-accessibility-jest-run/SKILL.md +104 -25
- package/skills/experience-lwc-accessibility-jest-run/assets/jest.config.js +4 -0
- package/skills/experience-lwc-accessibility-jest-run/assets/sa11y-jest-setup.js +5 -0
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +5 -5
- package/skills/experience-ui-bundle-features-generate/SKILL.md +65 -36
- package/skills/experience-ui-bundle-features-generate/references/angular/features.md +74 -0
- package/skills/experience-ui-bundle-features-generate/references/react/features.md +59 -0
- package/skills/experience-ui-bundle-features-generate/scripts/detect-framework.sh +73 -0
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -2
- package/skills/experience-ui-bundle-metadata-generate/SKILL.md +26 -14
- package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +37 -0
- package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +32 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +73 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +30 -8
- package/skills/field-service-data-capture-migrate/SKILL.md +391 -0
- package/skills/field-service-data-capture-migrate/assets/sample-legacy-flow.flow-meta.xml +163 -0
- package/skills/field-service-data-capture-migrate/references/architecture-notes.md +40 -0
- package/skills/field-service-data-capture-migrate/references/component-mapping.md +278 -0
- package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +183 -0
- package/skills/field-service-data-capture-migrate/references/dc-platform-rules.md +130 -0
- package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +215 -0
- package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +36 -0
- package/skills/field-service-data-capture-migrate/references/migration-checklist.md +121 -0
- package/skills/field-service-data-capture-migrate/references/transformer-rules.md +132 -0
- package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +277 -0
- package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1311 -0
- package/skills/field-service-data-capture-migrate/scripts/cud_analysis.py +402 -0
- package/skills/field-service-data-capture-migrate/scripts/deploy_flow.sh +230 -0
- package/skills/field-service-data-capture-migrate/scripts/discover_subflow_tree.py +230 -0
- package/skills/field-service-data-capture-migrate/scripts/flow_input.py +186 -0
- package/skills/field-service-data-capture-migrate/scripts/flow_xml_utils.py +39 -0
- package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +413 -0
- package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +199 -0
- package/skills/field-service-data-capture-migrate/scripts/json_to_flow_xml.py +146 -0
- package/skills/field-service-data-capture-migrate/scripts/manual_review_flags.py +42 -0
- package/skills/field-service-data-capture-migrate/scripts/retrieve_flow_rest.sh +155 -0
- package/skills/field-service-data-capture-migrate/scripts/subflow_names.py +49 -0
- package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +1661 -0
- package/skills/field-service-data-capture-migrate/scripts/validate_flow.sh +147 -0
- package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +1258 -0
- package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +1 -1
- package/skills/life-sciences-fieldsalesrep-coordinate/references/orchestration-flow.md +1 -1
- package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +14 -1
- package/skills/mobile-apps-create/SKILL.md +1 -1
- package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/SKILL.md +7 -7
- package/skills/platform-sandbox-configure/SKILL.md +108 -133
- package/skills/platform-sandbox-configure/references/api-response-shapes.md +39 -0
- package/skills/platform-sandbox-configure/references/definition-file-approach.md +73 -0
- package/skills/platform-widget-generate/SKILL.md +26 -18
- package/skills/platform-widget-generate/examples/formulas.json +191 -0
- package/skills/platform-widget-generate/references/widget-formulas.md +123 -0
- package/skills/platform-widget-generate/references/widget-meta-directives.md +4 -4
- package/skills/sales-call-scoring-configure/SKILL.md +318 -0
- package/skills/sales-call-scoring-configure/assets/best-practice-competencies.json +67 -0
- package/skills/sales-call-scoring-configure/assets/ootb-competencies.json +58 -0
- package/skills/sales-call-scoring-configure/references/admin-communication.md +79 -0
- package/skills/sales-call-scoring-configure/references/competency-crud.md +130 -0
- package/skills/sales-call-scoring-configure/scripts/create-competency.sh +166 -0
- package/skills/sales-call-scoring-configure/scripts/create-custom-competency.sh +166 -0
- package/skills/sales-call-scoring-configure/scripts/edit-competency.sh +185 -0
- package/skills/sales-call-scoring-configure/scripts/edit-custom-competency.sh +190 -0
- package/skills/sales-call-scoring-configure/scripts/enable-call-scoring.sh +436 -0
- package/skills/sales-call-scoring-configure/scripts/get-competency.sh +72 -0
- package/skills/sales-call-scoring-configure/scripts/get-custom-competency.sh +78 -0
- package/skills/sales-call-scoring-configure/scripts/install-best-practice-competencies.sh +223 -0
- package/skills/sales-call-scoring-configure/scripts/install-ootb-competencies.sh +237 -0
- package/skills/sales-call-scoring-configure/scripts/list-competencies.sh +99 -0
- package/skills/sales-call-scoring-configure/scripts/shared/auth.sh +116 -0
- package/skills/sales-call-scoring-configure/scripts/shared/cap.sh +86 -0
- package/skills/sales-call-scoring-configure/scripts/shared/soap.sh +267 -0
- package/skills/sales-call-scoring-configure/scripts/shared/soql.sh +25 -0
- package/skills/sales-call-scoring-configure/scripts/toggle-competency.sh +112 -0
- package/skills/sales-call-scoring-configure/scripts/toggle-custom-competency.sh +125 -0
- package/skills/sales-call-scoring-configure/scripts/verify-ootb-competencies.sh +116 -0
- package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1 -0
- package/skills/service-de-channel-activate/SKILL.md +6 -5
- package/skills/service-de-channel-create/SKILL.md +3 -3
- package/skills/service-de-channel-routing-configure/SKILL.md +3 -3
- package/skills/service-de-channel-settings-configure/SKILL.md +195 -0
- package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +152 -0
- package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/gotchas.md +3 -3
- package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/language-keywords.md +4 -4
- package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/worked-examples.md +14 -14
- package/skills/service-de-headless-channel-configure/SKILL.md +6 -6
- package/skills/service-de-headless-channel-configure/references/worked-examples.md +1 -1
- package/skills/service-helpagent-coordinate/SKILL.md +3 -2
- package/skills/service-helpagent-coordinate/references/channel-voice.md +15 -4
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +49 -31
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +71 -6
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +26 -4
- package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +35 -10
- package/skills/service-itsm-agentic-setup-cmdb-access-assign/references/mcp-invocation.md +25 -5
- package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +5 -5
- package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +1 -1
- package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +2 -2
- package/skills/service-itsm-agentic-setup-cmdb-coordinate/examples/output-templates.md +1 -1
- package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +25 -15
- package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +8 -5
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +4 -2
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +1 -1
- package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +29 -16
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +8 -5
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +4 -2
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +1 -1
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +29 -16
- package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +138 -68
- package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +31 -15
- package/skills/service-itsm-agentic-setup-incident-management/references/incident-persona-psg.md +156 -0
- package/skills/service-itsm-agentic-setup-incident-management/references/incident-preferences.md +148 -0
- package/skills/service-itsm-agentic-setup-incident-management/references/major-incident-management.md +162 -0
- package/skills/service-itsm-agentic-setup-incident-management/references/service-mgmt-privilege.md +149 -0
- package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +103 -89
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +2 -2
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +21 -39
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +3 -3
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +18 -1
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +63 -37
- package/skills/service-omni-attribute-routing-configure/SKILL.md +53 -0
- package/skills/service-omni-attribute-routing-configure/references/api-notes.md +7 -0
- package/skills/service-omni-attribute-routing-configure/scripts/configure-and-report.sh +224 -0
- package/skills/service-omni-attribute-routing-configure/scripts/tests/test_attribute_routing_contracts.py +137 -0
- package/skills/service-omni-channel-inventory-analyze/SKILL.md +96 -0
- package/skills/service-omni-channel-inventory-analyze/references/api-notes.md +52 -0
- package/skills/service-omni-channel-inventory-analyze/scripts/analyze.sh +185 -0
- package/skills/service-omni-channel-inventory-analyze/scripts/tests/_bootstrap.py +84 -0
- package/skills/service-omni-channel-inventory-analyze/scripts/tests/test_inventory_analyze_contracts.py +141 -0
- package/skills/service-omni-channel-limits-analyze/SKILL.md +70 -0
- package/skills/service-omni-channel-limits-analyze/references/api-notes.md +22 -0
- package/skills/service-omni-channel-limits-analyze/scripts/analyze.sh +159 -0
- package/skills/service-omni-channel-limits-analyze/scripts/tests/_bootstrap.py +87 -0
- package/skills/service-omni-channel-limits-analyze/scripts/tests/test_limits_analyze_contracts.py +99 -0
- package/skills/service-omni-channel-setup-coordinate/SKILL.md +12 -20
- package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +55 -5
- package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +38 -0
- package/skills/service-omni-command-center-analyze/SKILL.md +2 -2
- package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
- package/skills/dx-org-manage/examples/snapshots/error_output.json +0 -9
- package/skills/dx-org-manage/examples/snapshots/success_output.json +0 -15
- package/skills/dx-org-manage/references/cli_flags.md +0 -67
- package/skills/dx-org-manage/references/creating-snapshot.md +0 -103
- package/skills/dx-org-manage/references/snapshot_usage.md +0 -74
- package/skills/experience-accessibility-validate/scripts/contrast-ratio.py +0 -153
- package/skills/experience-lwc-accessibility-jest-run/references/running-sa11y-jest-tests.md +0 -205
- package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +0 -14
- /package/skills/experience-ui-bundle-features-generate/references/{conflict-resolution-schema.json → common/conflict-resolution-schema.json} +0 -0
- /package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/references/api-response-schema.md +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Activate or deactivate a Coaching Competency by DeveloperName or Id.
|
|
4
|
+
# Toggles IsActive via Tooling API PATCH.
|
|
5
|
+
#
|
|
6
|
+
# Deactivation preserves historical EnablementCompetencyEval scores (per the
|
|
7
|
+
# entity XML comment on IsActive).
|
|
8
|
+
#
|
|
9
|
+
# Usage: ./toggle-competency.sh <org-alias> <name-or-id> <activate|deactivate>
|
|
10
|
+
|
|
11
|
+
set -euo pipefail
|
|
12
|
+
|
|
13
|
+
export NO_COLOR=1
|
|
14
|
+
export FORCE_COLOR=0
|
|
15
|
+
|
|
16
|
+
ORG_ALIAS="${1:-}"
|
|
17
|
+
IDENT="${2:-}"
|
|
18
|
+
ACTION="${3:-}"
|
|
19
|
+
|
|
20
|
+
if [[ -z "$ORG_ALIAS" || -z "$IDENT" || -z "$ACTION" ]]; then
|
|
21
|
+
echo "Usage: $0 <org-alias> <name-or-id> <activate|deactivate>"
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
if [[ "$ACTION" != "activate" && "$ACTION" != "deactivate" ]]; then
|
|
26
|
+
echo "Action must be 'activate' or 'deactivate'"
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
TARGET=$([[ "$ACTION" == "activate" ]] && echo "true" || echo "false")
|
|
31
|
+
|
|
32
|
+
# ---------------------------------------------------------------------------
|
|
33
|
+
# Auth
|
|
34
|
+
# ---------------------------------------------------------------------------
|
|
35
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
36
|
+
# shellcheck source=shared/auth.sh
|
|
37
|
+
source "$SCRIPT_DIR/shared/auth.sh"
|
|
38
|
+
# shellcheck source=shared/soql.sh
|
|
39
|
+
source "$SCRIPT_DIR/shared/soql.sh"
|
|
40
|
+
|
|
41
|
+
resolve_org_auth "$ORG_ALIAS" || exit 1
|
|
42
|
+
|
|
43
|
+
TOOLING_BASE="services/data/v68.0/tooling"
|
|
44
|
+
|
|
45
|
+
# ---------------------------------------------------------------------------
|
|
46
|
+
# Resolve identifier → Id + current state
|
|
47
|
+
# ---------------------------------------------------------------------------
|
|
48
|
+
# Ids start with 1nA (keyPrefix). Anything else is treated as DeveloperName or MasterLabel.
|
|
49
|
+
if [[ "$IDENT" =~ ^1nA[0-9a-zA-Z]{12,15}$ ]]; then
|
|
50
|
+
WHERE="Id='${IDENT}'"
|
|
51
|
+
else
|
|
52
|
+
SAFE=$(soql_escape "$IDENT")
|
|
53
|
+
WHERE="DeveloperName='${SAFE}' OR MasterLabel='${SAFE}'"
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
QUERY="SELECT+Id,MasterLabel,IsActive+FROM+EnablementCompetencyDef+WHERE+$(printf '%s' "$WHERE" | jq -sRr @uri)"
|
|
57
|
+
LOOKUP=$(sf api request rest "${TOOLING_BASE}/query/?q=${QUERY}" --target-org "$ORG_ALIAS" 2>/dev/null) || true
|
|
58
|
+
|
|
59
|
+
RECORD_COUNT=$(echo "$LOOKUP" | jq -r '.totalSize // 0')
|
|
60
|
+
if [[ "$RECORD_COUNT" == "0" ]]; then
|
|
61
|
+
echo "No competency found matching: $IDENT"
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
if [[ "$RECORD_COUNT" != "1" ]]; then
|
|
65
|
+
echo "Multiple competencies matched '$IDENT' — refusing to bulk-toggle."
|
|
66
|
+
echo "$LOOKUP" | jq -r '.records[] | " \(.Id) \(.MasterLabel)"'
|
|
67
|
+
exit 1
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
REC_ID=$(echo "$LOOKUP" | jq -r '.records[0].Id')
|
|
71
|
+
REC_LABEL=$(echo "$LOOKUP" | jq -r '.records[0].MasterLabel')
|
|
72
|
+
REC_STATE=$(echo "$LOOKUP" | jq -r '.records[0].IsActive')
|
|
73
|
+
|
|
74
|
+
echo "$REC_LABEL ($REC_ID) — currently IsActive=$REC_STATE"
|
|
75
|
+
|
|
76
|
+
# Idempotency
|
|
77
|
+
if [[ "$REC_STATE" == "$TARGET" ]]; then
|
|
78
|
+
echo "Already $ACTION'd — no-op."
|
|
79
|
+
exit 0
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
# Enforce 8-active cap when activating.
|
|
83
|
+
if [[ "$ACTION" == "activate" ]]; then
|
|
84
|
+
ACTIVE_COUNT=$( (sf api request rest \
|
|
85
|
+
"${TOOLING_BASE}/query/?q=SELECT+COUNT()+FROM+EnablementCompetencyDef+WHERE+IsActive=true" \
|
|
86
|
+
--target-org "$ORG_ALIAS" 2>/dev/null || true) | jq -r '.totalSize // 0' 2>/dev/null)
|
|
87
|
+
ACTIVE_COUNT="${ACTIVE_COUNT:-0}"
|
|
88
|
+
if [[ "$ACTIVE_COUNT" -ge 8 ]]; then
|
|
89
|
+
echo "Cannot activate: org already has $ACTIVE_COUNT active competencies (max 8)."
|
|
90
|
+
echo " Deactivate one first, then retry."
|
|
91
|
+
exit 1
|
|
92
|
+
fi
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
# ---------------------------------------------------------------------------
|
|
96
|
+
# PATCH
|
|
97
|
+
# ---------------------------------------------------------------------------
|
|
98
|
+
PAYLOAD=$(jq -n --argjson v "$TARGET" '{IsActive: $v}')
|
|
99
|
+
|
|
100
|
+
if RESP_BODY=$(sf api request rest "${TOOLING_BASE}/sobjects/EnablementCompetencyDef/${REC_ID}" \
|
|
101
|
+
--target-org "$ORG_ALIAS" \
|
|
102
|
+
--method PATCH \
|
|
103
|
+
--header 'Content-Type: application/json' \
|
|
104
|
+
--body "$PAYLOAD" \
|
|
105
|
+
2>/dev/null); then
|
|
106
|
+
echo "${ACTION}d $REC_LABEL — IsActive now $TARGET"
|
|
107
|
+
exit 0
|
|
108
|
+
else
|
|
109
|
+
echo "Error: PATCH failed"
|
|
110
|
+
echo " $RESP_BODY"
|
|
111
|
+
exit 1
|
|
112
|
+
fi
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# sales_call_scoring: story="custom-competency-crud" owner="W-CUSTOM-CRUD"
|
|
3
|
+
#
|
|
4
|
+
# Activate or deactivate a Coaching Competency by DeveloperName or Id.
|
|
5
|
+
# Toggles IsActive via Tooling API PATCH.
|
|
6
|
+
#
|
|
7
|
+
# Deactivation preserves historical EnablementCompetencyEval scores (per the
|
|
8
|
+
# entity XML comment on IsActive) so a rehired competency picks up its
|
|
9
|
+
# existing evaluation history.
|
|
10
|
+
#
|
|
11
|
+
# Companion of create-custom-competency.sh — parallel to toggle-competency.sh
|
|
12
|
+
# so the custom-CRUD story can iterate the activate/deactivate surface
|
|
13
|
+
# independently.
|
|
14
|
+
#
|
|
15
|
+
# Usage: ./toggle-custom-competency.sh <org-alias> <name-or-id> <activate|deactivate>
|
|
16
|
+
|
|
17
|
+
set -euo pipefail
|
|
18
|
+
|
|
19
|
+
export NO_COLOR=1
|
|
20
|
+
export FORCE_COLOR=0
|
|
21
|
+
|
|
22
|
+
ORG_ALIAS="${1:-}"
|
|
23
|
+
IDENT="${2:-}"
|
|
24
|
+
ACTION="${3:-}"
|
|
25
|
+
|
|
26
|
+
if [[ -z "$ORG_ALIAS" || -z "$IDENT" || -z "$ACTION" ]]; then
|
|
27
|
+
echo "Usage: $0 <org-alias> <name-or-id> <activate|deactivate>"
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
if [[ "$ACTION" != "activate" && "$ACTION" != "deactivate" ]]; then
|
|
32
|
+
echo "Action must be 'activate' or 'deactivate'"
|
|
33
|
+
exit 1
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
TARGET=$([[ "$ACTION" == "activate" ]] && echo "true" || echo "false")
|
|
37
|
+
|
|
38
|
+
# ---------------------------------------------------------------------------
|
|
39
|
+
# Auth
|
|
40
|
+
# ---------------------------------------------------------------------------
|
|
41
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
42
|
+
# shellcheck source=shared/auth.sh
|
|
43
|
+
source "$SCRIPT_DIR/shared/auth.sh"
|
|
44
|
+
# shellcheck source=shared/soql.sh
|
|
45
|
+
source "$SCRIPT_DIR/shared/soql.sh"
|
|
46
|
+
|
|
47
|
+
resolve_org_auth "$ORG_ALIAS" || exit 1
|
|
48
|
+
|
|
49
|
+
TOOLING_BASE="services/data/v68.0/tooling"
|
|
50
|
+
|
|
51
|
+
# ---------------------------------------------------------------------------
|
|
52
|
+
# Resolve identifier
|
|
53
|
+
# ---------------------------------------------------------------------------
|
|
54
|
+
if [[ "$IDENT" =~ ^1nA[0-9a-zA-Z]{12,15}$ ]]; then
|
|
55
|
+
WHERE="Id='${IDENT}'"
|
|
56
|
+
else
|
|
57
|
+
SAFE=$(soql_escape "$IDENT")
|
|
58
|
+
WHERE="DeveloperName='${SAFE}' OR MasterLabel='${SAFE}'"
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
QUERY="SELECT+Id,MasterLabel,IsActive+FROM+EnablementCompetencyDef+WHERE+$(printf '%s' "$WHERE" | jq -sRr @uri)"
|
|
62
|
+
LOOKUP=$(sf api request rest "${TOOLING_BASE}/query/?q=${QUERY}" --target-org "$ORG_ALIAS" 2>/dev/null || true)
|
|
63
|
+
|
|
64
|
+
RECORD_COUNT=$(echo "$LOOKUP" | jq -r '.totalSize // 0' 2>/dev/null || echo "0")
|
|
65
|
+
if [[ "$RECORD_COUNT" == "0" ]]; then
|
|
66
|
+
echo "No competency found matching: $IDENT"
|
|
67
|
+
exit 1
|
|
68
|
+
fi
|
|
69
|
+
if [[ "$RECORD_COUNT" != "1" ]]; then
|
|
70
|
+
echo "Multiple competencies matched '$IDENT' — refusing to bulk-toggle."
|
|
71
|
+
echo "$LOOKUP" | jq -r '.records[] | " \(.Id) \(.MasterLabel)"'
|
|
72
|
+
exit 1
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
REC_ID=$(echo "$LOOKUP" | jq -r '.records[0].Id')
|
|
76
|
+
REC_LABEL=$(echo "$LOOKUP" | jq -r '.records[0].MasterLabel')
|
|
77
|
+
REC_STATE=$(echo "$LOOKUP" | jq -r '.records[0].IsActive')
|
|
78
|
+
|
|
79
|
+
echo "$REC_LABEL ($REC_ID) — currently IsActive=$REC_STATE"
|
|
80
|
+
|
|
81
|
+
# Idempotency
|
|
82
|
+
if [[ "$REC_STATE" == "$TARGET" ]]; then
|
|
83
|
+
echo "Already $ACTION'd — no-op."
|
|
84
|
+
exit 0
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
# Enforce 8-active cap when activating. Refuse with a rich report — the
|
|
88
|
+
# activate path can't auto-fallback because "activate to inactive" is a
|
|
89
|
+
# no-op; the admin must actively free a slot.
|
|
90
|
+
if [[ "$ACTION" == "activate" ]]; then
|
|
91
|
+
# shellcheck source=shared/cap.sh
|
|
92
|
+
source "$SCRIPT_DIR/shared/cap.sh"
|
|
93
|
+
|
|
94
|
+
ACTIVE_COUNT=$(query_active_count "$ORG_ALIAS")
|
|
95
|
+
if [[ "$ACTIVE_COUNT" -ge "$MAX_ACTIVE_COMPETENCIES" ]]; then
|
|
96
|
+
echo "Cannot activate '$REC_LABEL' — org is at the 8-active competency cap."
|
|
97
|
+
print_cap_report "$ORG_ALIAS" "activating '$REC_LABEL'"
|
|
98
|
+
echo " Once a slot is free, retry:"
|
|
99
|
+
echo ""
|
|
100
|
+
echo " $0 $ORG_ALIAS $REC_ID activate"
|
|
101
|
+
echo ""
|
|
102
|
+
exit 1
|
|
103
|
+
fi
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
# ---------------------------------------------------------------------------
|
|
107
|
+
# PATCH
|
|
108
|
+
# ---------------------------------------------------------------------------
|
|
109
|
+
PAYLOAD=$(jq -n --argjson v "$TARGET" '{IsActive: $v}')
|
|
110
|
+
|
|
111
|
+
# sf api request rest exits non-zero on HTTP failure; success on Tooling
|
|
112
|
+
# PATCH is HTTP 204 (empty body). Capture both stdout and exit status.
|
|
113
|
+
if RESP_BODY=$(sf api request rest "${TOOLING_BASE}/sobjects/EnablementCompetencyDef/${REC_ID}" \
|
|
114
|
+
--target-org "$ORG_ALIAS" \
|
|
115
|
+
--method PATCH \
|
|
116
|
+
--header 'Content-Type: application/json' \
|
|
117
|
+
--body "$PAYLOAD" \
|
|
118
|
+
2>&1); then
|
|
119
|
+
echo "${ACTION}d $REC_LABEL — IsActive now $TARGET"
|
|
120
|
+
exit 0
|
|
121
|
+
else
|
|
122
|
+
echo "Error: PATCH failed"
|
|
123
|
+
echo " $RESP_BODY"
|
|
124
|
+
exit 1
|
|
125
|
+
fi
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Verify that a set of expected Coaching Competencies exist and are active,
|
|
4
|
+
# displaying each one's name + EvaluationInstructions in a markdown table so
|
|
5
|
+
# the admin can review what's actually configured. Defaults to the 6 OOTB
|
|
6
|
+
# competencies (assets/ootb-competencies.json); pass explicit names to verify
|
|
7
|
+
# a custom subset instead (e.g. after the admin chose only some of the OOTB
|
|
8
|
+
# set, or created custom competencies).
|
|
9
|
+
#
|
|
10
|
+
# Exit 0 only if every expected name exists AND is active. Exit 1 otherwise,
|
|
11
|
+
# listing what's missing or inactive.
|
|
12
|
+
#
|
|
13
|
+
# Usage:
|
|
14
|
+
# ./verify-ootb-competencies.sh <org-alias> # verify full OOTB set
|
|
15
|
+
# ./verify-ootb-competencies.sh <org-alias> "Name One" "Name Two" # verify specific names
|
|
16
|
+
|
|
17
|
+
set -euo pipefail
|
|
18
|
+
|
|
19
|
+
export NO_COLOR=1
|
|
20
|
+
export FORCE_COLOR=0
|
|
21
|
+
|
|
22
|
+
ORG_ALIAS="${1:-}"
|
|
23
|
+
shift || true
|
|
24
|
+
|
|
25
|
+
if [[ -z "$ORG_ALIAS" ]]; then
|
|
26
|
+
echo "Error: Missing org alias"
|
|
27
|
+
echo "Usage: $0 <org-alias> [\"Competency Name\" ...]"
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
32
|
+
ASSETS_FILE="$SCRIPT_DIR/../assets/ootb-competencies.json"
|
|
33
|
+
|
|
34
|
+
# ---------------------------------------------------------------------------
|
|
35
|
+
# Expected names: caller-supplied args, else the full OOTB set.
|
|
36
|
+
# ---------------------------------------------------------------------------
|
|
37
|
+
EXPECTED_NAMES=()
|
|
38
|
+
if [[ "$#" -gt 0 ]]; then
|
|
39
|
+
EXPECTED_NAMES=("$@")
|
|
40
|
+
else
|
|
41
|
+
if [[ ! -f "$ASSETS_FILE" ]]; then
|
|
42
|
+
echo "Cannot find $ASSETS_FILE"
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
while IFS= read -r name; do
|
|
46
|
+
EXPECTED_NAMES+=("$name")
|
|
47
|
+
done < <(jq -r '.competencies[].MasterLabel' "$ASSETS_FILE")
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
echo "Verifying Coaching Competencies on org: $ORG_ALIAS"
|
|
51
|
+
echo ""
|
|
52
|
+
echo " Expecting ${#EXPECTED_NAMES[@]} competenc$([[ ${#EXPECTED_NAMES[@]} == 1 ]] && echo "y" || echo "ies"):"
|
|
53
|
+
for n in "${EXPECTED_NAMES[@]}"; do
|
|
54
|
+
echo " - $n"
|
|
55
|
+
done
|
|
56
|
+
echo ""
|
|
57
|
+
|
|
58
|
+
# ---------------------------------------------------------------------------
|
|
59
|
+
# Fetch all existing competencies once, then check expected names against them.
|
|
60
|
+
# Auth is handled internally by `sf api request rest` (no token extraction).
|
|
61
|
+
# ---------------------------------------------------------------------------
|
|
62
|
+
EXISTING_RAW=$(sf api request rest \
|
|
63
|
+
"services/data/v68.0/tooling/query/?q=SELECT+Id,DeveloperName,MasterLabel,Description,EvaluationInstructions,IsActive,EvaluationScope,SourceCompetencyTemplate+FROM+EnablementCompetencyDef" \
|
|
64
|
+
--target-org "$ORG_ALIAS" 2>/dev/null)
|
|
65
|
+
|
|
66
|
+
if ! echo "$EXISTING_RAW" | jq -e 'has("records")' >/dev/null 2>&1; then
|
|
67
|
+
echo "Error: Tooling API query failed. Is the org authenticated?"
|
|
68
|
+
echo "$EXISTING_RAW" | jq -r '.[0].message // .message // .' 2>/dev/null || echo "$EXISTING_RAW"
|
|
69
|
+
exit 1
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
MISSING=()
|
|
73
|
+
INACTIVE=()
|
|
74
|
+
OK=()
|
|
75
|
+
ROWS=()
|
|
76
|
+
|
|
77
|
+
for NAME in "${EXPECTED_NAMES[@]}"; do
|
|
78
|
+
MATCH=$(echo "$EXISTING_RAW" | jq -c --arg n "$NAME" '.records[] | select(.MasterLabel == $n)' | head -1)
|
|
79
|
+
|
|
80
|
+
if [[ -z "$MATCH" ]]; then
|
|
81
|
+
MISSING+=("$NAME")
|
|
82
|
+
ROWS+=("missing | $NAME | _not found on this org_")
|
|
83
|
+
continue
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
IS_ACTIVE=$(echo "$MATCH" | jq -r '.IsActive')
|
|
87
|
+
INSTRUCTIONS=$(echo "$MATCH" | jq -r '.EvaluationInstructions // "(none)"' | tr '\n' ' ' | sed 's/|/\\|/g')
|
|
88
|
+
|
|
89
|
+
if [[ "$IS_ACTIVE" == "true" ]]; then
|
|
90
|
+
OK+=("$NAME")
|
|
91
|
+
STATUS_ICON="OK"
|
|
92
|
+
else
|
|
93
|
+
INACTIVE+=("$NAME")
|
|
94
|
+
STATUS_ICON="--"
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
ROWS+=("$STATUS_ICON | $NAME | $INSTRUCTIONS")
|
|
98
|
+
done
|
|
99
|
+
|
|
100
|
+
echo "Results:"
|
|
101
|
+
echo ""
|
|
102
|
+
echo "| | Competency | Evaluation Instructions |"
|
|
103
|
+
echo "|---|---|---|"
|
|
104
|
+
for ROW in "${ROWS[@]}"; do
|
|
105
|
+
echo "| $ROW |"
|
|
106
|
+
done
|
|
107
|
+
echo ""
|
|
108
|
+
|
|
109
|
+
echo "Summary: ${#OK[@]} ok, ${#INACTIVE[@]} inactive, ${#MISSING[@]} missing (of ${#EXPECTED_NAMES[@]} expected)"
|
|
110
|
+
|
|
111
|
+
if [[ "${#MISSING[@]}" -gt 0 || "${#INACTIVE[@]}" -gt 0 ]]; then
|
|
112
|
+
exit 1
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
echo "All expected competencies exist and are active."
|
|
116
|
+
exit 0
|
|
@@ -43,6 +43,7 @@ At the end of the run, print the live customer-facing portal URL for the operato
|
|
|
43
43
|
>
|
|
44
44
|
> | # | Step | Command / surface | Verify |
|
|
45
45
|
> |---|---|---|---|
|
|
46
|
+
> | 0 | **MCP authorization pre-check** | Confirm the `metadata-experts` MCP server (tool `execute_metadata_action`) is authorized *before* asking §A's branding questions — Stage 6 below hard-depends on it to author `sfdc_cms__brandingSet/*/content.json` (no reliable static fallback for the exhaustive branding-token schema). If the server is unauthorized, tell the operator now and ask whether to (a) pause here and authorize it via `claude mcp` / `/mcp`, or (b) proceed and stop before Stage 6 once colors are already collected. Do not silently discover this at Stage 6. | MCP tool call succeeds, or operator has explicitly chosen how to proceed |
|
|
46
47
|
> | 1 | Collect branding + access | §A `AskUserQuestion` × 7 | User confirms values |
|
|
47
48
|
> | 2 | Prerequisite check | §B — `GET /connect/communities` returns 200 | JSON has `communities` array |
|
|
48
49
|
> | 3 | Provision the site | §C — `POST /connect/communities` | Returns `id` (Network Id) |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: service-de-channel-activate
|
|
3
|
-
description: "Activate an Enhanced `MessagingChannel` (WhatsApp
|
|
3
|
+
description: "Activate an Enhanced `MessagingChannel` (WhatsApp/Apple/Facebook/SMS/RCS) by PATCHing `MessagingChannelUsage.DeploymentStatus` from `Disabled` to `Provisioning` via the REST sobject endpoint. The UDD save-hook dispatches by `MessageType` for the external callout (`WHATS_APP`→Meta `/register`, `FACEBOOK`→`subscribeFacebookPage`, `TEXT`→`registerCsotSms`; Apple/LINE need none), writes the terminal `Active`/`Error`, and flips `IsActive`. Synchronous on the HTTP response — WhatsApp returns 204 after Meta confirms (~15-21s); no-callout channels are near-instant. No Aura RPC, no CSRF cookies. Use to activate an already-inserted Enhanced channel headlessly via REST. Do not use for full end-to-end setup — use `service-de-headless-channel-configure`."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.0"
|
|
6
6
|
minApiVersion: "67.0"
|
|
@@ -13,9 +13,10 @@ metadata:
|
|
|
13
13
|
- tool: ["sf"]
|
|
14
14
|
semver: ">=2.0.0"
|
|
15
15
|
relatedSkills:
|
|
16
|
-
- "service-de-channel-consent-configure"
|
|
17
16
|
- "service-de-channel-create"
|
|
18
17
|
- "service-de-channel-routing-configure"
|
|
18
|
+
- "service-de-channel-settings-configure"
|
|
19
|
+
- "service-de-headless-channel-configure"
|
|
19
20
|
---
|
|
20
21
|
|
|
21
22
|
# Activating a Messaging Channel
|
|
@@ -88,7 +89,7 @@ Unlike the old Aura-based version of this skill, there are no `{POLL_TIMEOUT_S}`
|
|
|
88
89
|
**Failure — validator or server-side provisioning error:**
|
|
89
90
|
```json
|
|
90
91
|
{"ok": false, "kind": "readiness-failed", "errorCode": "FIELD_INTEGRITY_EXCEPTION",
|
|
91
|
-
"message": "...", "hint": "validateChannelReadinessOnProvisioning rejected the write — most commonly missing consent; run service-de-channel-
|
|
92
|
+
"message": "...", "hint": "validateChannelReadinessOnProvisioning rejected the write — most commonly missing consent; run service-de-channel-settings-configure first"}
|
|
92
93
|
{"ok": false, "kind": "provisioning-error", "mcuId": "0gL...", "errorReason": "MetaRegistrationFailed", "errorDetails": "..."}
|
|
93
94
|
{"ok": false, "kind": "verification-failed", "hint": "WhatsApp phone number verification failed or was declined by user"}
|
|
94
95
|
{"ok": false, "kind": "verification-request-failed", "errorCode": "...", "message": "...", "hint": "Could not request verification code from Meta"}
|
|
@@ -170,7 +171,7 @@ Classify by HTTP status:
|
|
|
170
171
|
| Message fragment | Meaning | Envelope |
|
|
171
172
|
| --- | --- | --- |
|
|
172
173
|
| "invalid deployment status transition" | The current status doesn't allow `→ Provisioning` (e.g. MCU is already `Active` — Stage 1 should have caught this, but there's a race window). | Re-read MCU; if now `Active`, emit success-noop. If `Provisioning`, Stage 3 poll. Otherwise emit `{ok:false, kind:"readiness-failed", ...}`. |
|
|
173
|
-
| "consent" / "keyword" / mentions of STOP/HELP | `validateChannelReadinessOnProvisioning` rejected — channel doesn't have required consent configured. | `{ok:false, kind:"readiness-failed", errorCode:"FIELD_INTEGRITY_EXCEPTION", message, hint:"channel requires a ConsentType and a matching MsgChannelLanguageKeyword record (opt-out keyword + confirmation) before activation — run service-de-channel-
|
|
174
|
+
| "consent" / "keyword" / mentions of STOP/HELP | `validateChannelReadinessOnProvisioning` rejected — channel doesn't have required consent configured. | `{ok:false, kind:"readiness-failed", errorCode:"FIELD_INTEGRITY_EXCEPTION", message, hint:"channel requires a ConsentType and a matching MsgChannelLanguageKeyword record (opt-out keyword + confirmation) before activation — run service-de-channel-settings-configure"}`. |
|
|
174
175
|
| "routing" / "queue" / "SessionHandler" | Routing precondition (Stage 1 should have caught, but the validator re-checks). | `{ok:false, kind:"no-routing", message, hint:"run service-de-channel-routing-configure first"}`. |
|
|
175
176
|
| other | Unrecognized validator error. | `{ok:false, kind:"readiness-failed", errorCode, message}`. |
|
|
176
177
|
|
|
@@ -252,7 +253,7 @@ If this skill is the leaf (user invoked it directly), render:
|
|
|
252
253
|
- `Info: Already active — MessagingChannel {CHANNEL_ID} is IsActive=true. No changes.` (no-op path)
|
|
253
254
|
- `Error: Routing not configured — run 'service-de-channel-routing-configure' skill first.` (no-routing)
|
|
254
255
|
- `Error: No MessagingChannelUsage row — run the insertion skill first.` (no-mcu)
|
|
255
|
-
- `Error: Readiness check failed: {message} — if it mentions consent/keywords, run 'service-de-channel-
|
|
256
|
+
- `Error: Readiness check failed: {message} — if it mentions consent/keywords, run 'service-de-channel-settings-configure' first.` (readiness-failed)
|
|
256
257
|
- `Error: Activation failed: {errorReason} — {errorDetails}` (provisioning-error)
|
|
257
258
|
- `Error: WhatsApp phone number verification failed: {hint}` (verification-failed)
|
|
258
259
|
- `Error: Could not request verification code: {message}` (verification-request-failed)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: service-de-channel-create
|
|
3
|
-
description: "**INTERNAL USE ONLY — invoked by `service-de-headless-channel-configure
|
|
3
|
+
description: "**INTERNAL USE ONLY — invoked by `service-de-headless-channel-configure`.** Insert an Enhanced messaging `MessagingChannel` (plus child `MessagingChannelUsage` as a free side-effect) of any type — WhatsApp, LINE, Apple Business Chat, Facebook, or SMS. Given a `{MESSAGE_TYPE}` and its inputs, runs the shared preflight → Connect-insert → verify flow, branching only where a type differs. Uses `POST /services/data/v{V}/connect/livemessage/channels` — no Aura session, no shell-stored token. **Invoke `service-de-headless-channel-configure` instead** — it handles insert → route → activate in one flow; replaces the four former per-type creation skills."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.0"
|
|
6
6
|
minApiVersion: "67.0"
|
|
@@ -14,8 +14,8 @@ metadata:
|
|
|
14
14
|
semver: ">=2.0.0"
|
|
15
15
|
relatedSkills:
|
|
16
16
|
- "service-de-channel-activate"
|
|
17
|
-
- "service-de-channel-consent-configure"
|
|
18
17
|
- "service-de-channel-routing-configure"
|
|
18
|
+
- "service-de-channel-settings-configure"
|
|
19
19
|
- "service-de-headless-channel-configure"
|
|
20
20
|
- "service-de-waba-integrate"
|
|
21
21
|
---
|
|
@@ -349,7 +349,7 @@ Rendered (when invoked directly rather than by the orchestrator):
|
|
|
349
349
|
- `Error: {kind}: {message or hint}`
|
|
350
350
|
|
|
351
351
|
On success the caller can immediately invoke `service-de-channel-routing-configure` with the
|
|
352
|
-
returned `channelId`, then `service-de-channel-
|
|
352
|
+
returned `channelId`, then `service-de-channel-settings-configure`, then
|
|
353
353
|
`service-de-channel-activate`. Those three are message-type-agnostic (they operate on
|
|
354
354
|
`MessagingChannel.Id` + `MessagingChannelUsage.Id`), so there's no downstream dispatch concern.
|
|
355
355
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: service-de-channel-routing-configure
|
|
3
|
-
description: "Configure routing on a newly-inserted Enhanced `MessagingChannel` so
|
|
3
|
+
description: "Configure routing on a newly-inserted Enhanced `MessagingChannel` so activation will accept it. Given a `{CHANNEL_ID}`, walks through picking a routing type (Omni-Channel Queue, Omni-Flow, Agentforce Service Agent, Digital Worker, or direct User), locates or provisions the target, then PATCHes `SessionHandlerId` (plus `FallbackQueueId` where required). Use between insertion and activation — activation fails server-side with `nullQueueId`/`LiveMessageSetupException` if no valid `SessionHandlerId` is set. Do not use for full end-to-end setup — use `service-de-headless-channel-configure`."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.1"
|
|
6
6
|
minApiVersion: "67.0"
|
|
@@ -14,8 +14,8 @@ metadata:
|
|
|
14
14
|
semver: ">=2.0.0"
|
|
15
15
|
relatedSkills:
|
|
16
16
|
- "service-de-channel-activate"
|
|
17
|
-
- "service-de-channel-consent-configure"
|
|
18
17
|
- "service-de-channel-create"
|
|
18
|
+
- "service-de-channel-settings-configure"
|
|
19
19
|
- "service-de-headless-channel-configure"
|
|
20
20
|
---
|
|
21
21
|
|
|
@@ -27,7 +27,7 @@ Ensures a `MessagingChannel` has valid routing configured before activation. The
|
|
|
27
27
|
|
|
28
28
|
These skills create **Enhanced** channels (`PlatformType=Enhanced`, SCRT2). All five SessionHandler domains are writable on Enhanced channels. (A Standard/SCRT1 channel would only accept a Flow as SessionHandler — the server rejects any other domain with "Only flows of type Omni-Channel are supported". These skills never create Standard channels, so that path isn't handled here.)
|
|
29
29
|
|
|
30
|
-
**Where this fits:** the channel is inserted by `service-de-channel-create` (or a per-type leaf); this skill sets routing; `service-de-channel-
|
|
30
|
+
**Where this fits:** the channel is inserted by `service-de-channel-create` (or a per-type leaf); this skill sets routing; `service-de-channel-settings-configure` sets consent; then `service-de-channel-activate` flips it live — activation requires both routing and consent. The `service-de-headless-channel-configure` orchestrator runs all four in sequence.
|
|
31
31
|
|
|
32
32
|
Supported routing types — all set `SessionHandlerId`, some also set `FallbackQueueId`:
|
|
33
33
|
|