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/deploy_and_publish.md
View on GitHub# Deploy, Publish, and Verify
Once the home page JSON has been patched (and any missing LWR routes scaffolded), stage the bundle into the project's default package, deploy asynchronously with polling, resolve the community's `Network.Name`, publish, and smoke-test the guest URL.
## Stage into `force-app`
The retrieval directory is not directly deployable — the modified bundle must live inside the project's default package.
- **LWR**:
```bash
cp -R <retrieve-dir>/digitalExperiences force-app/main/default/
```
- **Aura** — copy the bundle **and** the sibling site metadata (deploy fails without it):
```bash
cp -R <retrieve-dir>/experiences force-app/main/default/
cp <retrieve-dir>/sites/<siteName>.site-meta.xml force-app/main/default/sites/
```
If `force-app/main/default/sites/` does not exist, create it first.
## Async deploy
Start the deploy in the background so subsequent polling can report progress:
```bash
sf project deploy start \
--source-dir force-app/main/default \
--target-org <org-alias> \
--async
```
Capture the returned `job-id`.
## Poll to completion
Every 15 seconds, up to 10 minutes:
```bash
sf project deploy report \
--job-id <job-id> \
--target-org <org-alias>
```
Terminal statuses:
| Status | Meaning | Next action |
|--------|---------|-------------|
| `Succeeded` | Deploy complete | Proceed to publish |
| `SucceededPartial` | Some components skipped | Inspect the report; proceed if messaging component was among the succeeded set |
| `Failed` | Deploy failed | Surface the error and stop; do not publish |
| `Canceled` | User or platform canceled | Surface and stop |
If the timeout elapses without a terminal status, surface the last report and stop — publishing a partially deployed bundle can leave the site in an inconsistent state.
## Resolve `Network.Name`
`Network.Name` differs from the site `DeveloperName` in most orgs. Query by URL path prefix:
```bash
sf data query \
--query "SELECT Name FROM Network WHERE UrlPathPrefix='<urlPath>' LIMIT 1" \
--target-org <org-alias>
```
Capture the `Name` value.
## Publish
```bash
sf community publish \
--name "<resolved-Name>" \
--target-org <org-alias>
```
Publishing is asynchronous on the platform side even though the CLI call returns quickly — the guest smoke test may need a short delay before the new render is served.
## Guest URL smoke test
```bash
curl -sL -o /dev/null -w "%{http_code}" \
https://<domainHostname>/<urlPath>
```
- `200` → the site is rendering; the messaging widget should be visible.
- `403` or `503` → publish likely still propagating. Retry once after 60 seconds before falling back to manual.
- Any other status → surface as failure and route to the manual fallback.
Report success only when the response is `200`. Do not claim the widget is "live on the site" based solely on the deploy report.
## Common failures
| Symptom | Likely cause | Resolution |
|---------|--------------|------------|
| Deploy fails with missing route type (LWR) | Template requires an unresolved route | Scaffold per `lwr_route_scaffolding.md` |
| Deploy fails with "site metadata not found" (Aura) | `<siteName>.site-meta.xml` not staged | Copy the sibling `.site-meta.xml` |
| `sf community publish` returns "community not found" | Used site `DeveloperName` instead of `Network.Name` | Re-run the `Network.Name` query |
| Guest URL stays 403 after retry | Public access disabled on the site | Enable public access in Experience Builder, or set `isExpSiteAuthMode: true` on the messaging component |
| Async deploy hangs indefinitely | Large bundle | Extend the polling window; do not silently succeed |
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 |