@salesforce/afv-skills 1.71.0 → 1.72.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/assets/agents/README.md +1 -1
- package/skills/agentforce-generate/references/actions-reference.md +4 -0
- package/skills/agentforce-generate/references/mcp-actions-in-agent-script.md +233 -0
- package/skills/agentforce-generate/references/reference-map.md +1 -0
- package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +9 -7
- package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +78 -4
- package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +17 -13
- package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +110 -9
- package/skills/experience-app-mcp-generate/references/troubleshooting.md +1 -1
- package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +49 -18
- package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +1 -1
- package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +1 -1
- package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +3 -1
- package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +32 -26
- package/skills/experience-ui-bundle-custom-app-generate/references/configure-metadata-custom-application.md +6 -24
- package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +4 -6
- package/skills/platform-apex-generate/SKILL.md +2 -1
- package/skills/platform-apex-generate/assets/abstract.cls +0 -4
- package/skills/platform-apex-generate/assets/invocable-action-extension.invocableactionextension-meta.xml +28 -0
- package/skills/platform-apex-generate/assets/invocable.cls +2 -0
- package/skills/platform-apex-generate/references/dml-declarations.md +69 -0
- package/skills/platform-metadata-discovery-get/SKILL.md +15 -10
- package/skills/platform-metadata-grounding-get/SKILL.md +5 -3
- package/skills/service-add-agents-to-contact-center-create/SKILL.md +138 -0
- package/skills/service-agentforce-contact-center-coordinate/SKILL.md +5 -5
- package/skills/service-agentforce-contact-center-coordinate/references/omni-flow-routing.md +3 -3
- package/skills/service-agentforce-contact-center-coordinate/scripts/create-routing-flows.sh +8 -3
- package/skills/service-agentforce-contact-center-coordinate/scripts/create-voice-agent.sh +5 -5
- package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-acc-queue.sh +10 -1
- package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-channel-line.sh +4 -0
- package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-flow-definition.sh +5 -0
- package/skills/service-agentforce-contact-center-coordinate/scripts/verify-number-live.sh +6 -1
- package/skills/service-concierge-portal-generate/SKILL.md +1 -1
- package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +21 -8
- package/skills/service-digital-engagement-channel-configure/SKILL.md +45 -32
- package/skills/service-digital-engagement-channel-configure/assets/public_key_certificate_set_jwks_template.xml +20 -0
- package/skills/service-digital-engagement-channel-configure/assets/public_key_certificate_set_jwks_url_template.xml +23 -0
- package/skills/service-digital-engagement-channel-configure/assets/public_key_certificate_template.xml +15 -0
- package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +1 -1
- package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/examples/jwks_upload_key.xml +11 -0
- package/skills/service-digital-engagement-channel-configure/examples/jwks_upload_keyset.xml +13 -0
- package/skills/service-digital-engagement-channel-configure/examples/jwks_url_keyset.xml +17 -0
- package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/examples/user_channel.xml +1 -1
- package/skills/service-digital-engagement-channel-configure/references/_vendored/service-onboarding-delegation-guidelines.md +43 -0
- package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +1 -1
- package/skills/service-digital-engagement-channel-configure/references/keyset_settings.md +46 -0
- package/skills/service-digital-engagement-channel-configure/references/keyset_setup.md +42 -0
- package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +28 -27
- package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +2 -5
- package/skills/service-digital-engagement-channel-configure/references/routing_transitions.md +2 -2
- package/skills/service-digital-engagement-channel-configure/references/user_verification.md +3 -4
- package/skills/service-digital-engagement-channel-configure/references/user_verification_client.md +51 -0
- package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +7 -0
- package/skills/service-digital-engagement-deployment-configure/SKILL.md +28 -10
- package/skills/service-digital-engagement-deployment-configure/references/_vendored/service-onboarding-delegation-guidelines.md +43 -0
- package/skills/service-digital-engagement-deployment-configure/references/branding_and_tooling.md +2 -2
- package/skills/service-digital-engagement-deployment-configure/references/code_snippet.md +2 -2
- package/skills/service-digital-engagement-deployment-configure/references/connect_api_creation.md +13 -7
- package/skills/service-digital-engagement-deployment-configure/references/custom_labels.md +127 -0
- package/skills/service-digital-engagement-deployment-configure/references/deployment_settings.md +2 -1
- package/skills/service-digital-engagement-deployment-configure/references/onboarding_contract.md +24 -25
- package/skills/service-digital-engagement-deployment-configure/references/prechat_forms.md +1 -1
- package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +7 -0
- package/skills/service-email-to-case-configure/SKILL.md +89 -80
- package/skills/service-email-to-case-configure/assets/CaseSettings.settings-meta.xml +1 -1
- package/skills/service-email-to-case-configure/examples/CaseSettings-two-addresses.settings-meta.xml +6 -3
- package/skills/service-email-to-case-configure/references/_vendored/service-onboarding-delegation-guidelines.md +43 -0
- package/skills/service-email-to-case-configure/references/agent-delegation.md +22 -0
- package/skills/service-email-to-case-configure/references/apply-mechanics.md +15 -12
- package/skills/service-email-to-case-configure/references/end-to-end-proof.md +14 -0
- package/skills/service-email-to-case-configure/references/onboarding-delegated-run.md +66 -0
- package/skills/service-email-to-case-configure/references/routing_address_reference.md +6 -2
- package/skills/service-email-to-case-configure/references/troubleshooting.md +17 -9
- package/skills/service-email-to-case-configure/scripts/apply-casesettings.py +863 -925
- package/skills/service-email-to-case-configure/scripts/tests/_agent.py +162 -0
- package/skills/service-email-to-case-configure/scripts/tests/_fakeorg.py +119 -155
- package/skills/service-email-to-case-configure/scripts/tests/_run.py +10 -17
- package/skills/service-email-to-case-configure/scripts/tests/test_apply_org_scenarios.py +14 -14
- package/skills/service-email-to-case-configure/scripts/tests/test_dispatch_contract.py +316 -0
- package/skills/service-email-to-case-configure/scripts/tests/test_new_capabilities.py +12 -43
- package/skills/service-email-to-case-configure/scripts/tests/test_validate_casesettings.py +13 -0
- package/skills/service-email-to-case-configure/scripts/validate-casesettings.py +17 -5
- package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +11 -11
- package/skills/service-remove-agents-from-contact-center-assign/SKILL.md +145 -0
- package/skills/service-voice-configuration-manage/SKILL.md +206 -0
- package/skills/service-voice-configuration-manage/assets/regions.json +23 -0
- package/skills/service-voice-configuration-manage/references/lookups.md +91 -0
- package/skills/service-voice-configuration-manage/references/voice_config_api.md +169 -0
- package/skills/service-voice-configuration-manage/scripts/create-configuration.sh +20 -0
- package/skills/service-voice-configuration-manage/scripts/delete-configuration.sh +31 -0
- package/skills/service-voice-configuration-manage/scripts/get-configuration.sh +18 -0
- package/skills/service-voice-configuration-manage/scripts/lib.sh +22 -0
- package/skills/service-voice-configuration-manage/scripts/list-configurations.sh +18 -0
- package/skills/service-voice-configuration-manage/scripts/lookup-caller-lines.sh +30 -0
- package/skills/service-voice-configuration-manage/scripts/lookup-flows.sh +29 -0
- package/skills/service-voice-configuration-manage/scripts/lookup-profiles.sh +29 -0
- package/skills/service-voice-configuration-manage/scripts/lookup-users.sh +29 -0
- package/skills/service-voice-configuration-manage/scripts/update-configuration.sh +20 -0
- package/skills/tableau-next-asset-create/SKILL.md +10 -4
- package/skills/tableau-next-asset-create/references/dashboard-design-principles.md +133 -0
- package/skills/tableau-next-asset-create/references/data-transform-gotchas.md +284 -128
- package/skills/tableau-next-asset-create/references/deep-reference-index.md +3 -3
- package/skills/tableau-next-asset-create/references/edit-dashboard.md +1 -1
- package/skills/tableau-next-asset-create/references/edit-visualization.md +678 -468
- package/skills/tableau-next-asset-create/references/shared-gates.md +1 -1
- package/skills/tableau-next-asset-create/references/tasks/create-data-transform.md +120 -42
- package/skills/tableau-next-asset-create/references/tasks/create-viz.md +8 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-viz.md +7 -4
- package/skills/tableau-next-asset-create/references/tasks/promote-or-reuse.md +9 -4
- package/skills/tableau-next-asset-create/references/viz-authoring.md +1 -1
- package/skills/service-email-to-case-configure/scripts/tests/test_get_session.py +0 -134
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Voice Configuration API
|
|
2
|
+
|
|
3
|
+
The Voice Configuration Connect API manages `VoiceTelephonyDefinition` records (key prefix
|
|
4
|
+
`1pK`) — the native Contact Center "voice configurations" that define a dialing prefix, region,
|
|
5
|
+
default caller ID, a pre-dial flow, and the users/profiles assigned to them.
|
|
6
|
+
|
|
7
|
+
All endpoints share the base path
|
|
8
|
+
`/services/data/v68.0/connect/thb-voice-config/v1` (the native Contact Center voice-config API).
|
|
9
|
+
|
|
10
|
+
**Never extract the access token.** All calls go through `sf api request rest`, which uses the
|
|
11
|
+
CLI's stored session for `--target-org`. Do not pull `accessToken` out of `sf org display` and
|
|
12
|
+
hand-build an HTTP request with it.
|
|
13
|
+
|
|
14
|
+
**Never pass `--json` to `sf api request rest`.** The command has no `--json` flag — passing it
|
|
15
|
+
fails with `Error: Nonexistent flag: --json`. The raw stdout body is already JSON. (This is the
|
|
16
|
+
opposite of `sf data query`, which *does* need `--json` for the lookups in `lookups.md`.)
|
|
17
|
+
|
|
18
|
+
**Access.** Every endpoint requires native Contact Center admin access. A caller without it gets `403` before any work runs.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Field names: input vs. output (read this first)
|
|
23
|
+
|
|
24
|
+
The fields you **send** on create/update are named differently from the fields you **read back**.
|
|
25
|
+
A read-then-write cycle must translate — re-sending an output body verbatim will send unknown
|
|
26
|
+
fields. The values are the same; only the keys differ.
|
|
27
|
+
|
|
28
|
+
| Meaning | Input key (create/update) | Output key (get/list) |
|
|
29
|
+
|---------|---------------------------|-----------------------|
|
|
30
|
+
| Dialing region | `region` | `dialingRegion` |
|
|
31
|
+
| Pre-dial flow Id | `callOriginationFlowId` | `preDialFlowId` |
|
|
32
|
+
| Default caller Id | `defaultCallerId` | `defaultCallerIdentifier` |
|
|
33
|
+
| Label | `name` | `name` |
|
|
34
|
+
| Developer name | `developerName` (create only) | `developerName` |
|
|
35
|
+
| Dialing prefix | `dialingPrefix` | `dialingPrefix` |
|
|
36
|
+
| Description | `description` | `description` |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## List all configurations
|
|
41
|
+
|
|
42
|
+
**`GET /configurations`** — script: `list-configurations.sh <alias>`
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
sf api request rest \
|
|
46
|
+
"/services/data/v68.0/connect/thb-voice-config/v1/configurations" \
|
|
47
|
+
--target-org <alias>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Success (`200`) — `VoiceConfigurationCollectionRepresentation`:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"configurations": [
|
|
55
|
+
{ "id": "1pK...", "name": "US Inbound", "developerName": "US_Inbound",
|
|
56
|
+
"dialingPrefix": "+1", "dialingRegion": "US", "preDialFlowId": "300...",
|
|
57
|
+
"defaultCallerIdentifier": "+14155550100" }
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Each summary carries `id`, `name`, `developerName`, `dialingPrefix`, `dialingRegion`,
|
|
63
|
+
`preDialFlowId`, `defaultCallerIdentifier` (no dates/audit fields — get the detail for those).
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Create a configuration
|
|
68
|
+
|
|
69
|
+
**`POST /configurations`** — script: `create-configuration.sh <alias> <json-body>`
|
|
70
|
+
|
|
71
|
+
Request body — `CreateVoiceConfigurationInputRepresentation`:
|
|
72
|
+
|
|
73
|
+
| Field | Required | Notes |
|
|
74
|
+
|-------|----------|-------|
|
|
75
|
+
| `name` | **yes** | MasterLabel of the configuration |
|
|
76
|
+
| `developerName` | no | Immutable after create. If omitted, derived from `name` |
|
|
77
|
+
| `dialingPrefix` | no | e.g. `+1` |
|
|
78
|
+
| `region` | no | e.g. `US` (see `assets/regions.json`) |
|
|
79
|
+
| `defaultCallerId` | no | Default caller identification (a caller-line `code`) |
|
|
80
|
+
| `callOriginationFlowId` | no | PreDialFlow Id (a flow `durableId`) |
|
|
81
|
+
| `description` | no | Free text |
|
|
82
|
+
| `userIds` | no | Array of User Ids to assign |
|
|
83
|
+
| `profileIds` | no | Array of Profile Ids to assign |
|
|
84
|
+
|
|
85
|
+
> The API also accepts a `queueIds` array (queue assignment for SCV/BYOT orgs). This skill scopes
|
|
86
|
+
> to the native Contact Center path (users/profiles) and does not manage queues — omit `queueIds`.
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
sf api request rest \
|
|
90
|
+
"/services/data/v68.0/connect/thb-voice-config/v1/configurations" \
|
|
91
|
+
--method POST \
|
|
92
|
+
--body '{"name":"US Inbound","developerName":"US_Inbound","dialingPrefix":"+1","region":"US","userIds":["005..."],"profileIds":["00e..."]}' \
|
|
93
|
+
--target-org <alias>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Success (`200`) — `CreateVoiceConfigurationOutputRepresentation`:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{ "id": "1pK..." }
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
> **Create is lenient.** A `200` with an `id` means the record was created. User/profile
|
|
103
|
+
> assignment, however, is best-effort — if it fails it is *not* rolled back, and the create still
|
|
104
|
+
> returns `200`. Always read the configuration back (`get-configuration.sh`) and confirm the
|
|
105
|
+
> intended `userIds`/`profileIds` are actually assigned.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Get one configuration
|
|
110
|
+
|
|
111
|
+
**`GET /configurations/{configId}`** — script: `get-configuration.sh <alias> <configId>`
|
|
112
|
+
|
|
113
|
+
Success (`200`) — `VoiceConfigurationRepresentation` (note the output key names):
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"id": "1pK...", "name": "US Inbound", "developerName": "US_Inbound",
|
|
118
|
+
"dialingPrefix": "+1", "dialingRegion": "US", "preDialFlowId": "300...",
|
|
119
|
+
"defaultCallerIdentifier": "+14155550100", "description": "...",
|
|
120
|
+
"createdDate": "...", "lastModifiedDate": "...",
|
|
121
|
+
"createdBy": "...", "lastModifiedBy": "..."
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Update a configuration
|
|
128
|
+
|
|
129
|
+
**`PUT /configurations/{configId}`** — script: `update-configuration.sh <alias> <configId> <json-body>`
|
|
130
|
+
|
|
131
|
+
Request body — `UpdateVoiceConfigurationInputRepresentation`. Same shape as create **minus
|
|
132
|
+
`developerName`** (immutable — do not send it).
|
|
133
|
+
|
|
134
|
+
- `name` is **required**.
|
|
135
|
+
- `userIds` / `profileIds`, when present, **replace the full assignment list**. Omit a field to
|
|
136
|
+
leave those assignments untouched; send `[]` to clear them.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
sf api request rest \
|
|
140
|
+
"/services/data/v68.0/connect/thb-voice-config/v1/configurations/1pK..." \
|
|
141
|
+
--method PUT \
|
|
142
|
+
--body '{"name":"US Inbound (updated)","dialingPrefix":"+1","region":"US"}' \
|
|
143
|
+
--target-org <alias>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Success (`200`): empty body.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Delete a configuration
|
|
151
|
+
|
|
152
|
+
**`DELETE /configurations/{configId}`** — script: `delete-configuration.sh <alias> <configId>`
|
|
153
|
+
|
|
154
|
+
Success (`200`): empty body. The org's **default** voice configuration cannot be deleted
|
|
155
|
+
(returns `400`).
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Status-code mapping
|
|
160
|
+
|
|
161
|
+
| Status | Meaning | Action |
|
|
162
|
+
|--------|---------|--------|
|
|
163
|
+
| `400 BAD_REQUEST` | Invalid input, or attempt to delete the default configuration | Fix the input; a default config cannot be deleted |
|
|
164
|
+
| `403` | Caller lacks native Contact Center admin access | Stop; the user must be a Contact Center admin |
|
|
165
|
+
| `404 NOT_FOUND` | No configuration with that `configId` | Verify the Id via `list-configurations.sh` |
|
|
166
|
+
| `409 CONFLICT` | A configuration with this `developerName` already exists | Choose a different `developerName` or reuse the existing config |
|
|
167
|
+
| `500 INTERNAL_SERVER_ERROR` | Backend failure | Retry after a few seconds; escalate if persistent |
|
|
168
|
+
|
|
169
|
+
Stop and report on any non-2xx response — do not continue a multi-step operation on a failure.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Create a voice config. Body = create-input JSON (required: name); see references/voice_config_api.md.
|
|
3
|
+
# Usage: create-configuration.sh <org-alias> <json-body>
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
source "$SCRIPT_DIR/lib.sh"
|
|
8
|
+
|
|
9
|
+
if [[ "${1:-}" == "--help" || $# -lt 2 ]]; then
|
|
10
|
+
echo "Usage: create-configuration.sh <org-alias> <json-body>" >&2
|
|
11
|
+
[[ "${1:-}" == "--help" ]] && exit 0 || exit 2
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
ALIAS="$1"; BODY="$2"
|
|
15
|
+
|
|
16
|
+
sf api request rest \
|
|
17
|
+
"/${VC_BASE}/configurations" \
|
|
18
|
+
--method POST \
|
|
19
|
+
--body "$BODY" \
|
|
20
|
+
--target-org "$ALIAS"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Delete a voice config by Id (the org default cannot be deleted — API returns 400).
|
|
3
|
+
# Usage: delete-configuration.sh <org-alias> <configId>
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
source "$SCRIPT_DIR/lib.sh"
|
|
8
|
+
|
|
9
|
+
if [[ "${1:-}" == "--help" || $# -lt 2 ]]; then
|
|
10
|
+
echo "Usage: delete-configuration.sh <org-alias> <configId>" >&2
|
|
11
|
+
[[ "${1:-}" == "--help" ]] && exit 0 || exit 2
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
ALIAS="$1"; CONFIG_ID="$2"
|
|
15
|
+
|
|
16
|
+
# Validate the Id before building the URL: an empty or malformed value would
|
|
17
|
+
# otherwise produce `DELETE /configurations/` (or a bad path) and hit the wrong
|
|
18
|
+
# endpoint. Voice configurations use the `1pK` key prefix and a 15- or 18-char Id.
|
|
19
|
+
if [[ ! "$CONFIG_ID" =~ ^1pK[A-Za-z0-9]{12}([A-Za-z0-9]{3})?$ ]]; then
|
|
20
|
+
echo "delete-configuration.sh: '$CONFIG_ID' is not a valid voice configuration Id (expected a 15- or 18-char Id with the 1pK key prefix)" >&2
|
|
21
|
+
exit 2
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# `sf api request rest` only attaches the required body `mode` when --body is
|
|
25
|
+
# non-empty; a DELETE with no body fails with "No 'mode' found in 'body' entry".
|
|
26
|
+
# Pass a dummy empty-object body (the API ignores it for DELETE) to satisfy the CLI.
|
|
27
|
+
sf api request rest \
|
|
28
|
+
"/${VC_BASE}/configurations/$(urlenc "$CONFIG_ID")" \
|
|
29
|
+
--method DELETE \
|
|
30
|
+
--body '{}' \
|
|
31
|
+
--target-org "$ALIAS"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Retrieve a single voice configuration by Id.
|
|
3
|
+
# Usage: get-configuration.sh <org-alias> <configId>
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
source "$SCRIPT_DIR/lib.sh"
|
|
8
|
+
|
|
9
|
+
if [[ "${1:-}" == "--help" || $# -lt 2 ]]; then
|
|
10
|
+
echo "Usage: get-configuration.sh <org-alias> <configId>" >&2
|
|
11
|
+
[[ "${1:-}" == "--help" ]] && exit 0 || exit 2
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
ALIAS="$1"; CONFIG_ID="$2"
|
|
15
|
+
|
|
16
|
+
sf api request rest \
|
|
17
|
+
"/${VC_BASE}/configurations/$(urlenc "$CONFIG_ID")" \
|
|
18
|
+
--target-org "$ALIAS"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Shared constants/helpers for the voice-config scripts (sourced, not run directly).
|
|
3
|
+
# Connect calls use `sf api request rest`; never extract the access token.
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
API_VERSION="v68.0"
|
|
8
|
+
# Base path for the Voice Configuration Connect API (native Contact Center voice-config API).
|
|
9
|
+
VC_BASE="services/data/${API_VERSION}/connect/thb-voice-config/v1"
|
|
10
|
+
|
|
11
|
+
# Percent-encode a value for safe use in a URL (unreserved chars stay literal).
|
|
12
|
+
urlenc() {
|
|
13
|
+
local s="$1" i c out=""
|
|
14
|
+
for (( i=0; i<${#s}; i++ )); do
|
|
15
|
+
c="${s:i:1}"
|
|
16
|
+
case "$c" in
|
|
17
|
+
[a-zA-Z0-9.~_-]) out+="$c" ;;
|
|
18
|
+
*) printf -v c '%%%02X' "'$c"; out+="$c" ;;
|
|
19
|
+
esac
|
|
20
|
+
done
|
|
21
|
+
printf '%s' "$out"
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# List all voice configurations for the org.
|
|
3
|
+
# Usage: list-configurations.sh <org-alias>
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
source "$SCRIPT_DIR/lib.sh"
|
|
8
|
+
|
|
9
|
+
if [[ "${1:-}" == "--help" || $# -lt 1 ]]; then
|
|
10
|
+
echo "Usage: list-configurations.sh <org-alias>" >&2
|
|
11
|
+
[[ "${1:-}" == "--help" ]] && exit 0 || exit 2
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
ALIAS="$1"
|
|
15
|
+
|
|
16
|
+
sf api request rest \
|
|
17
|
+
"/${VC_BASE}/configurations" \
|
|
18
|
+
--target-org "$ALIAS"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# List live caller-line numbers (Tooling API); a `code` feeds `defaultCallerId`.
|
|
3
|
+
# Usage: lookup-caller-lines.sh <org-alias> -> { "callerLines": [ { id, code } ] }
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
source "$SCRIPT_DIR/lib.sh"
|
|
8
|
+
|
|
9
|
+
if [[ "${1:-}" == "--help" || $# -lt 1 ]]; then
|
|
10
|
+
echo "Usage: lookup-caller-lines.sh <org-alias>" >&2
|
|
11
|
+
[[ "${1:-}" == "--help" ]] && exit 0 || exit 2
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
ALIAS="$1"
|
|
15
|
+
|
|
16
|
+
# Capture the query result and verify it succeeded before handing it to jq: a
|
|
17
|
+
# failed `sf data query` still prints a JSON body, but with `status != 0` and no
|
|
18
|
+
# `.result.records`, which would make the jq filter emit a misleading empty list.
|
|
19
|
+
raw="$(sf data query \
|
|
20
|
+
--query "SELECT Id, Code FROM CommunicationChannelLine WHERE CodeStatus = 'Live' AND CliStatus IN ('DEFAULT_CLI','CLI_ENABLED') ORDER BY LastModifiedDate DESC LIMIT 2000" \
|
|
21
|
+
--target-org "$ALIAS" \
|
|
22
|
+
--use-tooling-api \
|
|
23
|
+
--json)" || true
|
|
24
|
+
|
|
25
|
+
if [[ "$(jq -r '.status // empty' <<<"$raw" 2>/dev/null || true)" != "0" ]]; then
|
|
26
|
+
echo "lookup-caller-lines.sh: sf data query failed: $(jq -r '.message // "unknown error (no JSON returned)"' <<<"$raw" 2>/dev/null || echo "unknown error")" >&2
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
jq '{callerLines: [.result.records[] | {id: .Id, code: .Code}]}' <<<"$raw"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# List active auto-launched flows; a flow's durableId feeds `callOriginationFlowId`.
|
|
3
|
+
# Usage: lookup-flows.sh <org-alias> -> { "flows": [ { durableId, apiName, label } ] }
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
source "$SCRIPT_DIR/lib.sh"
|
|
8
|
+
|
|
9
|
+
if [[ "${1:-}" == "--help" || $# -lt 1 ]]; then
|
|
10
|
+
echo "Usage: lookup-flows.sh <org-alias>" >&2
|
|
11
|
+
[[ "${1:-}" == "--help" ]] && exit 0 || exit 2
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
ALIAS="$1"
|
|
15
|
+
|
|
16
|
+
# Capture the query result and verify it succeeded before handing it to jq: a
|
|
17
|
+
# failed `sf data query` still prints a JSON body, but with `status != 0` and no
|
|
18
|
+
# `.result.records`, which would make the jq filter emit a misleading empty list.
|
|
19
|
+
raw="$(sf data query \
|
|
20
|
+
--query "SELECT DurableId, ApiName, Label, ProcessType FROM FlowDefinitionView WHERE IsActive = true AND ProcessType = 'AutoLaunchedFlow' AND ManageableState = 'unmanaged' ORDER BY Label ASC LIMIT 2000" \
|
|
21
|
+
--target-org "$ALIAS" \
|
|
22
|
+
--json)" || true
|
|
23
|
+
|
|
24
|
+
if [[ "$(jq -r '.status // empty' <<<"$raw" 2>/dev/null || true)" != "0" ]]; then
|
|
25
|
+
echo "lookup-flows.sh: sf data query failed: $(jq -r '.message // "unknown error (no JSON returned)"' <<<"$raw" 2>/dev/null || echo "unknown error")" >&2
|
|
26
|
+
exit 1
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
jq '{flows: [.result.records[] | {durableId: .DurableId, apiName: .ApiName, label: .Label}]}' <<<"$raw"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# List org profiles; their ids feed `profileIds`.
|
|
3
|
+
# Usage: lookup-profiles.sh <org-alias> -> { "profiles": [ { id, name } ] }
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
source "$SCRIPT_DIR/lib.sh"
|
|
8
|
+
|
|
9
|
+
if [[ "${1:-}" == "--help" || $# -lt 1 ]]; then
|
|
10
|
+
echo "Usage: lookup-profiles.sh <org-alias>" >&2
|
|
11
|
+
[[ "${1:-}" == "--help" ]] && exit 0 || exit 2
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
ALIAS="$1"
|
|
15
|
+
|
|
16
|
+
# Capture the query result and verify it succeeded before handing it to jq: a
|
|
17
|
+
# failed `sf data query` still prints a JSON body, but with `status != 0` and no
|
|
18
|
+
# `.result.records`, which would make the jq filter emit a misleading empty list.
|
|
19
|
+
raw="$(sf data query \
|
|
20
|
+
--query "SELECT Id, Name FROM Profile ORDER BY Name ASC LIMIT 500" \
|
|
21
|
+
--target-org "$ALIAS" \
|
|
22
|
+
--json)" || true
|
|
23
|
+
|
|
24
|
+
if [[ "$(jq -r '.status // empty' <<<"$raw" 2>/dev/null || true)" != "0" ]]; then
|
|
25
|
+
echo "lookup-profiles.sh: sf data query failed: $(jq -r '.message // "unknown error (no JSON returned)"' <<<"$raw" 2>/dev/null || echo "unknown error")" >&2
|
|
26
|
+
exit 1
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
jq '{profiles: [.result.records[] | {id: .Id, name: .Name}]}' <<<"$raw"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# List active Contact Center users (deduped); their ids feed `userIds`.
|
|
3
|
+
# Usage: lookup-users.sh <org-alias> -> { "users": [ { id, name, username } ] }
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
source "$SCRIPT_DIR/lib.sh"
|
|
8
|
+
|
|
9
|
+
if [[ "${1:-}" == "--help" || $# -lt 1 ]]; then
|
|
10
|
+
echo "Usage: lookup-users.sh <org-alias>" >&2
|
|
11
|
+
[[ "${1:-}" == "--help" ]] && exit 0 || exit 2
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
ALIAS="$1"
|
|
15
|
+
|
|
16
|
+
# Capture the query result and verify it succeeded before handing it to jq: a
|
|
17
|
+
# failed `sf data query` still prints a JSON body, but with `status != 0` and no
|
|
18
|
+
# `.result.records`, which would make the jq filter emit a misleading empty list.
|
|
19
|
+
raw="$(sf data query \
|
|
20
|
+
--query "SELECT AssigneeId, Assignee.Name, Assignee.Username FROM PermissionSetAssignment WHERE PermissionSet.Name IN ('ContactCenterAgentNativeCCaaS','ContactCenterSupervisorNativeCCaaS','ContactCenterAdminNativeCCaaS') AND Assignee.IsActive = true ORDER BY Assignee.Name ASC LIMIT 2000" \
|
|
21
|
+
--target-org "$ALIAS" \
|
|
22
|
+
--json)" || true
|
|
23
|
+
|
|
24
|
+
if [[ "$(jq -r '.status // empty' <<<"$raw" 2>/dev/null || true)" != "0" ]]; then
|
|
25
|
+
echo "lookup-users.sh: sf data query failed: $(jq -r '.message // "unknown error (no JSON returned)"' <<<"$raw" 2>/dev/null || echo "unknown error")" >&2
|
|
26
|
+
exit 1
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
jq '{users: ([.result.records[] | {id: .AssigneeId, name: .Assignee.Name, username: .Assignee.Username}] | unique_by(.id))}' <<<"$raw"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Update a voice config. Body = update-input JSON (required: name; no developerName;
|
|
3
|
+
# userIds/profileIds replace the full list). Usage: update-configuration.sh <org-alias> <configId> <json-body>
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
source "$SCRIPT_DIR/lib.sh"
|
|
8
|
+
|
|
9
|
+
if [[ "${1:-}" == "--help" || $# -lt 3 ]]; then
|
|
10
|
+
echo "Usage: update-configuration.sh <org-alias> <configId> <json-body>" >&2
|
|
11
|
+
[[ "${1:-}" == "--help" ]] && exit 0 || exit 2
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
ALIAS="$1"; CONFIG_ID="$2"; BODY="$3"
|
|
15
|
+
|
|
16
|
+
sf api request rest \
|
|
17
|
+
"/${VC_BASE}/configurations/$(urlenc "$CONFIG_ID")" \
|
|
18
|
+
--method PUT \
|
|
19
|
+
--body "$BODY" \
|
|
20
|
+
--target-org "$ALIAS"
|
|
@@ -18,6 +18,7 @@ metadata:
|
|
|
18
18
|
- add_semantic_model_metric
|
|
19
19
|
- add_semantic_model_parameter
|
|
20
20
|
- add_semantic_model_relationship
|
|
21
|
+
- add_to_data_space
|
|
21
22
|
- add_workspace_asset
|
|
22
23
|
- analyze_data
|
|
23
24
|
- browse_data_assets
|
|
@@ -59,6 +60,8 @@ metadata:
|
|
|
59
60
|
- get_data_stream
|
|
60
61
|
- get_data_transform
|
|
61
62
|
- get_data_transform_run_history
|
|
63
|
+
- get_data_transform_schedule
|
|
64
|
+
- get_data_transform_setup_id
|
|
62
65
|
- get_dlo_to_dmo_mapping_status
|
|
63
66
|
- get_license_availability
|
|
64
67
|
- get_promotion_reuse_request
|
|
@@ -80,6 +83,7 @@ metadata:
|
|
|
80
83
|
- list_connections
|
|
81
84
|
- list_dashboards
|
|
82
85
|
- list_data_connection_objects
|
|
86
|
+
- list_data_spaces
|
|
83
87
|
- list_promotion_reuse_requests
|
|
84
88
|
- list_semantic_model_calculated_dimensions
|
|
85
89
|
- list_semantic_model_calculated_measures
|
|
@@ -192,14 +196,14 @@ from existing Tableau Next data") is a query/analyze intent: route to
|
|
|
192
196
|
|-------------|----------|
|
|
193
197
|
| "analyze this CSV" / "build a dashboard from these files" / nothing modeled yet | `references/tasks/build-end-to-end.md` |
|
|
194
198
|
| "ingest this CSV / Excel into a DLO/DMO" or ingest from an existing Snowflake / Databricks / BigQuery / Redshift connection (ingest only, no downstream ask) | `references/tasks/ingest-flat-file.md` |
|
|
195
|
-
|
|
|
199
|
+
| create/update a data transform, or inspect an existing transform's definition, outputs, runs, status, or schedule | `references/tasks/create-data-transform.md` |
|
|
196
200
|
| "profile / discover / check this data" (read-only) | `references/tasks/profile-dataset.md` |
|
|
197
201
|
| add a **raw** object / dimension / measure / join / **logical view** / **parameter** to my model | `references/tasks/edit-sdm.md` |
|
|
198
202
|
| add a **calculated** dimension / measure / **metric** to my model | `references/tasks/enrich-model.md` |
|
|
199
203
|
| "is my model AI-ready" / "backfill readiness metadata" / validate a model | `references/tasks/ai-readiness-audit.md` |
|
|
200
204
|
| count / total / scalar ("how many orders", "what is total revenue") or named-model structured `run_semantic_query` or raw DLO/DMO `run_query` | `references/tasks/query-model.md` |
|
|
201
205
|
| interpreted breakdown / ranking / trend / comparison without asking to author | `references/tasks/analyze-data.md` |
|
|
202
|
-
| delete a calc / metric / data object / logical view / relationship (component, not the whole SDM) | `references/sdm-tool-reference.md` |
|
|
206
|
+
| delete a calc / metric / data object / logical view / relationship (component, not the whole SDM) | `references/sdm-tool-reference.md` — Read the whole "Deleting a semantic definition" section (incl. Preflight `rawEdges: true`); confirm with the user before any `delete_*` call |
|
|
203
207
|
| "create a viz / chart" OR which-chart-type / `create_visualization` payload (no existing chart; not "just advise") | `references/tasks/create-viz.md` (then that guide cites `viz-authoring.md` — do **not** skip to it) |
|
|
204
208
|
| "edit / add a filter / forecast / sort / field to **this** chart" (an existing viz) | `references/tasks/edit-viz.md` |
|
|
205
209
|
| "show / view / display my existing chart/visualization" (no edit) | Call `get_visualization` directly (`minorVersion: -1`) — renders inline; do NOT chain `render_visualization` |
|
|
@@ -242,6 +246,8 @@ call `save_dashboard` or `upsert_user` without the user's explicit go-ahead.
|
|
|
242
246
|
Derived table / Data Cloud SQL transform → `create-data-transform.md`, not
|
|
243
247
|
ingest and not `enrich-model.md`. Metadata discovery (list SDMs, fields,
|
|
244
248
|
relationships) is `list_*` / `get_*`, not `analyze_data`.
|
|
249
|
+
- **read vs author a transform** — both use `create-data-transform.md`; select
|
|
250
|
+
its Read, Create, or Update path by intent.
|
|
245
251
|
- **create vs. edit a viz** — a request that names or clearly references an
|
|
246
252
|
**existing** chart ("add a forecast to my monthly sales chart", "filter this
|
|
247
253
|
chart to West") routes to `edit-viz.md`; a request with no existing chart in
|
|
@@ -390,8 +396,8 @@ Not a first hop (cited only from the matching task guide):
|
|
|
390
396
|
`tasks/build-dashboard.md` (NOT `dashboard-authoring.md`)
|
|
391
397
|
- "how do I ingest a CSV / Excel / existing connection into a DLO/DMO" → `tasks/ingest-flat-file.md`
|
|
392
398
|
(NOT `ingest-and-metric-gotchas.md`)
|
|
393
|
-
- "how do I create or
|
|
394
|
-
(NOT `data-transform-gotchas.md`)
|
|
399
|
+
- "how do I create, update, or inspect a data transform" →
|
|
400
|
+
`tasks/create-data-transform.md` (NOT `data-transform-gotchas.md`)
|
|
395
401
|
- "walk me through building a model end to end" → `tasks/build-end-to-end.md`
|
|
396
402
|
(NOT `build-workflow.md`)
|
|
397
403
|
- "how do I share / unshare / list who has access" → `tasks/share-asset.md`
|
|
@@ -19,6 +19,7 @@ gate — translated from universal dashboard design best practices to what the
|
|
|
19
19
|
|
|
20
20
|
## Contents
|
|
21
21
|
|
|
22
|
+
- 0. Baseline Requirements — Every Dashboard (REQUIRED)
|
|
22
23
|
- 1. Think Like a Business User (before any `create_*` call)
|
|
23
24
|
- 2. Design the Narrative Before Picking Charts (REQUIRED)
|
|
24
25
|
- 3. Visual Storytelling Flow — KPIs → Trends → Breakdowns → Correlations
|
|
@@ -34,6 +35,127 @@ gate — translated from universal dashboard design best practices to what the
|
|
|
34
35
|
|
|
35
36
|
---
|
|
36
37
|
|
|
38
|
+
## 0. Baseline Requirements — Every Dashboard (REQUIRED)
|
|
39
|
+
|
|
40
|
+
These apply to **every** dashboard, on top of the design principles below.
|
|
41
|
+
Each maps to a real MCP mechanism — none introduces a new param or template.
|
|
42
|
+
Treat the §11 "Baseline requirements" checklist group as the pass/fail gate.
|
|
43
|
+
|
|
44
|
+
### 0.0 Pre-Build Intake Gate — Hard Stop Before Any Widget
|
|
45
|
+
|
|
46
|
+
**STOP: before creating the workspace or any widget, ask the two questions
|
|
47
|
+
below** — a blocking gate like §10's Data-Presence Gate, so the first build is
|
|
48
|
+
usable instead of needing several revision rounds. **Ask only what the request
|
|
49
|
+
hasn't already answered, batched into one `AskUserQuestion` prompt** (never
|
|
50
|
+
serial); if both are answered, skip the gate and build.
|
|
51
|
+
|
|
52
|
+
1. **Purpose & audience** — the main decision it supports, and exec/at-a-glance
|
|
53
|
+
vs analyst/exploratory. Drives density: **exec** → fewer, larger KPI tiles +
|
|
54
|
+
a few headline charts; **analyst** → more breakdowns, a detail table, more
|
|
55
|
+
filters. A stated goal ("exec summary of profit") already answers this.
|
|
56
|
+
2. **Color scheme** — a named theme, or the SLDS default (use SLDS if no
|
|
57
|
+
preference). A theme in the request ("use an oscar theme") already answers
|
|
58
|
+
this; apply it per requirement #2. **When editing a dashboard that already
|
|
59
|
+
has a color scheme, skip this question and inherit the existing scheme**
|
|
60
|
+
(requirement #2) — don't ask the user to re-pick a palette they've set.
|
|
61
|
+
|
|
62
|
+
Infer everything else (chart types, sort, filters, KPI set) from these answers
|
|
63
|
+
plus the model — don't grow this into a questionnaire.
|
|
64
|
+
|
|
65
|
+
1. **Title & subtitle.** There is no native dashboard title/subtitle field —
|
|
66
|
+
realize both with one `text` widget (`edit_dashboard`'s `upsert_text_widget`
|
|
67
|
+
+ `place_widget_on_page`) placed at `row: 0` spanning the top band. Use two
|
|
68
|
+
Quill-Delta `content` ops: the title at a larger `size` (e.g. `"large"` /
|
|
69
|
+
`"24px"`, `bold: true`) on the first line, the subtitle at a smaller `size`
|
|
70
|
+
on the next. The title names the dashboard's business purpose; the subtitle
|
|
71
|
+
adds scope/timeframe (e.g. "FY27 to date, all regions").
|
|
72
|
+
|
|
73
|
+
2. **A coherent color scheme.** The palette is chosen at the §0.0 Pre-Build
|
|
74
|
+
Intake Gate (SLDS default if the user has no preference). Apply the chosen palette
|
|
75
|
+
consistently in three places: the dashboard `layouts[].style`
|
|
76
|
+
(`backgroundColor` / `gutterColor` — SLDS default `#ffffff` / `#f3f3f3`, the
|
|
77
|
+
verified create-shell values in `dashboard-authoring.md` §1), every chart's
|
|
78
|
+
`Color` encoding (same dimension → same color across all charts, §8/§4), and
|
|
79
|
+
any `text`/widget style colors. Use SLDS color tokens for series colors;
|
|
80
|
+
don't scatter ad-hoc hex values that differ chart-to-chart.
|
|
81
|
+
**When adding an asset to an existing dashboard, inherit its established
|
|
82
|
+
palette — never introduce a competing one.** First read the dashboard back
|
|
83
|
+
(`get_dashboard` / `render_dashboard`) and detect the colors already in use —
|
|
84
|
+
the `layouts[].style` background/gutter colors and the `Color` encodings on
|
|
85
|
+
the existing charts — then apply that same palette to the new viz or widget.
|
|
86
|
+
A new asset dropped into a themed dashboard must match what's there; only
|
|
87
|
+
fall back to the SLDS default when the dashboard has no scheme yet.
|
|
88
|
+
|
|
89
|
+
3. **Every visualization needs a visible title — add it as a `text` widget.**
|
|
90
|
+
There's no tool to render a title on the chart itself, so place a dedicated
|
|
91
|
+
`text` widget (`upsert_text_widget` + `place_widget_on_page`) in the grid row
|
|
92
|
+
**directly above** each viz, with the **same `colspan`** so the two read as
|
|
93
|
+
one unit. Give it a ≥3-word business-question title (no jargon, **not** a
|
|
94
|
+
bare dimension name like "Region"/"Category" — §6, `viz-authoring.md` §4) and
|
|
95
|
+
keep it short (e.g. `rowspan: 2`). Still set a meaningful `label` on the viz
|
|
96
|
+
for identification.
|
|
97
|
+
|
|
98
|
+
4. **KPIs must be real SDM metrics.** For every KPI tile, create the metric in
|
|
99
|
+
the semantic model first (`add_semantic_model_metric`), then add it as a
|
|
100
|
+
`metric` widget (`upsert_metric_widget` with
|
|
101
|
+
`parameters.metricOption.{sdmApiName, sdmId}` + `place_widget_on_page`; see
|
|
102
|
+
§3). Do **not** fake a KPI with a text widget or a single-number viz — the
|
|
103
|
+
KPI must be backed by an SDM metric so it stays live and consistent.
|
|
104
|
+
**Size the metric widget for its insight.** A metric card auto-renders an
|
|
105
|
+
insight narrative (e.g. "Total Sales was 12.64M … top contributors …")
|
|
106
|
+
beneath the headline number, and it **truncates silently** when the widget
|
|
107
|
+
is too short or narrow. Give each metric enough `rowspan` **and** adequate
|
|
108
|
+
`colspan` to show the full narrative — a cramped quarter-width tile clips it
|
|
109
|
+
with no warning. Read the dashboard back (`render_dashboard`) and grow the
|
|
110
|
+
widget until the insight is no longer cut off.
|
|
111
|
+
|
|
112
|
+
5. **Filters/parameters for interactivity.** Every dashboard must carry at
|
|
113
|
+
least one filter or parameter so it is dynamic, not static. Use a
|
|
114
|
+
dashboard-wide `add_global_filter_to_dashboard` (§9) or a `filter` /
|
|
115
|
+
`parameter` widget. **When adding a filter widget, set
|
|
116
|
+
`parameters.viewType: "listcard"`** — the MCP enum is `list` / `listcard` /
|
|
117
|
+
`toggle`; `listcard` is the required card-style List filter, while `list`
|
|
118
|
+
is the compact/legacy (classic) variant. Filter on dimensions, never
|
|
119
|
+
measures (§9), with a business-friendly `filterLabel`/`label`.
|
|
120
|
+
**Choose the filter from the business user's perspective — what cut of this
|
|
121
|
+
data would they want to explore?** Pick a dimension (or a parameter) that is
|
|
122
|
+
*relevant across the set* of visualizations and metrics; it need not appear
|
|
123
|
+
in every one — the test is business meaning, not literal field overlap. Ask
|
|
124
|
+
what question someone reading these charts would want to slice by, then
|
|
125
|
+
register that filter dashboard-wide via `add_global_filter_to_dashboard` (§9)
|
|
126
|
+
so it — and click-to-filter interactions, where selecting a mark in one viz
|
|
127
|
+
filters the rest — applies broadly rather than being scoped to a single
|
|
128
|
+
widget. Avoid an arbitrary field that is meaningful to only one chart and
|
|
129
|
+
leaves the rest of the dashboard unresponsive.
|
|
130
|
+
**Keep filter/parameter widgets compact — they are controls, not charts.**
|
|
131
|
+
A `listcard` filter renders as a small dropdown-style control (label + a
|
|
132
|
+
single collapsed value row), so a chart-sized placement leaves most of the
|
|
133
|
+
widget as empty box. Size it to the control, not to the grid: a modest
|
|
134
|
+
`colspan` (≈8–14 — a tight filter band, not a wide span) and a **short
|
|
135
|
+
`rowspan` of ~2–4**. The value count does *not* require a tall box — the
|
|
136
|
+
card stays collapsed and the list scrolls internally when expanded, so don't
|
|
137
|
+
scale `rowspan` to the number of values. The same applies to `parameter`
|
|
138
|
+
widgets. After placing, read the dashboard back and shrink any filter/
|
|
139
|
+
parameter whose box dwarfs its control until it sits neatly in the layout.
|
|
140
|
+
|
|
141
|
+
6. **Multi-page navigation.** For a dashboard with more than one page, add
|
|
142
|
+
pages with `add_page` and wire navigation with a `navigation` widget
|
|
143
|
+
(`upsert_navigation_widget`, `parameters.viewType: "toggle"`, one
|
|
144
|
+
`navigationItems[]` entry per page targeting its `page_N` name).
|
|
145
|
+
|
|
146
|
+
7. **Give adjacent widgets breathing room — space them deliberately.** Don't
|
|
147
|
+
pack metric tiles, filters, or charts flush against one another; a row of KPI
|
|
148
|
+
cards or filters touching edge-to-edge reads as one cramped block. Keep a
|
|
149
|
+
consistent gutter between neighboring widgets via the layout's
|
|
150
|
+
`cellSpacingX/Y`, and where it helps separate groups, leave a one-column or
|
|
151
|
+
one-row gap so each tile is visually distinct. This is the middle ground to
|
|
152
|
+
§4's "don't overcrowd": aim for even, intentional spacing between
|
|
153
|
+
components — neither crammed together nor stranded in wide empty bands.
|
|
154
|
+
Read the dashboard back (`render_dashboard`) and adjust the spacing until
|
|
155
|
+
tiles are clearly separated without large dead regions.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
37
159
|
## 1. Think Like a Business User (before any `create_*` call)
|
|
38
160
|
|
|
39
161
|
Before calling `create_visualization` or `create_dashboard`, answer three
|
|
@@ -308,6 +430,17 @@ equivalent MCP tool. The gate is real; those helpers are not. Use
|
|
|
308
430
|
|
|
309
431
|
## 11. Dashboard Quality Checklist (MCP Reality)
|
|
310
432
|
|
|
433
|
+
**Baseline requirements (every dashboard — §0)**
|
|
434
|
+
- [ ] §0.0 Pre-Build Intake Gate cleared before building — purpose/audience and color/theme asked in one batched prompt (skipping anything the request already answered)
|
|
435
|
+
- [ ] Title + subtitle present as a top `text` widget (`upsert_text_widget` at `row: 0`)
|
|
436
|
+
- [ ] Color scheme (from the §0.0 gate; SLDS default) applied consistently across charts + dashboard `style`; when editing an existing dashboard, the new asset inherits the dashboard's existing palette rather than introducing a new one
|
|
437
|
+
- [ ] Every visualization has a visible title via a `text` widget directly above it (≥3 words, not a bare dimension name) — no reliable native chart-title tool yet
|
|
438
|
+
- [ ] Every KPI is a real SDM metric (`add_semantic_model_metric` → `upsert_metric_widget`), never a text/number stand-in, sized (rowspan + colspan) so its insight narrative isn't truncated
|
|
439
|
+
- [ ] At least one filter or parameter present; filter widgets use `viewType: "listcard"` (card List, not the compact/classic `list`), sized compact as a control (modest `colspan`, short `rowspan` ~2–4) — not scaled to value count or given a chart-sized box
|
|
440
|
+
- [ ] Filter/parameter chosen for business relevance across the set (the cut a user would actually explore), registered dashboard-wide (`add_global_filter_to_dashboard`) so it and click-to-filter apply broadly — not an arbitrary field meaningful to only one chart
|
|
441
|
+
- [ ] Multi-page dashboards configure a `navigation` widget
|
|
442
|
+
- [ ] Adjacent widgets (KPI tiles, filters, charts) have deliberate spacing between them — even gutters, not crammed edge-to-edge and not wide dead bands
|
|
443
|
+
|
|
311
444
|
**Business clarity**
|
|
312
445
|
- [ ] Every chart title states the business question it answers (≥3 words, no jargon)
|
|
313
446
|
- [ ] Field labels come from SDM `label` (via `list_semantic_model_*`), not raw apiNames
|