Configures Embedded Messaging Deployments for Salesforce Messaging for In-App and Web (MIAW). Creates new deployments via Connect API or updates existing ones via Metadata API, including custom label translations.
Ships in sf-skills. 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; scripts run unread.
Configures EmbeddedServiceConfig metadata for Salesforce Messaging for In-App and Web (MIAW). Supports two distinct workflows: creating new deployments via Connect API and updating existing deployments via Metadata API.
When delegationFrom is set to service-onboarding, fetch and follow
the Service-Onboarding delegation guidelines before acting — it is the single
source of truth, identical across every service-onboarding delegate. When it is absent, ignore this
and run as a normal standalone conversation.
EmbeddedServiceConfig XML for updatesservice-digital-engagement-channel-configure), generating the website code snippet (offered only as a next step, see references/code_snippet.md), creating Experience Sites (Connect API prerequisite for Web type)delegationFrom is set; alias context.calledFrom == "service-onboarding" until onboarding drops it): read the inputs from intent and ask only for what it leaves open (deploymentName, deploymentType, channelName). Never fabricate a value; invalid shell input or an unknown channel is failed. Standalone (no delegationFrom): run Clarifying Questions.^[A-Za-z0-9][A-Za-z0-9_.@+-]*$, the derived API name ^[a-zA-Z][a-zA-Z0-9_]*$, a channel Id ^[A-Za-z0-9]{15,18}$, and hostDomain ^[A-Za-z0-9.-]+(:[0-9]+)?$; otherwise stop and ask (delegated: failed). Pass labels and other free text single-quoted, escaping any ' as '\'', and build JSON bodies with jq -n --arg (see references/connect_api_creation.md), never by string splicing.dispatch / dispatch_readonly on /services/data/vXX.0/headless/metadata. Transport B: the sf commands below, only where a probe shows Transport A unavailable. Decide the transport before the first org command and say it in one line (Transport: A, probe returned xmlRep or Transport: B, <signal>); no org write without that line. For B, quote the failed tool load or the probe's error text: "dispatch isn't available" with no load attempt or probe result is not a reason. If dispatch / dispatch_readonly is not in your tool list, try to load it (e.g. ToolSearch) and probe before choosing B. If you have no tool-loading tool or the load fails, that is the signal: quote it, take B, and continue; never stop without writing. Use B only on one of these signals: ROUTE_NOT_FOUND, UNSUPPORTED_OPERATION, METADATA_CRUD_ERROR, or an auth/connection error. The choice resets at every step: an earlier sf step (e.g. the Web create) is never a reason to use sf for the next. The Web create also tries A first and falls back to B only on INTERNAL_ERROR from that call (step 17a).Details: references/onboarding_contract.md (§1 entry points, §2 transport, §3 pre-scan, §5 result).
Before generating, ask the user if not already clear (standalone only):
channelPlatformKey of the messaging channel to associate?references/prechat_forms.md §Inputs to GatherGather or infer before proceeding:
create or updateAPI, Mobile, or WebmasterLabel. Derive the API name (fullName / DeveloperName, Connect name) from it: replace each run of characters other than letters and digits with _, then trim leading/trailing _ (Acme Support Chat → Acme_Support_Chat). The result must match ^[a-zA-Z][a-zA-Z0-9_]*$. Use the API name for every lookup and writechannelPlatformKey of the associated messaging channelFor update operations additionally:
ESW_<name>_<timestamp>)BrandingSetreferences/prechat_forms.md §Inputs to GatherBusinessHours recordDefaults unless specified:
isEnabled: truedeploymentFeature: EmbeddedMessagingAll steps are sequential. Do not skip or reorder. Branch based on the operation type.
Verify org API version — run scripts/check-api-version.sh 67.0 '<org-alias>' and report any errors it returns. Exit 1 = org below 67.0: stop all org writes and relay the script's next step (delegated: failed); local template generation may continue. Exit 3 = invalid org alias: stop and ask for the alias (delegated: failed). Exit 2 = version could not be read: warn that it is unverified and continue; the deploy confirms it. Create sfdx-project.json in the metadata output folder only if none exists, with sourceApiVersion set to the script's ORG_API_VERSION (67.0 if exit 2).
Determine operation — standalone: ask whether the user wants to create a new deployment or update an existing one. Delegated: taken from intent, defaulting per contract §1, then confirmed by the pre-scan (step 4a).
Collect inputs — standalone: per Clarifying Questions. Delegated: from intent (deploymentName, deploymentType, channelName required; ask for any it omits).
3a. Probe transport — read-only GET of EmbeddedServiceConfig (contract §2).
references/deployment_settings.md to understand all available configuration options.4a. Pre-scan — look up the deployment by its derived API name (contract §3): none → create (Phase 2A); matches → no write, already-configured, skip to Phase 3; differs → update (Phase 2B), announce each change (standalone: ask first); linked to a different channel → standalone: ask before repointing, delegated: failed. Standalone, deployment exists: offer exactly three choices — no change / override / add to existing.
Use this path when the operation is create.
Determine API method by type — API/Mobile: Metadata API deploy. Web: Connect API (creates the Experience Site). All types need the channel to exist.
For API/Mobile types — read the template assets/esd_api_mobile_template.xml and generate the EmbeddedServiceConfig XML with:
deploymentType set to API or MobiledeploymentFeature set to EmbeddedMessagingFor Web type — inform the user that Web deployments require Connect API for initial creation because of a circular dependency between Network and CustomSite. Read references/connect_api_creation.md for the Connect API payload and instructions.
Generate output — produce the .EmbeddedServiceConfig-meta.xml file (for API/Mobile) or Connect API instructions (for Web).
Present output and next steps — as in step 17.
Use this path when the operation is update.
Retrieve the existing deployment — take the current EmbeddedServiceConfig from the org before making changes. Transport A: the xmlRep from the step 3a/4a GET. Transport B:
sf project retrieve start --metadata EmbeddedServiceConfig:<DEPLOYMENT_NAME> --target-org '<org-alias>'
Use it as the starting structure — the update is always a full document (see Rules). If retrieval is not possible, load assets/esd_web_update_template.xml as a fallback reference.
Apply messaging channel settings — in <embeddedServiceMessagingChannel> set messagingChannel (the channel's channelPlatformKey) and the UI toggles (shouldShow*, shouldStartNewLineOnEnter, invitation flags). Include every boolean, even when false; full list in references/deployment_settings.md. Leave each shouldShow* / shouldStartNewLineOnEnter at its retrieved value (default false if nothing was retrieved); set one to true only when the user explicitly asks for that feature — never infer it from an example.
Apply pre-chat forms — pre-chat is OFF by default: omit <embeddedServiceForms> unless the user asks to collect data before the conversation. If they do, read references/prechat_forms.md first and follow it (field attributes, hidden fields, ChoiceList, displayNameFormat, deactivate vs. remove).
service-digital-engagement-channel-configure; never hand-edit the channel here.examples/esd_web_prechat_fields.xml.12a. Apply custom labels (Web v1/v2 and Mobile, not API; only if asked) — read references/custom_labels.md. Labels are Tooling records, not EmbeddedServiceConfig XML: check the deployment type (Mobile: two keys only), Translation Workbench and language prerequisites first, warn that Web v1/v2 show different label sets, write them in Phase 2C, and they go live only on publish (17c). Reply to the user with the result, the Setup review link and one next question; leave out tool, recipe and endpoint names. Delegated: still end with the contract §5 result.
Apply branding customization (Web only) — a BrandingSet is automatically created with defaults when the deployment is created via Connect API. If the user wants to override specific branding properties (colors, fonts, dimensions), read references/branding_and_tooling.md for the Tooling API steps to update individual properties.
Apply invitation (Web only) — set isInvitationEnabled to true, add <embdMsgChannelInvitationConditions> (fields and operators in references/deployment_settings.md), and keep formula (e.g. 1 AND 2) in sync with the condition sequence numbers whenever conditions change.
Apply additional settings:
isTermsAndConditionsEnabled / isTermsAndConditionsRequired — T&C in pre-chatsite — Web: the retrieved value, unchanged (see Rules); omit for API/MobileGenerate the file — produce the .EmbeddedServiceConfig-meta.xml file at the path the user specifies, or default to EmbeddedServiceConfig/ in the project's metadata source path.
Present output and next steps — show the generated file and summarize what was configured. Recommend as next steps:
references/code_snippet.mdRuns for both Phase 2A and 2B, except when the pre-scan returned already-configured. Standalone: confirm before writing. Delegated: the plan approval is the confirmation; still announce each write.
17a. Write the deployment —
- Web create: Connect API (see references/connect_api_creation.md). Transport A first: dispatch POST on the fully-qualified path. If it returns INTERNAL_ERROR (MCP sessions can fail while the ESW site is built), quote the error, re-run the step 3 pre-scan, and continue on B with sf api request rest only if no partial EmbeddedServiceConfig for the name exists; if one does, stop and ask.
- API/Mobile create: Transport A POST EmbeddedServiceConfig (body carries type, fullName, xmlRep); Transport B sf project deploy start.
- Update: Transport A PUT of the full document; Transport B sf project deploy start.
Check results[].success, not just HTTP status. On failure stop and report the step — no silent retry.
17b. Re-read and diff — GET the component again and confirm every intended field landed and no inline block (embeddedServiceMessagingChannel, forms) was dropped.
17c. Publish (Web only) — never automatic. Publishing makes the changes live to customers; the deploy only saves a draft. After 17b, stop: summarize what changed, give the plain Setup link <instanceUrl>/lightning/setup/EmbeddedServiceDeployments/<EmbeddedServiceConfigId>/view so the user can review the draft, and ask whether to publish now. Publish only on an explicit yes in that turn (a "publish" in the original request does not count). Then dispatch POST on the fully-qualified publish path; if it returns a path/route error, or on Transport B, run the sf publish command from references/connect_api_creation.md. Delegated: do not publish; return published: true only if a Web create auto-published (isPublishSuccess: true), else false. Note: a Web create via Connect API publishes by itself (isPublishSuccess: true); say so in the plan before creating.
Verify against checklist — confirm all items in the Verification Checklist below pass.
Report — delegated: return the contract §5 result. Standalone: the same outcome in plain language.
| Constraint | Rationale |
|---|---|
deploymentType must be API, Mobile, or Web | Platform rejects other values |
Web updates must include site, set to the retrieved value unchanged | Site (ESW_<name>_<timestamp>) is auto-generated at creation; the platform rejects a missing or changed value |
embeddedServiceMessagingChannelName must reference an existing channel | Deployment fails if channel doesn't exist |
File extension is .EmbeddedServiceConfig-meta.xml | Metadata API uses this specific extension |
Do not hardcode file paths — respect sfdx-project.json package directories | Customer orgs customize source paths |
| Do not embed deploy/push commands inside generated files or artifacts | Artifacts stay portable; in-session writes happen in Phase 2C through the chosen transport |
| Update with the full retrieved document, never a minimal PUT | Omitted inline blocks can be silently cleared by the update |
| Issue | Resolution |
|---|---|
| Branding overrides not applied | Use Tooling API to update individual BrandingSet properties after the deployment is created |
Pre-chat form, field, ChoiceList, or displayNameFormat issues | See the Gotchas table in references/prechat_forms.md |
| Changes not appearing in widget | The deploy is a draft until published (step 17c) |
sf api request rest fails ("No 'mode' found", "Nonexistent flag: --url") | See references/connect_api_creation.md §Publishing After Updates |
| Deploy fails with "required field missing" or "upsert failed null" | All attributes are mandatory: boolean fields in embeddedServiceMessagingChannel (include all even with default false), and all pre-chat form field attributes |
deploymentType one of API, Mobile, or Web?masterLabel populated and unique?messagingChannel reference an existing channel?deploymentFeature set to EmbeddedMessaging?isEnabled set to true?site populated with the Experience Site name?embeddedServiceBrandingName reference an existing BrandingSet?references/prechat_forms.md Verification Checklist pass?isInvitationEnabled is true, is formula populated and consistent with all sequence numbers in <embdMsgChannelInvitationConditions>?siteUrl empty (no site needed)?deploymentType correctly set to API or Mobile?Deliverables:
<source-path>/EmbeddedServiceConfig/<DeploymentName>.EmbeddedServiceConfig-meta.xmlFile structure follows the templates in assets/.
| Need | Delegate to |
|---|---|
| Creating the messaging channel | service-digital-engagement-channel-configure skill |
| Channel custom parameters, flow-variable mappings, or Queue → Omni-Flow routing | service-digital-engagement-channel-configure skill (pass the retrieved channel; see step 12) |
| Creating Omni-Channel routing flows | automation-flow-generate skill |
| Creating permission sets for agents | platform-permission-set-generate skill |
| File | When to read |
|---|---|
references/onboarding_contract.md | Pre-scan (§3, both modes); delegated mode (delegationFrom set), org writes (transport), module registration |
assets/esd_api_mobile_template.xml, assets/esd_web_update_template.xml | Before generating API/Mobile deployments and Web updates, respectively |
references/deployment_settings.md | When configuring deployment options beyond defaults; less common gotchas (embedded flow, reCAPTCHA, business hours) |
references/custom_labels.md | Whenever custom labels are requested — prerequisites, key validation, create/update/remove, transport |
references/prechat_forms.md | Whenever pre-chat is requested — inputs, field rules, ChoiceList, displayNameFormat, deactivate vs. remove, pre-chat gotchas and checklist |
references/connect_api_creation.md | When creating Web type deployments (Connect API required); publish command and ID query |
references/branding_and_tooling.md | When user asks about branding configuration |
references/code_snippet.md | When user wants the JavaScript embed code snippet for their website |
scripts/check-api-version.sh | Phase 1 — verify org API version meets the passed minimum (67.0) |
examples/esd_api.xml, esd_mobile.xml, esd_web_full.xml, esd_web_prechat_fields.xml | To verify output per type; the pre-chat file is a forms delta to graft onto esd_web_full.xml |
assets/esd_api_mobile_template.xml (opens in a new tab)assets/esd_web_update_template.xml (opens in a new tab)examples/esd_api.xml (opens in a new tab)examples/esd_mobile.xml (opens in a new tab)examples/esd_web_full.xml (opens in a new tab)examples/esd_web_prechat_fields.xml (opens in a new tab)references/_vendored/service-onboarding-delegation-guidelines.md (opens in a new tab)references/branding_and_tooling.md (opens in a new tab)references/code_snippet.md (opens in a new tab)references/connect_api_creation.md (opens in a new tab)references/custom_labels.md (opens in a new tab)references/deployment_settings.md (opens in a new tab)references/onboarding_contract.md (opens in a new tab)references/prechat_forms.md (opens in a new tab)scripts/check-api-version.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/sf-skills:service-digital-engagement-deployment-configurefrom sf-skills
sf-skills@sf-skills-plugin is listed by ccmalcom/sf-skills-plugin — review the source before installing
npx claudepluginhub ccmalcom/sf-skills-plugin --plugin sf-skills266 skills in this plugin
/afcc-setup-coordinateOrchestrates end-to-end headless setup of Agentforce Contact Center (AFCC) on a Salesforce org. Scans the org first, presents a delta plan for approval, then sequentially provisions demo users, Omni-Channel base settings, a human queue with routing config and members, presence statuses, permission sets, a PSTN voice number, and an active PstnVoice MessagingChannel wired to the queue. Interactive at key decision points — never assumes country, number type, queue names, or user counts. TRIGGER: set up AFCC, configure Agentforce Contact Center, stand up voice contact center, AFCC migration setup, provision AFCC org headlessly./agentforce-architecture-analyzeDeclared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins. Renders a human-readable architecture document and Mermaid invocation graph from design-time metadata (not runtime audit rows). TRIGGER when user asks to describe, diagram, inventory, audit, document, or diff (e.g. v3 vs v5) the architecture / action tree / topic structure / tool inventory of a specific agent by agent API name in a specific org. DO NOT TRIGGER for runtime session traces, conversation transcripts, generation timings, or gateway audit chains — this skill reads design-time metadata only (use agentforce-d360-analyze for session traces).Other plugins' skills for the same job