@salesforce/afv-skills 1.69.0 → 1.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/package.json +1 -1
  2. package/skills/data360-code-extension-generate/SKILL.md +160 -252
  3. package/skills/data360-code-extension-generate/references/README.md +34 -172
  4. package/skills/data360-code-extension-generate/references/environment-setup.md +198 -0
  5. package/skills/data360-code-extension-generate/references/mcp-integration.md +36 -0
  6. package/skills/data360-code-extension-generate/references/quick-reference.md +132 -202
  7. package/skills/data360-code-extension-generate/references/run-logs.md +31 -0
  8. package/skills/data360-code-extension-generate/references/schema-discovery.md +45 -0
  9. package/skills/data360-code-extension-generate/references/troubleshooting.md +45 -0
  10. package/skills/data360-code-extension-generate/scripts/check_env.sh +197 -0
  11. package/skills/data360-code-extension-generate/scripts/venv_hook.sh +22 -0
  12. package/skills/dx-devops-work-item-manage/SKILL.md +24 -8
  13. package/skills/dx-devops-work-item-manage/examples/common-workflows.md +32 -0
  14. package/skills/dx-devops-work-item-manage/references/review-api.md +95 -0
  15. package/skills/dx-org-manage/SKILL.md +12 -12
  16. package/skills/dx-org-manage/examples/scratch-orgs/display_output.json +1 -3
  17. package/skills/dx-org-manage/examples/scratch-orgs/success_shape.json +1 -3
  18. package/skills/dx-org-manage/references/opening-org.md +1 -1
  19. package/skills/dx-org-manage/references/scratch-org-operations.md +15 -20
  20. package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +1 -1
  21. package/skills/education-cloud-academic-calendar-generate/SKILL.md +2 -2
  22. package/skills/education-cloud-course-catalog-migrate/SKILL.md +1 -1
  23. package/skills/education-cloud-domain-configure/references/domain-features/recruitment-admissions.md +8 -7
  24. package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -0
  25. package/skills/education-cloud-multi-campus-configure/references/error_handling.md +7 -6
  26. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +2 -0
  27. package/skills/education-cloud-student-recruitment-agent-configure/references/customer-narration.md +2 -0
  28. package/skills/education-cloud-student-recruitment-agent-configure/references/flows.md +1 -1
  29. package/skills/education-cloud-student-recruitment-agent-configure/references/grounding.md +5 -4
  30. package/skills/education-cloud-student-recruitment-agent-configure/references/permissions.md +1 -1
  31. package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +1 -1
  32. package/skills/education-cloud-student-recruitment-agent-configure/references/routing.md +1 -1
  33. package/skills/experience-cms-content-type-generate/SKILL.md +7 -6
  34. package/skills/experience-cms-content-type-generate/references/agent-checklist.md +3 -3
  35. package/skills/experience-cms-content-type-generate/references/anti-patterns.md +2 -2
  36. package/skills/experience-cms-content-type-generate/references/discovery-details.md +1 -1
  37. package/skills/experience-cms-content-type-generate/references/retrieve-and-reconcile.md +5 -9
  38. package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.mjs +10 -0
  39. package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +2 -2
  40. package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +2 -2
  41. package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +1 -1
  42. package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1 -1
  43. package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +2 -2
  44. package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +2 -2
  45. package/skills/platform-custom-application-generate/SKILL.md +97 -104
  46. package/skills/platform-custom-application-generate/references/app-properties.md +52 -0
  47. package/skills/platform-custom-application-generate/references/app-visibility.md +19 -0
  48. package/skills/platform-custom-application-generate/references/utility-bar.md +55 -0
  49. package/skills/platform-datamask-run/SKILL.md +1 -1
  50. package/skills/platform-datamask-run/references/policy-authoring.md +41 -18
  51. package/skills/platform-dsar-policy-manage/SKILL.md +7 -6
  52. package/skills/platform-dsar-policy-manage/references/export-and-history.md +10 -8
  53. package/skills/platform-dsar-policy-manage/references/report-format.md +4 -2
  54. package/skills/platform-metadata-grounding-get/SKILL.md +7 -7
  55. package/skills/platform-report-generate/SKILL.md +9 -7
  56. package/skills/platform-report-generate/references/column-names.md +12 -1
  57. package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
  58. package/skills/platform-sharing-rules-generate/SKILL.md +12 -3
  59. package/skills/platform-sharing-rules-generate/references/rule-types.md +1 -0
  60. package/skills/service-agentforce-channel-configure/SKILL.md +6 -3
  61. package/skills/service-agentforce-channel-configure/references/agent-wiring.md +5 -3
  62. package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +24 -15
  63. package/skills/service-agentforce-channel-configure/references/input-validation.md +23 -0
  64. package/skills/service-agentforce-channel-configure/references/live-traffic-gate.md +13 -7
  65. package/skills/service-agentforce-channel-configure/references/queue-resolution.md +3 -1
  66. package/skills/service-agentforce-human-escalation-configure/references/_vendored/input-validation.md +23 -0
  67. package/skills/service-agentforce-human-escalation-configure/references/_vendored/queue-resolution.md +146 -0
  68. package/skills/service-agentforce-human-escalation-configure/references/escalation-mechanism.md +1 -1
  69. package/skills/service-agentforce-human-escalation-configure/scripts/tests/_bootstrap.py +42 -11
  70. package/skills/service-agentforce-human-escalation-configure/scripts/tests/test_escalation_contracts.py +45 -0
  71. package/skills/service-agentforce-human-escalation-configure/scripts/verify-and-configure.sh +23 -9
  72. package/skills/service-de-channel-activate/SKILL.md +10 -10
  73. package/skills/service-de-channel-activate/references/gotchas.md +4 -4
  74. package/skills/service-de-channel-activate/references/phone-verification.md +43 -19
  75. package/skills/service-de-channel-create/SKILL.md +1 -1
  76. package/skills/service-de-channel-create/references/facebook.md +1 -1
  77. package/skills/service-de-channel-create/references/whatsapp.md +33 -6
  78. package/skills/service-de-channel-routing-configure/SKILL.md +5 -1
  79. package/skills/service-de-channel-routing-configure/references/gotchas.md +3 -1
  80. package/skills/service-de-channel-routing-configure/references/named-queue.md +39 -0
  81. package/skills/service-de-channel-settings-configure/SKILL.md +3 -1
  82. package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +2 -2
  83. package/skills/service-de-channel-settings-configure/references/gotchas.md +12 -1
  84. package/skills/service-de-headless-channel-configure/SKILL.md +68 -74
  85. package/skills/service-de-headless-channel-configure/references/gotchas.md +6 -2
  86. package/skills/service-de-headless-channel-configure/references/inputs.md +19 -0
  87. package/skills/service-de-headless-channel-configure/references/output-envelopes.md +23 -1
  88. package/skills/service-de-headless-channel-configure/references/partial-success.md +1 -0
  89. package/skills/service-de-headless-channel-configure/references/requested-settings.md +55 -0
  90. package/skills/service-de-headless-channel-configure/references/worked-examples.md +35 -1
  91. package/skills/service-digital-engagement-channel-configure/SKILL.md +3 -3
  92. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +2 -2
  93. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +1 -1
  94. package/skills/service-digital-engagement-deployment-configure/SKILL.md +2 -2
  95. package/skills/service-digital-engagement-deployment-configure/references/onboarding_contract.md +4 -2
  96. package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +1 -1
  97. package/skills/service-omni-command-center-configure/SKILL.md +1 -1
  98. package/skills/data360-schema-get/SKILL.md +0 -388
  99. package/skills/data360-schema-get/references/README.md +0 -191
  100. package/skills/data360-schema-get/scripts/get_dlo_schema.py +0 -244
  101. package/skills/data360-schema-get/scripts/get_dmo_schema.py +0 -233
  102. package/skills/field-service-prework-brief-deployer-configure/SKILL.md +0 -646
  103. package/skills/field-service-voice-to-form-configure/SKILL.md +0 -650
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: service-de-headless-channel-configure-gotchas
3
- description: "Load when debugging unexpected orchestrator behavior — duplicate-key errors, resume/idempotency questions, preflight SOQL shape, or unattended/CI usage of the headless channel setup orchestrator. Covers the nine known gotchas: prereq ownership, MessagingPlatformKey uniqueness, resume-by-reinvocation, CSOT-only support, error-classification boundaries, prompt placement, platform-key mapping, wall-clock duration, and the two-query preflight. DO NOT load during a normal end-to-end run with no errors."
3
+ description: "Load when debugging unexpected orchestrator behavior — duplicate-key errors, resume/idempotency questions, preflight SOQL shape, or unattended/CI usage of the headless channel setup orchestrator. Covers the known gotchas: prereq ownership, MessagingPlatformKey uniqueness, resume-by-reinvocation, CSOT-only support, error-classification boundaries, prompt placement, platform-key mapping, wall-clock duration, the two-query preflight, requested settings that must never be silently dropped, and the LiveMessageSetup AuthProvider prerequisite. DO NOT load during a normal end-to-end run with no errors."
4
4
  metadata:
5
5
  version: "1.0"
6
6
  related-skills: service-de-headless-channel-configure
@@ -18,10 +18,14 @@ metadata:
18
18
 
19
19
  5. **Don't catch transport/internal errors at this layer.** The leaf skills handle that — by the time a failure reaches this orchestrator, it's already classified into `ok:false, kind:"..."`. Just annotate which step failed.
20
20
 
21
- 6. **The orchestrator's prompts are limited to Stage 0 (type if omitted) and Stage 3 (routing choices).** Stages 2 and 4 are non-interactive. For fully-unattended mode (CI, cron), you need `{MESSAGE_TYPE}` supplied, and either (a) use an already-configured queue so Stage 3 no-ops, or (b) add a `--queue-id` override. Not built yet.
21
+ 6. **The orchestrator's own prompts are limited to Stage 0 (type if omitted), Stage 0.5 (T&C), and Stage 3 (routing choices).** Stages 2 and 4 are non-interactive apart from the per-type prereq prompts inside the insert. For fully-unattended mode (CI, cron), supply `{MESSAGE_TYPE}` and `{QUEUE}` (an eligible queue — Stage 3 then doesn't prompt), or use a channel whose routing is already configured so Stage 3 no-ops. The T&C gate can't be skipped.
22
22
 
23
23
  7. **Channel-agnostic preflight keys off `{PLATFORM_KEY}`, not the type-specific id name.** The SOQL filter is always `MessagingPlatformKey = '{PLATFORM_KEY}'`. Map the per-type input to `{PLATFORM_KEY}` once at Stage 0 rather than branching the SOQL — keeps Stage 1 one query, not three.
24
24
 
25
25
  8. **Total duration is wall-clock, not sum-of-steps.** If the user pauses mid-prompt in Stage 0 or Stage 3, `totalDurationMs` includes think time. For perf analysis, care about the per-leaf `durationMs` values.
26
26
 
27
27
  9. **Preflight uses two queries, not a subquery.** The `MessagingChannel` → `MessagingChannelUsage` child relationship is `MessagingChannelUsages` on some orgs (`test1`) but unnameable on others (`wadtesting` has `relationshipName: None` in `sf sobject describe`). Subqueries fail with `INVALID_TYPE` on the latter. FK-keyed second query (`MessagingChannelUsage WHERE MessagingChannelId = '{CHANNEL_ID}'`) works everywhere. Cost is one extra SOQL per preflight — negligible.
28
+
29
+ 10. **Requested settings must never be silently dropped.** Validation (Round 5, release 264) found the orchestrator reporting success while ignoring auto-responses and an idle timeout that were in the prompt — on a fresh channel *and* on an `already-active` one, where Stage 1 returned a no-op. Stage 0 now records every requested setting, the `already-active` path jumps to Stage 4.5 instead of returning, and Stage 5 accounts for each item as configured / not applicable / failed. Settings run **after** activation and never fail the run: auto-responses, keywords, and inactivity aren't part of the activation-readiness check, and a metadata-deploy failure (e.g. the Facebook defect in the settings leaf's gotchas) shouldn't stop a channel that would otherwise go live.
30
+
31
+ 11. **The `LiveMessageSetup` AuthProvider only exists after the Messaging Setup wizard has run once.** `enableLiveMessage=true` alone doesn't create it (verified on a 264 org with messaging on and 0 AuthProviders). Every non-Text insert needs its Id, so Stage 1 checks for it up front and halts with an actionable message instead of failing mid-insert. Running the wizard is a manual UI step — no skill can do it.
@@ -47,3 +47,22 @@ metadata:
47
47
  - `{ISO_COUNTRY_CODE}` — optional, default `US`. Pass the real country if the number is non-US.
48
48
 
49
49
  The orchestrator validates type-specific inputs upfront; missing ones raise a prompt before we burn a Stage 0 SOQL.
50
+
51
+ ## Optional, any type
52
+
53
+ - `{QUEUE}` — a routing queue the user named (label, DeveloperName, or `00G` Id). Forwarded to `service-de-channel-routing-configure`, which validates it instead of prompting.
54
+ - `{REQUESTED_SETTINGS}` — not a field the user fills in; extract it from the request in Stage 0. One item per thing asked for:
55
+
56
+ | User says (examples) | Item | Facet / leaf input |
57
+ | --- | --- | --- |
58
+ | "initial response: 'Thanks for reaching out…'" | `auto-response:InitialResponse` | `auto-responses`, `TextResponse` with that text |
59
+ | "when an agent engages: '…'" | `auto-response:AgentEngagedResponse` | `auto-responses` |
60
+ | "when the customer goes idle, after 10 minutes: '…'" | `auto-response:EndUserIdleResponse` | `auto-responses`, `responseTimeoutInMins=10` |
61
+ | "when the conversation ends / customer stopped responding: '…'" | `auto-response:AgentEndEngagementResponse` / `auto-response:EndUserInactiveResponse` | `auto-responses` |
62
+ | "implicit opt-in consent with STOP, END as opt-out keywords" (keywords given with a consent type) | none — these are consent inputs, not a separate item | Stage 3.5: forwarded as the language-keyword record's `OptOutKeywords` / `OptInKeywords` |
63
+ | "a Help keyword 'help'", "add OptOut keywords STOP, END" (no consent type) | `keywords:<Help\|OptOut\|OptIn>:<language>` | `keywords` |
64
+ | "session idle timeout 15 minutes", "end inactive sessions after 20" | `inactivity:endUserIdleTimeOut` / `inactivity:endInactiveSessionTimeOut` | `inactivity` (MIAW-only → `notApplicable` here) |
65
+ | "reset the timer when an agent replies" | `inactivity:isAgentMessageResetInactivityEnabled` | `inactivity` (Apple/Facebook only) |
66
+ | "use explicit / double opt-in" | `consent:<ConsentType>` | Stage 3.5, not Stage 4.5 |
67
+
68
+ Response text that references an existing messaging component by name (`ConversationMessageDefinition`) uses the `MessageDefinition` shape instead of `TextResponse` — the settings leaf handles both. Don't create messaging components from this orchestrator.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: service-de-headless-channel-configure-output-envelopes
3
- description: "Load when you need the canonical JSON envelope shapes this orchestrator emits — success, step-annotated failure, and terms-declined — before wiring error handling or parsing a leaf skill's response. Covers the exact field names (channelId, mcuId, stepsRun, failedStep, resumeHint, etc.) for each of the three top-level outcomes. DO NOT load for the per-stage envelope-handling tables in Stage 2-4, which already reference these shapes."
3
+ description: "Load when you need the canonical JSON envelope shapes this orchestrator emits — success (including requested-settings results), step-annotated failure, terms-declined, and missing-AuthProvider — before wiring error handling or parsing a leaf skill's response. Covers the exact field names (channelId, mcuId, stepsRun, failedStep, resumeHint, etc.) for each of the three top-level outcomes. DO NOT load for the per-stage envelope-handling tables in Stage 2-4, which already reference these shapes."
4
4
  metadata:
5
5
  version: "1.0"
6
6
  related-skills: service-de-headless-channel-configure
@@ -17,6 +17,20 @@ metadata:
17
17
  "totalDurationMs": 12345}
18
18
  ```
19
19
 
20
+ **Success with requested settings** (`settings` present only when the request asked for any):
21
+ ```json
22
+ {"ok": true, "messageType": "Facebook", "channelId": "0Mj...", "isActive": true,
23
+ "stepsRun": ["insert","route","activate"], "stepsSkipped": ["consent"],
24
+ "settings": {
25
+ "configured": ["auto-response:InitialResponse", "auto-response:AgentEngagedResponse"],
26
+ "notApplicable": [{"item": "inactivity:endUserIdleTimeOut", "reason": "endUserIdleTimeOut is MIAW-only; not supported on Facebook channels"}],
27
+ "failed": [{"item": "auto-response:EndUserIdleResponse", "kind": "metadata-deploy-failed", "message": "..."}]},
28
+ "warnings": ["channel is live, but 1 requested setting was not applied"],
29
+ "totalDurationMs": 12345}
30
+ ```
31
+
32
+ `ok` stays `true` when only settings failed — the channel is live. `"settings"` is in `stepsRun` only if at least one item was configured. Every item extracted in Stage 0 lands in exactly one of the three buckets.
33
+
20
34
  On a typical fresh run `consent` lands in `stepsSkipped`, not `stepsRun`: the Connect insert
21
35
  auto-seeds `ConsentType=ImplicitOptIn` + a default opt-out keyword, so the consent leaf no-ops
22
36
  (`noop: true`) and the orchestrator appends `"consent"` to `stepsSkipped`. It appears in `stepsRun`
@@ -51,3 +65,11 @@ before Stage 3.5) means unconfigured.
51
65
  {"ok": false, "kind": "terms-not-accepted",
52
66
  "hint": "user did not accept the Enhanced Messaging Terms and Conditions — channel setup cannot proceed. Re-run when ready to accept."}
53
67
  ```
68
+
69
+ **Missing AuthProvider** (Stage 1 preflight — `failedStep: "insert"`, `kind: "missing-authprovider"`). Render:
70
+ ```text
71
+ Error: This org isn't ready for {CHANNEL_LABEL} channels yet — the 'LiveMessageSetup' auth provider
72
+ doesn't exist. Turning on Messaging (enableLiveMessage) doesn't create it; only the Messaging
73
+ Setup wizard does, and that's a one-time manual step no skill can do.
74
+ Fix: run the Messaging Setup wizard once in Setup → Messaging Settings, then re-run this skill.
75
+ ```
@@ -18,6 +18,7 @@ Error: Step {N} of 4 ({stepName}) failed: {leafEnvelope.kind} — {leafEnvelope.
18
18
  - Routing configured: {sessionHandlerId ? "yes — " + queueName : "no"}
19
19
  - Consent configured: {(stepsRun.includes("consent") || (stepsSkipped || []).includes("consent")) ? "yes" : "no"}
20
20
  - Activation: {isActive ? "yes" : "no"}
21
+ - Requested settings: not attempted — {each REQUESTED_SETTINGS item} (only when any were requested)
21
22
 
22
23
  To retry: fix the issue above, then re-run this skill with the same
23
24
  inputs. The orchestrator will skip completed steps.
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: service-de-headless-channel-configure-requested-settings
3
+ description: "Load when running Stage 4.5 of the headless channel setup orchestrator (the request asked for auto-responses, messaging keywords, or session inactivity) or rendering those settings in the Stage 5 report. Covers what to forward to service-de-channel-settings-configure, per-type applicability, the configured / notApplicable / failed classification, the known Facebook metadata defect, and the report block. DO NOT load for the consent facet, which runs before activation in Stage 3.5."
4
+ metadata:
5
+ version: "1.0"
6
+ related-skills: service-de-headless-channel-configure
7
+ ---
8
+
9
+ # Requested settings (Stage 4.5 + Stage 5)
10
+
11
+ ## Invoke the settings leaf once
12
+
13
+ Invoke `service-de-channel-settings-configure` **once**, with:
14
+
15
+ - `{CHANNEL_ID}`, `{ORG_ALIAS}`
16
+ - `{FACETS}` = the requested subset of `auto-responses`, `keywords`, `inactivity`
17
+ - the values from the request (response text per `<type>`, `responseTimeoutInMins`, keyword lists,
18
+ timeout minutes). Forward them, and don't invent defaults for values the user didn't give.
19
+
20
+ The leaf enforces per-type applicability. For the types this orchestrator creates, **the idle and
21
+ inactive-session timeouts are MIAW-only**, so they never apply here. Only
22
+ `isAgentMessageResetInactivityEnabled` applies, and only on Apple and Facebook. Expect
23
+ `facet-not-applicable` for the rest and report it. That's correct behavior, not a failure.
24
+
25
+ ## Classify each requested item
26
+
27
+ | Leaf outcome for the item | Bucket |
28
+ | --- | --- |
29
+ | In `facetsConfigured` and verified, or `noop: true` | `configured` |
30
+ | `facet-not-applicable` | `notApplicable` (with the leaf's `hint`) |
31
+ | `metadata-deploy-failed` / `verify-failed` / any other `ok:false` | `failed` (with the leaf's `kind` + `message` verbatim) |
32
+
33
+ **Never fail the run here.** The channel is already live. Append `"settings"` to `STEPS_RUN` if
34
+ anything was configured, and carry failures to Stage 5 as warnings.
35
+
36
+ **Facebook:** Facebook channels currently reject real metadata changes with an opaque numeric error
37
+ like `(-462367322)` (see `service-de-channel-settings-configure` `references/gotchas.md` #16). Report
38
+ it as `failed` with the leaf's hint, and don't retry.
39
+
40
+ ## Stage 5 report block
41
+
42
+ Add `"settings": {"configured": [...], "notApplicable": [...], "failed": [...]}` to the success
43
+ envelope (shape in `references/output-envelopes.md`). Below the standard success lines, render:
44
+
45
+ ```text
46
+ Requested settings:
47
+ - Configured: {each configured item}
48
+ - Not applicable to {MESSAGE_TYPE}: {each item} — {reason}
49
+ - Failed: {each item} — {kind}: {message}
50
+ ```
51
+
52
+ If any item is `failed`, lead the report with
53
+ `Warning: channel is live, but {N} requested setting(s) were not applied` instead of an unqualified
54
+ `Success`, and add the same text to the envelope's `warnings`. **Every item captured in Stage 0 must
55
+ appear in exactly one bucket.** Check the count before rendering.
@@ -1,6 +1,6 @@
1
1
  # Worked examples: `service-de-headless-channel-configure`
2
2
 
3
- Four reference traces: a fresh WhatsApp run (the most common path), a resume after a mid-flow failure, an Apple Business Chat dispatch (to show type-agnostic flow), and an unsupported-type rejection. Read these when you need to see the exact envelope shapes the orchestrator emits at each outcome.
3
+ Six reference traces: a fresh WhatsApp run (the most common path), a resume after a mid-flow failure, an Apple Business Chat dispatch (to show type-agnostic flow), an unsupported-type rejection, a Facebook run with requested settings, and a settings-only run on an already-active channel. Read these when you need to see the exact envelope shapes the orchestrator emits at each outcome.
4
4
 
5
5
  ---
6
6
 
@@ -106,3 +106,37 @@ User invokes without specifying a type, gets the prompt, then types `wechat`.
106
106
  Alternatively, if the orchestrator forwards `WeChat` directly to the dispatcher without validating upfront, the dispatcher (`service-de-channel-create`) emits the same `unsupported-type` envelope and the orchestrator passes it through with `failedStep: "insert"`.
107
107
 
108
108
  Either way the user gets a clear "this type isn't supported" message rather than a confusing mid-flow error.
109
+
110
+ ---
111
+
112
+ ## Worked example: Facebook with auto-responses and an idle timeout
113
+
114
+ Prompt: *"Set up my Facebook Messenger channel for page 103663378691289, route it to Default_Queue. Also add auto-responses: 'Thanks for reaching out!' initially, 'You're now connected with an agent.' when an agent engages, and 'Are you still there?' when the customer goes idle after 10 minutes — and set the session idle timeout to 15 minutes."*
115
+
116
+ **Stage 0**: `MESSAGE_TYPE=Facebook`, `PAGE_ID=103663378691289`, `QUEUE=Default_Queue`. `{REQUESTED_SETTINGS}` = `auto-response:InitialResponse`, `auto-response:AgentEngagedResponse`, `auto-response:EndUserIdleResponse` (`responseTimeoutInMins=10`), `inactivity:endUserIdleTimeOut` (15).
117
+
118
+ **Stages 0.5–4**: T&C accepted; preflight `fresh`; AuthProvider present; insert, route (to the named queue, no prompt), consent no-op, activate. `STEPS_RUN=["insert","route","activate"]`, `STEPS_SKIPPED=["consent"]`.
119
+
120
+ **Stage 4.5**: one `service-de-channel-settings-configure` call with `FACETS=[auto-responses, inactivity]`. The leaf returns `facet-not-applicable` for `endUserIdleTimeOut` (MIAW-only), and attempts the three auto-responses in one metadata deploy. If the deploy hits the known Facebook metadata-update defect, all three land in `failed` with the leaf's `metadata-deploy-failed` message.
121
+
122
+ **Stage 5**:
123
+ ```text
124
+ Warning: channel is live, but 3 requested setting(s) were not applied.
125
+ Channel ID: 0Mj... Routed to: Default_Queue (00G...)
126
+ Steps: ran insert, route, activate, skipped consent
127
+
128
+ Requested settings:
129
+ - Not applicable to Facebook: session idle timeout (15 min) — endUserIdleTimeOut is MIAW-only
130
+ - Failed: initial / agent-engaged / idle auto-responses — metadata-deploy-failed: <server message>.
131
+ Configure them in Setup → Messaging Settings → this channel for now.
132
+ ```
133
+
134
+ Every requested item shows up — nothing is silently dropped.
135
+
136
+ ---
137
+
138
+ ## Worked example: settings on an already-active channel
139
+
140
+ Prompt: *"Fully configure my existing Facebook channel for page 103663378691289, including the initial auto-response."*
141
+
142
+ **Stage 1**: preflight finds the channel with `IsActive=true` → `already-active`. `{REQUESTED_SETTINGS}` is non-empty, so instead of returning a no-op, skip Stages 2–4 (`STEPS_SKIPPED=["insert","route","consent","activate"]`) and run **Stage 4.5** for the auto-response. Stage 5 reports the item as configured / not applicable / failed. With an empty `{REQUESTED_SETTINGS}`, the same preflight result returns the plain no-op success envelope.
@@ -30,7 +30,7 @@ Creates `MessagingChannel` metadata XML for Salesforce Messaging for In-App and
30
30
 
31
31
  ## Entry points and transport
32
32
 
33
- - **Delegated** (`context.calledFrom == "service-onboarding"`): use the approved `values`, ask nothing, and return `failed` naming any missing required key. **Standalone** (no `context`): ask for the Inputs below.
33
+ - **Delegated** (`context.calledFrom == "service-onboarding"`): use the supplied `values` for parameter transport only. Before any mutation, verify that the target org and change description match an explicit user authorization obtained by the caller. If `context.userAuthorizationRef` is absent, prompt the user to confirm. Return `failed` naming any missing required key. **Standalone** (no `context`): ask for the Inputs below.
34
34
  - **Shell safety**: org alias and bot name must match `^[A-Za-z0-9_.@+-]+$` before use in a command; otherwise stop and ask (delegated: `failed`). Pass the channel label single-quoted, escaping any `'` as `'\''`.
35
35
  - **Transport A** (primary): headless-360 MCP `dispatch` / `dispatch_readonly` on `/headless/metadata`. **Transport B**: the `sf` commands below, only where a probe shows Transport A unavailable.
36
36
 
@@ -59,13 +59,13 @@ Run in order; step 3a may jump to step 15 or Phase 4. All SOQL below: Transport
59
59
 
60
60
  ### Phase 1 — Gather Context
61
61
 
62
- 1. **Verify org API version** — run `scripts/check-api-version.sh 67.0 '<org-alias>'` (skip it when Transport A is in use). Exit 1 = org below 67.0: stop (delegated: `failed`). Exit 2 = version unknown: say so and continue. Create `sfdx-project.json` with `"sourceApiVersion": "67.0"` in the output folder only if none exists.
62
+ 1. **Verify org API version** — run `scripts/check-api-version.sh 67.0 '<org-alias>'` (skip it when Transport A is in use). If the script exits non-zero (1 below minimum, 2 unknown), STOP and report the error to the user (delegated: `failed`). Do NOT generate sfdx-project.json or proceed with any metadata writes until the API version is successfully verified. A failed version check is a blocking precondition.
63
63
 
64
64
  2. **Collect inputs** — standalone: ask for the Inputs. Delegated: from `values`. Then probe transport with a read-only `GET` of `MessagingChannel` (contract §2).
65
65
 
66
66
  3. **Determine file name** — run `scripts/normalize-channel-name.sh '<LABEL>'` and surface any errors it returns.
67
67
 
68
- 3a. **Pre-scan** — `GET` `MessagingChannel` by the step 3 name (contract §3): none → create; matches and active → no write, `already-configured`, skip to Phase 4; matches but inactive → activate only (step 15); differs → announce each change, then write the full document (standalone: ask first).
68
+ 3a. **Pre-scan** — `GET` `MessagingChannel` by the step 3 name (contract §3): none → create; matches and active → no write, `already-configured`, skip to Phase 4; matches but inactive → activate only (step 15); differs → announce each change, then write the full document (standalone: ask first; delegated: confirm per contract section 3).
69
69
 
70
70
  4. **Verify routing target exists** — skip when step 3a ended in `already-configured` or activate-only, so a re-run never creates a queue. Names must match `^[A-Za-z0-9_.@+-]+$` before they go into a query. Query the org to confirm the referenced routing target exists:
71
71
  - For Queue: `sf data query --query "SELECT Id, DeveloperName FROM Group WHERE Type='Queue' AND DeveloperName='<QUEUE_NAME>'" --target-org <org-alias>`
@@ -9,7 +9,7 @@ onboarding module. The sibling `service-digital-engagement-deployment-configure`
9
9
  |---|---|---|
10
10
  | Detected by | `context.calledFrom == "service-onboarding"` | no `context` object |
11
11
  | Values come from | `values` in the payload — already approved in the plan table | you ask for the Inputs in SKILL.md; defaults are in `references/channel_settings.md` |
12
- | Questions | none. A missing required key is a caller bug: stop and return `failed` naming the key. Never default a value the admin did not approve | the Inputs list in SKILL.md |
12
+ | Questions | none, except one confirmation of the target org and change summary before the first write when the authorization context is absent. A missing required key is a caller bug: stop and return `failed` naming the key. Never default a value the admin did not approve | the Inputs list in SKILL.md |
13
13
  | Wording | `discoveryMode == "guided"` → plain business language (§4). `"pickAreas"` → Salesforce terminology | Salesforce terminology (the Inputs as written) |
14
14
  | Ends with | the structured result in section 5 | a plain-language summary of the same outcome |
15
15
 
@@ -77,7 +77,7 @@ Run before any write, both modes. `GET` `MessagingChannel` by `fullName` = the n
77
77
  | No such channel | not set up → create (`POST`) |
78
78
  | Exists, and every targeted setting equals the target (routing type and target, fallback queue, `authMode`, plus each supplied key) **and** `IsActive = true` | **already configured** — no write, return `already-configured` |
79
79
  | Exists, matches, but `IsActive = false` | only activate; do not rewrite the metadata |
80
- | Exists, some targeted setting differs | **drift** — announce each change ("routing: Queue A → Queue B"), then write the full document. Standalone: ask for a yes first. Delegated: the plan approval covers it |
80
+ | Exists, some targeted setting differs | **drift** — announce each change ("routing: Queue A → Queue B"), then write the full document. Standalone: ask for a yes first. Delegated: confirm the specific drift change with the user before writing. Plan approval does not cover drift correction without explicit re-confirmation naming the changed settings and target org. |
81
81
  | Exists but was created by Connect `channel/setup` (defaults populated: opt-out/help keywords, `embeddedConfig`) | you now own the whole document: GET, modify only targeted fields, PUT the full result |
82
82
 
83
83
  Standalone, channel exists: offer exactly three choices — no change (stop) / override (replace the targeted settings, keep the rest) / add to existing (keep current settings, add only what the user lists).
@@ -24,6 +24,6 @@ if python3 -c "import sys; sys.exit(0 if float(sys.argv[1]) >= float(sys.argv[2]
24
24
  echo "OK: Org API version $API_VERSION meets minimum $MIN_VERSION."
25
25
  exit 0
26
26
  else
27
- echo "ERROR: Org API version $API_VERSION is below minimum $MIN_VERSION."
27
+ echo "ERROR: Org API version $API_VERSION is below minimum $MIN_VERSION. Cannot proceed; the org does not meet the minimum API version prerequisite."
28
28
  exit 1
29
29
  fi
@@ -77,7 +77,7 @@ All steps are sequential. Do not skip or reorder. Branch based on the operation
77
77
 
78
78
  ### Phase 1 — Gather Context
79
79
 
80
- 1. **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"`.
80
+ 1. **Verify org API version** — run `scripts/check-api-version.sh 67.0 <org-alias>` and report any errors it returns. If the script fails (unknown or below-minimum version), STOP all org-write phases. Report the version failure. Only non-org-write operations (local template generation) may continue.
81
81
 
82
82
  2. **Determine operation** — standalone: ask whether the user wants to create a new deployment or update an existing one. Delegated: taken from `values.operation`, then confirmed by the pre-scan (step 4a).
83
83
 
@@ -148,7 +148,7 @@ Runs for both Phase 2A and 2B, except when the pre-scan returned `already-config
148
148
 
149
149
  17b. **Re-read and diff** — `GET` the component again and confirm every intended field landed and no inline block (`embeddedServiceMessagingChannel`, forms) was dropped.
150
150
 
151
- 17c. **Publish (Web only) — never automatic.** Publishing makes the changes live to customers; the deploy only saves a draft. After 17b, stop: summarize what changed, give the plain Setup link `<instanceUrl>/lightning/setup/EmbeddedServiceDeployments/<EmbeddedServiceConfigId>/view` so the user can review the draft, and ask whether to publish now. Publish only on an explicit yes in that turn (a "publish" in the original request does not count). Then `dispatch` `POST` on the fully-qualified publish path; if it returns a path/route error, or on Transport B, run the `sf` publish command from `references/connect_api_creation.md`. Delegated: do not publish; return `published: false`. Note: a Web create via Connect API publishes by itself (`isPublishSuccess: true`); say so in the plan before creating.
151
+ 17c. **Publish (Web only) — never automatic.** Publishing makes the changes live to customers; the deploy only saves a draft. After 17b, stop: summarize what changed, give the plain Setup link `<instanceUrl>/lightning/setup/EmbeddedServiceDeployments/<EmbeddedServiceConfigId>/view` so the user can review the draft, and ask whether to publish now. Publish only on an explicit yes in that turn (a "publish" in the original request does not count). Then `dispatch` `POST` on the fully-qualified publish path; if it returns a path/route error, or on Transport B, run the `sf` publish command from `references/connect_api_creation.md`. Delegated: do not publish; return `published: true` only if a Web create auto-published (`isPublishSuccess: true`), else `false`. Note: a Web create via Connect API publishes by itself (`isPublishSuccess: true`); say so in the plan before creating.
152
152
 
153
153
  ### Phase 3 — Validate
154
154
 
@@ -83,8 +83,8 @@ Run before any write, both modes. Read `EmbeddedServiceConfig` by `fullName` = t
83
83
 
84
84
  Standalone, deployment exists: offer exactly three choices — no change / override / add to existing.
85
85
 
86
- The metadata read does not say whether the latest edits are **published**. Publishing is never automatic (SKILL.md
87
- step 17c); delegated returns `published: false` so the coordinator can ask the admin.
86
+ The metadata read does not say whether the latest edits are **published**. Web creation auto-publishes. If auto-publish succeeded
87
+ (isPublishSuccess=true), return published: true. For updates, publishing is a separate step (SKILL.md step 17c); delegated returns `published: false` so the coordinator can ask the admin.
88
88
 
89
89
  ## 4. Questions in the admin's language (guided mode)
90
90
 
@@ -113,6 +113,8 @@ Ask about the outcome, not the Salesforce feature. Keep it to a handful; state t
113
113
  }
114
114
  ```
115
115
 
116
+ `published` is `true` only when a Web create auto-published (`isPublishSuccess=true`).
117
+
116
118
  `status` and `errorMessage` are the contract. `outputs` is always returned; it is an addition to the documented shape.
117
119
  On `failed`: `errorMessage` names the failed step and the platform error; stop; do not retry.
118
120
 
@@ -24,6 +24,6 @@ if python3 -c "import sys; sys.exit(0 if float(sys.argv[1]) >= float(sys.argv[2]
24
24
  echo "OK: Org API version $API_VERSION meets minimum $MIN_VERSION."
25
25
  exit 0
26
26
  else
27
- echo "ERROR: Org API version $API_VERSION is below minimum $MIN_VERSION. Generate a sfdx-project.json with \"sourceApiVersion\": \"$MIN_VERSION\" in the metadata output folder."
27
+ echo "ERROR: Org API version $API_VERSION is below minimum $MIN_VERSION. Cannot proceed; the org does not meet the minimum API version prerequisite."
28
28
  exit 1
29
29
  fi
@@ -5,7 +5,7 @@ allowed-tools: Bash Read Write Edit Grep Glob
5
5
  metadata:
6
6
  version: "1.0"
7
7
  domains: ["Service"]
8
- minApiVersion: "69.0"
8
+ minApiVersion: "66.0"
9
9
  relatedSkills:
10
10
  - "service-omni-base-settings-configure"
11
11
  - "service-omni-channel-setup-coordinate"