forcedotcom/sf-skills / plugins/builder/service-engagement/skills/service-digital-engagement-messaging-site-integrate
service-digital-engagement-messaging-site-integrate
VerifiedIntegrates 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 16.9 KB |
| references/aura_patch.md | markdown | 2.4 KB |
| references/bundle_detection.md | markdown | 2.5 KB |
| references/deploy_and_publish.md | markdown | 3.6 KB |
| references/lwr_patch.md | markdown | 3.7 KB |
| references/lwr_route_scaffolding.md | markdown | 1.8 KB |
| references/manual_fallback.md | markdown | 3.0 KB |
| scripts/detect_bundle_type.shexecutable | script | 1.1 KB |
| scripts/patch_aura_bundle.shexecutable | script | 4.1 KB |
| scripts/patch_lwr_bundle.shexecutable | script | 7.3 KB |
references/bundle_detection.md
View on GitHub# Bundle Detection — LWR vs Aura
Experience Cloud sites ship in two bundle shapes. Detect which one the target site uses by trying to retrieve each in turn and inspecting the resulting directory tree — the shape of the bundle uniquely identifies the framework.
## LWR retrieve
LWR (Lightning Web Runtime) sites live under `DigitalExperienceBundle`. Each site is stored as `site/<siteName>`.
```bash
sf project retrieve start \
--metadata "DigitalExperienceBundle:site/<siteName>" \
--target-org <org-alias> \
--target-metadata-dir <retrieve-dir>
```
Success indicator — the following file exists:
```text
<retrieve-dir>/digitalExperiences/site/<siteName>/sfdc_cms__view/home/content.json
```
If present, the site is LWR. The bundle also contains sibling directories like `sfdc_cms__route/<RouteApiName>/`, `sfdc_cms__view/<viewId>/`, and `sfdc_cms__theme/`.
## Aura retrieve
Aura Experience sites live under `ExperienceBundle`.
```bash
sf project retrieve start \
--metadata "ExperienceBundle:<siteName>" \
--target-org <org-alias> \
--target-metadata-dir <retrieve-dir>
```
Success indicator — the following file exists:
```text
<retrieve-dir>/experiences/<siteName>/views/homeGuestLayout.json
```
If present, the site is Aura. Look for a sibling `<siteName>.site-meta.xml` at `<retrieve-dir>/sites/<siteName>.site-meta.xml`. That file must be copied alongside the Aura bundle at deploy time.
## Neither
If retrieval succeeds for both but neither indicator file exists, the site is likely a Salesforce Tabs + Visualforce or Site.com site — the automated JSON patching path does not apply. Route to the manual Experience Builder fallback.
If both retrievals fail (site not found, permission denied), surface the error to the user and stop before attempting to patch anything.
## Troubleshooting
| Symptom | Likely cause | Resolution |
|---------|--------------|------------|
| `INVALID_METADATA` for both retrievals | Site `DeveloperName` is wrong | Query the org: `sf data query --query "SELECT DeveloperName, UrlPathPrefix FROM Network"` |
| LWR retrieve succeeds but has no `content.json` | Site template is minimal or corrupt | Ask the user to open Experience Builder once so the platform materializes the default views |
| Aura retrieve succeeds but no `homeGuestLayout.json` | Guest access disabled on the site | Fall back to `homeLayout.json` for authenticated-only sites, but note that the messaging widget then requires `isExpSiteAuthMode: true` |
| Retrieve hangs | Large bundle | Use `--wait 30` and confirm with the user that retrieval is in-flight |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 119k | Updated | Claude CodeCodex | Verified | Install |
| 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: 118k | Updated | Claude CodeCodex | Verified | Install |