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/aura_patch.md
View on GitHub# Aura — Patching `homeGuestLayout.json`
Target file:
```text
experiences/<siteName>/views/homeGuestLayout.json
```
The patch is applied by `scripts/patch_aura_bundle.sh`. Invoke as:
```bash
scripts/patch_aura_bundle.sh <homeGuestLayout.json> <deploymentName> <scrtUrl> <siteEndpoint>
```
Aura differs from LWR: component keys are `componentName` / `componentAttributes` (not `definition` / `attributes`), and there is no `dxpStyle` field. See `manual_fallback.md` if the script cannot run.
## What the script does
1. Reads `<homeGuestLayout.json>` with `jq`.
2. Iterates `.regions[]` and selects the first region whose `.components[]` is non-empty.
3. Recursively searches components (descending through every level of `forceCommunity:section` wrapper's `componentAttributes.regions[].components[]`) for `.componentName == "experience_messaging:embeddedMessaging"`.
4. **If found** — updates that node's `.componentAttributes` to the six standard values and **preserves the existing `.id`**:
- `deploymentName`, `scrtUrl`, `siteEndpoint` (from CLI args)
- `isExpSiteAuthMode: false`, `hideChatButtonOnLoad: "Default"`, `clientVersion: "WebV1"`
5. **If absent** — appends a fresh `forceCommunity:section` wrapper. The nested region carries `id`, `type: "region"`, `regionLabel: "Column"`, `regionName: "column"`, `renditionMap: {}`.
6. Writes the file back with jq's 2-space indentation.
Re-running is idempotent — the script updates in place rather than appending a second wrapper.
## How to verify
- Exactly one messaging node exists:
```bash
jq '[.. | select(.componentName? == "experience_messaging:embeddedMessaging")] | length' <homeGuestLayout.json>
# → 1
```
- All new IDs are UUIDs (no reused IDs from the fixture):
```bash
jq '[.. | .id? // empty] | unique | length' <homeGuestLayout.json>
```
- The sibling `<siteName>.site-meta.xml` still exists in the retrieve directory — it must be copied at deploy time or the deploy will be rejected.
## Common failures
| Symptom | Cause |
|---------|-------|
| Deploy succeeds but chat button never appears | Wrote `definition` instead of `componentName` |
| Section deployed but empty | Nested region missing `type: "region"` or `renditionMap` |
| Deploy fails with "site metadata not found" | Sibling `<siteName>.site-meta.xml` was not copied alongside the `experiences/` bundle |
| Two chat buttons after re-run | Detection did not recurse through `forceCommunity:section` wrappers' nested regions |
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 |