@salesforce/afv-skills 1.54.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/README.md +310 -0
- package/skills/dx-org-analyze/SKILL.md +260 -0
- package/skills/dx-org-analyze/references/collection-details.md +88 -0
- package/skills/dx-org-analyze/references/report-format.md +67 -0
- package/skills/dx-org-analyze/scripts/collect_org_data.py +823 -0
- package/skills/dx-org-analyze/scripts/compute_diff.py +1101 -0
- package/skills/dx-org-analyze/scripts/introspect_org.py +400 -0
- package/skills/dx-org-analyze/tests/README.md +46 -0
- package/skills/dx-org-analyze/tests/fixtures/org_a.json +76 -0
- package/skills/dx-org-analyze/tests/fixtures/org_b.json +70 -0
- package/skills/dx-org-analyze/tests/test_compute_diff.sh +284 -0
- package/skills/dx-org-analyze/tests/test_consistency.sh +428 -0
- 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-design-validate/SKILL.md +163 -0
- package/skills/experience-design-validate/references/ai.md +54 -0
- package/skills/experience-design-validate/references/components.md +61 -0
- package/skills/experience-design-validate/references/craft.md +158 -0
- package/skills/experience-design-validate/references/data.md +59 -0
- package/skills/experience-design-validate/references/forms-flows.md +57 -0
- package/skills/experience-design-validate/references/interaction.md +53 -0
- package/skills/experience-design-validate/references/navigation.md +51 -0
- package/skills/experience-design-validate/references/performance.md +56 -0
- package/skills/experience-design-validate/references/records.md +60 -0
- package/skills/experience-design-validate/references/responsive.md +48 -0
- package/skills/experience-design-validate/references/scoring-rubric.md +257 -0
- package/skills/experience-design-validate/references/state.md +53 -0
- package/skills/experience-design-validate/references/trust.md +47 -0
- package/skills/experience-design-validate/references/usability.md +35 -0
- package/skills/experience-design-validate/references/visual-system.md +183 -0
- 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
package/package.json
CHANGED
|
@@ -327,6 +327,14 @@ change. Never invent unavailable action inputs, outputs, or model reasoning.
|
|
|
327
327
|
3. Present the exact target org and version state. Obtain explicit user approval
|
|
328
328
|
before publishing or activating.
|
|
329
329
|
4. Publish, activate, and verify the user-facing agent only after approval.
|
|
330
|
+
5. **Voice agents — wiring a telephony channel is a separate, opt-in step; never
|
|
331
|
+
auto-wire it.** Attaching a phone number creates real routing infrastructure
|
|
332
|
+
(flows, a queue, an active `MessagingChannel`) and consumes a provisioned
|
|
333
|
+
number, so do it only when the user **explicitly asks** and has supplied a
|
|
334
|
+
**provisioned phone number** (confirm it exists — do not assume or invent
|
|
335
|
+
one). If either is missing, stop and say what's needed. When both hold, attach
|
|
336
|
+
it headless via the CLI — do not send the user to Agent Builder. Follow
|
|
337
|
+
[Headless Telephony CLI](references/voice-telephony-cli.md).
|
|
330
338
|
|
|
331
339
|
### Delete or Rename an Agent
|
|
332
340
|
|
|
@@ -560,9 +560,9 @@ connection messaging:
|
|
|
560
560
|
|---------|-------------|----------|
|
|
561
561
|
| `messaging` | Chat/messaging channels; also the escalation-routing surface | Enhanced Chat, Web Chat, In-App; human escalation via `@utils.escalate` |
|
|
562
562
|
| `customer_web_client` | Enhanced Chat v2 (ECv2) surface — the voice-capable connection ADLC authors | Voice agents, Agent Builder Preview (see [Voice Modality Reference](voice-modality-reference.md)) |
|
|
563
|
-
| `telephony` | Voice/phone routing channel | Service Cloud Voice, phone support (channel attachment is
|
|
563
|
+
| `telephony` | Voice/phone routing channel | Service Cloud Voice, phone support (channel attachment is headless via CLI — see [voice-telephony-cli.md](voice-telephony-cli.md)) |
|
|
564
564
|
|
|
565
|
-
> **Voice agents** use `connection customer_web_client:` (ECv2) as the authored voice surface. `telephony` (Service Cloud Voice) is a real channel,
|
|
565
|
+
> **Voice agents** use `connection customer_web_client:` (ECv2) as the authored voice surface. `telephony` (Service Cloud Voice) is a real channel, and attaching a phone number is done **headless via the CLI** ([voice-telephony-cli.md](voice-telephony-cli.md)) — not a UI-only step. Do **not** author a `connection voice:` block; it does not exist.
|
|
566
566
|
|
|
567
567
|
**CRITICAL**: Values like `"queue"`, `"skill"`, `"agent"` for `outbound_route_type` cause validation errors!
|
|
568
568
|
|
|
@@ -138,14 +138,31 @@ Supported pronunciation types: `IPA` (International Phonetic Alphabet), `CMU` (C
|
|
|
138
138
|
Voice interactions differ from text. When authoring instructions for voice agents:
|
|
139
139
|
|
|
140
140
|
1. **Keep responses concise.** Users cannot scan/skim voice responses. Aim for 1-2 sentences per turn, not paragraphs. (Long turns also risk tripping the silence/nudge timer — see [voice-latency-heuristics.md](voice-latency-heuristics.md) §5.)
|
|
141
|
-
2. **Avoid lists longer than 3 items.** Users lose track of spoken lists.
|
|
142
|
-
3. **Use confirmation patterns.** Repeat back key information (account numbers, dates, amounts) before taking action.
|
|
141
|
+
2. **Avoid lists longer than 3 items — and batch long ones.** Users lose track of spoken lists. For a list that can be long, read at most **2 items per turn** and offer to continue (*"Would you like the next two?"*) rather than reading the whole set. **Never speak a raw total count** ("I found forty-seven results") — it's meaningless aloud; summarize or offer to narrow instead.
|
|
142
|
+
3. **Use confirmation patterns — and split capture from action.** Repeat back key information (account numbers, dates, amounts) before taking action. For anything that triggers an irreversible action (sending an email/SMS, creating a record), make **capture and send two separate steps**: capture and store the value, read it back, get a yes, and only *then* call the action that acts on it. Don't let a single turn both collect a misheard value and act on it.
|
|
143
143
|
4. **Design for barge-in.** Users may interrupt. Instructions should handle partial inputs gracefully. Add: *"If the caller starts talking, stop speaking immediately, listen, and respond to what they said — don't finish your sentence."*
|
|
144
144
|
5. **Avoid formatting references.** Do not reference links, bullet points, tables, or visual formatting in instructions — they don't render in voice.
|
|
145
|
-
6. **Acknowledge slow actions
|
|
146
|
-
7. **Render numbers, prices, and IDs in spoken form.** TTS reads `$19.99` and `+14155551212` as garble. Instruct: *"When reading numbers, prices, phone numbers, IDs, or dates, use natural spoken form — never read punctuation, currency symbols, or raw digits."* Spell out numbers under 100 ("twenty-five"); prices as *"nineteen dollars and ninety-nine cents"*; phone numbers digit-by-digit grouped naturally; dates as *"May tenth, twenty twenty-six"*.
|
|
145
|
+
6. **Acknowledge slow actions — prefer the platform's progress indicator over LLM filler.** Any action over ~800ms (SOQL, external HTTP, retrieval) needs a "still working" signal. **Best practice:** set a `progress_indicator_message` on the action itself (*"Just a moment while I look that up"*) so the platform speaks the hold phrase and the agent's own turn begins **with the answer** — don't have the LLM vocalize "one moment" as well, or the caller hears it twice. Reserve LLM-spoken filler (*"Let me pull that up"*) for cases where you can't set a progress message. Mark truly instant actions out of the progress indicator so they don't announce a delay that isn't there. This is the instruction-level fix for the latency patterns in [voice-latency-heuristics.md](voice-latency-heuristics.md).
|
|
146
|
+
7. **Render numbers, prices, and IDs in spoken form.** TTS reads `$19.99` and `+14155551212` as garble. Instruct: *"When reading numbers, prices, phone numbers, IDs, or dates, use natural spoken form — never read punctuation, currency symbols, or raw digits."* Spell out numbers under 100 ("twenty-five"); prices as *"nineteen dollars and ninety-nine cents"*; phone numbers digit-by-digit grouped naturally; dates as *"May tenth, twenty twenty-six"*. Author this guidance **once** — do not stack extra rules or tag overrides trying to force phone-number grouping, country-code suppression, or a specific date format. Those are platform-controlled; see "Entity Confirmation & Normalization" below.
|
|
147
147
|
8. **Add ASR repair prompts for misheard input.** Speech recognition isn't perfect. Instruct: *"If the caller's response doesn't match an expected value, or you're unsure what you heard, repeat it back and ask them to confirm — e.g. 'I heard four four two, is that right?'"*
|
|
148
148
|
9. **Give empty results a caller-friendly fallback.** Any lookup that can return zero results needs a graceful recovery. Instruct: *"If a lookup returns nothing, don't say 'no records found.' Say something like 'I couldn't find that account — could you spell your last name?' or offer a different search."* (Pair with voice-friendly action error shapes — see [actions-reference.md](actions-reference.md) "Voice-Safe Action Authoring".)
|
|
149
|
+
10. **Never claim an action happened unless it did.** The most common voice failure mode is the agent saying *"I've sent that to you"* or *"you'll get a text shortly"* when no action actually fired. Instruct explicitly: *"Never state or imply that an email, SMS, or record action has happened, is happening, or will happen unless you actually executed the corresponding action this turn."* Confirm delivery only *after* the action returns success.
|
|
150
|
+
11. **Never expose internals to the caller.** Action names, variable names, JSON, tool inputs, and retriever/knowledge-source names must never be spoken aloud. Instruct: *"When invoking an action, say only the configured progress message or the final customer-facing answer — never read out action names, field names, or raw data structures."*
|
|
151
|
+
|
|
152
|
+
### Entity Confirmation & Normalization — what you CANNOT control from instructions
|
|
153
|
+
|
|
154
|
+
How spoken entities are **read back and confirmed** (phone numbers, currency, dates, numerals, IDs) is decided by the platform's voice normalization layer, **downstream of your agent instructions**. A few specific behaviors are **not** reliably controllable from the `.agent` file — and trying to control them makes things *worse*, not better:
|
|
155
|
+
|
|
156
|
+
- **Country code on phone numbers** (e.g. a "plus one" prepended to a US number). Whether it appears is decided by the normalization layer, not your prompt.
|
|
157
|
+
- **Digit grouping when reading numbers back** (e.g. `980 23 222 45` vs. an even digit-by-digit read). Grouping is applied at the language level and can vary run-to-run.
|
|
158
|
+
- **Dropping the current year from a date** (e.g. reading a same-year date as month and day only).
|
|
159
|
+
|
|
160
|
+
**Do NOT author custom instructions or tag overrides to fight these.** Adding rules like "always emit the phone tag with an empty country code," "read phone numbers as area-code / prefix / last-four," or "always include the year" **conflicts with the platform's built-in tagging and makes readback *less* consistent, not more.** In practice these overrides produce unreliable, ~50/50 results and can destabilize otherwise-correct normalization.
|
|
161
|
+
|
|
162
|
+
**What to do instead:**
|
|
163
|
+
- Write the spoken-form guidance in item 7 **once**, and stop there. Tag entities correctly (say the value is a phone number, a price, a date) and let the platform normalize it.
|
|
164
|
+
- If a customer needs a specific readback format or wants to **suppress an out-of-the-box confirmation**, that is **platform/product configuration, not agent-script authoring**. Per-entity confirmation configurability is active platform work — surface the requirement to the voice product team rather than encoding a workaround in the `.agent` file.
|
|
165
|
+
- Set the customer's expectations: these three behaviors may still occur regardless of instructions, and are being addressed at the platform layer.
|
|
149
166
|
|
|
150
167
|
### Instruction Example — Voice vs Text
|
|
151
168
|
|
|
@@ -184,7 +201,7 @@ connection customer_web_client:
|
|
|
184
201
|
adaptive_response_allowed: True
|
|
185
202
|
```
|
|
186
203
|
|
|
187
|
-
> **Choosing a surface — ECv2 (`customer_web_client`) vs Telephony.** Both ECv2 and Telephony (Service Cloud Voice) are voice-capable channels. In Agent Builder, adding *either* connection auto-enables Voice Settings. ADLC authors **`customer_web_client` (ECv2)** because it is the surface that is reliably created via the CLI/DSL today and is what Agent Builder Preview requires
|
|
204
|
+
> **Choosing a surface — ECv2 (`customer_web_client`) vs Telephony.** Both ECv2 and Telephony (Service Cloud Voice) are voice-capable channels. In Agent Builder, adding *either* connection auto-enables Voice Settings. ADLC authors **`customer_web_client` (ECv2)** because it is the surface that is reliably created via the CLI/DSL today and is what Agent Builder Preview requires. If your deployment target is Service Cloud Voice telephony, author `customer_web_client` for authoring/preview, then complete the telephony channel wiring **headless via the CLI** — see [voice-telephony-cli.md](voice-telephony-cli.md) (`MessagingChannel` + routing flow + `Atlas__VoiceAgent` planner). It is *not* a UI-only step.
|
|
188
205
|
>
|
|
189
206
|
> **Do not** invent `connection voice:`, and do not remove an existing `connection messaging:` block when enabling voice — enabling voice **adds** the `modality voice:` block, the `VoiceCallId` variable, and `connection customer_web_client:`.
|
|
190
207
|
|
|
@@ -207,24 +224,43 @@ The `modality voice:` block is validated during `sf agent validate`. Common issu
|
|
|
207
224
|
- Out-of-range floats — `outbound_speed` must be 0.5–2.0, others must be 0.0–1.0
|
|
208
225
|
- Timing values out of bounds — speak-up timers: 10s–5min, endpointing/beepboop: 0.5s–60s
|
|
209
226
|
|
|
210
|
-
##
|
|
211
|
-
|
|
212
|
-
You can **author
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
227
|
+
## Telephony Channel Setup Is Headless (CLI) — No UI Step Required
|
|
228
|
+
|
|
229
|
+
You can **author**, **validate**, **publish**, AND **wire to a telephony channel** entirely
|
|
230
|
+
headless (CLI/API). `sf agent validate/publish authoring-bundle` compile and deploy the agent
|
|
231
|
+
metadata (including the `modality voice:` block); the last-mile telephony/voice channel
|
|
232
|
+
attachment — creating the `MessagingChannel`, wiring the routing flow, and going Live on a
|
|
233
|
+
phone number — is done with `sf data create record`, `sf project deploy`, and `sf api request
|
|
234
|
+
rest`. See **[voice-telephony-cli.md](voice-telephony-cli.md)** for the full procedure.
|
|
235
|
+
|
|
236
|
+
> **Correction to prior guidance.** Earlier versions of this doc treated voice-channel deploy as
|
|
237
|
+
> UI-only (open Agent Builder → Connections → Voice → Continue). That is **no longer accurate** —
|
|
238
|
+
> the same channel wiring is fully scriptable via the CLI (proven by the Contact Center
|
|
239
|
+
> `afv-pstn-setup-cli` skill: "fully headless, no browser"). Do **not** tell the user the channel
|
|
240
|
+
> step requires the UI.
|
|
241
|
+
|
|
242
|
+
The **one** thing that still needs the UI is picking a **non-default voice ID / tuning** — the
|
|
243
|
+
voice picklist (names, gender, accent, locale) is not enumerable via CLI, so ADLC authors the
|
|
244
|
+
platform default voice and the user customizes later in Agent Builder → Connections → Voice
|
|
245
|
+
(see "Default Voice — start here" above). This is a voice-*selection* limitation, not a
|
|
246
|
+
channel-*attachment* one.
|
|
247
|
+
|
|
248
|
+
Headless telephony wiring, in brief (full detail + gotchas in
|
|
249
|
+
[voice-telephony-cli.md](voice-telephony-cli.md)):
|
|
250
|
+
1. Planner: `plannerType=Atlas__VoiceAgent` + a `SurfaceAction__Telephony` plannerSurface, with ≥1 topic.
|
|
251
|
+
2. Deploy escalation flow → voice queue (`RoutingModel=ExternalRouting`) → inbound routing flow (`routingType=Copilot`).
|
|
252
|
+
3. `MessagingChannel` (`MessageType=PstnVoice`, `MessagingPlatformKey=<phone>`), then PATCH `SessionHandlerId` (FlowDefinition `300…`) + `FallbackQueueId`.
|
|
253
|
+
4. Poll the phone number to `CodeStatus=Live`; smoke-test with a call.
|
|
219
254
|
|
|
220
255
|
## Steel Thread Alignment (Project Codey)
|
|
221
256
|
|
|
222
257
|
Voice work in ADLC targets **Steel Thread 2 — "Voice-Enabled Agent with Knowledge Grounding"**: build voice agents with subagents, actions, and knowledge integration (ADL / Salesforce Knowledge), then deploy to the voice channel. Two implications for authoring:
|
|
223
258
|
|
|
224
259
|
- **Pair voice with knowledge grounding.** Voice service agents are almost always FAQ/policy-backed, so `/agentforce-generate` proactively asks the Knowledge Grounding question when it detects a voice agent. The combined template is `assets/agents/voice-knowledge-grounded.agent`.
|
|
225
|
-
- **Deploy is
|
|
260
|
+
- **Deploy is now fully headless.** Authoring, validation, publish, AND telephony-channel wiring are all CLI — see [voice-telephony-cli.md](voice-telephony-cli.md). (Formerly a Steel Thread 2 gap; the channel step no longer requires the UI. Only non-default voice-ID selection remains UI-only.)
|
|
226
261
|
|
|
227
262
|
## Related References
|
|
228
263
|
|
|
264
|
+
- [voice-telephony-cli.md](voice-telephony-cli.md) — headless PSTN/telephony channel setup via SF CLI (MessagingChannel, routing flows, `Atlas__VoiceAgent` planner, troubleshooting).
|
|
229
265
|
- [voice-latency-heuristics.md](voice-latency-heuristics.md) — latency anti-patterns (sync writes, bulky retrieval, long turns) for authoring and trace diagnosis.
|
|
230
266
|
- [actions-reference.md](actions-reference.md) "Voice-Safe Action Authoring" — voice-safe action descriptions, parameter names, enums, error shapes.
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# Headless Telephony (PSTN) Channel Attach via SF CLI
|
|
2
|
+
|
|
3
|
+
**Scope: the last step only.** This covers attaching an **already-authored, published, and
|
|
4
|
+
active** voice agent to a real phone number (PSTN) — the step this skill previously deferred to
|
|
5
|
+
the Agent Builder UI. Authoring the agent (the `.agent` file, `modality voice:` block,
|
|
6
|
+
subagents/topics/actions, publish, activate) is handled by the normal `agentforce-generate`
|
|
7
|
+
flow — **do not re-do it here.** This doc starts *after* `sf agent publish` + `sf agent activate`.
|
|
8
|
+
|
|
9
|
+
The whole channel attach is headless — `sf` CLI, `sf project deploy`, and REST. **No Agent
|
|
10
|
+
Builder step.** This supersedes the older "channel wiring is UI-only" guidance.
|
|
11
|
+
|
|
12
|
+
> **Ask before wiring — this step is opt-in.** Channel attach creates real routing
|
|
13
|
+
> infrastructure (flows, a queue, an active `MessagingChannel`) and binds a provisioned phone
|
|
14
|
+
> number. **Never run it automatically** as part of publish/activate. Confirm both first:
|
|
15
|
+
> (1) the user has **explicitly asked** to wire telephony, and (2) a **provisioned phone number**
|
|
16
|
+
> exists (do not assume/invent one). If either is missing, stop and tell the user what's needed.
|
|
17
|
+
|
|
18
|
+
> The only thing that still needs the UI is picking a **non-default voice ID / tuning** (the
|
|
19
|
+
> voice picklist isn't enumerable via CLI — see [voice-modality-reference.md](voice-modality-reference.md)).
|
|
20
|
+
> Channel *attachment* is not UI-only.
|
|
21
|
+
|
|
22
|
+
Commands below are adapted from the Agentforce Contact Center `afv-pstn-setup-cli` skill.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Prerequisites (produced by the normal authoring flow)
|
|
27
|
+
|
|
28
|
+
- A voice agent **already published + active** via `agentforce-generate` (authored with
|
|
29
|
+
`modality voice:` and a voice-capable connection surface).
|
|
30
|
+
- Org authenticated via `sf` CLI; you are inside the SFDX project dir (`sf agent
|
|
31
|
+
activate/deactivate` fail outside one with `InvalidProjectWorkspaceError`).
|
|
32
|
+
- A **provisioned phone number** supplied by the user (do not assume one).
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## What "attach to telephony" adds on top of the published agent
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
Inbound call on +1XXXXXXXXXX
|
|
40
|
+
↓ MessagingChannel (PstnVoice) ← created here
|
|
41
|
+
SessionHandlerId → FlowDefinition (300…)
|
|
42
|
+
↓ Voice Routing Flow (routingType=Copilot) ← created here
|
|
43
|
+
copilotId → BotDefinition (the published agent)
|
|
44
|
+
↓
|
|
45
|
+
Published voice agent (planner needs a Telephony surface — see Step 1)
|
|
46
|
+
↓ (on escalation)
|
|
47
|
+
Voice Escalation Flow (routingType=QueueBased) → voice queue ← created here
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Deploy order: **preflight number is Live (Step 0) → escalation flow → queue → (verify planner) → inbound routing flow → channel.**
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Step 0 — Preflight: the supplied number must already be provisioned + Live (do this FIRST)
|
|
55
|
+
|
|
56
|
+
**Before any deploy or create step**, confirm the exact phone number the user supplied is
|
|
57
|
+
already provisioned and `CodeStatus=Live`. Nothing below (planner patch, escalation flow, queue,
|
|
58
|
+
inbound flow, `MessagingChannel`) may run until this passes — otherwise a typo'd or unprovisioned
|
|
59
|
+
number leaves real routing infrastructure created for a number that can never route, which defeats
|
|
60
|
+
the opt-in gate.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
sf data query --target-org <alias> \
|
|
64
|
+
--query "SELECT Id, CodeStatus FROM PhoneNumber WHERE PhoneNumber='<phone_number>'"
|
|
65
|
+
```
|
|
66
|
+
Proceed **only** when the query returns exactly the supplied number with `CodeStatus=Live`. **Stop
|
|
67
|
+
and make zero changes** if any of these hold:
|
|
68
|
+
- no row is returned (number not provisioned on this org),
|
|
69
|
+
- `CodeStatus` is anything other than `Live` (still provisioning / failed),
|
|
70
|
+
- the query errors with `INVALID_TYPE` (Agentforce Voice numbers aren't provisioned on this org —
|
|
71
|
+
verify in Setup → Service → Voice → Agentforce Voice Setup).
|
|
72
|
+
|
|
73
|
+
Tell the user exactly what's missing and do not attempt to create or invent a number.
|
|
74
|
+
|
|
75
|
+
## Step 1 — Verify the published planner carries a Telephony surface
|
|
76
|
+
|
|
77
|
+
Authoring produces the planner; you only need to **confirm** (and patch only if missing) that it
|
|
78
|
+
has a `Telephony` surface — the DSL commonly emits `Messaging` + `CustomerWebClient` (ECv2 for
|
|
79
|
+
Preview) but PSTN routing needs `SurfaceAction__Telephony`.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
sf project retrieve start --metadata "GenAiPlannerBundle:<Agent_API_Name>" --target-org <alias>
|
|
83
|
+
```
|
|
84
|
+
Confirm: `plannerType=Atlas__VoiceAgent`, a `SurfaceAction__Telephony` `plannerSurface`
|
|
85
|
+
(with `outboundRouteConfigs` naming the escalation flow), and ≥1 `localTopics` (a topic-less
|
|
86
|
+
planner accepts then drops calls in ~10s). If the Telephony surface is absent, add it and
|
|
87
|
+
redeploy with the agent deactivated:
|
|
88
|
+
```bash
|
|
89
|
+
sf agent deactivate --api-name <Agent_API_Name> --target-org <alias>
|
|
90
|
+
sf project deploy start --source-dir <project-source-dir>/genAiPlannerBundles/<Agent_API_Name> --target-org <alias> --wait 10
|
|
91
|
+
sf agent activate --api-name <Agent_API_Name> --target-org <alias>
|
|
92
|
+
```
|
|
93
|
+
> `<project-source-dir>` is the source directory derived from `sfdx-project.json`: take the
|
|
94
|
+
> `packageDirectories[]` entry with `"default": true` (else the first) and append `/main/default`
|
|
95
|
+
> to its `path` → e.g. `force-app/main/default`. The `path` value alone (e.g. `force-app`) is the
|
|
96
|
+
> package root, not the source dir — don't append the metadata folder to it directly.
|
|
97
|
+
> Topics/actions themselves come from the authored `.agent` — don't hand-write them here; if
|
|
98
|
+
> they're missing, fix the source agent and re-publish via `agentforce-generate`.
|
|
99
|
+
|
|
100
|
+
## Step 2 — Voice queue (ExternalRouting)
|
|
101
|
+
|
|
102
|
+
Deploy `QueueRoutingConfig` with **`RoutingModel=ExternalRouting`** (`LeastActive` breaks PSTN —
|
|
103
|
+
calls arrive, agent never answers), a `Group` (Queue) linked to it, a `QueueSObject` for
|
|
104
|
+
`VoiceCall`, and add the running user as a member. Save the queue Id.
|
|
105
|
+
|
|
106
|
+
## Step 3 — Escalation flow (before Step 4/5)
|
|
107
|
+
|
|
108
|
+
Deploy a `RoutingFlow`: `routingType=QueueBased`, `serviceChannelDevName=sfdc_phone`, variable
|
|
109
|
+
`recordId` (capital I), `apiVersion=66.0`. The planner references `<Agent_API_Name>_Voice_Escalation`
|
|
110
|
+
by name — a missing flow silently breaks escalation.
|
|
111
|
+
|
|
112
|
+
## Step 4 — Inbound voice routing flow
|
|
113
|
+
|
|
114
|
+
Deploy a `RoutingFlow` that routes inbound calls to the agent. Critical fields (from a working org):
|
|
115
|
+
- `routingType` = **`Copilot`** (NOT `Bot` — silently fails)
|
|
116
|
+
- `copilotId.setupReferenceType` = **`BotDefinition`** (NOT `Bot`)
|
|
117
|
+
- `serviceChannelLabel` = **`Phone`** (NOT `"Voice Call"`); `serviceChannelDevName` = `sfdc_phone`
|
|
118
|
+
- Variable name = **`recordid`** (lowercase — differs from the escalation flow's `recordId`)
|
|
119
|
+
- Include **all** empty `<inputParameters>` Flow Builder generates; `apiVersion=66.0`,
|
|
120
|
+
`CanvasMode=AUTO_LAYOUT_CANVAS`, `areMetricsLoggedToDataCloud=false`
|
|
121
|
+
|
|
122
|
+
## Step 5 — Create + wire the MessagingChannel (the former "UI-only" step)
|
|
123
|
+
|
|
124
|
+
This is the core of the last step — what Agent Builder → Connections → Voice used to own:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# 1. Create the channel
|
|
128
|
+
CHANNEL_ID=$(sf data create record --sobject MessagingChannel \
|
|
129
|
+
--values "MasterLabel='<Label>' DeveloperName='<Dev_Name>' MessageType='PstnVoice' MessagingPlatformKey='<phone_number>' IsActive=true" \
|
|
130
|
+
--json --target-org <alias> | python3 -c "import json,sys;print(json.load(sys.stdin)['result']['id'])")
|
|
131
|
+
|
|
132
|
+
# 2. Get the inbound flow's FlowDefinition ID (300… prefix — NOT the 301… version ID)
|
|
133
|
+
FLOW_DEF_ID=$(sf api request rest \
|
|
134
|
+
"/services/data/v62.0/tooling/query?q=SELECT+Id+FROM+FlowDefinition+WHERE+DeveloperName='<Agent_API_Name>_Voice_Omni_Flow'" \
|
|
135
|
+
--target-org <alias> | python3 -c "import json,sys;r=json.load(sys.stdin)['records'];print(r[0]['Id'] if r else '')")
|
|
136
|
+
|
|
137
|
+
# 3. Wire SessionHandlerId + FallbackQueueId (both mandatory)
|
|
138
|
+
sf api request rest "/services/data/v62.0/sobjects/MessagingChannel/$CHANNEL_ID" \
|
|
139
|
+
--method PATCH \
|
|
140
|
+
--body "{\"SessionHandlerId\":\"$FLOW_DEF_ID\",\"FallbackQueueId\":\"<Queue_Id>\"}" \
|
|
141
|
+
--target-org <alias>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Channel facts:
|
|
145
|
+
- `MessageType` = **`PstnVoice`** (NOT `Phone` — only one `Phone` channel allowed per org).
|
|
146
|
+
- `SessionHandlerId` must be a **FlowDefinition ID (`300…`)**, not a Flow *version* ID (`301…`).
|
|
147
|
+
- `FallbackQueueId` is **mandatory** — without it calls may drop.
|
|
148
|
+
|
|
149
|
+
## Step 6 — Smoke-test end-to-end
|
|
150
|
+
|
|
151
|
+
The number was already confirmed `Live` in Step 0, so this step just verifies the wiring holds
|
|
152
|
+
together: agent `Status=Active`, channel `IsActive=true` with `SessionHandlerId` set, phone still
|
|
153
|
+
`CodeStatus=Live`, queue has a `VoiceCall` SObject + ≥1 member.
|
|
154
|
+
```bash
|
|
155
|
+
sf data query --query "SELECT Id, CodeStatus FROM PhoneNumber WHERE PhoneNumber='<phone_number>'" --target-org <alias>
|
|
156
|
+
```
|
|
157
|
+
Then place a test call and confirm the agent answers.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Troubleshooting — call not reaching the agent
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
sf data query --query "SELECT Id, DisconnectReason, ConversationId, CallSubtype, VendorType FROM VoiceCall ORDER BY CreatedDate DESC LIMIT 5" --target-org <alias>
|
|
165
|
+
sf data query --query "SELECT Id, BotId, Status, ActiveTime, HandleTime, RoutingModel FROM AgentWork ORDER BY CreatedDate DESC LIMIT 5" --target-org <alias>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
| VoiceCall.ConversationId | AgentWork | ActiveTime | Root cause |
|
|
169
|
+
|---|---|---|---|
|
|
170
|
+
| null | — | — | PSTN / Amazon Connect not reaching Salesforce |
|
|
171
|
+
| set | none | — | Routing flow not running, or `SessionHandlerId` is a `301…` version ID |
|
|
172
|
+
| set | BotId null | — | Queue `RoutingModel=LeastActive` → change to `ExternalRouting` |
|
|
173
|
+
| set | BotId set | 0 | Planner has **no topics** — fix source agent, re-publish |
|
|
174
|
+
| set | BotId set | >0 | Bot ran — inspect `MessagingSession` + transcript / welcome message |
|
|
175
|
+
|
|
176
|
+
## Key gotchas (channel-attach only)
|
|
177
|
+
|
|
178
|
+
| Mistake | Symptom | Fix |
|
|
179
|
+
|---|---|---|
|
|
180
|
+
| `routingType=Bot` in inbound flow | Agent not invoked | `routingType=Copilot` |
|
|
181
|
+
| `setupReferenceType=Bot` | Deploy error / silent fail | `BotDefinition` |
|
|
182
|
+
| `serviceChannelLabel="Voice Call"` | Flow can't resolve channel | `"Phone"` |
|
|
183
|
+
| No `SurfaceAction__Telephony` surface on planner | Escalation never fires on voice | Add Telephony surface + redeploy (Step 1) |
|
|
184
|
+
| `SessionHandlerId` = `301…` (version) | Channel doesn't route | Use FlowDefinition `300…` |
|
|
185
|
+
| `MessageType=Phone` | "Only one Phone channel allowed" | `PstnVoice` |
|
|
186
|
+
| `RoutingModel=LeastActive` | Calls arrive, agent never answers | `ExternalRouting` |
|
|
187
|
+
| `sf agent activate/deactivate` outside project dir | `InvalidProjectWorkspaceError` | `cd` into the SFDX project first |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Related References
|
|
192
|
+
- [voice-modality-reference.md](voice-modality-reference.md) — `modality voice:` block, connection surfaces, authoring guidance.
|
|
193
|
+
- [voice-latency-heuristics.md](voice-latency-heuristics.md) — live-call latency anti-patterns.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentforce-observe
|
|
3
|
-
description: "Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM) alerts. TRIGGER when: user queries STDM session data or Data Cloud trace records; investigates production agent failures, regressions, or performance issues; asks about session traces, conversation logs, or agent metrics; wants to reproduce a reported production issue in preview; runs findSessions or trace analysis queries; creates, lists, or deletes an AHM data alert on an agent metric (escalation rate, deflection, etc.); asks why an alert is not firing or wants to check whether alerts have fired (notification counts, or the per-alert Incidents view). DO NOT TRIGGER when: user creates, modifies, or debugs .agent files during development (use agentforce-generate); writes or runs test specs (use agentforce-test); uses sf agent preview for local development iteration; deploys or publishes agents."
|
|
3
|
+
description: "Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM) alerts. TRIGGER when: user queries STDM session data or Data Cloud trace records; investigates production agent failures, regressions, or performance issues; asks about session traces, conversation logs, or agent metrics; wants to reproduce a reported production issue in preview; runs findSessions or trace analysis queries; creates, lists, updates, or deletes an AHM data alert on an agent metric (escalation rate, deflection, etc.); asks why an alert is not firing or wants to check whether alerts have fired (notification counts, or the per-alert Incidents view). DO NOT TRIGGER when: user creates, modifies, or debugs .agent files during development (use agentforce-generate); writes or runs test specs (use agentforce-test); uses sf agent preview for local development iteration; deploys or publishes agents."
|
|
4
4
|
allowed-tools: Bash Read Write Edit Glob Grep
|
|
5
5
|
metadata:
|
|
6
6
|
relatedSkills:
|
|
@@ -57,9 +57,9 @@ Determine intent from user input:
|
|
|
57
57
|
- **"analyze" / "sessions" / "what's wrong"** -> Phase 1 only, then suggest next steps
|
|
58
58
|
- **"reproduce" / "test" / "preview"** -> Phase 2 (run Phase 1 first if no issues in hand)
|
|
59
59
|
- **"fix" / "improve" / "update"** -> Phase 3 (run Phase 1 first if no issues in hand)
|
|
60
|
-
- **"create alert" / "set up monitoring" / "alert me when"** ->
|
|
61
|
-
- **"list alerts" / "show my alerts" / "delete alert"** ->
|
|
62
|
-
- **"
|
|
60
|
+
- **"create alert" / "set up monitoring" / "alert me when"** -> AHM (create)
|
|
61
|
+
- **"list alerts" / "show my alerts" / "update alert" / "delete alert"** -> AHM (list / update via PUT / delete)
|
|
62
|
+
- **"get / list notifications" / "notifications for a specific alert" / "have my alerts fired" / "why isn't my alert firing"** -> AHM: fetch notifications with header `X-UNS-Type-Filter: all`, report status + list; for a specific alert, filter by alertId from `targetPageRef.state.c__alertId` (15/18-char-safe), not metricId (+ Incidents view + metric verify)
|
|
63
63
|
|
|
64
64
|
### Resolve agent name
|
|
65
65
|
|
|
@@ -394,16 +394,20 @@ Proactive complement to the reactive Observe phases: **AHM data alerts** fire wh
|
|
|
394
394
|
# List/describe -- resolve owner id first (required); single-alert GET is 405 => list + filter client-side
|
|
395
395
|
USER_ID=$(sf org display user --target-org <org> --json | python3 -c 'import sys,json;print(json.load(sys.stdin)["result"]["id"])')
|
|
396
396
|
sf api request rest "/services/data/v66.0/tableau/dataAlerts?ownerId=$USER_ID" -o <org>
|
|
397
|
-
# Create (body
|
|
397
|
+
# Create / PUT update-in-place / delete (204). PUT & DELETE are addressed by $ALERT_ID in the path; PUT takes the full POST-style body. Bodies per reference into a 0600 mktemp file.
|
|
398
398
|
sf api request rest "/services/data/v66.0/tableau/dataAlerts" -X POST -H "Content-Type: application/json" -b "@$body" -o <org>
|
|
399
|
+
sf api request rest "/services/data/v66.0/tableau/dataAlerts/$ALERT_ID" -X PUT -H "Content-Type: application/json" -b "@$body" -o <org>
|
|
399
400
|
sf api request rest "/services/data/v66.0/tableau/dataAlerts/$ALERT_ID" -X DELETE -o <org> --include
|
|
400
|
-
#
|
|
401
|
-
sf api request rest "/services/data/v66.0/connect/notifications/status" -o <org>
|
|
401
|
+
# Notifications REQUIRE header X-UNS-Type-Filter: all (else custom-types-only => AHM empty = false 0). Report status + list.
|
|
402
|
+
sf api request rest "/services/data/v66.0/connect/notifications/status" -H "X-UNS-Type-Filter: all" -o <org>
|
|
403
|
+
sf api request rest "/services/data/v66.0/connect/notifications" -H "X-UNS-Type-Filter: all" -o <org>
|
|
404
|
+
# AHM notifications: type=templatized_data_alert; no per-alert endpoint. Attribute by alertId in targetPageRef.state.c__alertId (15/18-char-safe), NOT metricId (collides).
|
|
402
405
|
```
|
|
403
406
|
|
|
404
|
-
**
|
|
407
|
+
**Three silent-failure traps to carry into any alert work:**
|
|
405
408
|
- **Thresholds are raw 0-1 ratios**, not display percentages -- 5% is `"0.05"`, `"1"` means 100%.
|
|
406
409
|
- **POST field names/casing differ from GET** -- POST uses `utterance` (not `alertName`) and PascalCase `type` discriminators, so copying a GET response back into a POST fails.
|
|
410
|
+
- **Notifications need `X-UNS-Type-Filter: all`** -- without it `connect/notifications*` returns custom types only, so AHM notifications (type `templatized_data_alert`) come back empty; an empty list is a false negative, not "never fired."
|
|
407
411
|
|
|
408
412
|
---
|
|
409
413
|
|
|
@@ -412,7 +416,7 @@ sf api request rest "/services/data/v66.0/connect/notifications/status" -o <org>
|
|
|
412
416
|
| Reference | Contents |
|
|
413
417
|
|---|---|
|
|
414
418
|
| `references/stdm-queries.md` | STDM query procedures, Apex service deployment, response parsing |
|
|
415
|
-
| `references/ahm-alerts.md` | AHM data-alert create/list/delete, trigger history, SDM/metric/agent discovery, threshold schema, metric verification |
|
|
419
|
+
| `references/ahm-alerts.md` | AHM data-alert create/list/update/delete, trigger history, SDM/metric/agent discovery, threshold schema, metric verification |
|
|
416
420
|
| `references/issue-classification.md` | Issue pattern table, root cause categories, structural analysis checks |
|
|
417
421
|
| `references/reproduce-reference.md` | Phase 2 preview procedures, trace diagnosis, classification criteria |
|
|
418
422
|
| `references/improve-reference.md` | Phase 3 editing, deployment chain, verification, safety, test cases |
|