@salesforce/afv-skills 1.6.4 → 1.6.6

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 (19) hide show
  1. package/package.json +3 -3
  2. package/skills/generating-experience-lwr-site/SKILL.md +11 -1
  3. package/skills/generating-experience-lwr-site/docs/update-site-urls.md +100 -0
  4. package/skills/{generating-experience-react-site → generating-ui-bundle-site}/SKILL.md +14 -2
  5. package/skills/{generating-experience-react-site → generating-ui-bundle-site}/docs/configure-metadata-digital-experience.md +4 -2
  6. package/skills/generating-ui-bundle-site/docs/update-site-urls.md +100 -0
  7. package/skills/implementing-ui-bundle-agentforce-conversation-client/SKILL.md +216 -37
  8. package/skills/implementing-ui-bundle-agentforce-conversation-client/references/style-tokens.md +168 -21
  9. package/skills/searching-media/SKILL.md +1 -1
  10. package/skills/using-ui-bundle-salesforce-data/SKILL.md +337 -91
  11. package/skills/using-ui-bundle-salesforce-data/references/mutation-query-generation.md +0 -140
  12. package/skills/using-ui-bundle-salesforce-data/references/query-testing.md +0 -78
  13. package/skills/using-ui-bundle-salesforce-data/references/read-query-generation.md +0 -307
  14. package/skills/using-ui-bundle-salesforce-data/references/schema-introspection.md +0 -53
  15. package/skills/using-ui-bundle-salesforce-data/references/ui-bundle-integration.md +0 -221
  16. /package/skills/{generating-experience-react-site → generating-ui-bundle-site}/docs/configure-metadata-custom-site.md +0 -0
  17. /package/skills/{generating-experience-react-site → generating-ui-bundle-site}/docs/configure-metadata-digital-experience-bundle.md +0 -0
  18. /package/skills/{generating-experience-react-site → generating-ui-bundle-site}/docs/configure-metadata-digital-experience-config.md +0 -0
  19. /package/skills/{generating-experience-react-site → generating-ui-bundle-site}/docs/configure-metadata-network.md +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/afv-skills",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "Salesforce skills for Agentforce Vibes",
5
5
  "license": "CC-BY-NC-4.0",
6
6
  "files": [
@@ -11,8 +11,8 @@
11
11
  "registry": "https://registry.npmjs.org"
12
12
  },
13
13
  "devDependencies": {
14
- "@salesforce/ui-bundle-template-app-react-sample-b2e": "^1.118.1",
15
- "@salesforce/ui-bundle-template-app-react-sample-b2x": "^1.118.1",
14
+ "@salesforce/ui-bundle-template-app-react-sample-b2e": "^1.120.2",
15
+ "@salesforce/ui-bundle-template-app-react-sample-b2x": "^1.120.2",
16
16
  "@salesforce/webapp-template-app-react-sample-b2e-experimental": "^1.117.1",
17
17
  "@salesforce/webapp-template-app-react-sample-b2x-experimental": "^1.117.1",
18
18
  "@types/js-yaml": "^4.0.9",
@@ -102,6 +102,7 @@ Before doing anything, you **MUST ALWAYS** load them first if they match user in
102
102
  - [handle-component-and-region-ids.md](docs/handle-component-and-region-ids.md) - **UUID generation (CRITICAL)** for component and region ids used in views and themeLayout.
103
103
  - [handle-ui-components.md](docs/handle-ui-components.md) - Component discovery, schemas, insertion, configuration
104
104
  - [configure-guest-sharing-rules.md](docs/configure-guest-sharing-rules.md) - **Guest sharing rules** (`sharingGuestRules`) for public sites — use for any request involving "guest sharing rule", "Site Guest User", or sharing object records with unauthenticated visitors
105
+ - [update-site-urls.md](docs/update-site-urls.md) - **Updating site URLs** - URL architecture, workflow for updating `urlPathPrefix` in DigitalExperienceConfig, Network, and CustomSite
105
106
 
106
107
  ## Common Workflows
107
108
 
@@ -211,6 +212,15 @@ The site developer name can be found in the CustomSite filename (e.g., `sites/My
211
212
 
212
213
  If the site is not found, an error message will be returned indicating that the site may not be deployed. Ensure the site has been successfully deployed before calling this action.
213
214
 
215
+ ### Updating Experience Site URLs
216
+
217
+ **Use when** user wants to update or change site URLs (urlPathPrefix).
218
+
219
+ **Steps** (Follow the steps sequentially. Do not skip any step before proceeding):
220
+
221
+ - [ ] MUST read [update-site-urls.md](docs/update-site-urls.md) to understand the three-component architecture and URL update workflow
222
+ - [ ] Follow the step-by-step workflow in the doc to update URLs consistently across all three components (DigitalExperienceConfig, Network, CustomSite)
223
+
214
224
  ### Validation & Deployment
215
225
 
216
226
  Use `sf` CLI to validate and deploy. Access help docs by attaching `--help`, e.g.:
@@ -230,4 +240,4 @@ sf project deploy validate --metadata DigitalExperienceBundle DigitalExperience
230
240
 
231
241
  ```bash
232
242
  sf project deploy start --metadata DigitalExperienceBundle DigitalExperience DigitalExperienceConfig Network CustomSite --target-org ${usernameOrAlias}
233
- ```
243
+ ```
@@ -0,0 +1,100 @@
1
+ # Updating Experience Site URLs
2
+
3
+ Experience sites have a three-component architecture with two distinct URL patterns. Understanding this structure is critical when updating site URLs.
4
+
5
+ ## Architecture Overview
6
+
7
+ Every Salesforce Experience Site consists of three components:
8
+
9
+ 1. **Network** (metadata: `Network`) - Network configuration
10
+ 2. **ChatterNetwork Site** (metadata: `CustomSite`) - Authentication endpoints and core site services
11
+ 3. **ChatterNetworkPicasso Site** (metadata: `DigitalExperienceConfig` + `DigitalExperienceBundle`) - Customer-facing pages and content
12
+
13
+ ## URL Pattern
14
+
15
+ These three components use **two different URLs**:
16
+
17
+ - **Primary URL** (ChatterNetworkPicasso): Used for customer-facing pages
18
+ - Defined in: `DigitalExperienceConfig` → `<urlPathPrefix>`
19
+ - Example: `mysite`
20
+
21
+ - **Secondary URL** (Network + CustomSite): Used for authentication endpoints and other services
22
+ - Defined in: `Network` → `<urlPathPrefix>` AND `CustomSite` → `<urlPathPrefix>`
23
+ - Example: `mysitevforcesite`
24
+ - **Must be synchronized** - both files must have identical values
25
+
26
+ By default, Salesforce differentiates these URLs by appending `vforcesite` suffix to the Network/CustomSite URL.
27
+
28
+ ## URL Update Workflow
29
+
30
+ When updating site URLs, follow this workflow:
31
+
32
+ ### Step 1: Discover All URL References
33
+
34
+ Search for all occurrences of `urlPathPrefix` across the project metadata files.
35
+
36
+ **For agents**: Use the `search_files` tool with these parameters:
37
+ - path: `force-app/main/default`
38
+ - regex: `urlPathPrefix`
39
+ - file_pattern: `*.xml`
40
+
41
+ **For humans**: Use your IDE's search functionality or command line tools:
42
+ ```bash
43
+ # Using grep
44
+ grep -r "urlPathPrefix" force-app/main/default --include="*.xml"
45
+
46
+ # Using VS Code: Ctrl+Shift+F (Windows/Linux) or Cmd+Shift+F (Mac)
47
+ # Search for: urlPathPrefix
48
+ # Files to include: *.xml
49
+ ```
50
+
51
+ ### Step 2: Identify URL Groups
52
+
53
+ Determine which files belong to which URL group:
54
+
55
+ - **Primary URL Group**: `DigitalExperienceConfig`
56
+ - **Secondary URL Group**: `Network` AND `CustomSite`
57
+
58
+ ### Step 3: Update URLs Consistently
59
+
60
+ Update the `<urlPathPrefix>` value in each file:
61
+
62
+ - **DigitalExperienceConfig**: Update to new primary URL
63
+ - **Network**: Update to new secondary URL (typically primary URL + `vforcesite`)
64
+ - **CustomSite**: Update to **same value as Network** (must be synchronized)
65
+
66
+ ### Step 4: Validate Naming Convention
67
+
68
+ Ensure URL values follow best practices:
69
+ - Use lowercase letters only
70
+ - Avoid special characters except hyphens where appropriate
71
+ - Keep URLs concise and meaningful
72
+
73
+ ### Step 5: Verify Consistency
74
+
75
+ Before deploying, confirm:
76
+ - [ ] Primary URL in `DigitalExperienceConfig` is set correctly
77
+ - [ ] Secondary URL in `Network` matches `CustomSite` exactly
78
+ - [ ] URLs are properly differentiated (typically via suffix)
79
+ - [ ] All URL values follow naming conventions
80
+
81
+ ## Example URL Configuration
82
+
83
+ ```
84
+ ChatterNetworkPicasso Site (Primary):
85
+ DigitalExperienceConfig: <urlPathPrefix>bestsupport</urlPathPrefix>
86
+
87
+ Network + ChatterNetwork Site (Secondary):
88
+ Network: <urlPathPrefix>bestsupportvforcesite</urlPathPrefix>
89
+ CustomSite: <urlPathPrefix>bestsupportvforcesite</urlPathPrefix>
90
+ ```
91
+
92
+ ## Common Pitfalls to Avoid
93
+
94
+ ❌ **Don't** update only one or two files - all three must be updated
95
+ ❌ **Don't** use different values in Network and CustomSite
96
+ ❌ **Don't** use the same URL for both Primary and Secondary groups
97
+ ❌ **Don't** skip the discovery step with `search_files`
98
+ ✅ **Do** use `search_files` to find all occurrences first
99
+ ✅ **Do** maintain URL differentiation between the two groups
100
+ ✅ **Do** follow lowercase naming conventions
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: generating-experience-react-site
2
+ name: generating-ui-bundle-site
3
3
  description: "Use this skill when users need to create or configure a Salesforce Digital Experience Site specifically for hosting a React UI bundle. Trigger when users mention creating an Experience site for a React app, setting up a React site on Salesforce, configuring Network/CustomSite/DigitalExperience metadata for a UI bundle, or deploying site infrastructure for a React application. Also trigger when users mention site URL path prefixes, app namespaces, appDevName, guest access configuration, DigitalExperienceConfig, DigitalExperienceBundle, or sfdc_cms__site content types in the context of React apps. Always use this skill for any React UI bundle site creation or site infrastructure configuration work, even if the user just says \"create a site for my React app\" or \"set up the site for my UI bundle.\""
4
4
  ---
5
5
 
@@ -51,6 +51,8 @@ Use the default templates in the docs below. Values in `{braces}` are resolved p
51
51
  | DigitalExperienceBundle | [configure-metadata-digital-experience-bundle.md](docs/configure-metadata-digital-experience-bundle.md) |
52
52
  | DigitalExperience (sfdc_cms__site) | [configure-metadata-digital-experience.md](docs/configure-metadata-digital-experience.md) |
53
53
 
54
+ For URL updates, see [update-site-urls.md](docs/update-site-urls.md).
55
+
54
56
  ### Execution Note for Step 3: Load and use the docs
55
57
  - Agents MUST read the full contents of each docs/*.md file referenced in Step 3 before attempting to populate metadata fields.
56
58
  - Use your platform's file-read tool (for example, `read_file`) to load these files in full, then perform placeholder substitution for values in `{braces}` using the resolved properties from Step 1.
@@ -63,7 +65,7 @@ Use the default templates in the docs below. Values in `{braces}` are resolved p
63
65
  - Read entire file contents, replace placeholders (e.g. `{siteName}`) with the resolved values, then use the expanded templates to populate the metadata XML/JSON content.
64
66
 
65
67
  ### Step 4: Resolve Additional Configurations
66
- Address any extra configurations the user requests. Use the metadata sections and field context identified in Step 2 to understand each fields purpose and constraints, then update only the minimum necessary fields.
68
+ Address any extra configurations the user requests. Use the metadata sections and field context identified in Step 2 to understand each field's purpose and constraints, then update only the minimum necessary fields.
67
69
 
68
70
  ## Verification Checklist
69
71
  Before deploying, confirm:
@@ -76,3 +78,13 @@ Before deploying, confirm:
76
78
  ```bash
77
79
  sf project deploy validate --metadata Network CustomSite DigitalExperienceConfig DigitalExperienceBundle DigitalExperience --target-org ${usernameOrAlias}
78
80
  ```
81
+
82
+ ## Common Workflows
83
+
84
+ ### Updating Experience Site URLs
85
+
86
+ **Use when** user wants to update or change site URLs (urlPathPrefix).
87
+
88
+ **Steps**:
89
+ - [ ] Read [update-site-urls.md](docs/update-site-urls.md) to understand the three-component architecture and URL update workflow
90
+ - [ ] Follow the step-by-step workflow in the doc to update URLs consistently across all three components (DigitalExperienceConfig, Network, CustomSite)
@@ -3,7 +3,7 @@
3
3
  ## Purpose
4
4
  These configuration files create **net-new, default** DigitalExperience content records (`sfdc_cms__site` type) for a Digital Experience React Site. They are not intended to edit or modify existing DigitalExperience content. Use these templates only when provisioning a brand-new React site.
5
5
 
6
- The `appContainer: true` and `appSpace` fields in `content.json` are what make this a React site rather than a standard LWR site. The `appSpace` value follows the format `{namespace}__{developerName}` and must match a deployed `UIBundle` metadata record.
6
+ The `appContainer: true` field in `content.json` is what makes this a React site rather than a standard LWR site. The `appSpace` field should **be left empty if the UIBundle metadata record does not already exist**. When the UIBundle exists, populate the `appSpace` value following the format `{namespace}__{developerName}` to match the deployed `UIBundle` metadata record.
7
7
 
8
8
  ## File Location
9
9
  The DigitalExperience directory contains only `_meta.json` and `content.json`. Do not create any directories other than `sfdc_cms__site` inside the bundle.
@@ -32,7 +32,9 @@ digitalExperiences/site/{siteName}1/sfdc_cms__site/{siteName}1/content.json
32
32
  "contentBody": {
33
33
  "authenticationType": "AUTHENTICATED_WITH_PUBLIC_ACCESS_ENABLED",
34
34
  "appContainer": true,
35
- "appSpace": "{appNamespace}__{appDevName}"
35
+ "appSpace": ""
36
36
  }
37
37
  }
38
38
  ```
39
+
40
+ **Note:** Leave `appSpace` empty (`""`) if the UIBundle does not exist. If the UIBundle metadata record is already deployed, populate it with `"{appNamespace}__{appDevName}"`.
@@ -0,0 +1,100 @@
1
+ # Updating Experience Site URLs
2
+
3
+ Experience sites have a three-component architecture with two distinct URL patterns. Understanding this structure is critical when updating site URLs.
4
+
5
+ ## Architecture Overview
6
+
7
+ Every Salesforce Experience Site consists of three components:
8
+
9
+ 1. **Network** (metadata: `Network`) - Network configuration
10
+ 2. **ChatterNetwork Site** (metadata: `CustomSite`) - Legacy site and proxy core site services
11
+ 3. **ChatterNetworkPicasso Site** (metadata: `DigitalExperienceConfig` + `DigitalExperienceBundle`) - Customer-facing pages and content
12
+
13
+ ## URL Pattern
14
+
15
+ These three components use **two different URLs**:
16
+
17
+ - **Primary URL** (ChatterNetworkPicasso): Used for customer-facing pages
18
+ - Defined in: `DigitalExperienceConfig` → `<urlPathPrefix>`
19
+ - Example: `mysite`
20
+
21
+ - **Secondary URL** (Network + CustomSite): Used for legacy authentication endpoints and other services
22
+ - Defined in: `Network` → `<urlPathPrefix>` AND `CustomSite` → `<urlPathPrefix>`
23
+ - Example: `mysitevforcesite`
24
+ - **Must be synchronized** - both files must have identical values
25
+
26
+ By default, Salesforce differentiates these URLs by appending `vforcesite` suffix to the Network/CustomSite URL.
27
+
28
+ ## URL Update Workflow
29
+
30
+ When updating site URLs, follow this workflow:
31
+
32
+ ### Step 1: Discover All URL References
33
+
34
+ Search for all occurrences of `urlPathPrefix` across the project metadata files.
35
+
36
+ **For agents**: Use the `search_files` tool with these parameters:
37
+ - path: `force-app/main/default`
38
+ - regex: `urlPathPrefix`
39
+ - file_pattern: `*.xml`
40
+
41
+ **For humans**: Use your IDE's search functionality or command line tools:
42
+ ```bash
43
+ # Using grep
44
+ grep -r "urlPathPrefix" force-app/main/default --include="*.xml"
45
+
46
+ # Using VS Code: Ctrl+Shift+F (Windows/Linux) or Cmd+Shift+F (Mac)
47
+ # Search for: urlPathPrefix
48
+ # Files to include: *.xml
49
+ ```
50
+
51
+ ### Step 2: Identify URL Groups
52
+
53
+ Determine which files belong to which URL group:
54
+
55
+ - **Primary URL Group**: `DigitalExperienceConfig`
56
+ - **Secondary URL Group**: `Network` AND `CustomSite`
57
+
58
+ ### Step 3: Update URLs Consistently
59
+
60
+ Update the `<urlPathPrefix>` value in each file:
61
+
62
+ - **DigitalExperienceConfig**: Update to new primary URL
63
+ - **Network**: Update to new secondary URL (typically primary URL + `vforcesite`)
64
+ - **CustomSite**: Update to **same value as Network** (must be synchronized)
65
+
66
+ ### Step 4: Validate Naming Convention
67
+
68
+ Ensure URL values follow best practices:
69
+ - Use lowercase letters only
70
+ - Avoid special characters except hyphens where appropriate
71
+ - Keep URLs concise and meaningful
72
+
73
+ ### Step 5: Verify Consistency
74
+
75
+ Before deploying, confirm:
76
+ - [ ] Primary URL in `DigitalExperienceConfig` is set correctly
77
+ - [ ] Secondary URL in `Network` matches `CustomSite` exactly
78
+ - [ ] URLs are properly differentiated (typically via suffix)
79
+ - [ ] All URL values follow naming conventions
80
+
81
+ ## Example URL Configuration
82
+
83
+ ```
84
+ ChatterNetworkPicasso Site (Primary):
85
+ DigitalExperienceConfig: <urlPathPrefix>bestsupport</urlPathPrefix>
86
+
87
+ Network + ChatterNetwork Site (Secondary):
88
+ Network: <urlPathPrefix>bestsupportvforcesite</urlPathPrefix>
89
+ CustomSite: <urlPathPrefix>bestsupportvforcesite</urlPathPrefix>
90
+ ```
91
+
92
+ ## Common Pitfalls to Avoid
93
+
94
+ ❌ **Don't** update only one or two files - all three must be updated
95
+ ❌ **Don't** use different values in Network and CustomSite
96
+ ❌ **Don't** use the same URL for both Primary and Secondary groups
97
+ ❌ **Don't** skip the discovery step with `search_files`
98
+ ✅ **Do** use `search_files` to find all occurrences first
99
+ ✅ **Do** maintain URL differentiation between the two groups
100
+ ✅ **Do** follow lowercase naming conventions
@@ -1,16 +1,31 @@
1
1
  ---
2
2
  name: implementing-ui-bundle-agentforce-conversation-client
3
- description: "Adds or modifies AgentforceConversationClient in React apps (.tsx or .jsx files). Use when user says \"add chat widget\", \"embed agentforce\", \"add agent\", \"add chatbot\", \"integrate conversational AI\", or asks to change colors, dimensions, styling, or configure agentId, width, height, inline mode, or styleTokens for travel agent, HR agent, employee agent, or any Salesforce agent chat."
3
+ description: Use this skill when the user asks to add, embed, integrate, configure, style, or remove an agent, chatbot, chat widget, conversation client, or AI assistant in a React component. Covers styling (colors, fonts, spacing, borders), layout (inline vs floating, width, height, dimensions), and props (agentId, agentLabel, headerEnabled, showHeaderIcon, showAvatar, styleTokens). Also matches references to specific agents (e.g. travel agent, HR agent, support agent, employee agent). Never create a custom agent, chatbot, or chat widget component.
4
4
  metadata:
5
5
  author: ACC Components
6
- version: 1.0.0
6
+ version: 1.0.1
7
7
  package: "@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client"
8
8
  sdk-package: "@salesforce/agentforce-conversation-client"
9
- last-updated: 2025-03-18
9
+ last-updated: 2025-04-01
10
10
  ---
11
11
 
12
12
  # Managing Agentforce Conversation Client
13
13
 
14
+ **HARD CONSTRAINT:** NEVER create a custom agent, chatbot, or chat widget component. ALL such requests MUST be fulfilled by importing and rendering the existing `<AgentforceConversationClient />` from `@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client` as documented below. If a requirement is unsupported by this component's props, state the limitation — do not improvise an alternative.
15
+
16
+ ## Prerequisites
17
+
18
+ Before the component will work, the following Salesforce settings must be configured by the user. ALWAYS call out the prequisites after successfully embedding the agent.
19
+
20
+ **Cookie settings:**
21
+
22
+ - Setup → My Domain → Disable "Require first party use of Salesforce cookies"
23
+
24
+ **Trusted domains (required only for local development):**
25
+
26
+ - Setup → Session Settings → Trusted Domains for Inline Frames → Add your domain
27
+ - Local development: `localhost:<PORT>` (e.g., `localhost:3000`)
28
+
14
29
  ## Instructions
15
30
 
16
31
  ### Step 1: Check if component already exists
@@ -73,42 +88,50 @@ Do not infer import path from file discovery alone. Prefer one consistent packag
73
88
 
74
89
  ### Step 4: Add or update component
75
90
 
76
- **For new installations:**
91
+ Determine which sub-step applies:
92
+
93
+ - Component NOT found in Step 1 → go to **4a (New installation)**
94
+ - Component found in Step 1 → go to **4b (Update existing)**
95
+
96
+ #### 4a — New installation
77
97
 
78
- Add to the target React component file using the canonical package import:
98
+ 1. If the user already specified a target file, use that file. Otherwise, ask the user: _"Which file should I add the AgentforceConversationClient to?"_ Do NOT proceed until a target file is confirmed.
99
+ 2. Read the target file to understand its existing imports and TSX structure.
100
+ 3. Add the import at the top of the file, alongside existing imports. Use the canonical package import from Step 3:
79
101
 
80
102
  ```tsx
81
- import { Outlet } from "react-router";
82
103
  import { AgentforceConversationClient } from "@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client";
83
-
84
- export default function AgentChatHost() {
85
- return (
86
- <>
87
- <Outlet />
88
- <AgentforceConversationClient agentId="0Xx..." />
89
- </>
90
- );
91
- }
92
104
  ```
93
105
 
94
- **Fallback note:** Use a local relative import only when the user explicitly requests patched/local component usage in that app.
95
-
96
- **For updates:**
106
+ 4. Insert the `<AgentforceConversationClient />` TSX into the component's return block. Place it as a sibling of existing content do NOT wrap or restructure existing TSX. Use the real `agentId` obtained in Step 2:
107
+ **Example:**
108
+ ```tsx
109
+ <AgentforceConversationClient agentId="0Xx8X00000001AbCDE" />
110
+ ```
97
111
 
98
- Read the file where component is used and modify only the props that need to change. Preserve all other props. Never delete and recreate.
112
+ 5. Do NOT add any other code (wrappers, layout components, new functions) unless the user explicitly requests it.
99
113
 
100
- **Replacing placeholder values:**
114
+ #### 4b — Update existing
101
115
 
102
- If the component has a placeholder agentId (e.g., `agentId="Placeholder"` or `agentId="0Xx..."`), replace it with the real agent ID:
116
+ 1. Read the file identified in Step 1.
117
+ 2. Locate the existing `<AgentforceConversationClient ... />` TSX element.
118
+ 3. Apply **only** the changes the user requested. Rules:
119
+ - **Add** new props that the user asked for.
120
+ - **Change** prop values the user asked to update.
121
+ - **Preserve** every prop and value the user did NOT mention — do not remove, reorder, or reformat them.
122
+ - **Never** delete the component and recreate it.
123
+ 4. If the current `agentId` is a placeholder (failed validation in Step 1) and a real agent ID was obtained in Step 2, replace the placeholder value:
103
124
 
104
125
  ```tsx
105
- // Before (template with placeholder)
126
+ // Before
106
127
  <AgentforceConversationClient agentId="Placeholder" />
107
128
 
108
- // After (with real agent ID)
129
+ // After
109
130
  <AgentforceConversationClient agentId="0Xx8X00000001AbCDE" />
110
131
  ```
111
132
 
133
+ 5. If the current `agentId` is already valid and the user did not ask to change it, leave it as-is.
134
+
112
135
  ### Step 5: Configure props
113
136
 
114
137
  **Available props (use directly on component):**
@@ -121,6 +144,7 @@ If the component has a placeholder agentId (e.g., `agentId="Placeholder"` or `ag
121
144
  - `styleTokens` (object) - For all styling (colors, fonts, spacing)
122
145
  - `salesforceOrigin` (string) - Auto-resolved
123
146
  - `frontdoorUrl` (string) - Auto-resolved
147
+ - `agentLabel` (string) - header title for agent
124
148
 
125
149
  **Examples:**
126
150
 
@@ -136,6 +160,175 @@ Inline mode with dimensions:
136
160
  <AgentforceConversationClient agentId="0Xx..." inline width="420px" height="600px" />
137
161
  ```
138
162
 
163
+ Adding or updating agent label:
164
+
165
+ ```tsx
166
+ <AgentforceConversationClient agentId="0Xx..." agentLabel="<dummy-agent-label>" />
167
+ ```
168
+
169
+ **Styling rules (mandatory):**
170
+
171
+ - ALL visual customization (colors, fonts, spacing, borders, radii, shadows) MUST go through the `styleTokens` prop. There are no exceptions.
172
+ - ONLY use token names listed in the tables below. Do NOT invent custom token names.
173
+ - NEVER apply styling via CSS files, `style` attributes, `className`, or wrapper elements. These approaches will not work and will be ignored by the component.
174
+ - If the user requests a visual change that does not map to a token below, inform them that the change is not supported by the current token set.
175
+
176
+ ### Container
177
+
178
+ | Token name | UI area themed |
179
+ | --------------------- | --------------------------- |
180
+ | `fabBackground` | FAB button background color |
181
+ | `containerBackground` | Chat container background |
182
+ | `headerBackground` | Header background |
183
+ | `containerWidth` | Chat container width |
184
+ | `chatBorderRadius` | Chat border radius |
185
+ | `layoutMaxWidth` | Layout max width |
186
+
187
+ ### Agentforce Header
188
+
189
+ | Token name | UI area themed |
190
+ | ------------------------------- | ---------------------------------- |
191
+ | `headerBlockBackground` | Header block background |
192
+ | `headerBlockBorderBottomWidth` | Header border bottom width |
193
+ | `headerBlockBorderBottomStyle` | Header border bottom style |
194
+ | `headerBlockBorderBottomColor` | Header border bottom color |
195
+ | `headerBlockBorderRadius` | Header corner radius |
196
+ | `headerBlockPaddingBlock` | Header block padding (vertical) |
197
+ | `headerBlockPaddingInline` | Header inline padding (horizontal) |
198
+ | `headerBlockMinHeight` | Header minimum height |
199
+ | `headerBlockBrandingGap` | Header branding area gap |
200
+ | `headerBlockFontFamily` | Header font family |
201
+ | `headerBlockFontWeight` | Header title font weight |
202
+ | `headerBlockFontSize` | Header title font size |
203
+ | `headerBlockLineHeight` | Header title line height |
204
+ | `headerBlockTextColor` | Header text color |
205
+ | `headerBlockIconDisplay` | Header icon display |
206
+ | `headerBlockIconMargin` | Header icon margin |
207
+ | `headerBlockIconColor` | Header icon color |
208
+ | `headerBlockIconWidth` | Header icon width |
209
+ | `headerBlockIconHeight` | Header icon height |
210
+ | `headerBlockLogoMaxHeight` | Header logo max height |
211
+ | `headerBlockLogoMaxWidth` | Header logo max width |
212
+ | `headerBlockLogoMinWidth` | Header logo min width |
213
+ | `headerBlockButtonHeight` | Header action button height |
214
+ | `headerBlockButtonWidth` | Header action button width |
215
+ | `headerBlockButtonPadding` | Header action button padding |
216
+ | `headerBlockButtonBorderRadius` | Header action button border radius |
217
+ | `headerBlockHoverBackground` | Header hover background |
218
+ | `headerBlockActiveBackground` | Header active background |
219
+ | `headerBlockFocusBorder` | Header focus border |
220
+
221
+ ### Agentforce Welcome Block
222
+
223
+ | Token name | UI area themed |
224
+ | ----------------------------------- | -------------------------------- |
225
+ | `welcomeBlockTextContainerWidth` | Welcome text container width |
226
+ | `welcomeBlockFontFamily` | Welcome block font family |
227
+ | `welcomeBlockFontSize` | Welcome block font size |
228
+ | `welcomeBlockFontWeight` | Welcome block font weight |
229
+ | `welcomeBlockLineHeight` | Welcome block line height |
230
+ | `welcomeBlockLetterSpacing` | Welcome block letter spacing |
231
+ | `welcomeBlockTextColor` | Welcome block text color |
232
+ | `welcomeBlockPaddingVertical` | Welcome block vertical padding |
233
+ | `welcomeBlockPaddingHorizontal` | Welcome block horizontal padding |
234
+ | `welcomeBlockTextAnimationDuration` | Welcome text animation duration |
235
+
236
+ ### Agentforce Messages
237
+
238
+ | Token name | UI area themed |
239
+ | -------------------------------- | ------------------------------------------------------- |
240
+ | `messageBlockBorderRadius` | Message block border radius |
241
+ | `avatarDisplay` | Avatar display property (e.g. `block`, `none`) |
242
+ | `hideMessageActions` | Message actions display (e.g. `block`, `none` to hide) |
243
+ | `hideCopyAction` | Copy action button display (e.g. `inline-flex`, `none`) |
244
+ | `messageBlockPaddingContainer` | Message block container padding |
245
+ | `messageBlockFontSize` | Message block font size |
246
+ | `messageBlockBackgroundColor` | Message block background (base) |
247
+ | `messageBlockInboundBorder` | Inbound message border |
248
+ | `messageBlockOutboundBorder` | Outbound message border |
249
+ | `messageBlockBodyWidth` | Message block body width |
250
+ | `messageBlockPadding` | Message block padding |
251
+ | `messageBlockContainerMarginTop` | Message block container top margin |
252
+ | `messageBlockLineHeight` | Message block line height |
253
+
254
+ ### Avatar visibility (behavioral config)
255
+
256
+ Use `renderingConfig.showAvatar` to control whether avatars are rendered in message rows.
257
+
258
+ - `showAvatar: true` (default) renders avatars.
259
+ - `showAvatar: false` hides avatars by removing them from the DOM.
260
+
261
+ ### Inbound message (agent → customer)
262
+
263
+ | Token name | UI area themed |
264
+ | ----------------------------------------- | --------------------------------- |
265
+ | `inboundMessgeTextColor` | Inbound message text color (base) |
266
+ | `messageBlockInboundBorderRadius` | Inbound message border radius |
267
+ | `messageBlockInboundBackgroundColor` | Inbound message background |
268
+ | `messageBlockInboundTextColor` | Inbound message text color |
269
+ | `messageBlockInboundWidth` | Inbound message width |
270
+ | `messageBlockInboundTextAlign` | Inbound message text alignment |
271
+ | `messageBlockInboundHoverBackgroundColor` | Inbound message hover background |
272
+
273
+ ### Outbound message (customer → agent)
274
+
275
+ | Token name | UI area themed |
276
+ | ------------------------------------- | ------------------------------- |
277
+ | `messageBlockOutboundBorderRadius` | Outbound message border radius |
278
+ | `messageBlockOutboundBackgroundColor` | Outbound message background |
279
+ | `messageBlockOutboundTextColor` | Outbound message text color |
280
+ | `messageBlockOutboundWidth` | Outbound message width |
281
+ | `messageBlockOutboundMarginLeft` | Outbound message left margin |
282
+ | `messageBlockOutboundTextAlign` | Outbound message text alignment |
283
+
284
+ ### Agentforce Input
285
+
286
+ | Token name | UI area themed |
287
+ | ------------------------------------------ | ---------------------------------------------- |
288
+ | `messageInputPadding` | Message input container padding |
289
+ | `messageInputFooterBorderColor` | Message input footer border color |
290
+ | `messageInputBorderRadius` | Message input border radius |
291
+ | `messageInputBorderTransitionDuration` | Message input border transition duration |
292
+ | `messageInputBorderTransitionEasing` | Message input border transition easing |
293
+ | `messageInputTextColor` | Message input text color |
294
+ | `messageInputTextBackgroundColor` | Message input text background color |
295
+ | `messageInputFooterBorderFocusColor` | Message input footer focus border color |
296
+ | `messageInputFocusShadow` | Message input focus shadow |
297
+ | `messageInputMaxHeight` | Message input max height |
298
+ | `messageInputLineHeight` | Message input line height |
299
+ | `messageInputTextPadding` | Message input text padding |
300
+ | `messageInputFontWeight` | Message input font weight |
301
+ | `messageInputFontSize` | Message input font size |
302
+ | `messageInputOverflowY` | Message input overflow Y |
303
+ | `messageInputScrollbarWidth` | Message input scrollbar width |
304
+ | `messageInputScrollbarColor` | Message input scrollbar color |
305
+ | `messageInputActionsWidth` | Message input actions width |
306
+ | `messageInputActionsPaddingRight` | Message input actions right padding |
307
+ | `messageInputFooterPlaceholderText` | Message input placeholder text color |
308
+ | `messageInputPlaceholderFontWeight` | Placeholder font weight |
309
+ | `messageInputErrorTextColor` | Message input error text color |
310
+ | `messageInputActionsGap` | Message input actions gap |
311
+ | `messageInputActionsPadding` | Message input actions padding |
312
+ | `messageInputActionButtonSize` | Message input action button size |
313
+ | `messageInputActionButtonRadius` | Message input action button radius |
314
+ | `messageInputFooterSendButton` | Message input send button color |
315
+ | `messageInputSendButtonDisabledColor` | Message input send button disabled color |
316
+ | `messageInputActionButtonFocusBorder` | Message input action button focus border |
317
+ | `messageInputActionButtonActiveIconColor` | Message input action button active icon color |
318
+ | `messageInputActionButtonActiveBackground` | Message input action button active background |
319
+ | `messageInputSendButtonIconColor` | Message input send button icon color |
320
+ | `messageInputFooterSendButtonHoverColor` | Message input send button hover color |
321
+ | `messageInputActionButtonHoverShadow` | Message input action button hover shadow |
322
+ | `messageInputFilePreviewPadding` | Message input file preview padding |
323
+ | `messageInputTextareaMaxHeight` | Message input textarea max height |
324
+ | `messageInputTextareaWithImageMaxHeight` | Message input textarea max height (with image) |
325
+
326
+ ### Agentforce Error Block
327
+
328
+ | Token name | UI area themed |
329
+ | ---------------------- | ---------------------------- |
330
+ | `errorBlockBackground` | Error block background color |
331
+
139
332
  Styling with styleTokens:
140
333
 
141
334
  ```tsx
@@ -156,7 +349,6 @@ Styling with styleTokens:
156
349
  - Inline without header, calculated dimensions
157
350
  - Complete host component examples
158
351
 
159
- **For styling:** For ANY color, font, or spacing changes, use `styleTokens` prop only. See `references/style-tokens.md` for complete token list and examples.
160
352
 
161
353
  **Common mistakes to avoid:** Consult `references/constraints.md` for:
162
354
 
@@ -171,16 +363,3 @@ If component doesn't appear or authentication fails, see `references/troubleshoo
171
363
  - Agent activation and deployment
172
364
  - Localhost trusted domains
173
365
  - Cookie restriction settings
174
-
175
- ## Prerequisites
176
-
177
- Before the component will work, the following Salesforce settings must be configured by the user:
178
-
179
- **Cookie settings:**
180
-
181
- - Setup → My Domain → Disable "Require first party use of Salesforce cookies"
182
-
183
- **Trusted domains (required only for local development):**
184
-
185
- - Setup → Session Settings → Trusted Domains for Inline Frames → Add your domain
186
- - Local development: `localhost:<PORT>` (e.g., `localhost:3000`)