npx skills add ...
npx skills add forcedotcom/sf-skills --skill service-digital-engagement-deployment-configure
Configures Embedded Messaging Deployments for Messaging for In-App and Web (MIAW). Use when the user needs to create a new embedded messaging deployment from scratch using Connect API with defaults, or update an existing deployment's settings using Metadata API. Produces Connect API request payloads for new deployments and EmbeddedServiceConfig metadata XML for updates. TRIGGER when the user mentions embedded messaging deployment, embedded service deployment, MIAW deployment, messaging widget setup, chat widget configuration, embedded chat deployment, or references a .EmbeddedServiceConfig-meta.xml file. DO NOT TRIGGER when the user is creating a messaging channel (use service-digital-engagement-channel-configure), configuring legacy Live Agent embedded service, or generating the JavaScript code snippet for website embedding.
npx skills add forcedotcom/sf-skills --skill service-digital-engagement-deployment-configure
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.
EmbeddedServiceConfig XML for updatesservice-digital-engagement-channel-configure), publishing deployments (Connect API post-step), creating Experience Sites (Connect API prerequisite for Web type)Before generating, ask the user if not already clear:
channelPlatformKey of the messaging channel to associate?Gather or infer before proceeding:
create or updateAPI, Mobile, or WebmasterLabel and the API namechannelPlatformKey of the associated messaging channelFor update operations additionally:
ESW_<name>_<timestamp>)BrandingSetBusinessHours 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. If the script fails, generate a sfdx-project.json in the metadata output folder with "sourceApiVersion": "67.0".
Determine operation — ask whether the user wants to create a new deployment or update an existing one.
Collect inputs — gather deployment name, type, and channel name per Clarifying Questions above.
Read deployment settings reference — load references/deployment_settings.md to understand all available configuration options.
Use this path when the operation is create.
Determine API method by type:
| Deployment Type | Creation Method | Prerequisites |
|---|---|---|
| API | Metadata API deploy | Channel must exist |
| Mobile | Metadata API deploy | Channel must exist |
| Web | Connect API | Channel must exist + Experience Site required |
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 — show the generated file and summarize what was configured. Recommend as next steps:
EMBEDDED_SERVICE_CONFIG_ID:
references/code_snippet.mdUse this path when the operation is update.
Retrieve the existing deployment — retrieve the current EmbeddedServiceConfig metadata from the org before making changes:
Use the retrieved file as the starting structure. If retrieval is not possible, load assets/esd_web_update_template.xml as a fallback reference.
Apply messaging channel settings — configure <embeddedServiceMessagingChannel> with:
messagingChannel — the channel's channelPlatformKeyshouldShowAgentforceTagline — Agentforce brandingshouldShowDeliveryReceipts — delivery receiptsshouldShowEmojiSelection — emoji pickershouldShowReadReceipts — read receiptsshouldShowTypingIndicators — typing indicatorsshouldStartNewLineOnEnter — Enter key behaviorisChatInvitationCustomizable / isInvitationEnabled — chat invitation settingsApply pre-chat forms — if the user needs pre-chat data collection, generate <embeddedServiceForms> with <embeddedServiceFormFields> elements containing embeddedServiceFormFieldName and isRequired.
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) — if the user wants the widget to proactively invite visitors based on conditions:
isInvitationEnabled to true in <embeddedServiceMessagingChannel><embdMsgChannelInvitationConditions> elements with sequence, conditionType, operand, value, and optionally customVariableNameformula field in <embeddedServiceMessagingChannel> to reference the condition sequences (e.g., 1 AND 2, 1 OR 2). The formula must be updated whenever conditions are added or removed to stay in sync with the sequence numbersreferences/deployment_settings.md for available condition types and operatorsApply additional settings:
isTermsAndConditionsEnabled / isTermsAndConditionsRequired — T&C in pre-chatsite — the site name is auto-generated during creation and must never be modifiedGenerate 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:
EMBEDDED_SERVICE_CONFIG_ID:
references/code_snippet.md| Constraint | Rationale |
|---|---|
| Always retrieve existing deployment before updating | Ensures current settings are preserved and only intended changes are applied |
deploymentType must be API, Mobile, or Web | Platform rejects other values |
Never update the site field on a Web deployment | Site name is auto-generated at creation and must not be changed |
| Web deployments cannot be created via Metadata API | Circular dependency between Network and CustomSite — use Connect API |
embeddedServiceMessagingChannelName must reference an existing channel | Deployment fails if channel doesn't exist |
site field required for Web type updates | Web widget must be associated with an Experience Site |
| BrandingSet is auto-created with defaults by Connect API | To override branding properties, use Tooling API — see references/branding_and_tooling.md |
| Pre-chat form fields must reference valid channel custom parameters | ChoiceList fields need the parameter deployed on the channel first |
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 |
| Never include deploy/push commands in generated output | This skill produces artifacts only |
| Publish step (Connect API) required after Web ESD updates | Changes are not live until published |
| Issue | Resolution |
|---|---|
| Web ESD creation fails via Metadata API | Web type requires Connect API for initial creation; use Metadata API only for updates |
| Site name not found | Site must exist before Web ESD update; format is ESW_<name>_<timestamp> |
| Branding overrides not applied | Use Tooling API to update individual BrandingSet properties after the deployment is created |
| Pre-chat ChoiceList not showing | ChoiceList requires two-step deploy: create ChoiceList first, then assign to form field |
| Changes not appearing in widget | Web ESDs must be published via Connect API after any update |
embeddedServiceFlowConfig.enabled error | Set to false unless you specifically need embedded flows (not routing flows) |
| reCAPTCHA configuration rejected | reCAPTCHA is @HideInWsdl — must use Tooling API |
| Business hours not taking effect | Only updating existing business hours works; creation is managed separately |
| 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 form field attributes (formField, formFieldType, isHidden, isRequired, displayOrder, messagingChannelParameterType) |
| Standard pre-chat field not found | Use _ prefix for standard fields in formField: _FirstName, _LastName, _Email, _Subject |
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?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.xml<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 |
| Creating Omni-Channel routing flows | automation-flow-generate skill |
| Creating permission sets for agents | platform-permission-set-generate skill |
| File | When to read |
|---|---|
assets/esd_api_mobile_template.xml | Before generating API or Mobile type deployments |
assets/esd_web_update_template.xml | Before generating Web type updates |
references/deployment_settings.md | When configuring deployment options beyond defaults |
references/connect_api_creation.md | When creating Web type deployments (Connect API required) |
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 | To verify output for API type deployment |
examples/esd_mobile.xml | To verify output for Mobile type deployment |
examples/esd_web_full.xml | To verify output for fully configured Web deployment |