@salesforce/afv-skills 1.65.1 → 1.67.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 (71) hide show
  1. package/package.json +2 -4
  2. package/skills/agentforce-offline-experimentation-run/SKILL.md +29 -43
  3. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +3 -245
  4. package/skills/commerce-react-storefront-create/SKILL.md +350 -0
  5. package/skills/consumer-goods-promotion-bo-api-deploy/SKILL.md +2 -2
  6. package/skills/consumer-goods-promotion-bo-api-deploy/references/generate-and-wire.md +28 -16
  7. package/skills/consumer-goods-promotion-bo-api-deploy/references/smoke-and-verify.md +18 -1
  8. package/skills/dx-devops-work-item-manage/SKILL.md +34 -17
  9. package/skills/dx-devops-work-item-manage/examples/common-workflows.md +49 -0
  10. package/skills/dx-devops-work-item-manage/references/commit-api.md +116 -0
  11. package/skills/education-cloud-domain-configure/SKILL.md +21 -23
  12. package/skills/education-cloud-domain-configure/references/dependent-features.md +9 -0
  13. package/skills/education-cloud-domain-configure/references/domain-features.md +15 -0
  14. package/skills/education-cloud-domain-configure/references/gotchas-extended.md +8 -0
  15. package/skills/education-cloud-domain-configure/references/setup-widgets.md +123 -0
  16. package/skills/experience-lwc-widget-assess/SKILL.md +79 -0
  17. package/skills/experience-lwc-widget-migrate/SKILL.md +50 -0
  18. package/skills/experience-search-coordinate/SKILL.md +2 -2
  19. package/skills/experience-search-coordinate/references/media-route.md +30 -4
  20. package/skills/experience-ui-bundle-features-generate/SKILL.md +1 -1
  21. package/skills/experience-ui-bundle-mfa-configure/SKILL.md +1 -1
  22. package/skills/platform-metadata-deploy/README.md +1 -1
  23. package/skills/platform-metadata-deploy/SKILL.md +114 -15
  24. package/skills/platform-metadata-deploy/references/agent-deployment-guide.md +3 -4
  25. package/skills/platform-metadata-deploy/references/orchestration.md +2 -3
  26. package/skills/platform-role-hierarchy-apply/SKILL.md +177 -0
  27. package/skills/platform-value-set-generate/SKILL.md +19 -19
  28. package/skills/platform-widget-generate/SKILL.md +59 -68
  29. package/skills/platform-widget-generate/examples/formulas.json +19 -2
  30. package/skills/platform-widget-generate/examples/localized-labels.json +57 -0
  31. package/skills/platform-widget-generate/references/widget-actions.md +29 -0
  32. package/skills/platform-widget-generate/references/widget-bundle-validation.md +15 -0
  33. package/skills/platform-widget-generate/references/widget-formulas.md +24 -7
  34. package/skills/platform-widget-generate/references/widget-gotchas.md +10 -0
  35. package/skills/platform-widget-generate/references/widget-labels.md +78 -0
  36. package/skills/platform-widget-generate/references/widget-styling.md +12 -0
  37. package/skills/sales-call-scoring-configure/SKILL.md +17 -10
  38. package/skills/sales-call-scoring-configure/scripts/enable-call-scoring.sh +55 -33
  39. package/skills/service-agentforce-contact-center-coordinate/SKILL.md +1 -1
  40. package/skills/service-agentforce-contact-center-coordinate/references/number_management_api.md +11 -1
  41. package/skills/service-agentforce-contact-center-coordinate/scripts/fetch-numbers.sh +12 -6
  42. package/skills/service-agentforce-contact-center-coordinate/scripts/lib.sh +16 -0
  43. package/skills/service-agentforce-contact-center-coordinate/scripts/procure-number.sh +2 -1
  44. package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +24 -11
  45. package/skills/service-digital-engagement-channel-configure/SKILL.md +29 -16
  46. package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +13 -2
  47. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +143 -0
  48. package/skills/service-digital-engagement-deployment-configure/SKILL.md +65 -79
  49. package/skills/service-digital-engagement-deployment-configure/assets/esd_web_update_template.xml +83 -8
  50. package/skills/service-digital-engagement-deployment-configure/examples/esd_web_prechat_fields.xml +74 -0
  51. package/skills/service-digital-engagement-deployment-configure/references/connect_api_creation.md +26 -7
  52. package/skills/service-digital-engagement-deployment-configure/references/deployment_settings.md +13 -78
  53. package/skills/service-digital-engagement-deployment-configure/references/onboarding_contract.md +145 -0
  54. package/skills/service-digital-engagement-deployment-configure/references/prechat_forms.md +245 -0
  55. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +166 -112
  56. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +61 -37
  57. package/skills/service-itsm-agentic-setup-incident-management/references/audit-tracking.md +42 -0
  58. package/skills/service-itsm-agentic-setup-incident-management/references/broadcast-communications.md +23 -0
  59. package/skills/service-itsm-agentic-setup-incident-management/references/email-to-incident.md +23 -0
  60. package/skills/service-itsm-agentic-setup-incident-management/references/incident-dashboards.md +25 -0
  61. package/skills/service-itsm-agentic-setup-incident-management/references/incident-persona-psg.md +30 -145
  62. package/skills/service-itsm-agentic-setup-incident-management/references/incident-preferences.md +32 -137
  63. package/skills/service-itsm-agentic-setup-incident-management/references/major-incident-management.md +32 -155
  64. package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +45 -0
  65. package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +32 -0
  66. package/skills/service-itsm-agentic-setup-incident-management/references/service-mgmt-privilege.md +30 -140
  67. package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +110 -0
  68. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +34 -25
  69. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +1 -1
  70. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +90 -86
  71. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/workflow.md +63 -38
@@ -3,25 +3,98 @@
3
3
  <areGuestUsersAllowed>false</areGuestUsersAllowed>
4
4
 
5
5
  <!-- Branding (optional — reference an existing BrandingSet) -->
6
- <!-- <branding>{BRANDING_SET_NAME}</branding> -->
6
+ <!-- To set branding, add a branding element whose value is {BRANDING_SET_NAME} -->
7
7
 
8
8
  <deploymentFeature>EmbeddedMessaging</deploymentFeature>
9
9
  <deploymentType>{Web|API|Mobile}</deploymentType>
10
10
 
11
+ <!-- Pre-Chat Form (OPTIONAL) -->
12
+ <!-- Pre-chat is OFF by default. DELETE this entire block if the deployment
13
+ collects no pre-chat data (that is the correct default).
14
+ Each formField must resolve to a standard parameter (_-prefixed) OR an
15
+ existing customParameter on the channel below. ChoiceList fields also need
16
+ a choiceList record that ALREADY EXISTS in the org (created in Setup —
17
+ it is not a deployable artifact). -->
18
+ <embeddedServiceForms>
19
+ <displayContext>Conversation</displayContext>
20
+
21
+ <!-- 1. Standard field -->
22
+ <embeddedServiceFormFields>
23
+ <displayOrder>0</displayOrder>
24
+ <formField>_FirstName</formField>
25
+ <formFieldType>Text</formFieldType>
26
+ <isHidden>false</isHidden>
27
+ <isRequired>true</isRequired>
28
+ <messagingChannelParameterType>Standard</messagingChannelParameterType>
29
+ </embeddedServiceFormFields>
30
+
31
+ <!-- 2. Visible custom text field (formField = an existing channel customParameter name) -->
32
+ <embeddedServiceFormFields>
33
+ <displayOrder>1</displayOrder>
34
+ <formField>{CUSTOM_PARAM_NAME}</formField>
35
+ <formFieldType>Text</formFieldType>
36
+ <isHidden>false</isHidden>
37
+ <isRequired>false</isRequired>
38
+ <messagingChannelParameterType>Custom</messagingChannelParameterType>
39
+ </embeddedServiceFormFields>
40
+
41
+ <!-- 3. Checkbox custom field -->
42
+ <embeddedServiceFormFields>
43
+ <displayOrder>2</displayOrder>
44
+ <formField>{CHECKBOX_PARAM_NAME}</formField>
45
+ <formFieldType>Checkbox</formFieldType>
46
+ <isHidden>false</isHidden>
47
+ <isRequired>false</isRequired>
48
+ <messagingChannelParameterType>Custom</messagingChannelParameterType>
49
+ </embeddedServiceFormFields>
50
+
51
+ <!-- 4. ChoiceList (dropdown) field — choiceList DeveloperName must already exist in the org -->
52
+ <embeddedServiceFormFields>
53
+ <choiceList>{CHOICELIST_DEVELOPER_NAME}</choiceList>
54
+ <displayOrder>3</displayOrder>
55
+ <formField>{CHOICELIST_PARAM_NAME}</formField>
56
+ <formFieldType>ChoiceList</formFieldType>
57
+ <isHidden>false</isHidden>
58
+ <isRequired>true</isRequired>
59
+ <messagingChannelParameterType>Custom</messagingChannelParameterType>
60
+ </embeddedServiceFormFields>
61
+
62
+ <!-- 5. Hidden / pre-populated field — displayOrder=-1, value captured but never shown -->
63
+ <embeddedServiceFormFields>
64
+ <displayOrder>-1</displayOrder>
65
+ <formField>{HIDDEN_PARAM_NAME}</formField>
66
+ <formFieldType>Text</formFieldType>
67
+ <isHidden>true</isHidden>
68
+ <isRequired>false</isRequired>
69
+ <messagingChannelParameterType>Custom</messagingChannelParameterType>
70
+ </embeddedServiceFormFields>
71
+
72
+ <isActive>true</isActive>
73
+ </embeddedServiceForms>
74
+
11
75
  <!-- Messaging Channel Configuration -->
12
76
  <embeddedServiceMessagingChannel>
77
+ <!-- Display name shown when pre-chat is enabled (OPTIONAL — delete this line if unused).
78
+ EXACTLY 3 brace tokens; leave unused slots EMPTY, e.g. {_firstName}{_lastName}{}.
79
+ Each non-empty token = a pre-chat field's externalParameterName (Channel Variable Name),
80
+ NOT the formField value. Standard: _firstName / _lastName / _email / _subject
81
+ (lowercase-first — the _FirstName formField spelling is REJECTED).
82
+ Custom: the channel param's externalParameterName (usually its name, e.g. CompanyName). -->
83
+ <displayNameFormat>{DISPLAY_NAME_FORMAT}</displayNameFormat>
13
84
  <isChatInvitationCustomizable>{true|false}</isChatInvitationCustomizable>
14
85
  <isEnabled>true</isEnabled>
15
86
  <isInvitationEnabled>{true|false}</isInvitationEnabled>
16
87
  <isSendInvtAllowedAfterAccept>{true|false}</isSendInvtAllowedAfterAccept>
17
88
  <isSendInvtAllowedAfterReject>{true|false}</isSendInvtAllowedAfterReject>
18
89
  <messagingChannel>{CHANNEL_PLATFORM_KEY}</messagingChannel>
19
- <shouldShowAgentforceTagline>{true|false}</shouldShowAgentforceTagline>
20
- <shouldShowDeliveryReceipts>{true|false}</shouldShowDeliveryReceipts>
21
- <shouldShowEmojiSelection>{true|false}</shouldShowEmojiSelection>
22
- <shouldShowReadReceipts>{true|false}</shouldShowReadReceipts>
23
- <shouldShowTypingIndicators>{true|false}</shouldShowTypingIndicators>
24
- <shouldStartNewLineOnEnter>{true|false}</shouldStartNewLineOnEnter>
90
+ <!-- shouldShow* / shouldStartNewLineOnEnter below: keep the retrieved value on update; with nothing retrieved, leave at the default false.
91
+ Set true only if the user explicitly asks for that feature. -->
92
+ <shouldShowAgentforceTagline>false</shouldShowAgentforceTagline>
93
+ <shouldShowDeliveryReceipts>false</shouldShowDeliveryReceipts>
94
+ <shouldShowEmojiSelection>false</shouldShowEmojiSelection>
95
+ <shouldShowReadReceipts>false</shouldShowReadReceipts>
96
+ <shouldShowTypingIndicators>false</shouldShowTypingIndicators>
97
+ <shouldStartNewLineOnEnter>false</shouldStartNewLineOnEnter>
25
98
  </embeddedServiceMessagingChannel>
26
99
 
27
100
  <isEnabled>true</isEnabled>
@@ -29,5 +102,7 @@
29
102
  <isTermsAndConditionsRequired>{true|false}</isTermsAndConditionsRequired>
30
103
  <masterLabel>{DEPLOYMENT_NAME}</masterLabel>
31
104
  <shouldHideAuthDialog>false</shouldHideAuthDialog>
32
- <!-- Do NOT update <site> — auto-generated at creation, must not be modified -->
105
+ <!-- Web only: copy the site value UNCHANGED from the retrieved config (required for Web, can never be
106
+ changed). Omit this element entirely for Mobile/API deployments. -->
107
+ <site>{EXISTING_SITE_NAME}</site>
33
108
  </EmbeddedServiceConfig>
@@ -0,0 +1,74 @@
1
+ <!--
2
+ Pre-chat forms delta. This is NOT a standalone deployable file; graft it onto a base
3
+ Web deployment (see esd_web_full.xml for everything else: branding, site, etc.). Two pieces:
4
+ 1. embeddedServiceForms goes directly under EmbeddedServiceConfig.
5
+ 2. displayNameFormat goes INSIDE the existing embeddedServiceMessagingChannel (not
6
+ directly under EmbeddedServiceConfig). Merge it into that element if the base file
7
+ already has one; do not add a second embeddedServiceMessagingChannel.
8
+ -->
9
+ <embeddedServiceForms>
10
+ <displayContext>Conversation</displayContext>
11
+ <embeddedServiceFormFields>
12
+ <displayOrder>0</displayOrder>
13
+ <formField>_FirstName</formField>
14
+ <formFieldType>Text</formFieldType>
15
+ <isHidden>false</isHidden>
16
+ <isRequired>true</isRequired>
17
+ <messagingChannelParameterType>Standard</messagingChannelParameterType>
18
+ </embeddedServiceFormFields>
19
+ <embeddedServiceFormFields>
20
+ <displayOrder>1</displayOrder>
21
+ <formField>_LastName</formField>
22
+ <formFieldType>Text</formFieldType>
23
+ <isHidden>false</isHidden>
24
+ <isRequired>true</isRequired>
25
+ <messagingChannelParameterType>Standard</messagingChannelParameterType>
26
+ </embeddedServiceFormFields>
27
+ <embeddedServiceFormFields>
28
+ <displayOrder>2</displayOrder>
29
+ <formField>_Email</formField>
30
+ <formFieldType>Email</formFieldType>
31
+ <isHidden>false</isHidden>
32
+ <isRequired>true</isRequired>
33
+ <messagingChannelParameterType>Standard</messagingChannelParameterType>
34
+ </embeddedServiceFormFields>
35
+ <embeddedServiceFormFields>
36
+ <displayOrder>3</displayOrder>
37
+ <formField>CompanyName</formField>
38
+ <formFieldType>Text</formFieldType>
39
+ <isHidden>false</isHidden>
40
+ <isRequired>false</isRequired>
41
+ <messagingChannelParameterType>Custom</messagingChannelParameterType>
42
+ </embeddedServiceFormFields>
43
+ <embeddedServiceFormFields>
44
+ <displayOrder>4</displayOrder>
45
+ <formField>NewsletterOptIn</formField>
46
+ <formFieldType>Checkbox</formFieldType>
47
+ <isHidden>false</isHidden>
48
+ <isRequired>false</isRequired>
49
+ <messagingChannelParameterType>Custom</messagingChannelParameterType>
50
+ </embeddedServiceFormFields>
51
+ <embeddedServiceFormFields>
52
+ <choiceList>Customer_Inquiry_Type</choiceList>
53
+ <displayOrder>5</displayOrder>
54
+ <formField>InquiryType</formField>
55
+ <formFieldType>ChoiceList</formFieldType>
56
+ <isHidden>false</isHidden>
57
+ <isRequired>true</isRequired>
58
+ <messagingChannelParameterType>Custom</messagingChannelParameterType>
59
+ </embeddedServiceFormFields>
60
+ <embeddedServiceFormFields>
61
+ <displayOrder>-1</displayOrder>
62
+ <formField>utm_campaign</formField>
63
+ <formFieldType>Text</formFieldType>
64
+ <isHidden>true</isHidden>
65
+ <isRequired>false</isRequired>
66
+ <messagingChannelParameterType>Custom</messagingChannelParameterType>
67
+ </embeddedServiceFormFields>
68
+ <isActive>true</isActive>
69
+ </embeddedServiceForms>
70
+ <!-- displayNameFormat tokens use each field's externalParameterName (e.g. _firstName),
71
+ NOT the formField spelling above (e.g. _FirstName). -->
72
+ <embeddedServiceMessagingChannel>
73
+ <displayNameFormat>{_firstName}{_lastName}{}</displayNameFormat>
74
+ </embeddedServiceMessagingChannel>
@@ -15,9 +15,11 @@ Web-type Embedded Service Deployments cannot be created via Metadata API due to
15
15
  ## Connect API Endpoint
16
16
 
17
17
  ```text
18
- POST /connect/embeddedmessaging/deployment/setup
18
+ POST /services/data/vXX.0/connect/embeddedmessaging/deployment/setup
19
19
  ```
20
20
 
21
+ Always use the fully-qualified path (minimum `v67.0`). A bare `/connect/...` path is not routed.
22
+
21
23
  ### Request Body (Web)
22
24
 
23
25
  ```json
@@ -55,10 +57,13 @@ POST /connect/embeddedmessaging/deployment/setup
55
57
 
56
58
  ### Using Salesforce CLI (Web)
57
59
 
60
+ Always create Web deployments with the CLI. The same call through the headless-360 MCP `dispatch` fails with an
61
+ `INTERNAL_ERROR` server error during site creation.
62
+
58
63
  ```bash
59
64
  sf api request rest \
65
+ "/services/data/v67.0/connect/embeddedmessaging/deployment/setup" \
60
66
  --method POST \
61
- --url "/connect/embeddedmessaging/deployment/setup" \
62
67
  --body '{"name":"<NAME>","masterLabel":"<LABEL>","deploymentType":"Web","clientVersion":"WebV2","hostDomain":"<DOMAIN>","messagingChannelId":"<CHANNEL_ID>"}' \
63
68
  --target-org <org-alias>
64
69
  ```
@@ -67,8 +72,8 @@ sf api request rest \
67
72
 
68
73
  ```bash
69
74
  sf api request rest \
75
+ "/services/data/v67.0/connect/embeddedmessaging/deployment/setup" \
70
76
  --method POST \
71
- --url "/connect/embeddedmessaging/deployment/setup" \
72
77
  --body '{"name":"<NAME>","masterLabel":"<LABEL>","deploymentType":"API","messagingChannelId":"<CHANNEL_ID>"}' \
73
78
  --target-org <org-alias>
74
79
  ```
@@ -114,22 +119,36 @@ Save the `embeddedServiceDeploymentId` — it identifies the deployment for subs
114
119
  After creating the Web ESD via Connect API:
115
120
 
116
121
  1. **Update via Metadata API** — deploy `EmbeddedServiceConfig` XML with full configuration (forms, branding, channel settings, T&C)
117
- 2. **Publish** — make changes live via Connect API publish endpoint
122
+ 2. **Publish** — see below
118
123
 
119
124
  ---
120
125
 
121
126
  ## Publishing After Updates
122
127
 
123
- After any update to a Web ESD (branding, forms, labels, settings), publish to make changes live:
128
+ Updates to a Web ESD (branding, forms, labels, settings) stay in draft until published. Publish only after the user approves (SKILL.md step 17c):
124
129
 
125
130
  ```text
126
- POST /connect/embeddedservice/embeddedserviceconfig/publish/<EMBEDDED_SERVICE_CONFIG_ID>
131
+ POST /services/data/vXX.0/connect/embeddedservice/embeddedserviceconfig/publish/<EMBEDDED_SERVICE_CONFIG_ID>
127
132
  ```
128
133
 
129
134
  ```bash
130
135
  sf api request rest \
131
- /services/data/v67.0/connect/embeddedservice/embeddedserviceconfig/publish/<EMBEDDED_SERVICE_CONFIG_ID> \
136
+ "/services/data/v67.0/connect/embeddedservice/embeddedserviceconfig/publish/<EMBEDDED_SERVICE_CONFIG_ID>" \
132
137
  --method POST \
138
+ --body '{}' \
139
+ --target-org <org-alias>
140
+ ```
141
+
142
+ The `--body '{}'` is required: a POST with no body (or `--body ""`) fails in the CLI with
143
+ "No 'mode' found in 'body' entry" before any request is sent. The URL is a positional
144
+ argument, not a flag (`--url` fails with "Nonexistent flag"), and must be fully qualified
145
+ (`/services/data/vXX.0/connect/...`).
146
+
147
+ To obtain the `EMBEDDED_SERVICE_CONFIG_ID` (a Tooling API object, so `--use-tooling-api` is required):
148
+
149
+ ```bash
150
+ sf data query --use-tooling-api \
151
+ --query "SELECT Id FROM EmbeddedServiceConfig WHERE DeveloperName = '<DEPLOYMENT_NAME>'" \
133
152
  --target-org <org-alias>
134
153
  ```
135
154
 
@@ -40,7 +40,7 @@ Links the deployment to a messaging channel and configures widget behavior. All
40
40
  |-------|------|---------|-------------|
41
41
  | `messagingChannel` | String | — | **Required.** Channel `channelPlatformKey` |
42
42
  | `businessHours` | String | — | BusinessHours `businessHoursName` |
43
- | `displayNameFormat` | String | — | Display name if pre-chat is enabled |
43
+ | `displayNameFormat` | String | — | Display name shown when pre-chat is enabled. **Exactly 3 brace tokens** (empty for unused, e.g. `{_firstName}{_lastName}{}`); each token = a pre-chat field's `externalParameterName`, **not** its `formField`. See `references/prechat_forms.md` → displayNameFormat Rules |
44
44
  | `formula` | String | — | Condition logic expression referencing `sequence` numbers from `<embdMsgChannelInvitationConditions>` (e.g., `1 AND 2`, `1 OR 2 OR 3`). Required when `isInvitationEnabled` is `true`. Must be updated whenever conditions are added or removed |
45
45
  | `isChatInvitationCustomizable` | Boolean | `false` | **Required.** Allow customizing chat invitation. Can only be `true` for Web deployments; must be `false` for API/Mobile |
46
46
  | `isEnabled` | Boolean | `true` | **Required.** Whether messaging is enabled on this deployment |
@@ -56,84 +56,9 @@ Links the deployment to a messaging channel and configures widget behavior. All
56
56
 
57
57
  ---
58
58
 
59
- ## Pre-Chat Forms (`<embeddedServiceForms>`)
59
+ ## Pre-Chat Forms (`<embeddedServiceForms>`) and `displayNameFormat`
60
60
 
61
- Collects information from users before conversation starts. Applicable to all deployment types.
62
-
63
- ### Form Structure
64
-
65
- | Field | Type | Required | Description |
66
- |-------|------|----------|-------------|
67
- | `displayContext` | Enum | Yes | `Conversation` or `Session` |
68
- | `isActive` | Boolean | Yes | Whether the form is active |
69
- | `embeddedServiceFormFields` | Repeatable | Yes | Individual form fields (see below) |
70
-
71
- ### Form Field Structure (`<embeddedServiceFormFields>`)
72
-
73
- | Field | Type | Required | Description |
74
- |-------|------|----------|-------------|
75
- | `displayOrder` | Integer | Yes | 0-based display position |
76
- | `formField` | String | Yes | Parameter name — use `_` prefix for standard fields (e.g., `_FirstName`), exact `name` for custom fields |
77
- | `formFieldType` | Enum | Yes | `Text`, `Email`, `Phone`, `Number` |
78
- | `isHidden` | Boolean | Yes | Whether field is hidden from user (still collected) |
79
- | `isRequired` | Boolean | Yes | Whether field must be filled |
80
- | `messagingChannelParameterType` | Enum | Yes | `Standard` or `Custom` |
81
-
82
- ### Example
83
-
84
- ```xml
85
- <embeddedServiceForms>
86
- <displayContext>Conversation</displayContext>
87
- <embeddedServiceFormFields>
88
- <displayOrder>0</displayOrder>
89
- <formField>_FirstName</formField>
90
- <formFieldType>Text</formFieldType>
91
- <isHidden>false</isHidden>
92
- <isRequired>true</isRequired>
93
- <messagingChannelParameterType>Standard</messagingChannelParameterType>
94
- </embeddedServiceFormFields>
95
- <embeddedServiceFormFields>
96
- <displayOrder>1</displayOrder>
97
- <formField>_Email</formField>
98
- <formFieldType>Email</formFieldType>
99
- <isHidden>false</isHidden>
100
- <isRequired>true</isRequired>
101
- <messagingChannelParameterType>Standard</messagingChannelParameterType>
102
- </embeddedServiceFormFields>
103
- <embeddedServiceFormFields>
104
- <displayOrder>2</displayOrder>
105
- <formField>CompanyName</formField>
106
- <formFieldType>Text</formFieldType>
107
- <isHidden>false</isHidden>
108
- <isRequired>false</isRequired>
109
- <messagingChannelParameterType>Custom</messagingChannelParameterType>
110
- </embeddedServiceFormFields>
111
- <isActive>true</isActive>
112
- </embeddedServiceForms>
113
- ```
114
-
115
- ### Standard Pre-Chat Fields
116
-
117
- Standard fields use a `_` prefix in the `formField` value:
118
-
119
- | `formField` Value | Maps to `parameterType` | Typical Usage |
120
- |-------------------|------------------------|---------------|
121
- | `_FirstName` | `FirstName` | User identification |
122
- | `_LastName` | `LastName` | User identification |
123
- | `_Email` | `Email` | Follow-up and case creation |
124
- | `_Subject` | `Subject` | Routing context |
125
-
126
- ### Custom Pre-Chat Fields
127
-
128
- Custom fields use the exact `name` value from the channel's `customParameters` (no prefix). Custom fields must first be configured as `customParameters` on the messaging channel (via `service-digital-engagement-channel-configure`) before they can be referenced in the ESD form.
129
-
130
- ### ChoiceList (Dropdown) Fields
131
-
132
- ChoiceList fields require a two-step deployment:
133
- 1. Create the `ChoiceList` metadata record
134
- 2. Assign it to the form field in the ESD
135
-
136
- The ChoiceList field must reference a custom parameter `name` on the messaging channel.
61
+ Pre-chat is OFF by default. Form and field structure, hidden fields, the channel coupling and Omni-Flow routing prerequisites, ChoiceList (dropdown) fields, deactivating vs. removing fields, `displayNameFormat` rules, and pre-chat gotchas are all in `references/prechat_forms.md`.
137
62
 
138
63
  ---
139
64
 
@@ -191,3 +116,13 @@ Available since API v58.0. Repeatable. Configures conditions under which the mes
191
116
  | Create BrandingSet | No (auto-created by Connect API) | No | Yes |
192
117
  | Update BrandingSet properties | No | Yes | No |
193
118
  | Publish ESD | No | No | Yes |
119
+
120
+ ---
121
+
122
+ ## Less Common Gotchas
123
+
124
+ | Issue | Resolution |
125
+ |-------|------------|
126
+ | `embeddedServiceFlowConfig.enabled` error | Set to `false` unless you specifically need embedded flows (not routing flows) |
127
+ | reCAPTCHA configuration rejected | reCAPTCHA is `@HideInWsdl` — must use Tooling API |
128
+ | Business hours not taking effect | Only updating existing business hours works; creation is managed separately |
@@ -0,0 +1,145 @@
1
+ # Onboarding contract — delegated mode, transport, pre-scan, registration
2
+
3
+ Read this when the invocation carries a `context` object, when you are about to write to the org, or when the
4
+ skill is being registered in an onboarding module. It implements the Feature Setup Skill Guidelines (Conversational
5
+ Onboarding, Service Cloud) for this skill.
6
+
7
+ ## 1. Two entry points, one write procedure
8
+
9
+ | | Delegated | Standalone |
10
+ |---|---|---|
11
+ | Detected by | invocation has `context.calledFrom == "service-onboarding"` | no `context` object |
12
+ | Values come from | `values` in the payload — already approved in the plan table | you ask, using the defaults in SKILL.md |
13
+ | Questions | none. A missing required key is a caller bug: stop and report `failed` naming the key. Never default a value the admin did not approve | the Clarifying Questions in SKILL.md |
14
+ | Wording | `discoveryMode == "guided"` → plain business language (§4). `"pickAreas"` → Salesforce terminology | Salesforce terminology (the Clarifying Questions as written) |
15
+ | Ends with | the structured result in section 5 | a plain-language summary of the same outcome |
16
+
17
+ Both paths converge on the same pre-scan → write → validate procedure. The only difference is where values come from.
18
+
19
+ Delegated payload:
20
+
21
+ ```json
22
+ {
23
+ "values": {
24
+ "operation": "create",
25
+ "deploymentType": "Web",
26
+ "deploymentName": "Acme Support Chat",
27
+ "channelName": "Acme_Support_Channel",
28
+ "siteName": "ESW_AcmeSupport_1700000000000"
29
+ },
30
+ "context": { "calledFrom": "service-onboarding", "discoveryMode": "guided" }
31
+ }
32
+ ```
33
+
34
+ Required `values`: `deploymentName`, `deploymentType`, `channelName`. `deploymentName` is the label; the API name is
35
+ derived from it (SKILL.md Required Inputs: `Acme Support Chat` → `Acme_Support_Chat`). `operation` defaults to `create` when the pre-scan
36
+ finds nothing and `update` when it finds a deployment. `siteName` is required for Web updates. Optional feature keys
37
+ (pre-chat fields, business hours, T&C, branding) are applied only when present — do not invent them.
38
+
39
+ ## 2. Transport — `/headless/metadata` first, `sf` CLI as fallback
40
+
41
+ **Transport A (primary): the headless-360 MCP `dispatch` / `dispatch_readonly` tools** against the synchronous
42
+ Metadata-CRUD route, fully-qualified: `/services/data/vXX.0/headless/metadata/<Type>?type=<Type>&fullName=<Name>`.
43
+
44
+ - `GET` = read (`dispatch_readonly`) → `{type, fullName, xmlRep}`. `POST` = create-only (duplicate → `DUPLICATE_VALUE`).
45
+ `PUT` = update. On writes the body must carry `type`, `fullName` **and** `xmlRep`.
46
+ - Response is synchronous: `{results:[{success, errors[], ...}]}`. HTTP 200 can still be a failure — inner `success` wins.
47
+ - **PUT is not a safe merge for `EmbeddedServiceConfig`.** Child collections survive an omitted block but inline
48
+ complex blocks can be silently cleared. Always GET → modify → PUT the **full** document. Never PUT a minimal payload.
49
+ Re-GET after the PUT and diff, so a dropped block is caught here and not in the widget.
50
+ - Use the same `dispatch` tool for the probe and for the write. `sf api request rest` / `curl` carry the `sf` CLI's
51
+ separate credential, which can be expired while the MCP token is valid — a REST URL called through the CLI is
52
+ **not** Transport A.
53
+
54
+ **Probe per type, per operation — do not infer from another type.** Before the first write run a read-only
55
+ `GET` for `EmbeddedServiceConfig` (and for any other type you are about to touch).
56
+
57
+ | Probe result | Meaning | Action |
58
+ |---|---|---|
59
+ | `xmlRep` returned, or "Metadata not found" style error | type is onboarded | Transport A |
60
+ | `UNSUPPORTED_OPERATION` for the type or verb | not onboarded for that verb | Transport B for that call only |
61
+ | auth / connection error | MCP unavailable | Transport B; say so |
62
+
63
+ **Transport B (fallback): `sf` CLI** — the retrieve/deploy commands already in SKILL.md. Use it only when the probe
64
+ says Transport A is unavailable for that type/verb, never as a convenience.
65
+
66
+ What is not a transport choice:
67
+ - **Web deployment creation is a Connect API call — send it with `sf api request rest`, not `dispatch`.** Through
68
+ `dispatch` it always fails with an `INTERNAL_ERROR` server error while building the ESW site; the same body via the CLI
69
+ succeeds. Do not try `dispatch` first.
70
+ - **Publish is a Connect API call**, sent per SKILL.md step 17c (`dispatch`, `sf api request rest` on a route error).
71
+ - **Tooling API** work (custom labels, branding, reCAPTCHA) is not verified through `dispatch`. Use `sf` CLI.
72
+
73
+ ## 3. Pre-scan (idempotency)
74
+
75
+ Run before any write, both modes. Read `EmbeddedServiceConfig` by `fullName` = the API name derived from `deploymentName` (Transport A GET).
76
+
77
+ | Finding | Outcome |
78
+ |---|---|
79
+ | No such deployment | not set up → create path |
80
+ | Exists, and every targeted field already equals the target (channel link, `isEnabled`, type, and each optional feature supplied) | **already configured** — make no write, return `already-configured` |
81
+ | Exists, some targeted field differs | **drift** — announce each change ("pre-chat form: on → off"), then write. Standalone: ask for a yes first. Delegated: the plan approval covers it |
82
+ | Exists but links a different channel than `channelName` | Standalone: ask before repointing. Delegated: return `failed`, `errorMessage` = "deployment <name> already uses channel <other>" |
83
+
84
+ Standalone, deployment exists: offer exactly three choices — no change / override / add to existing.
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.
88
+
89
+ ## 4. Questions in the admin's language (guided mode)
90
+
91
+ Ask about the outcome, not the Salesforce feature. Keep it to a handful; state the default with each.
92
+
93
+ | Instead of | Ask |
94
+ |---|---|
95
+ | "Which deployment type: API, Mobile or Web?" | "Where will customers chat with you — on your website, in a mobile app, or through your own custom app?" (website=Web, mobile app=Mobile, custom=API) |
96
+ | "Associate which `channelPlatformKey`?" | Not asked. Delegated: comes from the channel step. Standalone: "Which messaging channel should this chat use?" listing existing ones |
97
+ | "Enable pre-chat form fields?" | "Do you want to ask customers for their name and email before the chat starts? (Default: yes — name and email.)" |
98
+ | "Enable `isTermsAndConditionsEnabled`?" | "Do customers need to accept terms before chatting? (Default: no.)" |
99
+ | "Business hours record?" | "Should the chat only be offered during your business hours? (Default: no.)" |
100
+ | "Chat invitation conditions" | Skip in guided mode unless the admin raises it. It is a pickAreas/expert option |
101
+
102
+ ## 5. Result returned to the coordinator
103
+
104
+ ```json
105
+ {
106
+ "status": "success | already-configured | failed",
107
+ "errorMessage": "<empty unless failed>",
108
+ "outputs": {
109
+ "deploymentName": "Acme_Support_Chat",
110
+ "embeddedServiceConfigId": "<id or null>",
111
+ "published": false
112
+ }
113
+ }
114
+ ```
115
+
116
+ `status` and `errorMessage` are the contract. `outputs` is always returned; it is an addition to the documented shape.
117
+ On `failed`: `errorMessage` names the failed step and the platform error; stop; do not retry.
118
+
119
+ ## 6. Registration entry (draft for the onboarding team to place in a module)
120
+
121
+ ```yaml
122
+ - id: messagingDeployment
123
+ title: "Chat widget for your website or app"
124
+ description: "Create the chat widget (embedded messaging deployment) that customers use to start a messaging conversation: where it appears, what it asks before chat starts, and publishing it live."
125
+ delegateSkill: service-digital-engagement-deployment-configure
126
+ dependsOn: [messagingChannel]
127
+ revisionOwner: service-digital-engagement-deployment-configure
128
+ # org perms: confirm exact names with Digital Engagement licensing (not yet confirmed)
129
+ values:
130
+ deploymentType: { from: signal.messagingSurface, default: "Web" }
131
+ deploymentName: { from: signal.messagingWidgetName, default: "<company> Support Chat" }
132
+ channelName: { from: outputs.messagingChannel.channelName }
133
+ writes: "EmbeddedServiceConfig (Metadata CRUD); Web create via Connect API embeddedmessaging/deployment/setup (sf CLI); publish via Connect API; optional BrandingSet / custom labels via Tooling API"
134
+ gating:
135
+ irreversible: false
136
+ note: "Reversible by disabling the deployment (isEnabled=false). Pre-chat form fields can be deactivated but the form cannot be fully deleted."
137
+ validate:
138
+ check: check-messaging-deployment
139
+ passWhen: "GET EmbeddedServiceConfig fullName=<derived API name> returns isEnabled=true and the embeddedServiceMessagingChannel links values.channelName; for Web, publishing is left to the admin after review (published may be false)"
140
+ alternative: "Setup > Embedded Service Deployments > New Deployment > Messaging for In-App and Web; choose the channel, set pre-chat, then Publish."
141
+ ```
142
+
143
+ Open items for the onboarding team: the `signal.*` keys do not exist in `onboarding-state.schema.json` yet
144
+ (`channels` allows only email/web); the coordinator must accept `outputs` and pass `outputs.messagingChannel.channelName`
145
+ to this skill; org perm names are not yet confirmed.