Skip to content

forcedotcom/sf-skills / skills/service-de-channel-settings-configure

service-de-channel-settings-configure

Verified

Configure settings on an already-existing Enhanced `MessagingChannel` (any type — WhatsApp, Text/SMS, LINE, Apple, Facebook, EmbeddedMessaging), given its `{CHANNEL_ID}`. Covers five facets: consent (ConsentType + per-language keyword records), automated responses, messaging keywords, session-inactivity timeouts, and pre-chat parameters. Consent + a matching language-keyword record are required for activation's readiness check. TRIGGER when setting or changing settings on a channel that already exists (opt-out keyword, consent type, double opt-in confirmation, initial/help auto-responses, OptIn/OptOut keywords, session-inactivity timeout) — typically between insertion/routing and activation, or on a live channel. DO NOT TRIGGER for creating a new channel (`service-de-channel-create`), deploying a MIAW/EmbeddedMessaging channel from metadata XML (`service-digital-engagement-channel-configure`), setting routing (`service-de-channel-routing-configure`), or activating a channel (`service-de-channel-activate`).

FileKindSize
SKILL.mdskill md15.1 KB
references/channel-settings-facets.mdmarkdown7.9 KB
references/gotchas.mdmarkdown10.8 KB
references/language-keywords.mdmarkdown5.7 KB
references/worked-examples.mdmarkdown6.2 KB

references/language-keywords.md

View on GitHub
# Per-language keyword records: `MsgChannelLanguageKeyword`

Load this when Stage 2 (Facet 1 — Consent) needs to create or update the per-language keyword record for a channel.

## Entity shape

`MsgChannelLanguageKeyword` (key prefix `3Or`, introduced in API 224) is a **master-detail child of `MessagingChannel`**. One record holds all the consent keywords and confirmation messages for **one language** on one channel. A channel can have many of these — one per supported language.

Fields (all string/CLOB except the FK):

| Field | Meaning | Keyword or response |
| --- | --- | --- |
| `MasterLanguage` | **Required.** Language locale for this record, e.g. `en_US`, `fr_CA`, `es`, `pt_BR`. | — |
| `MessagingChannelId` | **Required.** Master-detail FK to the channel (`0Mj…`). Set on create only. | — |
| `OptInKeywords` | Keywords an end user sends to opt in (e.g. `START,YES,SUBSCRIBE`). | keyword list |
| `OptInConfirmation` | Reply sent after a successful opt-in. | response |
| `DoubleOptInKeywords` | Keywords an end user sends to confirm a double opt-in (e.g. `CONFIRM`). | keyword list |
| `OptOutKeywords` | Keywords an end user sends to opt out (e.g. `STOP,UNSUBSCRIBE,CANCEL`). | keyword list |
| `OptOutConfirmation` | Reply sent after a successful opt-out. | response |
| `HelpKeywords` | Keywords an end user sends to get help (e.g. `HELP,INFO`). | keyword list |
| `HelpResponse` | Reply sent for a help request. | response |
| `CustomKeywords` | Extra keywords the channel handles. | keyword list |
| `CustomResponse` | Reply sent for a custom keyword match. | response |
| `MessagingChannelUsage` | Optional FK (minApiVersion 252); leave unset unless the caller has a specific usage row. | — |

## Keyword storage format — comma-separated strings

Keyword fields hold a **comma-separated string**, not a multi-value/picklist. The UI joins the entered words with `wordArray.toString()` and the server splits them with `TextUtil.splitSimpleAndTrim(value, ",", 0)`. So:

- Store `OptOutKeywords` as the literal string `STOP,UNSUBSCRIBE,CANCEL`.
- Whitespace around each token is trimmed server-side, but keep it clean: no leading/trailing commas, no empty tokens.
- Matching is on the whole inbound message against the token list; keep keywords single-word and uppercase by convention (the UI upper-cases nothing automatically — follow the org's existing records if any).

## Create vs update — reuse the record for a language

**There is one record per (channel, language).** Before creating, check the Stage 2 read (`/tmp/cs-keywords.json`) for an existing `MsgChannelLanguageKeyword` whose `MasterLanguage` equals `{LANGUAGE}`:

- **Exists →** `updateRecord` path: PATCH that record's Id with the new field values. Do NOT create a second record for the same language — duplicates confuse the readiness check and the UI.
- **Doesn't exist →** `createRecord` path: insert a new record, setting `MessagingChannelId={CHANNEL_ID}` and `MasterLanguage={LANGUAGE}` plus the collected keyword/response fields.

### Create

```bash
sf data create record --target-org '{ORG_ALIAS}' --sobject MsgChannelLanguageKeyword \
  --values "MessagingChannelId={CHANNEL_ID} MasterLanguage={LANGUAGE} \
OptOutKeywords='STOP,UNSUBSCRIBE' OptOutConfirmation='You have been unsubscribed.'" \
  --json > /tmp/cs-kw-write.json
```

Add `OptInKeywords`/`OptInConfirmation` for ExplicitOptIn, and `DoubleOptInKeywords` for DoubleOptIn.

**Quoting (load-bearing):** `sf data ... --values` splits on spaces, so wrap any value containing a space in single quotes *inside* the double-quoted `--values` string — including keyword CSVs if you ever add spaces after commas, and every confirmation/response message. A comma-separated keyword list with no spaces (`OptOutKeywords=stop,unsubscribe,cancel`) does not need quoting, but a message (`OptOutConfirmation='You have been unsubscribed.'`) always does. An unquoted multi-word value fails with `Malformed key=value pair` (verified live on sdb6c 2026-08-13).

### Update

```bash
sf data update record --target-org '{ORG_ALIAS}' --sobject MsgChannelLanguageKeyword \
  --record-id '{KEYWORD_RECORD_ID}' \
  --values "OptInKeywords='START,YES' OptInConfirmation='You are now subscribed.'" \
  --json > /tmp/cs-kw-write.json
```

Check `status` in the JSON result; on non-zero return `{ok:false, kind:"keyword-record-failed", message: ...}`.

## Per-ConsentType minimum (what the readiness check requires)

The record must satisfy, for at least one language, the row matching the channel's `ConsentType` (this is the exact server-side contract from `MessagingChannelReadinessChecker` — see `gotchas.md`):

| ConsentType | Required on the keyword record |
| --- | --- |
| ImplicitOptIn | `OptOutKeywords` **and** `OptOutConfirmation` non-null |
| ExplicitOptIn | above **and** `OptInKeywords` non-null |
| DoubleOptIn | above **and** `DoubleOptInKeywords` non-null |

`OptInConfirmation` is not part of the base readiness check, but collect it — a channel that opts users in with no confirmation reply is a poor experience.

## Unified SMS extras (only when the channel is Unified SMS)

If the channel is Unified SMS (an Enhanced channel with `MessageType='Text'`; there is no `IsUnifiedMessagingEnabled` column on the Data-API `MessagingChannel` sObject — use `MessageType`), two extra rules apply to the keyword record — the readiness check enforces them:

- **Help is mandatory:** `HelpKeywords` **and** `HelpResponse` must both be non-null.
- **French locale custom rule:** for a `fr_CA` record, `CustomKeywords` **and** `CustomResponse` must both be non-null.

These are *not* required for non-Unified-SMS channels (WhatsApp, Facebook, etc.), where help/custom are optional. Only enforce them when you've confirmed Unified SMS in Stage 1.
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall