/service-engagement:service-de-channel-settings-configurefrom Salesforce Service Engagement
Configures consent, automated responses, messaging keywords, session-inactivity timeouts, and pre-chat parameters on an existing Enhanced MessagingChannel (WhatsApp, SMS, LINE, Apple, Facebook, EmbeddedMessaging).
Ships in Salesforce Service Engagement. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Configures settings on an already-existing Enhanced MessagingChannel (identified by {CHANNEL_ID}), for any message type. It groups five facets; you only run the ones the caller asks for.
| # | Facet | Write surface | Applies to |
|---|---|---|---|
| 1 | Consent — ConsentType + OptInPrompt/DoubleOptInPrompt on the channel, plus per-language MsgChannelLanguageKeyword records | Data/SObjects API (sf data update/create record) | all Enhanced types |
| 2 | Automated responses — <automatedResponses> (initial, agent-engaged/-ended, opt-in prompt/confirmation, help, opt-out, inactive/idle) | Metadata API deploy | all Enhanced types |
| 3 | Messaging keywords — <messagingKeywords> (OptIn/OptOut/Help keyword groups per language) | Metadata API deploy | all Enhanced types |
| 4 | Session inactivity — endUserIdleTimeOut, endUserIdleAction, endInactiveSessionTimeOut, isAgentMessageResetInactivityEnabled | Metadata API deploy | MIAW-only (reset-flag also Apple/Facebook) |
| 5 | Pre-chat parameters — <customParameters> / <standardParameters> | Metadata API deploy | MIAW pre-chat only (rare) |
This skill is mixed-surface. Consent (facet 1) is written with the Data API on the live record. Facets 2–5 live only in the channel's metadata and are configured by retrieving the channel's .messagingChannel-meta.xml, editing it, and deploying it back. Verified live on sdb6 (2026-09): every Data/Connect/Tooling read of the facet-2–5 fields fails INVALID_TYPE/"No such column" — they are Metadata-API-only.
Per-type applicability is verified, not assumed (from a live retrieve of real channels of each type). Facets 2 and 3 are genuinely type-agnostic. Facet 4's four timeout fields appear only on MIAW; only isAgentMessageResetInactivityEnabled extends to Apple/Facebook, and SMS/WhatsApp/LINE carry no inactivity fields at all. Facet 5 appears only on MIAW channels that use pre-chat. Scope per-type accordingly — do not deploy a facet a type doesn't support.
Trigger this skill when the user wants to configure or change settings on a channel that already exists, e.g.:
DO NOT TRIGGER — hand off instead:
service-digital-engagement-channel-configure. That skill creates an Embedded Messaging channel from XML; this skill only configures a channel that already exists (it needs a live {CHANNEL_ID}, prefix 0Mj).service-de-channel-create.service-de-channel-routing-configure.service-de-channel-activate.Part of the Enhanced-channel headless pipeline: service-de-channel-create → service-de-channel-routing-configure → this skill → service-de-channel-activate. Activation's readiness check requires both routing and consent, so at minimum run facet 1 before activating. The service-de-headless-channel-configure orchestrator sequences the pipeline automatically; invoke this skill directly to configure settings on their own. For the MIAW-specific channel-creation-from-XML flow, see the sibling service-digital-engagement-channel-configure.
| Reference file | Load when |
|---|---|
references/language-keywords.md | Facet 1: creating/updating MsgChannelLanguageKeyword records — field list, CSV keyword semantics, create-vs-update, Unified-SMS help/custom rules. |
references/channel-settings-facets.md | Facets 2–5: the Metadata-API retrieve→edit→deploy flow, the full <automatedResponses> type/shape catalog (12 types, 2 content shapes), <messagingKeywords>, the inactivity fields, and per-type applicability. |
references/gotchas.md | Troubleshooting an unexpected result, or before modifying this skill. |
references/worked-examples.md | Reference runs of the ImplicitOptIn/ExplicitOptIn/DoubleOptIn consent paths. |
PlatformType=Enhanced channels only. Stage 1 confirms this and stops otherwise.service-de-channel-create first; this skill expects a real MessagingChannel.Id (prefix 0Mj).{CHANNEL_ID} — a 15/18-char MessagingChannel.Id (prefix 0Mj). Must already exist and be Enhanced.{FACETS} — optional; which facets to configure (consent, auto-responses, keywords, inactivity, parameters). If omitted, infer from the request or ask.{CONSENT_TYPE} — optional (facet 1); ImplicitOptIn | ExplicitOptIn | DoubleOptIn.{LANGUAGE} — optional; locale for keyword/response records (e.g. en_US). Default en_US.{ORG_ALIAS} — optional; sf target-org alias. Default: sf config get target-org.Facet-specific values (prompts, keyword lists, response text, timeout minutes) are collected interactively per facet, or accepted if pre-supplied.
Success:
{"ok": true, "channelId": "0Mj...", "messageType": "WhatsApp",
"facetsConfigured": ["consent","auto-responses"],
"consent": {"consentType": "ExplicitOptIn", "languageKeywordId": "3Or...", "activationReady": true},
"metadataDeploy": {"status": "Succeeded", "facets": ["auto-responses","keywords"]}}
No change needed / precondition / failure:
{"ok": true, "noop": true, "message": "Requested settings already configured"}
{"ok": false, "kind": "not-enhanced", "hint": "settings apply to Enhanced channels only; this channel is PlatformType=<x>"}
{"ok": false, "kind": "facet-not-applicable", "hint": "<facet> is not supported on <messageType> channels"}
{"ok": false, "kind": "channel-patch-failed" | "keyword-record-failed" | "metadata-deploy-failed" | "verify-failed", "message": "..."}
Read the channel; confirm it exists and is Enhanced; capture MessageType (drives per-type applicability).
sf data query --target-org '{ORG_ALIAS}' \
--query "SELECT Id, DeveloperName, PlatformType, MessageType, MessagingPlatformKey, ConsentType, OptInPrompt, DoubleOptInPrompt, IsRequireDoubleOptIn FROM MessagingChannel WHERE Id = '{CHANNEL_ID}'" \
--json > /tmp/cs-channel.json
Error: Channel {CHANNEL_ID} not found — check the id, or run service-de-channel-create first.PlatformType != 'Enhanced' → emit {ok:false, kind:"not-enhanced", ...} and stop.Decide which facets to run from {FACETS} or the request. For each requested facet, check per-type applicability (table above / references/channel-settings-facets.md); if a facet doesn't apply to this MessageType, emit {ok:false, kind:"facet-not-applicable", ...} for that facet (or skip it and note it) rather than deploying an unsupported field.
sf CLI is slow, not broken. Calls to this org routinely take 2–4 minutes (heavy CLI startup + slow round-trip). Run each sf command with a generous timeout; a slow return is normal, not a hang.
Run when consent is requested (and always before activation). Read the existing keyword records:
sf data query --target-org '{ORG_ALIAS}' \
--query "SELECT Id, MasterLanguage, OptInKeywords, DoubleOptInKeywords, OptInConfirmation, OptOutKeywords, OptOutConfirmation, HelpKeywords, HelpResponse, CustomKeywords, CustomResponse FROM MsgChannelLanguageKeyword WHERE MessagingChannelId = '{CHANNEL_ID}'" \
--json > /tmp/cs-keywords.json
No-op check: if ConsentType is non-null AND an existing keyword record already satisfies the readiness matrix for that ConsentType, don't overwrite — this facet is already activation-ready.
Choose the ConsentType (prompt if {CONSENT_TYPE} absent — do not auto-pick), then satisfy this contract (the exact server-side activation-readiness rule — source in references/gotchas.md):
| ConsentType | MessagingChannel fields | MsgChannelLanguageKeyword (≥1 record) |
|---|---|---|
| ImplicitOptIn | (none required) | OptOutKeywords + OptOutConfirmation |
| ExplicitOptIn | OptInPrompt¹ | above + OptInKeywords |
| DoubleOptIn | OptInPrompt¹ + DoubleOptInPrompt + IsRequireDoubleOptIn=true | above + DoubleOptInKeywords |
¹ OptInPrompt is optional for readiness on Unified SMS / WhatsApp / RCS (MessageType IN ('Text','WhatsApp','Rcs') on Enhanced); still recommend setting it. ImplicitOptIn is never a no-op — it still needs an opt-out keyword record.
Write the channel fields in one PATCH, then create/update the language-keyword record per references/language-keywords.md.
Quoting rule (load-bearing): sf data ... --values splits on spaces — wrap every multi-word value in single quotes inside the double-quoted string: OptInPrompt='Reply YES to receive messages'. Unquoted fails with Malformed key=value pair.
# ExplicitOptIn example
sf data update record --target-org '{ORG_ALIAS}' --sobject MessagingChannel \
--record-id '{CHANNEL_ID}' --values "ConsentType=ExplicitOptIn OptInPrompt='{OPT_IN_PROMPT}'" --json > /tmp/cs-patch.json
On non-zero status: emit {ok:false, kind:"channel-patch-failed"|"keyword-record-failed", message: ...}. Then verify by re-reading (Stage 5).
WhatsApp rich content rejects ExplicitOptIn server-side — surface the message, don't retry (see
references/gotchas.md).
Run when auto-responses and/or keywords are requested. These are type-agnostic (all Enhanced types). Load references/channel-settings-facets.md and follow it — it has the retrieve→edit→deploy flow, the 12 <automatedResponses> type values, the two content shapes (TextResponse vs MessageDefinition), the EndUserIdleResponse <responseTimeoutInMins> rule, XML escaping, and the <messagingKeywords> OptIn/OptOut/Help groups.
Outline:
sf project retrieve start -m MessagingChannel:{DeveloperName}).<automatedResponses> / <messagingKeywords> blocks in the retrieved .messagingChannel-meta.xml (add/replace by <type> / <keywordType>+<language>; XML-escape response text).sf project deploy start -m MessagingChannel:{DeveloperName}).{ok:false, kind:"metadata-deploy-failed", message: <componentFailures>}.Facebook: real metadata changes currently fail with an opaque numeric error (e.g.
(-462367322)). It's a known platform issue, not bad input. Don't retry; returnmetadata-deploy-failedwith the Setup-UI fallback hint (seereferences/gotchas.md#16).
Never emit <actionParameterMappings> (0 occurrences across a 191-channel scan — it's a Tooling-only mapping done in the UI post-deploy).
Run only when requested and applicable to this MessageType:
endUserIdleTimeOut 5–30, endUserIdleAction = Inactivate|End|InactivateAndEnd, endInactiveSessionTimeOut, isAgentMessageResetInactivityEnabled) are top-level siblings of <embeddedConfig>, not inside it. Full four fields → MIAW only; isAgentMessageResetInactivityEnabled also valid on Apple/Facebook; not applicable on SMS/WhatsApp/LINE → emit facet-not-applicable. (Release-gated: on 262 pods only endUserIdleTimeOut deploys and the reset flag is silently dropped; all four work on 264+ — see references/gotchas.md #15.)<customParameters> (name, masterLabel, externalParameterName, parameterDataType=String, optional maxLength) and <standardParameters> — MIAW pre-chat only, rare. Skip unless the caller explicitly configures pre-chat.Both use the same retrieve→edit→deploy flow as Stage 3 (references/channel-settings-facets.md).
For facet 1, re-read the channel + keyword records and confirm every required field for the chosen ConsentType is non-null (channel and ≥1 language record); else {ok:false, kind:"verify-failed", hint:"..."}. For metadata facets, confirm the deploy status is Succeeded, then re-retrieve the channel metadata and confirm the edited <automatedResponses> / <messagingKeywords> / inactivity / parameter blocks are present; if a deploy reports Succeeded but the re-retrieved block is missing, emit {ok:false, kind:"verify-failed", hint:"..."}.
Emit the JSON envelope. If invoked directly (leaf), render a short summary:
Success — configured {facets} on channel {CHANNEL_ID} ({MessageType}). (add Activation-ready. when consent passed)Info: requested settings already configured — no changes. (no-op)Warning: {facet} is not supported on {MessageType} channels — skipped. (facet-not-applicable)Warning: this channel is PlatformType={x}, not Enhanced — these settings don't apply. (not-enhanced)Error: {kind}: {message} (failures)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub forcedotcom/sf-skills --plugin service-engagement13 skills in this plugin
/service-agentforce-channel-configureWires an existing, active Agentforce agent to a channel by resolving a fallback queue, setting up inbound routing (either PATCH SessionHandlerId on the MessagingChannel, or an inbound RoutingFlow for Voice/Email), and optionally configuring outbound escalation. Use when the user wants to add a channel to an existing agent, connect an agent to a messaging or voice channel, route Voice or Email-to-Case to an Agentforce agent, or set up a fallback queue for an agent channel. Also applies to an existing Help Agent. The channel infrastructure must already exist — this skill adds routing. DO NOT TRIGGER when the agent does not yet exist or still needs Help Agent setup (use agentforce-generate or service-helpagent-coordinate), when setting up Email-to-Case with an agent end-to-end (use service-email-to-case-configure), when creating the MessagingChannel itself (use service-digital-engagement-channel-configure), or when creating an Embedded Service Deployment (use service-digital-engagement-deployment-configure)./service-agentforce-human-escalation-configureUse to configure and verify Agentforce agent-to-human escalation, including human handoff, a staffed fallback queue, and failure-threshold directives. Triggers: configure agent escalation, escalate to a human agent, agent handoff to a queue, configure a human escalation queue, set an Agentforce fallback handoff. Do not use to create an agent or configure inbound channel routing; use service-agentforce-channel-configure for inbound routing.Other plugins' skills for the same job