@salesforce/afv-skills 1.67.0 → 1.68.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 (118) hide show
  1. package/README.md +55 -5
  2. package/package.json +1 -1
  3. package/skills/agentforce-offline-experimentation-run/SKILL.md +14 -22
  4. package/skills/agentforce-offline-experimentation-run/scripts/bt_compare.py +81 -0
  5. package/skills/agentforce-offline-experimentation-run/scripts/bt_fetch.py +358 -0
  6. package/skills/agentforce-offline-experimentation-run/scripts/bt_patch_agent.py +110 -0
  7. package/skills/agentforce-offline-experimentation-run/scripts/btlib/__init__.py +34 -0
  8. package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentpatch.py +483 -0
  9. package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentsrc.py +565 -0
  10. package/skills/agentforce-offline-experimentation-run/scripts/btlib/cache.py +95 -0
  11. package/skills/agentforce-offline-experimentation-run/scripts/btlib/compare.py +617 -0
  12. package/skills/agentforce-offline-experimentation-run/scripts/btlib/fetch.py +1012 -0
  13. package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +148 -0
  14. package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +92 -0
  15. package/skills/agentforce-offline-experimentation-run/scripts/btlib/patch.py +327 -0
  16. package/skills/agentforce-offline-experimentation-run/scripts/btlib/redact.py +40 -0
  17. package/skills/agentforce-offline-experimentation-run/scripts/btlib/results.py +288 -0
  18. package/skills/agentforce-offline-experimentation-run/scripts/btlib/scoring.py +340 -0
  19. package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +238 -0
  20. package/skills/agentforce-offline-experimentation-run/scripts/btlib/splits.py +136 -0
  21. package/skills/agentforce-offline-experimentation-run/scripts/btlib/stdm.py +98 -0
  22. package/skills/agentforce-offline-experimentation-run/scripts/btlib/tokens.py +173 -0
  23. package/skills/agentforce-offline-experimentation-run/scripts/btlib/units.py +199 -0
  24. package/skills/agentforce-offline-experimentation-run/scripts/btlib/versions.py +194 -0
  25. package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +366 -378
  26. package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +14 -4
  27. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +472 -796
  28. package/skills/dx-lifecycle-center/SKILL.md +5 -2
  29. package/skills/dx-lifecycle-center/assets/widgets/connect-connected/connect-connected.json +65 -0
  30. package/skills/dx-lifecycle-center/assets/widgets/connect-connected/schema.json +32 -0
  31. package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/connect-sign-in.json +57 -0
  32. package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/schema.json +21 -0
  33. package/skills/dx-lifecycle-center/examples/workflows.md +20 -6
  34. package/skills/dx-lifecycle-center/references/connect-org.md +21 -2
  35. package/skills/dx-lifecycle-center/references/deploy.md +2 -2
  36. package/skills/dx-lifecycle-center/references/list-orgs.md +1 -1
  37. package/skills/dx-lifecycle-center/scripts/card-policy.jq +71 -0
  38. package/skills/dx-lifecycle-center/scripts/fill-widget.jq +29 -0
  39. package/skills/dx-lifecycle-center/scripts/widget.sh +28 -0
  40. package/skills/dx-org-devhub-configure/SKILL.md +85 -84
  41. package/skills/dx-org-devhub-configure/examples/status-output.md +25 -2
  42. package/skills/dx-org-devhub-configure/scripts/devhub.sh +265 -140
  43. package/skills/dx-org-devhub-configure/scripts/test-devhub.sh +100 -15
  44. package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +89 -0
  45. package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +164 -0
  46. package/skills/dx-scratch-def-configure/SKILL.md +163 -0
  47. package/skills/dx-scratch-def-configure/examples/confirm-card.md +53 -0
  48. package/skills/dx-scratch-def-configure/examples/report-recipes.md +100 -0
  49. package/skills/dx-scratch-def-configure/references/features.json +3270 -0
  50. package/skills/dx-scratch-def-configure/references/project-scratch-def.schema.json +1841 -0
  51. package/skills/dx-scratch-def-configure/references/settings-map.json +682 -0
  52. package/skills/dx-scratch-def-configure/scripts/lib_scratch_def.py +1306 -0
  53. package/skills/dx-scratch-def-configure/scripts/requirements.txt +3 -0
  54. package/skills/dx-scratch-def-configure/scripts/scrape_config_values.py +848 -0
  55. package/skills/education-cloud-domain-configure/SKILL.md +1 -1
  56. package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -1
  57. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +1 -1
  58. package/skills/experience-design-validate/SKILL.md +1 -1
  59. package/skills/experience-search-coordinate/SKILL.md +18 -12
  60. package/skills/experience-search-coordinate/references/content-route.md +79 -1
  61. package/skills/field-service-data-capture-migrate/SKILL.md +1 -1
  62. package/skills/platform-apex-generate/SKILL.md +14 -11
  63. package/skills/platform-apex-test-generate/SKILL.md +2 -1
  64. package/skills/platform-datamask-run/SKILL.md +52 -71
  65. package/skills/platform-datamask-run/references/api-surface.md +10 -4
  66. package/skills/platform-datamask-run/references/policy-authoring.md +56 -7
  67. package/skills/platform-datamask-run/references/run-and-abort.md +17 -10
  68. package/skills/platform-datamask-run/scripts/poll-job.sh +15 -25
  69. package/skills/platform-dataspace-access-configure/SKILL.md +19 -1
  70. package/skills/platform-metadata-discovery-get/SKILL.md +185 -0
  71. package/skills/platform-metadata-discovery-get/references/api-map.md +25 -0
  72. package/skills/platform-metadata-discovery-get/references/h360-routes.md +30 -0
  73. package/skills/platform-metadata-discovery-get/references/scoped-soql.md +52 -0
  74. package/skills/platform-metadata-grounding-get/SKILL.md +170 -0
  75. package/skills/platform-policy-rule-generate/SKILL.md +84 -232
  76. package/skills/platform-policy-rule-generate/references/condition-model.md +47 -0
  77. package/skills/platform-policy-rule-generate/references/condition-templates.md +89 -0
  78. package/skills/platform-policy-rule-generate/references/conjunction-compiler.md +25 -0
  79. package/skills/platform-policy-rule-generate/references/conjunction-expression.md +22 -0
  80. package/skills/platform-policy-rule-generate/references/consumer-all.md +9 -0
  81. package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +91 -0
  82. package/skills/platform-policy-rule-generate/references/deploy-errors.md +24 -36
  83. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/package.xml +12 -0
  84. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +6 -0
  85. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitions/ExistsJoinRLS_Rule_1.policyRuleDefinition +91 -0
  86. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/package.xml +12 -0
  87. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +6 -0
  88. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitions/FieldReadDeny_Rule_1.policyRuleDefinition +72 -0
  89. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/package.xml +12 -0
  90. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +6 -0
  91. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitions/LastCharactersFieldMasking_Rule_1.policyRuleDefinition +77 -0
  92. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/package.xml +12 -0
  93. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +6 -0
  94. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitions/PrincipalFieldMatchRLS_Rule_1.policyRuleDefinition +77 -0
  95. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/package.xml +12 -0
  96. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +4 -0
  97. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitions/TaggedObjectAccess_Rule_1.policyRuleDefinition +65 -0
  98. package/skills/platform-policy-rule-generate/references/headless-transport.md +87 -0
  99. package/skills/platform-policy-rule-generate/references/policy-schema-full.md +17 -10
  100. package/skills/platform-policy-rule-generate/references/policy-shapes.md +74 -0
  101. package/skills/platform-policy-rule-generate/references/principal-expression.md +31 -0
  102. package/skills/platform-policy-rule-generate/references/reference-resolution.md +51 -0
  103. package/skills/platform-policy-rule-generate/references/resource-expression.md +48 -0
  104. package/skills/platform-policy-rule-generate/references/runtime-context.md +9 -0
  105. package/skills/platform-policy-rule-generate/references/templates-access.md +11 -9
  106. package/skills/platform-policy-rule-generate/references/templates-advanced.md +4 -2
  107. package/skills/platform-policy-rule-generate/references/templates-record.md +37 -22
  108. package/skills/platform-policy-rule-generate/references/templates-transform.md +10 -8
  109. package/skills/platform-policy-rule-generate/references/templates.md +2 -2
  110. package/skills/platform-policy-rule-generate/references/ui-compatibility.md +35 -17
  111. package/skills/platform-report-generate/SKILL.md +9 -4
  112. package/skills/platform-report-generate/references/chart-types.md +26 -2
  113. package/skills/platform-report-generate/references/column-names.md +43 -0
  114. package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
  115. package/skills/platform-report-generate/references/verification-checklist.md +10 -2
  116. package/skills/service-digital-engagement-channel-configure/SKILL.md +7 -5
  117. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +33 -0
  118. package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +110 -14
@@ -2,6 +2,9 @@
2
2
 
3
3
  Run through these checks before deploying any generated report metadata.
4
4
 
5
+ ## Before Writing the XML
6
+ - [ ] Check every `<field>` in `<columns>`, `<groupingsDown>`, and `<groupingsAcross>`, every filter `<column>`, and the chart `<groupingColumn>` against the column table for the report type in `references/column-names.md` (or the MCP column list). No bare `NAME` or `USERS.NAME` — use the report type's name column (e.g. `OPPORTUNITY_NAME`, `FULL_NAME`, `OWNER`, `FIRST_NAME` + `LAST_NAME`)
7
+
5
8
  ## Universal Checks
6
9
  - [ ] File extension is `.report-meta.xml`
7
10
  - [ ] File is placed under `<sourceDir>/reports/<FolderName>/` (check sfdx-project.json for source path)
@@ -13,6 +16,8 @@ Run through these checks before deploying any generated report metadata.
13
16
  - [ ] `<description>` explains the business purpose (max 255 chars)
14
17
  - [ ] All column `<field>` values use correct platform column names
15
18
  - [ ] Custom field columns use `<ObjectApiName>.<FieldApiName__c>` format
19
+ - [ ] Each `<columns>` contains exactly one `<field>`
20
+ - [ ] Custom report type: `<reportType>` ends in `__c` and every column uses a `<table>$<field>` path from the report type's sections
16
21
 
17
22
  ## Format-Specific Checks
18
23
  - [ ] Tabular: no `<groupingsDown>`, no `<groupingsAcross>`, no `<chart>`, no `<aggregateTypes>`
@@ -28,6 +33,7 @@ Run through these checks before deploying any generated report metadata.
28
33
  - [ ] `<timeFrameFilter>` uses a valid `<interval>` value from `references/date-intervals.md`
29
34
  - [ ] Date columns use platform column names (e.g. `CLOSE_DATE`, not `CloseDate`)
30
35
  - [ ] Multi-value picklist uses ONE criteriaItem with comma-separated values
36
+ - [ ] No `<params>` the request didn't ask for; Opportunity `probability` param is only `>0`
31
37
 
32
38
  ## Grouping Checks
33
39
  - [ ] `<dateGranularity>` is set for every grouping (use `None` for non-date fields)
@@ -38,8 +44,10 @@ Run through these checks before deploying any generated report metadata.
38
44
  - [ ] Chart is only on Summary or Matrix report
39
45
  - [ ] `<chartType>` is a valid type from `references/chart-types.md`
40
46
  - [ ] `<groupingColumn>` matches a grouping field
41
- - [ ] `<chartSummaries>` contains valid `<aggregate>` + `<column>` (or just `<column>RowCount</column>`)
42
- - [ ] `legendPosition` only used with grouped/stacked charts
47
+ - [ ] `<chartSummaries>` contains valid `<aggregate>` + `<column>`, or ONLY `<column>RowCount</column>` with no `<aggregate>`
48
+ - [ ] No `<columns><field>RowCount</field></columns>` — `RowCount` is only valid in `<chartSummaries><column>`, `<sortByName>`, or a `<calculatedFormula>`
49
+ - [ ] `legendPosition` omitted on single-series `HorizontalBar`/`VerticalColumn`/`Line`; on grouped/stacked charts only `Right` or `Bottom` (see `references/chart-types.md`)
50
+ - [ ] Every `<chart>` child element is in the allowed list in `references/chart-types.md`
43
51
 
44
52
  ## Cross-Filter Checks (if applicable)
45
53
  - [ ] Maximum 3 cross-filters per report
@@ -138,6 +138,8 @@ All steps are sequential. Do not skip or reorder.
138
138
  - `isSaveTranscriptEnabled` — save conversation transcripts
139
139
  - `maxFileSize` — maximum attachment size in MB
140
140
 
141
+ 9a. **Configure session inactivity (optional)** — ask using the Setup labels and set the top-level fields per `references/channel_settings.md` → "Setup Prompts: Session Inactivity".
142
+
141
143
  10. **Configure messaging keywords** — generate `<messagingKeywords>` elements:
142
144
  - `OptOut` type with individual `<keyword>` elements: cancel, end, quit, stop, stopall, unsubscribe
143
145
  - `Help` type with `<keyword>`: help
@@ -176,7 +178,7 @@ All steps are sequential. Do not skip or reorder.
176
178
  17. **Report** — delegated: return the contract §5 result and stop. Standalone: continue.
177
179
 
178
180
  18. **Present output** (standalone) — show the generated file to the user with a summary of configured settings and confirm activation status. Offer next steps:
179
- - **Automated responses** — ask if the user wants to configure `<automatedResponses>` (OptOutConfirmation, HelpResponse). If yes, generate elements with `autoResponseContentType: TextResponse`, `language`, and XML-escaped `response` text, then redeploy.
181
+ - **Automated responses** — ask which messages the user wants using the Setup labels per `references/channel_settings.md` → "Setup Prompts: Automated Responses", then redeploy.
180
182
 
181
183
  ---
182
184
 
@@ -219,7 +221,7 @@ All steps are sequential. Do not skip or reorder.
219
221
  | Custom parameters not collected | `name` must be unique per channel |
220
222
  | `<customParameters>` deploy fails: "bad value for restricted picklist field" | `parameterDataType` was set to something other than `String`. Channel custom parameters are always `String`; set the field's actual type (Number, Checkbox, dropdown) at the deployment level, not here |
221
223
  | Removing a custom parameter: "can't be deleted as it is referenced elsewhere" | **Check before deploying, not after.** Every deployment on this channel whose pre-chat form uses the param must first drop that field and be published (user-approved); remove the param's `actionParameterMappings` in a separate deploy first. See `references/channel_settings.md` §Removing a Custom Parameter |
222
- | Automated responses not showing | Use exact `type` values (`OptOutConfirmation`, `HelpResponse`); XML-escape special characters |
224
+ | Automated response / session-inactivity deploy fails | See `references/channel_settings.md` → "Automated Responses", "Session Settings" |
223
225
  | Channel deployed but messages not routing | Channel must be activated after deployment — it defaults to inactive |
224
226
  | "You can't enable Session-Based Chat for verified users" | Set `isSynchronousChatEnabled` to `false` for Auth channels — session-based chat is only valid for UnAuth |
225
227
 
@@ -252,9 +254,8 @@ All steps are sequential. Do not skip or reorder.
252
254
  - [ ] If UnAuth, is `anonymousUserJwtExpirationTime` set (default 360, range 60-4320)?
253
255
  - [ ] If Auth, is `verifiedUserJwtExpirationTime` set (default 60, range 60-240)?
254
256
 
255
- ### Automated Response Checks (only if user requested)
256
- - [ ] Do all `type` values use valid IDs (`OptOutConfirmation`, `HelpResponse`)?
257
- - [ ] Are special characters XML-escaped in `response` text?
257
+ ### Session Inactivity / Automated Response Checks (only if user requested)
258
+ - [ ] Checked against `references/channel_settings.md` (Session Settings, Automated Responses)?
258
259
 
259
260
  ### Keyword Checks
260
261
  - [ ] Is there at least an `OptOut` keyword type defined?
@@ -283,6 +284,7 @@ File structure follows the template in `assets/messaging_channel_template.xml`.
283
284
  | Creating the Omni-Channel Flow for routing | `automation-flow-generate` skill |
284
285
  | Creating permission sets for messaging agents | `platform-permission-set-generate` skill |
285
286
  | Creating the Embedded Service Deployment | `service-digital-engagement-deployment-configure` skill |
287
+ | Creating the `ConversationMessageDefinition` an automated response references | `conversation-message-definition-builder` skill |
286
288
 
287
289
  ---
288
290
 
@@ -1,6 +1,8 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <MessagingChannel xmlns="http://soap.sforce.com/2006/04/metadata">
3
3
  <!-- Automated Responses (optional, repeat per response) -->
4
+ <!-- Shape depends on type — see references/channel_settings.md "Automated Responses" -->
5
+ <!-- TextResponse shape: OptOutConfirmation, HelpResponse only -->
4
6
  <!--
5
7
  <automatedResponses>
6
8
  <autoResponseContentType>TextResponse</autoResponseContentType>
@@ -10,6 +12,18 @@
10
12
  </automatedResponses>
11
13
  -->
12
14
 
15
+ <!-- MessageDefinition shape: InitialResponse, AgentEngagedResponse, AgentEndEngagementResponse, EndUserInactiveResponse, EndUserIdleResponse, RerouteResponse, RoutingUnavailableResponse -->
16
+ <!-- messageDefinitionName must reference an existing ConversationMessageDefinition (build via conversation-message-definition-builder first) -->
17
+ <!-- Do NOT include language or response on this shape -->
18
+ <!-- Optional responseTimeoutInMins (4-30): only for EndUserIdleResponse / EndUserInactiveResponse -->
19
+ <!--
20
+ <automatedResponses>
21
+ <autoResponseContentType>MessageDefinition</autoResponseContentType>
22
+ <messageDefinitionName>{CONVERSATION_MESSAGE_DEFINITION_DEV_NAME}</messageDefinitionName>
23
+ <type>{InitialResponse|AgentEngagedResponse|AgentEndEngagementResponse|EndUserInactiveResponse|EndUserIdleResponse|RerouteResponse|RoutingUnavailableResponse}</type>
24
+ </automatedResponses>
25
+ -->
26
+
13
27
  <!-- Standard Parameters (optional, repeat per parameter) -->
14
28
  <!-- actionParameterMappings is optional — include when using Flow routing to map to flow input variables -->
15
29
  <!--
@@ -58,10 +72,29 @@
58
72
  <isFileAttachmentExtUnrestricted>{true|false}</isFileAttachmentExtUnrestricted>
59
73
  <isSaveTranscriptEnabled>{true|false}</isSaveTranscriptEnabled>
60
74
  <maxFileSize>{SIZE_IN_MB}</maxFileSize>
75
+
76
+ <!-- Messaging Authorizations (only when authMode is Auth; omit entirely for UnAuth) -->
77
+ <!--
78
+ <messagingAuthorizations>
79
+ <authIdentifier>{AUTH_IDENTIFIER}</authIdentifier>
80
+ <authorizationType>PublicKeyCertificateSet</authorizationType>
81
+ <enabled>{true|false}</enabled>
82
+ <publicKeyCertificateSetName>{KEYSET_NAME}</publicKeyCertificateSetName>
83
+ </messagingAuthorizations>
84
+ -->
61
85
  </embeddedConfig>
62
86
 
63
87
  <!-- Session Settings -->
64
88
  <endUserIdleTimeOut>{IDLE_TIMEOUT_MINUTES}</endUserIdleTimeOut>
89
+
90
+ <!-- Session Inactivity (optional) — top-level siblings of embeddedConfig, not nested inside it -->
91
+ <!-- endUserIdleAction must be Inactivate, End, or InactivateAndEnd -->
92
+ <!--
93
+ <endUserIdleAction>{Inactivate|End|InactivateAndEnd}</endUserIdleAction>
94
+ <endInactiveSessionTimeOut>{MINUTES_AFTER_IDLE_ACTION}</endInactiveSessionTimeOut>
95
+ <isAgentMessageResetInactivityEnabled>{true|false}</isAgentMessageResetInactivityEnabled>
96
+ -->
97
+
65
98
  <isEstimatedWaitTimeEnabled>{true|false}</isEstimatedWaitTimeEnabled>
66
99
  <isQueuePositionEnabled>{true|false}</isQueuePositionEnabled>
67
100
  <isSynchronousChatEnabled>{true|false}</isSynchronousChatEnabled>
@@ -133,12 +133,24 @@ Configures the authorization settings for verified user identity in the messagin
133
133
 
134
134
  | Field | Type | Default | Description |
135
135
  |-------|------|---------|-------------|
136
- | `endUserIdleTimeOut` | Integer | `5` | Minutes of user inactivity before idle warning |
136
+ | `endUserIdleTimeOut` | Integer | `5` | Minutes of user inactivity before idle warning (range 5-30) |
137
+ | `endUserIdleAction` | Enum | — | Action taken when the idle timeout elapses: `Inactivate`, `End`, or `InactivateAndEnd` |
138
+ | `endInactiveSessionTimeOut` | Integer | — | Minutes after `endUserIdleAction` fires before the inactive session itself ends |
139
+ | `isAgentMessageResetInactivityEnabled` | Boolean | — | Restart the customer's inactivity timer when a rep sends a message (Setup label: "Rep messages reset customer's inactivity timer"). Only takes effect when `endUserIdleTimeOut` is set; it is forced to `false` otherwise |
137
140
  | `isEstimatedWaitTimeEnabled` | Boolean | `false` | Show estimated wait time |
138
141
  | `isQueuePositionEnabled` | Boolean | `false` | Show queue position to user |
139
142
  | `isSynchronousChatEnabled` | Boolean | `false` | Enable real-time synchronous chat |
140
143
  | `isVoiceModeEnabled` | Boolean | `false` | Enable voice mode capability |
141
144
 
145
+ Setup UI (Customer Inactivity card): `endUserIdleTimeOut` is "Minutes to Inactivate Session" / "Minutes to End Session" (5-30); `endUserIdleAction` is "Choose action when customer is idle" with values "Inactivate Session" (`Inactivate`), "End Session" (`End`), and "Inactivate & End Session" (`InactivateAndEnd`); `endInactiveSessionTimeOut` is "Minutes to End Session After Inactivation" (5-30, only meaningful with `InactivateAndEnd`).
146
+
147
+ `endUserIdleTimeOut`, `endUserIdleAction`, `endInactiveSessionTimeOut`, and `isAgentMessageResetInactivityEnabled` are **MIAW (EmbeddedMessaging) only** — not applicable to SMS/WhatsApp/LINE. These can be deployed together with `isAbandonedChatsEnabled`/`chatAbandonmentTimeout` with no conflict.
148
+
149
+ ```xml
150
+ <endUserIdleTimeOut>5</endUserIdleTimeOut>
151
+ <endUserIdleAction>InactivateAndEnd</endUserIdleAction>
152
+ <endInactiveSessionTimeOut>10</endInactiveSessionTimeOut>
153
+ ```
142
154
 
143
155
  ---
144
156
 
@@ -237,30 +249,76 @@ A parameter still used by a pre-chat form can't be deleted ("can't be deleted as
237
249
 
238
250
  ## Automated Responses (`<automatedResponses>`)
239
251
 
240
- Repeatable element — automated messages sent at specific events.
252
+ Repeatable element — automated messages sent at specific events. There are two mutually exclusive content shapes, and **which shape applies depends on the `type`** (EmbeddedMessaging channel).
253
+
254
+ ### Shape 1 — `TextResponse` (inline text)
255
+
256
+ Applies only to `OptOutConfirmation` and `HelpResponse`.
241
257
 
242
258
  | Field | Type | Required | Description |
243
259
  |-------|------|----------|-------------|
244
- | `autoResponseContentType` | Enum | Yes | `TextResponse` or `MessageDefinition` |
260
+ | `autoResponseContentType` | Enum | Yes | `TextResponse` |
245
261
  | `language` | String | Yes | Locale code (e.g., `en_US`) |
246
262
  | `response` | String | Yes | The response message text (XML-escape special chars) |
247
- | `type` | Enum | Yes | The event type — see table below |
263
+ | `type` | Enum | Yes | `OptOutConfirmation` or `HelpResponse` |
264
+
265
+ ### Shape 2 — `MessageDefinition` (reference to a Messaging Component)
266
+
267
+ Applies to `InitialResponse`, `AgentEngagedResponse`, `AgentEndEngagementResponse`, `EndUserInactiveResponse`, `EndUserIdleResponse`, `RerouteResponse`, and `RoutingUnavailableResponse` — the "Conversation Acknowledgement," "Start Conversation," "End Conversation," "Inactive Conversation," "Warning Message," "Reroute Conversation," and "Routing Unavailable" fields in the Setup UI, all backed by a "Messaging Components" (`ConversationMessageDefinition`) picker.
268
+
269
+ | Field | Type | Required | Description |
270
+ |-------|------|----------|-------------|
271
+ | `autoResponseContentType` | Enum | Yes | `MessageDefinition` |
272
+ | `messageDefinitionName` | String | Yes | `DeveloperName` of an existing `ConversationMessageDefinition`. Must already exist in the org — build it with the `conversation-message-definition-builder` skill before deploying this reference (see Cross-Skill Integration in SKILL.md) |
273
+ | `type` | Enum | Yes | `InitialResponse`, `AgentEngagedResponse`, `AgentEndEngagementResponse`, `EndUserInactiveResponse`, `EndUserIdleResponse`, `RerouteResponse`, or `RoutingUnavailableResponse` |
274
+ | `responseTimeoutInMins` | Integer | No | **Only** on `EndUserIdleResponse` and `EndUserInactiveResponse` (range 4-30). Minutes before the idle action fires at which the message is shown (Setup label "Minutes to Show Warning"; Help: "select 4 to show the message 4 minutes before the session inactivates"). On `EndUserIdleResponse` it must be less than `endUserIdleTimeOut` (Setup caps it at `endUserIdleTimeOut` - 1). Rejected on every other type and on `TextResponse` |
275
+
276
+ **Do not include `<language>` or `<response>` on a `MessageDefinition`-shaped block.** The language comes from the referenced CMD's own `<language>` field. Including `<language>` here causes the deploy to fail — with `"unexpected metadata"` for `InitialResponse`/`AgentEngagedResponse`/`AgentEndEngagementResponse`, and with an internal server error for `EndUserInactiveResponse`. Omitting it is the fix, not a schema quirk to work around another way.
277
+
278
+ ```xml
279
+ <!-- TextResponse shape -->
280
+ <automatedResponses>
281
+ <autoResponseContentType>TextResponse</autoResponseContentType>
282
+ <language>en_US</language>
283
+ <response>Text STOP to opt out of further messages.</response>
284
+ <type>HelpResponse</type>
285
+ </automatedResponses>
286
+
287
+ <!-- MessageDefinition shape -->
288
+ <automatedResponses>
289
+ <autoResponseContentType>MessageDefinition</autoResponseContentType>
290
+ <messageDefinitionName>Customer_Inactive_Message</messageDefinitionName>
291
+ <type>EndUserInactiveResponse</type>
292
+ </automatedResponses>
293
+
294
+ <!-- Idle warning with responseTimeoutInMins (only valid on EndUserIdleResponse / EndUserInactiveResponse) -->
295
+ <automatedResponses>
296
+ <autoResponseContentType>MessageDefinition</autoResponseContentType>
297
+ <messageDefinitionName>Idle_Warning_Message</messageDefinitionName>
298
+ <responseTimeoutInMins>4</responseTimeoutInMins>
299
+ <type>EndUserIdleResponse</type>
300
+ </automatedResponses>
301
+ ```
248
302
 
249
303
  ### Response Types
250
304
 
251
- | `type` Value | When Sent |
252
- |-------------|-----------|
253
- | `OptOutConfirmation` | When user opts out of receiving messages |
254
- | `HelpResponse` | When user sends a help keyword |
255
- | `InitialResponse` | Let a customer know that their initial message was received |
256
- | `AgentEngagedResponse` | Let a customer know that their messaging session was accepted by a service rep |
257
- | `AgentEndEngagementResponse` | Let a customer know that their messaging session ended, and optionally provide a post-chat URL. This auto-response is sent when the service rep or end user ends the session |
258
- | `EndUserInactiveResponse` | Let a customer know that their messaging conversation has ended because they stopped responding |
259
- | `EndUserIdleResponse` | When end user idle response |
305
+ | `type` Value | Content Shape | When Sent |
306
+ |-------------|---------------|-----------|
307
+ | `OptOutConfirmation` | `TextResponse` | When user opts out of receiving messages |
308
+ | `HelpResponse` | `TextResponse` | When user sends a help keyword |
309
+ | `InitialResponse` | `MessageDefinition` | Let a customer know that their initial message was received |
310
+ | `AgentEngagedResponse` | `MessageDefinition` | Let a customer know that their messaging session was accepted by a service rep |
311
+ | `AgentEndEngagementResponse` | `MessageDefinition` | Let a customer know that their messaging session ended, and optionally provide a post-chat URL. Sent when the service rep or end user ends the session |
312
+ | `EndUserInactiveResponse` | `MessageDefinition` | Let a customer know that their messaging conversation has ended because they stopped responding |
313
+ | `EndUserIdleResponse` | `MessageDefinition` | Warn a customer that their conversation will be inactivated or ended because they are idle. Set in the Customer Inactivity card ("Warning Message"); `responseTimeoutInMins` is how many minutes before the idle action it is shown |
314
+ | `RerouteResponse` | `MessageDefinition` | Sent when a conversation is rerouted to a different queue or agent ("Reroute Conversation") |
315
+ | `RoutingUnavailableResponse` | `MessageDefinition` | Sent when no routing target is available ("Routing Unavailable") |
316
+
317
+ Only `OptOutConfirmation` and `HelpResponse` use the `TextResponse` shape; every other type is `MessageDefinition`-only. `OptIn*` and `CustomResponse` types are not used for EmbeddedMessaging channels.
260
318
 
261
319
  ### XML Escaping
262
320
 
263
- Special characters in `response` must be XML-escaped:
321
+ Special characters in a `TextResponse` block's `response` must be XML-escaped:
264
322
  - `'` → `&apos;`
265
323
  - `"` → `&quot;`
266
324
  - `&` → `&amp;`
@@ -303,3 +361,41 @@ Repeatable element — keyword groups that trigger automated responses. Each key
303
361
  <language>en_US</language>
304
362
  </messagingKeywords>
305
363
  ```
364
+
365
+ ---
366
+
367
+ ## Setup Prompts: Session Inactivity
368
+
369
+ Ask using the Setup labels (Customer Inactivity card), with the field in parentheses:
370
+
371
+ - "Inactivate or end a session after a period of customer inactivity?" If yes, "Minutes to Inactivate Session / End Session?" (`endUserIdleTimeOut`, 5-30).
372
+ - "Choose action when customer is idle": **Inactivate Session** (`Inactivate`), **End Session** (`End`), or **Inactivate & End Session** (`InactivateAndEnd`) (`endUserIdleAction` — no other values). **Validate before editing or deploying:** if the user names any other value (e.g. `EndChatSession`, "close", "terminate"), do not write it; say it is not an option, list the three, and ask which one. Never deploy to see whether it is accepted. For Inactivate & End Session also ask "Minutes to End Session After Inactivation?" (`endInactiveSessionTimeOut`, 5-30).
373
+ - "Should rep messages reset the customer's inactivity timer?" (`isAgentMessageResetInactivityEnabled`; needs `endUserIdleTimeOut`).
374
+ - Optional idle warning: the **Warning Message** prompt under Automated Responses below.
375
+
376
+ Set all of these as **top-level fields, siblings of `<embeddedConfig>`** (not nested inside it). MIAW (EmbeddedMessaging) only.
377
+
378
+ Checks:
379
+ - [ ] `endUserIdleAction`/`endInactiveSessionTimeOut` are top-level siblings of `<embeddedConfig>`, not nested inside it.
380
+ - [ ] `endUserIdleAction` is one of `Inactivate`, `End`, `InactivateAndEnd`, checked before the file is edited (free text such as `EndChatSession` fails with "not a valid value for the enum").
381
+ - [ ] `endUserIdleTimeOut` is in range 5-30.
382
+
383
+ ## Setup Prompts: Automated Responses
384
+
385
+ Ask which messages the user wants, using the Setup labels (Automated Responses card), with the `type` in parentheses. Two content shapes, chosen by `type`:
386
+
387
+ - Consent text — **Opt-Out Confirmation** (`OptOutConfirmation`) and **Help Response** (`HelpResponse`): `TextResponse` shape; generate elements with `autoResponseContentType: TextResponse`, `language`, and XML-escaped `response` text.
388
+ - Messaging Components — `MessageDefinition` shape; the referenced `ConversationMessageDefinition` must exist first. If it doesn't, delegate to `conversation-message-definition-builder` to create it, then generate the element with `autoResponseContentType: MessageDefinition` and `messageDefinitionName` (no `language`, no `response`):
389
+ - **Conversation Acknowledgement** (`InitialResponse`), **Start Conversation** (`AgentEngagedResponse`), **End Conversation** (`AgentEndEngagementResponse`), **Inactive Conversation** (`EndUserInactiveResponse`), **Reroute Conversation** (`RerouteResponse`), **Routing Unavailable** (`RoutingUnavailableResponse`).
390
+ - **Warning Message** (`EndUserIdleResponse`) — the idle warning; ask "How many minutes before the session inactivates/ends should the warning show?" (Setup: "Minutes to Show Warning"; `responseTimeoutInMins`, 4-30, less than `endUserIdleTimeOut`). `responseTimeoutInMins` is allowed only on `EndUserIdleResponse` and `EndUserInactiveResponse`.
391
+
392
+ Offer **every** type above (nine in all), never a subset. A question tool that allows only four options means asking in several rounds; do not merge types into buckets or drop any. If the user says only "automated responses", ask round by round until each type is accepted or declined. Ask for the `TextResponse` wording (Opt-Out, Help) instead of inventing it. Create any missing component by **invoking the `conversation-message-definition-builder` skill** (Skill tool) and deploying what it produces. Never write, copy, or adapt a `ConversationMessageDefinition` by hand, including by copying the shape of an existing one: the builder owns the required layout, `AutoResponse` type, and `Title` constant. If the builder skill is not available, stop and tell the user; do not fall back to hand-writing.
393
+
394
+ When adding to an existing channel, retrieve it first and keep **one** `automatedResponses` block per `type`. A second block of the same type fails the deploy with `duplicate value found: MessagingChannelId`; the cause is the duplicate block, not the component.
395
+
396
+ Checks:
397
+ - [ ] Every type was offered, and each answer (accepted or declined) was recorded.
398
+ - [ ] `OptOutConfirmation`/`HelpResponse`: `TextResponse` shape with `language` + `response`, special characters XML-escaped.
399
+ - [ ] Every other type: `MessageDefinition` shape with `messageDefinitionName` set and `language`/`response` both absent.
400
+ - [ ] `messageDefinitionName` references a `ConversationMessageDefinition` that already exists in the org (otherwise: "reference not found" — build it with `conversation-message-definition-builder` first).
401
+ - [ ] `responseTimeoutInMins` (4-30) appears only on `EndUserIdleResponse`/`EndUserInactiveResponse`, and on `EndUserIdleResponse` is less than `endUserIdleTimeOut`.