MCPInstall

service-digital-engagement-messaging-site-integrate

Integrates a Messaging for In-App and Web (MIAW) Embedded Messaging chat widget into an Experience Cloud site by patching the site's LWR or Aura page bundle, deploying, publishing, and verifying guest access. Use when the user wants to embed messaging on an Experience site, add a chat widget to a community, place the Embedded Messaging component on an LWR or Aura page, wire an embedded service deployment to a site, references the retrieved bundle artifacts (content.json, homeGuestLayout.json, or a .site-meta.xml file), or automates the retrieve/patch-JSON/deploy/publish flow instead of clicking through Experience Builder. DO NOT TRIGGER when creating the messaging channel (use service-digital-engagement-channel-configure), when creating or updating the EmbeddedServiceConfig deployment (use service-digital-engagement-deployment-configure), or when generating a standalone JavaScript snippet for a non-Experience website.

Installs
2.4K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/forcedotcom/sf-skills --skill service-digital-engagement-messaging-site-integrate
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads service-digital-engagement-messaging-site-integrate automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Embed Messaging Widget on an Experience Cloud Site

Wires an existing Embedded Messaging (MIAW) deployment onto an Experience Cloud site by retrieving the site's bundle (LWR DigitalExperienceBundle or Aura ExperienceBundle), patching the home page JSON to place the experience_messaging:embeddedMessaging component, staging the bundle into the local project, deploying it, publishing the site, and verifying guest access.

The operation is idempotent: if the component is already present it is updated in place (its id is preserved), so re-running with different ESD coordinates cleanly updates.

Scope

  • In scope: Detecting LWR vs Aura bundle type; scaffolding missing LWR template routes required by the site template (e.g. too-many-requests); patching all sfdc_cms__themeLayout/*/content.json files to insert or update the Embedded Messaging component in the footer region (site-wide placement); staging the bundle into force-app; async deploy with polling; resolving the Network.Name and publishing the site; guest-URL smoke test; manual Experience Builder fallback with a deep link.
  • Out of scope: Creating the EmbeddedServiceConfig (Embedded Service Deployment) itself — use service-digital-engagement-deployment-configure; creating the MessagingChannel — use service-digital-engagement-channel-configure; creating the Experience Cloud site itself — use experience-lwr-site-generate; generating a standalone JS snippet for a non-Experience website.

Clarifying Questions

Before executing, ask the user if not already clear:

  • Site name? The DeveloperName of the Experience Cloud site (the metadata folder name under digitalExperiences/site/<siteName>/ or experiences/<siteName>/).
  • Deployment coordinates? The deploymentName (Embedded Service Deployment DeveloperName), the scrtUrl, and the siteEndpoint (Experience site base URL). All three come from the published EmbeddedServiceConfig — obtain from service-digital-engagement-deployment-configure output if not provided.
  • Target org alias? For the sf commands.
  • URL path prefix? The site's UrlPathPrefix (needed to resolve Network.Name for publish and to hit the guest URL for verification).

Required Inputs

Gather or infer before proceeding:

  • Site name — DeveloperName of the site
  • Deployment name — DeveloperName of the EmbeddedServiceConfig
  • scrtUrl — SCRT2 endpoint URL from the deployment
  • siteEndpoint — Base URL of the Experience site
  • Target org alias
  • URL path prefix — Site's public URL path segment (e.g. esw-site)

Defaults applied to the component's attributes when writing:

  • isExpSiteAuthMode: false
  • hideChatButtonOnLoad: "Default"
  • clientVersion: "WebV1"

Workflow

Steps are sequential. If any automated step fails, proceed to the manual fallback (Phase 6) and do not claim the widget is "live" until either the guest-URL smoke test returns 200 or the user confirms manual publish.

Phase 1 — Detect Bundle Type

  1. Retrieve both candidate bundles into <retrieve-dir>. The script only performs a deterministic path check, so the retrieve calls must run first:

    sf project retrieve start --metadata "DigitalExperienceBundle:site/<siteName>" \
      --target-org <org-alias> --target-metadata-dir <retrieve-dir>
    sf project retrieve start --metadata "ExperienceBundle:<siteName>" \
      --target-org <org-alias> --target-metadata-dir <retrieve-dir>
    

    Either call may return "no metadata found" — that is expected; the missing bundle simply means the site is the other type.

  2. Run scripts/detect_bundle_type.sh <retrieve-dir> <siteName>. It emits exactly one token to stdout:

    • LWR → the LWR marker file exists (digitalExperiences/site/<siteName>/sfdc_cms__view/home/content.json). Go to Phase 2.
    • AURA → the Aura marker file exists (experiences/<siteName>/views/homeGuestLayout.json). Go to Phase 3.
    • UNKNOWN (exit code 1) → neither marker exists. Skip to the manual fallback in Phase 6.

Read references/bundle_detection.md for retrieval command shapes and troubleshooting.

Phase 2 — Patch the LWR Bundle

  1. Scaffold any missing LWR template routes (commonly too-many-requests) before patching — missing routes fail the deploy. Route+view scaffolding is owned by experience-lwr-site-generate (see its configure-content-route.md, configure-content-view.md, and handle-component-and-region-ids.md). Delegate to that skill for the actual scaffold; this skill only supplies the messaging-specific context (which route the deploy is complaining about, and confirmation that the scaffolded pair resolves that specific deploy error). See references/lwr_route_scaffolding.md for the delegation pointer.

  2. Patch all themeLayout files by running:

    scripts/patch_lwr_bundle.sh \
      <retrieve-dir>/digitalExperiences/site/<siteName> \
      <deploymentName> <scrtUrl> <siteEndpoint>
    

    The script iterates every sfdc_cms__themeLayout/*/content.json file. For each, it locates the footer region at .contentBody.component.children[], walks into the existing community_layout:section wrapper's inner slot region, and either updates the existing experience_messaging:embeddedMessaging component in place (preserving its id) or appends a fresh component node. Targeting the themeLayout footer makes the widget site-wide (floating overlay on every page), equivalent to the Aura themeFooter placement. See references/lwr_patch.md for the JSON shapes and how to verify.

  3. Proceed to Phase 4.

Phase 3 — Patch the Aura Bundle

  1. Patch the home guest layout by running:

    scripts/patch_aura_bundle.sh \
      <retrieve-dir>/experiences/<siteName>/views/homeGuestLayout.json \
      <deploymentName> <scrtUrl> <siteEndpoint>
    

    The script iterates .regions[], picks the first region whose .components[] is non-empty, recurses through any forceCommunity:section wrappers, and either updates the existing .componentName == "experience_messaging:embeddedMessaging" component in place (preserving id) or appends a fresh forceCommunity:section wrapper. Aura uses componentName / componentAttributes (not definition / attributes) and has no dxpStyle. See references/aura_patch.md for JSON shapes and verification steps.

  2. Proceed to Phase 4.

Phase 4 — Stage and Deploy

  1. Copy the modified bundle into the project's default package. Use cp -R so unchanged files travel with the modified one:

    • LWR: cp -R <retrieve-dir>/digitalExperiences force-app/main/default/
    • Aura: cp -R <retrieve-dir>/experiences force-app/main/default/ and also copy the sibling <siteName>.site-meta.xml file — Aura deploys are rejected without it.
  2. Async deploy and poll:

    sf project deploy start --source-dir force-app/main/default \
      --target-org <org-alias> --async
    

    Poll every 15 seconds up to 10 minutes:

    sf project deploy report --job-id <job-id> --target-org <org-alias>
    

    Stop when status is Succeeded, Failed, SucceededPartial, or Canceled. On failure, surface the deploy report and do not proceed to publish. See references/deploy_and_publish.md for the full polling loop and common failure modes.

Phase 5 — Publish and Verify

  1. Resolve the Network.Name. Network.Name frequently differs from the site DeveloperName, so query it by the URL path prefix rather than guessing:

    sf data query --query \
      "SELECT Name FROM Network WHERE UrlPathPrefix='<urlPath>' LIMIT 1" \
      --target-org <org-alias>
    
  2. Publish the community with the resolved name:

    sf community publish --name "<resolved-Name>" --target-org <org-alias>
    
  3. Smoke-test guest access by hitting the public URL:

    curl -sL -o /dev/null -w "%{http_code}" \
      https://<domainHostname>/<urlPath>
    

    Report success only when the response is 200.

Phase 6 — Manual Fallback

  1. If any automated step fails (bundle undetectable, patch write blocked, deploy fails, publish fails, or guest URL not 200), print the Experience Builder deep link and verbatim instructions from references/manual_fallback.md. Do not claim the widget is live until the user confirms.

    The deep link is:

    https://<MyDomain>.lightning.force.com/sfsites/picasso/core/config/commeditor.apexp?...networkId=<Network.Id>
    

    Resolve <MyDomain> via sf org display --target-org <org-alias> and <Network.Id> via:

    sf data query --query \
      "SELECT Id FROM Network WHERE UrlPathPrefix='<urlPath>' LIMIT 1" \
      --target-org <org-alias>
    

    Do not hardcode either value. Instruct the user to open Experience Builder, drag the Embedded Messaging component onto the target page, pick the deployment from the property panel, and click Publish.


Rules / Constraints

ConstraintRationale
Detect bundle type from retrieval output, do not assumeLWR and Aura sites need different files patched with different key names
Preserve the existing component id when updating in placeEnsures idempotency; the Experience runtime keys off id
Every new id must be a fresh UUIDDuplicate IDs corrupt the layout and can fail render
LWR uses definition / attributes; Aura uses componentName / componentAttributesWrong key names silently drop the component from render
LWR community_layout:section sectionConfig lives inside .attributes as a JSON string (not a top-level property, not a nested object)Top-level placement violates the schema's additionalProperties: false constraint; the serializer also expects a string not an object
Aura sibling <siteName>.site-meta.xml must be copied alongside the bundleDeploy is rejected without it
Poll the async deploy; do not fire-and-forgetPublish must run only after deploy succeeds
Resolve Network.Name from UrlPathPrefix, do not reuse site DeveloperNameThe two are frequently different
Do not claim "live on the site" until the guest URL returns 200 or the user confirmsPublish is asynchronous; premature success reports mislead
Never hardcode MyDomain or Network.Id in the manual fallback linkValues are org-specific and must be queried
Idempotency: re-running with new ESD coordinates must update in placeUsers iterate on deploymentName, scrtUrl, siteEndpoint during setup

Gotchas

IssueResolution
too-many-requests route missing during LWR deployScaffold the missing route+view pair per references/lwr_route_scaffolding.md
Aura deploy rejected with missing site metadataCopy the sibling <siteName>.site-meta.xml from the retrieve dir
Component appended but not renderingConfirm the region wrapper uses the correct type: "region" key and that Aura components use componentName (not definition)
sf community publish fails with "community not found"The Network.Name differs from site DeveloperName; resolve via UrlPathPrefix query
Guest URL returns 403 or 503 after publishPublish is async — retry the smoke test after 60s before falling back to manual
Re-run adds a second messaging componentThe recursive search matched on the wrong key name; component detection must use definition (LWR) or componentName (Aura)
Deploy succeeds but widget does not appear on all pagesFor LWR, confirm the component was injected into sfdc_cms__themeLayout/*/content.json footer (not sfdc_cms__view/home/content.json — that is page-specific). For Aura, confirm homeGuestLayout.json was patched (themeFooter region).
sectionConfig written as an objectSerialize it as a JSON string; the CMS parser will not accept an object

Verification Checklist

Bundle Detection

  • Was exactly one of sfdc_cms__view/home/content.json (LWR) or views/homeGuestLayout.json (Aura) found?
  • If neither was found, did the workflow route to the manual fallback?

Patch Correctness

  • For LWR, are the messaging component's keys definition and attributes?
  • For Aura, are the keys componentName and componentAttributes?
  • When updating in place, was the existing id preserved?
  • When appending, are all new id values fresh UUIDs?
  • For LWR, did the script patch every sfdc_cms__themeLayout/*/content.json (not just home/content.json)?
  • For LWR, does the messaging node appear inside the footer region's subtree in each themeLayout?
  • For LWR, is clientVersion set to "WebV2" in the messaging node attributes?

Deploy

  • For Aura, was <siteName>.site-meta.xml copied alongside the bundle?
  • Was the async deploy polled until a terminal status?
  • Is the terminal status Succeeded or SucceededPartial before proceeding to publish?

Publish

  • Was Network.Name resolved via UrlPathPrefix, not reused from site DeveloperName?
  • Did sf community publish complete without error?

Verify

  • Did the guest URL curl return 200?
  • Did the workflow refrain from claiming success until 200 was observed or the user confirmed manual publish?

Output Expectations

Deliverables:

  • Modified sfdc_cms__themeLayout/*/content.json files (one per themeLayout) in the retrieval directory and in force-app/main/default/... (LWR); or modified homeGuestLayout.json (Aura)
  • (LWR only, if needed) new sfdc_cms__route/<RouteApiName>/ + sfdc_cms__view/<viewId>/ pair for any scaffolded missing route
  • Deploy job-id and the final deploy report
  • Publish confirmation
  • Guest URL smoke-test HTTP status
  • On failure: the Experience Builder deep link and manual instructions

Do not produce the EmbeddedServiceConfig or the MessagingChannel metadata — those are the responsibilities of the deployment and channel skills below.


Cross-Skill Integration

NeedDelegate to
Create or update the Embedded Service Deploymentservice-digital-engagement-deployment-configure
Create the underlying MIAW messaging channelservice-digital-engagement-channel-configure
Create the Experience Cloud LWR site itselfexperience-lwr-site-generate
Scaffold a missing LWR route + view pair (e.g. too-many-requests)experience-lwr-site-generate (route/view creation, ID handling)

Reference File Index

FileWhen to read
references/bundle_detection.mdPhase 1 — LWR vs Aura retrieval and disambiguation
references/lwr_route_scaffolding.mdPhase 2 — delegation pointer for scaffolding missing LWR template routes (owned by experience-lwr-site-generate)
references/lwr_patch.mdPhase 2 — what patch_lwr_bundle.sh does and how to verify its output
references/aura_patch.mdPhase 3 — what patch_aura_bundle.sh does and how to verify its output
references/deploy_and_publish.mdPhases 4–5 — staging into force-app, async deploy polling, publish, and guest-URL smoke test
references/manual_fallback.mdPhase 6 — Experience Builder deep link and manual drag-drop-publish instructions
scripts/detect_bundle_type.shPhase 1 — deterministic LWR/Aura/UNKNOWN detection over a retrieved bundle
scripts/patch_lwr_bundle.shPhase 2 — idempotent LWR content.json patch (insert or update in place)
scripts/patch_aura_bundle.shPhase 3 — idempotent Aura homeGuestLayout.json patch (insert or update in place)

FAQ

What does the service-digital-engagement-messaging-site-integrate skill do?

Integrates a Messaging for In-App and Web (MIAW) Embedded Messaging chat widget into an Experience Cloud site by patching the site's LWR or Aura page bundle, deploying, publishing, and verifying guest access. Use when the user wants to embed messaging on an Experience site, add a chat widget to a community, place the Embedded Messaging component on an LWR or Aura page, wire an embedded service deployment to a site, references the retrieved bundle artifacts (content.json, homeGuestLayout.json, or a .site-meta.xml file), or automates the retrieve/patch-JSON/deploy/publish flow instead of clicking through Experience Builder. DO NOT TRIGGER when creating the messaging channel (use service-digital-engagement-channel-configure), when creating or updating the EmbeddedServiceConfig deployment (use service-digital-engagement-deployment-configure), or when generating a standalone JavaScript snippet for a non-Experience website.

How do I install service-digital-engagement-messaging-site-integrate?

Run npx skills add https://github.com/forcedotcom/sf-skills --skill service-digital-engagement-messaging-site-integrate in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/service-digital-engagement-messaging-site-integrate/ (personal) or .claude/skills/service-digital-engagement-messaging-site-integrate/ (project).

Which AI agents can use service-digital-engagement-messaging-site-integrate?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is service-digital-engagement-messaging-site-integrate safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains service-digital-engagement-messaging-site-integrate?

It is published by forcedotcom in forcedotcom/sf-skills. It has 2,378 recorded installs.

More from forcedotcom/sf-skills

View all →

platform-apex-generate

forcedotcom/sf-skills

Primary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refactor a class (service, selector, domain, batch, queueable, schedulable, invocable, DTO, utility, interface, abstract, exception, REST resource). Use this skill for requests involving SObject CRUD, mapping collections, fetching related records, scheduled jobs, batch jobs, trigger design, @AuraEnabled controllers, @RestResource endpoints, custom REST APIs, or code review of existing Apex.

platform-apex-test-generate

forcedotcom/sf-skills

Use to generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking, assertions, and disciplined test-fix loops. Use when creating Apex test classes (for triggers, services, controllers, batch jobs, queueables, and callouts), improving coverage, debugging or fixing failing Apex tests, or running test/coverage analysis. Triggers on Test.cls files, sf apex run test, coverage reports. Do NOT trigger for production Apex (use platform-apex-generate) or Jest/LWC tests.

Testing & QA7.1K installs

platform-apex-test-run

forcedotcom/sf-skills

Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. Use when the user runs Apex tests, checks code coverage, fixes failing tests, or touches Test.cls / Test.cls files. DO NOT TRIGGER when writing Apex production code (use platform-apex-generate), Agentforce agent testing (use agentforce-test), or Jest/LWC tests (use experience-lwc-generate).

Testing & QA7K installs

platform-apex-logs-debug

forcedotcom/sf-skills

Salesforce debug log analysis and troubleshooting with 100-point scoring. TRIGGER when: user analyzes debug logs, hits governor limits, reads stack traces, or touches .log files from Salesforce orgs. DO NOT TRIGGER when: running Apex tests (use platform-apex-test-run), generating or fixing Apex code (use platform-apex-generate), or Agentforce session tracing (use agentforce-observe).

platform-soql-query

forcedotcom/sf-skills

Use when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan/selectivity analysis, and performance or safety improvements. TRIGGER when the user writes, optimizes, or debugs SOQL/SOSL, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER for bulk data operations (use platform-data-manage), Apex DML logic (use platform-apex-generate), or report/dashboard queries.

platform-metadata-deploy

forcedotcom/sf-skills

Salesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, validates a deploy or does a dry-run, deploys to a Production org, quick-deploys a validated job ID, ships/promotes to prod, creates/manages scratch orgs or sandboxes, sets up CI/CD pipelines, or troubleshoots deployment errors with sf project deploy. DO NOT TRIGGER when: writing Apex code, building LWC components (use experience-lwc-generate), creating metadata definitions (use platform-custom-object-generate), deleting metadata from an org (use platform-destructive-deploy), or querying org data (use platform-data-manage).

DevOps & Cloud6.8K installs

Popular devops & cloud skills

View category →

microsoft-foundry

microsoft/azure-skills

Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure

OfficialDevOps & Cloud579.1K installs

azure-diagnostics

microsoft/azure-skills

Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.

OfficialDevOps & Cloud569.8K installs

azure-prepare

microsoft/azure-skills

Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.

OfficialDevOps & Cloud569K installs

azure-ai

microsoft/azure-skills

Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.

OfficialDevOps & Cloud568.8K installs

azure-deploy

microsoft/azure-skills

Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.

OfficialDevOps & Cloud568.6K installs

azure-validate

microsoft/azure-skills

Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.

OfficialDevOps & Cloud568K installs