@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental 1.33.1 → 1.33.3

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.
package/dist/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.33.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.33.2...v1.33.3) (2026-02-17)
7
+
8
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.33.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.33.1...v1.33.2) (2026-02-17)
15
+
16
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
17
+
18
+
19
+
20
+
21
+
6
22
  ## [1.33.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.33.0...v1.33.1) (2026-02-17)
7
23
 
8
24
  **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
@@ -8,7 +8,7 @@
8
8
  "name": "base-react-app",
9
9
  "version": "1.0.0",
10
10
  "dependencies": {
11
- "@salesforce/agentforce-conversation-client": "^1.33.0",
11
+ "@salesforce/agentforce-conversation-client": "^1.33.2",
12
12
  "@salesforce/webapp-experimental": "*",
13
13
  "@tailwindcss/vite": "^4.1.17",
14
14
  "react": "^19.2.0",
@@ -1863,9 +1863,9 @@
1863
1863
  ]
1864
1864
  },
1865
1865
  "node_modules/@salesforce/agentforce-conversation-client": {
1866
- "version": "1.33.0",
1867
- "resolved": "https://registry.npmjs.org/@salesforce/agentforce-conversation-client/-/agentforce-conversation-client-1.33.0.tgz",
1868
- "integrity": "sha512-KYRtnGpUO2LeLqFAXiW0/4aJVDnW0JFkCJwkB7o/QGFlR/9LKGGUDNxGIgypAy6TnTHo6gRCL4EV46O0NF+rhQ==",
1866
+ "version": "1.33.2",
1867
+ "resolved": "https://registry.npmjs.org/@salesforce/agentforce-conversation-client/-/agentforce-conversation-client-1.33.2.tgz",
1868
+ "integrity": "sha512-tc73w1u7TCO6/hAcwCIJ89Pw+tsiNrldXgNC87Y7vrSHy6YgHwLpbIkoIckyfuvVEzfcC8IAdpQ0mN077xWbDQ==",
1869
1869
  "license": "SEE LICENSE IN LICENSE.txt",
1870
1870
  "dependencies": {
1871
1871
  "@lightning-out/application": "2.1.1-rc.2"
@@ -12,7 +12,7 @@
12
12
  "test": "vitest"
13
13
  },
14
14
  "dependencies": {
15
- "@salesforce/agentforce-conversation-client": "^1.33.0",
15
+ "@salesforce/agentforce-conversation-client": "^1.33.2",
16
16
  "@salesforce/webapp-experimental": "*",
17
17
  "@tailwindcss/vite": "^4.1.17",
18
18
  "react": "^19.2.0",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "1.33.1",
3
+ "version": "1.33.3",
4
4
  "description": "Base SFDX project template",
5
5
  "private": true,
6
6
  "files": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental",
3
- "version": "1.33.1",
3
+ "version": "1.33.3",
4
4
  "description": "Embedded Agentforce conversation client feature for web applications",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "",
@@ -16,7 +16,9 @@
16
16
  },
17
17
  "files": [
18
18
  "dist",
19
- "src"
19
+ "src",
20
+ "rules",
21
+ "skills"
20
22
  ],
21
23
  "publishConfig": {
22
24
  "access": "public"
@@ -35,5 +37,5 @@
35
37
  "react-dom": "^19.2.1",
36
38
  "react-router": "^7.10.1"
37
39
  },
38
- "gitHead": "42f151f1111c4ad30eb13327e62076a96f2d1110"
40
+ "gitHead": "478e8511c58c7e4f0b45f2f36dcdaa3fe40c8d40"
39
41
  }
@@ -0,0 +1,32 @@
1
+ ---
2
+ paths:
3
+ - "**/*.tsx"
4
+ - "**/components/**/*.ts"
5
+ ---
6
+
7
+ # Agentforce Conversation Client (standards)
8
+
9
+ When adding or editing the embedded Agentforce chat client in this project, follow these conventions.
10
+
11
+ ## Component and library
12
+
13
+ - Use the shared **AgentforceConversationClient** React component from `feature-react-agentforce-conversation-client`. Do not call `embedAgentforceClient` directly in application code.
14
+ - The project must have **@salesforce/agentforce-conversation-client** installed (`npm install @salesforce/agentforce-conversation-client`).
15
+
16
+ ## Authentication
17
+
18
+ - The component resolves auth automatically: **localhost** fetches `frontdoorUrl` from `/__lo/frontdoor`; **production** uses `window.location.origin` as `salesforceOrigin`.
19
+ - Do not hard-code `salesforceOrigin` or `frontdoorUrl` unless the consumer explicitly provides them as props.
20
+
21
+ ## Rendering mode
22
+
23
+ - Pass `agentforceClientConfig.renderingConfig.mode` to select **floating** (default) or **inline**. Do not apply custom positioning CSS to override the built-in layout.
24
+ - For inline mode, set `width` and `height` in `renderingConfig`. Do not override iframe dimensions with external CSS.
25
+
26
+ ## Agent selection
27
+
28
+ - Use `agentforceClientConfig.agentId` to select a specific agent. Ask the user for the agent ID; if not provided, note that the org's default agent is used.
29
+
30
+ ## Placement
31
+
32
+ - Render `<AgentforceConversationClient />` inside the existing app layout (e.g. alongside `<Outlet />`). Do not replace the entire page shell with the chat client.
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: embedded-agent
3
+ description: Embed an Agentforce conversation client (chat UI) into a React web application. Use when the user wants to add an employee agent, a chat client, chatbot, chat widget, chat component, conversation client, or conversational interface to their React app. Also applies when the user asks to embed or integrate any Salesforce agent — including employee agent, travel agent, HR agent, service agent, or any custom-named agent — or mentions Agentforce, Agentforce widget, Agentforce chat, or agent chat.
4
+ ---
5
+
6
+ # Embedded Agentforce chat (workflow)
7
+
8
+ When the user wants an embedded Agentforce chat client in a React app, follow this workflow.
9
+
10
+ ## 1. Install the dependency
11
+
12
+ ```bash
13
+ npm install @salesforce/agentforce-conversation-client
14
+ ```
15
+
16
+ The dependency should be added to the project's `package.json` dependencies.
17
+
18
+ ## 2. Add the feature
19
+
20
+ - Include `@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental` in the app configuration.
21
+ - This feature provides **AgentforceConversationClient**.
22
+
23
+ ## 3. Use the shared wrapper
24
+
25
+ Use the `AgentforceConversationClient` React component. It resolves auth automatically:
26
+
27
+ - **Dev (localhost)**: fetches `frontdoorUrl` from `/__lo/frontdoor`
28
+ - **Prod (hosted in org)**: uses `salesforceOrigin` from `window.location.origin`
29
+
30
+ ## 4. Embed in the layout
31
+
32
+ Render `<AgentforceConversationClient />` in the app layout so the chat client loads globally. Keep it alongside the existing layout (do not replace the page shell).
33
+
34
+ ```tsx
35
+ import { Outlet } from "react-router";
36
+ import { AgentforceConversationClient } from "@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental";
37
+
38
+ export default function AppLayout() {
39
+ return (
40
+ <>
41
+ <Outlet />
42
+ <AgentforceConversationClient />
43
+ </>
44
+ );
45
+ }
46
+ ```
47
+
48
+ ## 5. Configure the agent
49
+
50
+ Pass options via the `agentforceClientConfig` prop:
51
+
52
+ | Option | Purpose |
53
+ | ---------------------------------- | ------------------------------------------------- |
54
+ | `renderingConfig.mode` | `"floating"` (default) or `"inline"` |
55
+ | `renderingConfig.width` / `height` | Inline dimensions (number for px, string for CSS) |
56
+ | `agentId` | Select a specific agent from the org |
57
+ | `styleTokens` | Theme colors and style overrides |
58
+
59
+ See [embed-examples.md](docs/embed-examples.md) for complete examples of each mode.
60
+
61
+ ## 6. Validate prerequisites
62
+
63
+ - The org must allow `localhost:<PORT>` in **Trusted Domains for Inline Frames** (session settings).
64
+
65
+ ## Quick reference: rendering modes
66
+
67
+ ### Floating (default)
68
+
69
+ A persistent chat widget overlay pinned to the bottom-right corner. No extra config needed — floating is the default.
70
+
71
+ ```tsx
72
+ <AgentforceConversationClient />
73
+ ```
74
+
75
+ ### Inline
76
+
77
+ The chat renders within the page layout at a specific size.
78
+
79
+ ```tsx
80
+ <AgentforceConversationClient
81
+ agentforceClientConfig={{
82
+ renderingConfig: { mode: "inline", width: 420, height: 600 },
83
+ }}
84
+ />
85
+ ```
86
+
87
+ ### Theming
88
+
89
+ Use `styleTokens` to customize the chat appearance.
90
+
91
+ ```tsx
92
+ <AgentforceConversationClient
93
+ agentforceClientConfig={{
94
+ styleTokens: {
95
+ headerBlockBackground: "#0176d3",
96
+ headerBlockTextColor: "#ffffff",
97
+ messageBlockInboundColor: "#0176d3",
98
+ },
99
+ }}
100
+ />
101
+ ```
102
+
103
+ ### Agent selection
104
+
105
+ Pass `agentId` to load a specific agent (e.g. travel agent, HR agent).
106
+
107
+ ```tsx
108
+ <AgentforceConversationClient
109
+ agentforceClientConfig={{
110
+ agentId: "0Xx000000000000",
111
+ }}
112
+ />
113
+ ```
@@ -0,0 +1,182 @@
1
+ # Embed examples
2
+
3
+ Detailed examples for configuring the Agentforce Conversation Client. All examples use the `AgentforceConversationClient` React component; the underlying `embedAgentforceClient` API accepts the same `agentforceClientConfig` shape.
4
+
5
+ ---
6
+
7
+ ## Floating mode (default)
8
+
9
+ A floating chat widget appears in the bottom-right corner. It starts minimized and expands when the user clicks it. This is the default — no `renderingConfig` is required.
10
+
11
+ ### Minimal (no config)
12
+
13
+ ```tsx
14
+ <AgentforceConversationClient />
15
+ ```
16
+
17
+ ### Explicit floating
18
+
19
+ ```tsx
20
+ <AgentforceConversationClient
21
+ agentforceClientConfig={{
22
+ renderingConfig: { mode: "floating" },
23
+ }}
24
+ />
25
+ ```
26
+
27
+ ### Floating with a specific agent and theme
28
+
29
+ ```tsx
30
+ <AgentforceConversationClient
31
+ agentforceClientConfig={{
32
+ renderingConfig: { mode: "floating" },
33
+ agentId: "0Xx000000000000",
34
+ styleTokens: {
35
+ headerBlockBackground: "#032D60",
36
+ headerBlockTextColor: "#ffffff",
37
+ },
38
+ }}
39
+ />
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Inline mode
45
+
46
+ The chat renders inside the parent container at a specific size. Use this when the chat should be part of the page layout rather than an overlay.
47
+
48
+ ### Fixed pixel dimensions
49
+
50
+ ```tsx
51
+ <AgentforceConversationClient
52
+ agentforceClientConfig={{
53
+ renderingConfig: { mode: "inline", width: 420, height: 600 },
54
+ }}
55
+ />
56
+ ```
57
+
58
+ ### CSS string dimensions
59
+
60
+ ```tsx
61
+ <AgentforceConversationClient
62
+ agentforceClientConfig={{
63
+ renderingConfig: { mode: "inline", width: "100%", height: "80vh" },
64
+ }}
65
+ />
66
+ ```
67
+
68
+ ### Inline filling a sidebar
69
+
70
+ ```tsx
71
+ <div style={{ display: "flex", height: "100vh" }}>
72
+ <main style={{ flex: 1 }}>{/* App content */}</main>
73
+ <aside style={{ width: 400 }}>
74
+ <AgentforceConversationClient
75
+ agentforceClientConfig={{
76
+ renderingConfig: { mode: "inline", width: "100%", height: "100%" },
77
+ }}
78
+ />
79
+ </aside>
80
+ </div>
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Theming
86
+
87
+ Use `styleTokens` to customize colors. Tokens are passed directly to the Agentforce client.
88
+
89
+ ### Brand-colored header
90
+
91
+ ```tsx
92
+ <AgentforceConversationClient
93
+ agentforceClientConfig={{
94
+ styleTokens: {
95
+ headerBlockBackground: "#0176d3",
96
+ headerBlockTextColor: "#ffffff",
97
+ },
98
+ }}
99
+ />
100
+ ```
101
+
102
+ ### Full theme example
103
+
104
+ ```tsx
105
+ <AgentforceConversationClient
106
+ agentforceClientConfig={{
107
+ styleTokens: {
108
+ headerBlockBackground: "#0176d3",
109
+ headerBlockTextColor: "#ffffff",
110
+ messageBlockInboundColor: "#0176d3",
111
+ },
112
+ }}
113
+ />
114
+ ```
115
+
116
+ ### Dark theme example
117
+
118
+ ```tsx
119
+ <AgentforceConversationClient
120
+ agentforceClientConfig={{
121
+ styleTokens: {
122
+ headerBlockBackground: "#1a1a2e",
123
+ headerBlockTextColor: "#e0e0e0",
124
+ messageBlockInboundColor: "#16213e",
125
+ },
126
+ }}
127
+ />
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Agent selection
133
+
134
+ Use `agentId` to load a specific agent from the org. If omitted, the org's default employee agent is used.
135
+
136
+ ### Specific agent by ID
137
+
138
+ ```tsx
139
+ <AgentforceConversationClient
140
+ agentforceClientConfig={{
141
+ agentId: "0Xx000000000000",
142
+ }}
143
+ />
144
+ ```
145
+
146
+ ### Agent with inline mode and theming
147
+
148
+ ```tsx
149
+ <AgentforceConversationClient
150
+ agentforceClientConfig={{
151
+ agentId: "0Xx000000000000",
152
+ renderingConfig: { mode: "inline", width: 400, height: 700 },
153
+ styleTokens: {
154
+ headerBlockBackground: "#0176d3",
155
+ headerBlockTextColor: "#ffffff",
156
+ },
157
+ }}
158
+ />
159
+ ```
160
+
161
+ ---
162
+
163
+ ## Using the low-level `embedAgentforceClient` API
164
+
165
+ The React component wraps `embedAgentforceClient`. If you need the raw API (e.g. in a non-React context), the config shape is the same:
166
+
167
+ ```ts
168
+ import { embedAgentforceClient } from "@salesforce/agentforce-conversation-client";
169
+
170
+ const { loApp, chatClientComponent } = embedAgentforceClient({
171
+ container: "#agentforce-container",
172
+ salesforceOrigin: "https://myorg.my.salesforce.com",
173
+ agentforceClientConfig: {
174
+ agentId: "0Xx000000000000",
175
+ renderingConfig: { mode: "floating" },
176
+ styleTokens: {
177
+ headerBlockBackground: "#0176d3",
178
+ headerBlockTextColor: "#ffffff",
179
+ },
180
+ },
181
+ });
182
+ ```