@salesforce/afv-skills 1.60.0 → 1.62.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 +3 -3
- package/skills/agentforce-architecture-analyze/README.md +2 -1
- package/skills/agentforce-d360-analyze/README.md +1 -1
- package/skills/agentforce-generate/README.md +1 -0
- package/skills/crm-analytics-wave-generate/SKILL.md +212 -0
- package/skills/crm-analytics-wave-generate/assets/dashboard-template.json +66 -0
- package/skills/crm-analytics-wave-generate/assets/wapp-meta-template.xml +10 -0
- package/skills/crm-analytics-wave-generate/assets/wdash-meta-template.xml +6 -0
- package/skills/crm-analytics-wave-generate/assets/wdpr-meta-template.xml +11 -0
- package/skills/crm-analytics-wave-generate/examples/industry-binding-dashboard.wdash +67 -0
- package/skills/crm-analytics-wave-generate/examples/opportunity-revenue-recipe.wdpr +132 -0
- package/skills/crm-analytics-wave-generate/examples/pipeline-by-industry-quarter.wdpr +236 -0
- package/skills/crm-analytics-wave-generate/examples/wdpr-skeleton.wdpr +62 -0
- package/skills/crm-analytics-wave-generate/references/dashboard-authoring.md +157 -0
- package/skills/crm-analytics-wave-generate/references/dataset-hygiene.md +27 -0
- package/skills/crm-analytics-wave-generate/references/external-data-upload.md +61 -0
- package/skills/crm-analytics-wave-generate/references/method-decision-tree.md +12 -0
- package/skills/crm-analytics-wave-generate/references/r3-node-schema.md +194 -0
- package/skills/crm-analytics-wave-generate/references/scripts-reference.md +17 -0
- package/skills/crm-analytics-wave-generate/references/ui-section-template.md +68 -0
- package/skills/crm-analytics-wave-generate/scripts/check_connector_error.sh +53 -0
- package/skills/crm-analytics-wave-generate/scripts/create_app.js +59 -0
- package/skills/crm-analytics-wave-generate/scripts/deploy_and_run_recipe.js +122 -0
- package/skills/crm-analytics-wave-generate/scripts/fetch_dataset_xmd.js +59 -0
- package/skills/crm-analytics-wave-generate/scripts/find_unused_dataset_fields.js +96 -0
- package/skills/crm-analytics-wave-generate/scripts/gen_synthetic_dataset.js +137 -0
- package/skills/crm-analytics-wave-generate/scripts/patch_t_oppo_view.js +99 -0
- package/skills/crm-analytics-wave-generate/scripts/probe_recipe.js +47 -0
- package/skills/crm-analytics-wave-generate/scripts/upload_dataset.js +119 -0
- package/skills/crm-analytics-wave-generate/scripts/verify_dashboard_steps.js +99 -0
- package/skills/crm-analytics-wave-generate/scripts/verify_synthetic_dataset.js +86 -0
- package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +59 -20
- package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +5 -1
- package/skills/service-itsm-agentic-setup-incident-management/references/incident-persona-psg.md +2 -2
- package/skills/service-itsm-agentic-setup-incident-management/references/incident-preferences.md +2 -2
- package/skills/service-itsm-agentic-setup-incident-management/references/major-incident-management.md +5 -5
- package/skills/service-itsm-agentic-setup-incident-management/references/service-mgmt-privilege.md +5 -5
- package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +67 -100
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone-action.json +2 -2
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +2 -2
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +23 -22
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +3 -3
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +182 -58
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/workflow.md +157 -88
- package/skills/service-de-channel-consent-configure/SKILL.md +0 -230
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: service-de-channel-consent-configure
|
|
3
|
-
description: "Configure consent (opt-in/opt-out) on an Enhanced `MessagingChannel` so activation will accept it. Given a `{CHANNEL_ID}`, sets the channel's `ConsentType` (ImplicitOptIn / ExplicitOptIn / DoubleOptIn) and the `OptInPrompt` / `DoubleOptInPrompt` prompt fields, then creates or updates one `MsgChannelLanguageKeyword` record per language holding the opt-in / double-opt-in / opt-out / help / custom keywords and confirmation messages. Use between channel insertion and activation — activation fails the consent-readiness check unless a valid ConsentType and at least one matching language-keyword record exist."
|
|
4
|
-
metadata:
|
|
5
|
-
version: "1.0"
|
|
6
|
-
minApiVersion: "67.0"
|
|
7
|
-
domains: ["Service"]
|
|
8
|
-
cliTools:
|
|
9
|
-
- tool: ["sf"]
|
|
10
|
-
semver: ">=2.0.0"
|
|
11
|
-
relatedSkills:
|
|
12
|
-
- "service-de-channel-activate"
|
|
13
|
-
- "service-de-channel-routing-configure"
|
|
14
|
-
- "service-de-headless-channel-configure"
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# Configuring Channel Consent
|
|
18
|
-
|
|
19
|
-
## What this skill does
|
|
20
|
-
|
|
21
|
-
Ensures an Enhanced `MessagingChannel` has valid **consent** configured before activation. Consent has two parts, and both are checked by the server-side activation-readiness gate (`MessagingChannelReadinessChecker.isConsentConfiguredForChannel`):
|
|
22
|
-
|
|
23
|
-
1. **Channel-level fields** on `MessagingChannel`:
|
|
24
|
-
- `ConsentType` — static enum: `ImplicitOptIn`, `ExplicitOptIn`, or `DoubleOptIn`.
|
|
25
|
-
- `OptInPrompt` — message sent when an end-user reply doesn't match an opt-in keyword (required for ExplicitOptIn/DoubleOptIn, except on Unified SMS / WhatsApp / RCS where it's optional).
|
|
26
|
-
- `DoubleOptInPrompt` — message sent when a reply doesn't match a double-opt-in keyword (required for DoubleOptIn).
|
|
27
|
-
- `IsRequireDoubleOptIn` — boolean flag; set true alongside `ConsentType=DoubleOptIn`.
|
|
28
|
-
|
|
29
|
-
2. **Per-language keyword records** — one or more `MsgChannelLanguageKeyword` child rows (master-detail to `MessagingChannel`, key prefix `3Or`). Each holds the keywords an end-user sends (opt-in, double-opt-in, opt-out, help, custom) and the confirmation replies, **for one language**. Keyword fields are **comma-separated strings** (e.g. `"STOP,UNSUBSCRIBE,CANCEL"`).
|
|
30
|
-
|
|
31
|
-
**Consent is never a no-op for activation.** Even `ImplicitOptIn` requires at least one `MsgChannelLanguageKeyword` with an opt-out keyword + opt-out confirmation. (The one exception is an outbound-only channel, which the readiness check passes automatically.)
|
|
32
|
-
|
|
33
|
-
Consent settings apply only to **Enhanced** channels (`PlatformType=Enhanced`) of a supported message type. On a Standard channel these fields aren't used; this skill only touches Enhanced channels.
|
|
34
|
-
|
|
35
|
-
## Where this fits
|
|
36
|
-
|
|
37
|
-
This skill runs between routing and activation in the Enhanced-channel setup pipeline. `service-de-channel-routing-configure` sets the channel's `SessionHandler`; this skill configures consent; then `service-de-channel-activate` flips the channel live. The activation readiness check requires **both** routing and consent, so run this before activating. The `service-de-headless-channel-configure` orchestrator sequences all three automatically — invoke this skill directly only when you want to configure consent on its own.
|
|
38
|
-
|
|
39
|
-
## Reference File Index
|
|
40
|
-
|
|
41
|
-
| Reference file | Load when |
|
|
42
|
-
| --- | --- |
|
|
43
|
-
| `references/language-keywords.md` | Creating or updating the per-language `MsgChannelLanguageKeyword` records — full field list, CSV keyword semantics, create-vs-update logic, and the Unified-SMS help/custom-keyword rules. |
|
|
44
|
-
| `references/gotchas.md` | Troubleshooting an unexpected result, or before modifying this skill. |
|
|
45
|
-
| `references/worked-examples.md` | You want a reference run of the ImplicitOptIn, ExplicitOptIn, or DoubleOptIn paths. |
|
|
46
|
-
|
|
47
|
-
## When NOT to use this skill
|
|
48
|
-
|
|
49
|
-
- **The channel isn't Enhanced.** Consent fields apply to Enhanced channels only. This skill confirms `PlatformType=Enhanced` and stops otherwise.
|
|
50
|
-
- **The channel is outbound-only.** Outbound-only channels pass the consent-readiness check automatically; there's nothing to configure.
|
|
51
|
-
- **The channel doesn't exist yet.** Run the insertion skill first; this skill expects a real `MessagingChannel.Id`.
|
|
52
|
-
|
|
53
|
-
## Inputs (from caller)
|
|
54
|
-
|
|
55
|
-
- `{CHANNEL_ID}` — a 15- or 18-char `MessagingChannel.Id` (prefix `0Mj`). Must already exist and be Enhanced.
|
|
56
|
-
- `{CONSENT_TYPE}` — optional; one of `ImplicitOptIn` | `ExplicitOptIn` | `DoubleOptIn`. If omitted, the skill prompts.
|
|
57
|
-
- `{LANGUAGE}` — optional; the `MasterLanguage` for the keyword record (e.g. `en_US`). Defaults to `en_US` if not provided.
|
|
58
|
-
- `{ORG_ALIAS}` — optional; `sf` CLI target-org alias. Default: whatever `sf config get target-org` returns.
|
|
59
|
-
|
|
60
|
-
The individual keyword/confirmation/prompt values are collected interactively in Stage 3–4 (or accepted from the caller if pre-supplied).
|
|
61
|
-
|
|
62
|
-
## Output (to caller)
|
|
63
|
-
|
|
64
|
-
**Success — no change needed:**
|
|
65
|
-
```json
|
|
66
|
-
{"ok": true, "noop": true, "consentType": "ImplicitOptIn|ExplicitOptIn|DoubleOptIn", "languageKeywordIds": ["3Or..."], "message": "Consent already configured and activation-ready"}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
**Success — consent configured:**
|
|
70
|
-
```json
|
|
71
|
-
{"ok": true, "consentType": "ExplicitOptIn", "channelFieldsSet": ["ConsentType","OptInPrompt"],
|
|
72
|
-
"languageKeywordId": "3Or...", "language": "en_US", "created": true|false, "activationReady": true}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**Precondition / validation not met:**
|
|
76
|
-
```json
|
|
77
|
-
{"ok": false, "kind": "not-enhanced", "hint": "consent fields apply to Enhanced channels only; this channel is PlatformType=<x>"}
|
|
78
|
-
{"ok": false, "kind": "missing-consent-input", "hint": "<which required keyword/prompt for the chosen ConsentType is missing>"}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Failure:**
|
|
82
|
-
```json
|
|
83
|
-
{"ok": false, "kind": "channel-patch-failed", "message": "..."}
|
|
84
|
-
{"ok": false, "kind": "keyword-record-failed", "message": "..."}
|
|
85
|
-
{"ok": false, "kind": "verify-failed", "hint": "writes returned success but a re-read shows the channel is still not consent-ready"}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Stage 1: Read current consent state
|
|
91
|
-
|
|
92
|
-
Read the channel's consent fields and any existing language-keyword records.
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
sf data query --target-org '{ORG_ALIAS}' \
|
|
96
|
-
--query "SELECT Id, DeveloperName, PlatformType, MessageType, MessagingPlatformKey, ConsentType, OptInPrompt, DoubleOptInPrompt, IsRequireDoubleOptIn FROM MessagingChannel WHERE Id = '{CHANNEL_ID}'" \
|
|
97
|
-
--json > /tmp/cc-channel.json
|
|
98
|
-
|
|
99
|
-
sf data query --target-org '{ORG_ALIAS}' \
|
|
100
|
-
--query "SELECT Id, MasterLanguage, OptInKeywords, DoubleOptInKeywords, OptInConfirmation, OptOutKeywords, OptOutConfirmation, HelpKeywords, HelpResponse, CustomKeywords, CustomResponse FROM MsgChannelLanguageKeyword WHERE MessagingChannelId = '{CHANNEL_ID}'" \
|
|
101
|
-
--json > /tmp/cc-keywords.json
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
If the channel record is missing — halt with `Error: Channel {CHANNEL_ID} not found — check the id, or run the insertion skill first.`
|
|
105
|
-
|
|
106
|
-
If `PlatformType != 'Enhanced'` — emit `{ok:false, kind:"not-enhanced", ...}` and stop.
|
|
107
|
-
|
|
108
|
-
**No-op check:** if `ConsentType` is non-null AND the existing language-keyword records already satisfy the readiness matrix for that ConsentType (see Stage 5), emit the `noop:true` envelope and return. Don't re-prompt or overwrite a channel that is already activation-ready.
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## Stage 2: Choose the ConsentType
|
|
113
|
-
|
|
114
|
-
If `{CONSENT_TYPE}` wasn't supplied, prompt (do NOT auto-pick):
|
|
115
|
-
|
|
116
|
-
```text
|
|
117
|
-
Channel '{developerName}' ({CHANNEL_ID}) — choose a consent model:
|
|
118
|
-
|
|
119
|
-
1) ImplicitOptIn — end users are opted in by default; you only handle opt-OUT (STOP) keywords.
|
|
120
|
-
2) ExplicitOptIn — end users must send an opt-in keyword before you can message them.
|
|
121
|
-
3) DoubleOptIn — explicit opt-in plus a second confirming keyword.
|
|
122
|
-
|
|
123
|
-
Pick [1-3]:
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Record `{CONSENT_TYPE}`. Note the field checks that follow (this is the exact server-side activation-readiness contract — see `references/gotchas.md` for the source):
|
|
127
|
-
|
|
128
|
-
| ConsentType | MessagingChannel fields | `MsgChannelLanguageKeyword` (≥1 record) |
|
|
129
|
-
| --- | --- | --- |
|
|
130
|
-
| ImplicitOptIn | (none required) | `OptOutKeywords` + `OptOutConfirmation` |
|
|
131
|
-
| ExplicitOptIn | `OptInPrompt`¹ | above + `OptInKeywords` |
|
|
132
|
-
| DoubleOptIn | `OptInPrompt`¹ + `DoubleOptInPrompt` + `IsRequireDoubleOptIn=true` | above + `DoubleOptInKeywords` |
|
|
133
|
-
|
|
134
|
-
¹ `OptInPrompt` is optional (not required for readiness) on Unified SMS / WhatsApp / RCS channels — detect via `MessageType IN ('Text','WhatsApp','Rcs')` on an Enhanced channel (the queryable proxy for the server's `isUnifiedSMSOrWhatsappOrRCS`). Still recommend setting it for a good end-user experience.
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## Stage 3: Collect channel-level prompt values
|
|
139
|
-
|
|
140
|
-
Only prompt for the fields the chosen ConsentType requires (see the matrix above). Skip this stage entirely for `ImplicitOptIn` — it needs no channel-level prompt fields.
|
|
141
|
-
|
|
142
|
-
For `ExplicitOptIn` / `DoubleOptIn`:
|
|
143
|
-
|
|
144
|
-
```text
|
|
145
|
-
Opt-in prompt (sent when a reply doesn't match an opt-in keyword):
|
|
146
|
-
```
|
|
147
|
-
For `DoubleOptIn`, also:
|
|
148
|
-
```text
|
|
149
|
-
Double-opt-in prompt (sent when a reply doesn't match a double-opt-in keyword):
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Trim whitespace. If a required prompt is empty after trimming, re-prompt once; on a second empty, emit `{ok:false, kind:"missing-consent-input", hint:"..."}`.
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## Stage 4: Configure the per-language keyword record
|
|
157
|
-
|
|
158
|
-
Collect the keyword lists and confirmation replies for `{LANGUAGE}` (default `en_US`), then create or update the `MsgChannelLanguageKeyword` record.
|
|
159
|
-
|
|
160
|
-
**Load `references/language-keywords.md` and follow it** — it holds the full field list, the comma-separated-keyword semantics, the create-vs-update decision (reuse an existing record for the same language rather than duplicating), and the Unified-SMS help/custom-keyword rules.
|
|
161
|
-
|
|
162
|
-
The minimum per ConsentType (again, from the readiness contract):
|
|
163
|
-
- **ImplicitOptIn:** `OptOutKeywords` (e.g. `STOP,UNSUBSCRIBE`) + `OptOutConfirmation`.
|
|
164
|
-
- **ExplicitOptIn:** the above + `OptInKeywords` (e.g. `START,YES`).
|
|
165
|
-
- **DoubleOptIn:** the above + `DoubleOptInKeywords` (e.g. `CONFIRM`).
|
|
166
|
-
|
|
167
|
-
`OptInConfirmation`, `HelpKeywords`/`HelpResponse`, and `CustomKeywords`/`CustomResponse` are optional for the base readiness check (help/custom are only *required* on Unified SMS — see the reference), but collect them if the user wants them.
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Stage 5: Write channel fields + keyword record
|
|
172
|
-
|
|
173
|
-
Write the channel-level fields in one PATCH (only the fields the ConsentType requires).
|
|
174
|
-
|
|
175
|
-
**Quoting rule (load-bearing):** `sf data update record --values` splits on spaces, so any value containing a space **must be wrapped in single quotes inside the double-quoted `--values` string** — e.g. `OptInPrompt='Reply YES to receive messages'`. An unquoted `OptInPrompt=Reply YES ...` fails with `Malformed key=value pair` (verified live on sdb6c). Prompts almost always contain spaces, so always quote them.
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
# ImplicitOptIn — ConsentType only
|
|
179
|
-
sf data update record --target-org '{ORG_ALIAS}' --sobject MessagingChannel \
|
|
180
|
-
--record-id '{CHANNEL_ID}' --values "ConsentType=ImplicitOptIn" --json > /tmp/cc-patch.json
|
|
181
|
-
|
|
182
|
-
# ExplicitOptIn
|
|
183
|
-
sf data update record --target-org '{ORG_ALIAS}' --sobject MessagingChannel \
|
|
184
|
-
--record-id '{CHANNEL_ID}' --values "ConsentType=ExplicitOptIn OptInPrompt='{OPT_IN_PROMPT}'" --json > /tmp/cc-patch.json
|
|
185
|
-
|
|
186
|
-
# DoubleOptIn
|
|
187
|
-
sf data update record --target-org '{ORG_ALIAS}' --sobject MessagingChannel \
|
|
188
|
-
--record-id '{CHANNEL_ID}' \
|
|
189
|
-
--values "ConsentType=DoubleOptIn OptInPrompt='{OPT_IN_PROMPT}' DoubleOptInPrompt='{DBL_PROMPT}' IsRequireDoubleOptIn=true" --json > /tmp/cc-patch.json
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
If `status !== 0`: emit `{ok:false, kind:"channel-patch-failed", message: ...}` and return.
|
|
193
|
-
|
|
194
|
-
Then create or update the `MsgChannelLanguageKeyword` record per `references/language-keywords.md`. If it fails: `{ok:false, kind:"keyword-record-failed", message: ...}`.
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
## Stage 6: Verify activation readiness
|
|
199
|
-
|
|
200
|
-
Re-read both the channel and its keyword records (same two queries as Stage 1). Confirm, per the chosen ConsentType's row in the Stage 2 matrix, that every required field is now non-null on the channel AND on at least one keyword record for the configured language.
|
|
201
|
-
|
|
202
|
-
If any required field is still null: emit `{ok:false, kind:"verify-failed", hint:"<which requirement is unmet>"}`.
|
|
203
|
-
|
|
204
|
-
Otherwise emit the success envelope with `activationReady: true`.
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
## Stage 7: Report to caller
|
|
209
|
-
|
|
210
|
-
Report the JSON envelope. If this skill is the leaf (user invoked it directly), render:
|
|
211
|
-
|
|
212
|
-
- `Success — Consent configured — channel {CHANNEL_ID} is now {CONSENT_TYPE} with a {LANGUAGE} keyword record. Activation-ready.`
|
|
213
|
-
- `Info: Consent already configured — {CONSENT_TYPE}, {N} language record(s). No changes.` (no-op path)
|
|
214
|
-
- `Warning: This channel is PlatformType={x}, not Enhanced — consent fields don't apply here.` (not-enhanced)
|
|
215
|
-
- `Warning: Missing required consent input for {CONSENT_TYPE}: {what}. Re-run and provide it.` (missing-consent-input)
|
|
216
|
-
- `Error: {kind}: {message}` (other failures)
|
|
217
|
-
|
|
218
|
-
---
|
|
219
|
-
|
|
220
|
-
## Worked examples
|
|
221
|
-
|
|
222
|
-
For reference runs of the ImplicitOptIn (opt-out only), ExplicitOptIn, and DoubleOptIn paths, see `references/worked-examples.md`.
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
## Gotchas
|
|
227
|
-
|
|
228
|
-
Known gotchas — the exact per-ConsentType activation-readiness contract (and its source), comma-separated keyword storage, the "ImplicitOptIn still needs a keyword record" trap, one-record-per-language uniqueness, the Unified-SMS help/French-custom rules, and the OptInPrompt Unified-SMS/WhatsApp/RCS exemption.
|
|
229
|
-
|
|
230
|
-
**When troubleshooting an unexpected result, or before modifying this skill, load `references/gotchas.md` and follow it.**
|