@salesforce/webapp-template-feature-react-file-upload-experimental 1.107.3 → 1.107.4
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/.a4drules/features/feature-react-agentforce-conversation-client-embedded-agent-rule.md +30 -6
- package/dist/.a4drules/skills/managing-agentforce-conversation-client/SKILL.md +186 -0
- package/dist/.a4drules/skills/managing-agentforce-conversation-client/references/constraints.md +134 -0
- package/dist/.a4drules/skills/managing-agentforce-conversation-client/references/examples.md +132 -0
- package/dist/.a4drules/skills/managing-agentforce-conversation-client/references/style-tokens.md +101 -0
- package/dist/.a4drules/skills/{integrating-agentforce-conversation-client/docs → managing-agentforce-conversation-client/references}/troubleshooting.md +9 -12
- package/dist/CHANGELOG.md +8 -0
- package/dist/force-app/main/default/webapplications/feature-react-file-upload/package.json +3 -3
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/package.json +2 -2
- package/dist/.a4drules/skills/integrating-agentforce-conversation-client/SKILL.md +0 -92
- package/dist/.a4drules/skills/integrating-agentforce-conversation-client/docs/embed-examples.md +0 -116
package/dist/.a4drules/features/feature-react-agentforce-conversation-client-embedded-agent-rule.md
CHANGED
|
@@ -8,11 +8,35 @@ paths:
|
|
|
8
8
|
|
|
9
9
|
## DO NOT build a chat UI from scratch
|
|
10
10
|
|
|
11
|
-
When the user asks for a chat UI, chat widget, chatbot, agent, or conversational interface — **always use the existing `AgentforceConversationClient` component
|
|
11
|
+
When the user asks for a chat UI, chat widget, chatbot, agent, or conversational interface — **always use the existing `AgentforceConversationClient` component**. Never generate custom chat implementations, third-party chat libraries, WebSocket/REST chat, or direct calls to `embedAgentforceClient`.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## NEVER edit implementation files
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
**CRITICAL: Only edit files where AgentforceConversationClient is USED, never the component implementation itself.**
|
|
16
|
+
|
|
17
|
+
❌ **DO NOT edit**: `AgentforceConversationClient.tsx`, `index.tsx`, or any files in:
|
|
18
|
+
|
|
19
|
+
- `node_modules/@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental/`
|
|
20
|
+
- `packages/template/feature/feature-react-agentforce-conversation-client/src/`
|
|
21
|
+
- `src/components/AgentforceConversationClient.tsx` (patched templates)
|
|
22
|
+
|
|
23
|
+
If you're reading a file named `AgentforceConversationClient.tsx`, stop and search for the USAGE instead.
|
|
24
|
+
|
|
25
|
+
## Invalid Props
|
|
26
|
+
|
|
27
|
+
AgentforceConversationClient does NOT accept:
|
|
28
|
+
|
|
29
|
+
- ❌ `containerStyle` - Use `width`/`height` props directly instead
|
|
30
|
+
- ❌ `style` - Use `styleTokens` prop for theming
|
|
31
|
+
- ❌ `className` - Not supported
|
|
32
|
+
|
|
33
|
+
## Styling
|
|
34
|
+
|
|
35
|
+
**For ANY styling, theming, branding, or color changes - ONLY use `styleTokens` prop.**
|
|
36
|
+
|
|
37
|
+
NEVER use: CSS files, `<style>` tags, `className`, inline styles, CSS modules, or CSS-in-JS libraries.
|
|
38
|
+
|
|
39
|
+
## Hard Constraints
|
|
40
|
+
|
|
41
|
+
- **`agentId` is required** - Always ask the user for their agent ID before proceeding
|
|
42
|
+
- **Use the React wrapper only** - Never call `embedAgentforceClient` directly
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: managing-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.
|
|
4
|
+
metadata:
|
|
5
|
+
author: ACC Components
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
package: "@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental"
|
|
8
|
+
sdk-package: "@salesforce/agentforce-conversation-client"
|
|
9
|
+
last-updated: 2025-03-18
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Managing Agentforce Conversation Client
|
|
13
|
+
|
|
14
|
+
## Instructions
|
|
15
|
+
|
|
16
|
+
### Step 1: Check if component already exists
|
|
17
|
+
|
|
18
|
+
Search for existing usage across all app files (not implementation files):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
grep -r "AgentforceConversationClient" --include="*.tsx" --include="*.jsx" --exclude-dir=node_modules
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Important:** Look for React files that import and USE the component (for example, shared shells, route components, or feature pages). Do NOT open files named `AgentforceConversationClient.tsx` or `AgentforceConversationClient.jsx` - those are the component implementation.
|
|
25
|
+
|
|
26
|
+
**If found:** Read the file and check the current `agentId` value.
|
|
27
|
+
|
|
28
|
+
**Agent ID validation rule (deterministic):**
|
|
29
|
+
|
|
30
|
+
- Valid only if it matches: `^0Xx[a-zA-Z0-9]{15}$`
|
|
31
|
+
- Meaning: starts with `0Xx` and total length is 18 characters
|
|
32
|
+
|
|
33
|
+
**Decision:**
|
|
34
|
+
|
|
35
|
+
- If `agentId` matches `^0Xx[a-zA-Z0-9]{15}$` and user wants to update other props → Go to Step 4 (update props)
|
|
36
|
+
- If `agentId` is missing, empty, or does NOT match `^0Xx[a-zA-Z0-9]{15}$` → Continue to Step 2 (need real ID)
|
|
37
|
+
- If not found → Continue to Step 2 (add new)
|
|
38
|
+
|
|
39
|
+
### Step 2: Get agent ID
|
|
40
|
+
|
|
41
|
+
If component doesn't exist or has an invalid placeholder value, ask user for their Salesforce agent ID.
|
|
42
|
+
|
|
43
|
+
Treat these as placeholder/invalid values:
|
|
44
|
+
|
|
45
|
+
- `"0Xx..."`
|
|
46
|
+
- `"Placeholder"`
|
|
47
|
+
- `"YOUR_AGENT_ID"`
|
|
48
|
+
- `"<USER_AGENT_ID_18_CHAR_0Xx...>"`
|
|
49
|
+
- Any value that does not match `^0Xx[a-zA-Z0-9]{15}$`
|
|
50
|
+
|
|
51
|
+
Skip this step if:
|
|
52
|
+
|
|
53
|
+
- Component exists with a real agent ID
|
|
54
|
+
- User only wants to update styling or dimensions
|
|
55
|
+
|
|
56
|
+
### Step 3: Canonical import strategy
|
|
57
|
+
|
|
58
|
+
Use this import path by default in app code:
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
import { AgentforceConversationClient } from "@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental";
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If the package is not installed, install it:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm install @salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Only use a local relative import (for example, `./components/AgentforceConversationClient`) when the user explicitly asks to use a patched/local component in that app.
|
|
71
|
+
|
|
72
|
+
Do not infer import path from file discovery alone. Prefer one consistent package import across the codebase.
|
|
73
|
+
|
|
74
|
+
### Step 4: Add or update component
|
|
75
|
+
|
|
76
|
+
**For new installations:**
|
|
77
|
+
|
|
78
|
+
Add to the target React component file using the canonical package import:
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
import { Outlet } from "react-router";
|
|
82
|
+
import { AgentforceConversationClient } from "@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental";
|
|
83
|
+
|
|
84
|
+
export default function AgentChatHost() {
|
|
85
|
+
return (
|
|
86
|
+
<>
|
|
87
|
+
<Outlet />
|
|
88
|
+
<AgentforceConversationClient agentId="0Xx..." />
|
|
89
|
+
</>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
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:**
|
|
97
|
+
|
|
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.
|
|
99
|
+
|
|
100
|
+
**Replacing placeholder values:**
|
|
101
|
+
|
|
102
|
+
If the component has a placeholder agentId (e.g., `agentId="Placeholder"` or `agentId="0Xx..."`), replace it with the real agent ID:
|
|
103
|
+
|
|
104
|
+
```tsx
|
|
105
|
+
// Before (template with placeholder)
|
|
106
|
+
<AgentforceConversationClient agentId="Placeholder" />
|
|
107
|
+
|
|
108
|
+
// After (with real agent ID)
|
|
109
|
+
<AgentforceConversationClient agentId="0Xx8X00000001AbCDE" />
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Step 5: Configure props
|
|
113
|
+
|
|
114
|
+
**Available props (use directly on component):**
|
|
115
|
+
|
|
116
|
+
- `agentId` (string, required) - Salesforce agent ID
|
|
117
|
+
- `inline` (boolean) - `true` for inline mode, omit for floating
|
|
118
|
+
- `width` (number | string) - e.g., `420` or `"100%"`
|
|
119
|
+
- `height` (number | string) - e.g., `600` or `"80vh"`
|
|
120
|
+
- `headerEnabled` (boolean) - Show/hide header
|
|
121
|
+
- `styleTokens` (object) - For all styling (colors, fonts, spacing)
|
|
122
|
+
- `salesforceOrigin` (string) - Auto-resolved
|
|
123
|
+
- `frontdoorUrl` (string) - Auto-resolved
|
|
124
|
+
|
|
125
|
+
**Examples:**
|
|
126
|
+
|
|
127
|
+
Floating mode (default):
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
<AgentforceConversationClient agentId="0Xx..." />
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Inline mode with dimensions:
|
|
134
|
+
|
|
135
|
+
```tsx
|
|
136
|
+
<AgentforceConversationClient agentId="0Xx..." inline width="420px" height="600px" />
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Styling with styleTokens:
|
|
140
|
+
|
|
141
|
+
```tsx
|
|
142
|
+
<AgentforceConversationClient
|
|
143
|
+
agentId="0Xx..."
|
|
144
|
+
styleTokens={{
|
|
145
|
+
headerBlockBackground: "#0176d3",
|
|
146
|
+
headerBlockTextColor: "#ffffff",
|
|
147
|
+
messageBlockInboundBackgroundColor: "#4CAF50",
|
|
148
|
+
}}
|
|
149
|
+
/>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**For complex patterns,** consult `references/examples.md` for:
|
|
153
|
+
|
|
154
|
+
- Sidebar containers and responsive sizing
|
|
155
|
+
- Dark theme and advanced theming combinations
|
|
156
|
+
- Inline without header, calculated dimensions
|
|
157
|
+
- Complete host component examples
|
|
158
|
+
|
|
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
|
+
|
|
161
|
+
**Common mistakes to avoid:** Consult `references/constraints.md` for:
|
|
162
|
+
|
|
163
|
+
- Invalid props (containerStyle, style, className)
|
|
164
|
+
- Invalid styling approaches (CSS files, style tags)
|
|
165
|
+
- What files NOT to edit (implementation files)
|
|
166
|
+
|
|
167
|
+
## Common Issues
|
|
168
|
+
|
|
169
|
+
If component doesn't appear or authentication fails, see `references/troubleshooting.md` for:
|
|
170
|
+
|
|
171
|
+
- Agent activation and deployment
|
|
172
|
+
- Localhost trusted domains
|
|
173
|
+
- 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`)
|
package/dist/.a4drules/skills/managing-agentforce-conversation-client/references/constraints.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Constraints and Anti-Patterns
|
|
2
|
+
|
|
3
|
+
This document lists all invalid approaches and patterns to avoid when working with AgentforceConversationClient.
|
|
4
|
+
|
|
5
|
+
## Never Edit Implementation Files
|
|
6
|
+
|
|
7
|
+
**CRITICAL: Only edit files where the component is USED, never the component implementation itself.**
|
|
8
|
+
|
|
9
|
+
- ✅ **DO edit**: Any React files that import and use `<AgentforceConversationClient />` (for example, shared shells, route components, or feature pages)
|
|
10
|
+
- ❌ **DO NOT edit**: AgentforceConversationClient.tsx, AgentforceConversationClient.jsx, index.tsx, index.jsx, or any files inside:
|
|
11
|
+
- `node_modules/@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental/src/`
|
|
12
|
+
- `packages/template/feature/feature-react-agentforce-conversation-client/src/`
|
|
13
|
+
- `src/components/AgentforceConversationClient.tsx` (patched templates)
|
|
14
|
+
- Any path containing `/components/AgentforceConversationClient.`
|
|
15
|
+
|
|
16
|
+
**If you're reading a file named `AgentforceConversationClient.tsx`, you're in the wrong place. Stop and search for the USAGE instead.**
|
|
17
|
+
|
|
18
|
+
## Invalid Props
|
|
19
|
+
|
|
20
|
+
AgentforceConversationClient uses a flat prop API and does NOT accept these props:
|
|
21
|
+
|
|
22
|
+
- ❌ `containerStyle` - Use `width` and `height` props directly instead
|
|
23
|
+
- ❌ `style` - Use `styleTokens` for theming
|
|
24
|
+
- ❌ `className` - Not supported
|
|
25
|
+
- ❌ Any standard React div props - This wraps an embedded iframe, not a div
|
|
26
|
+
|
|
27
|
+
**Why:** The component is a wrapper around an embedded iframe using Lightning Out 2.0. Standard React styling props don't apply.
|
|
28
|
+
|
|
29
|
+
## Invalid Styling Approaches
|
|
30
|
+
|
|
31
|
+
**CRITICAL: For ALL styling, theming, branding, or color changes - ONLY use `styleTokens` prop.**
|
|
32
|
+
|
|
33
|
+
Never use these approaches:
|
|
34
|
+
|
|
35
|
+
- ❌ Creating CSS files (e.g., `agent-styles.css`, `theme.css`)
|
|
36
|
+
- ❌ Creating `<style>` tags or internal stylesheets
|
|
37
|
+
- ❌ Using `style` attribute on the component
|
|
38
|
+
- ❌ Using `className` prop
|
|
39
|
+
- ❌ Inline styles
|
|
40
|
+
- ❌ CSS modules
|
|
41
|
+
- ❌ Styled-components or any CSS-in-JS libraries
|
|
42
|
+
|
|
43
|
+
**Why:** The component controls its own internal styling through the `styleTokens` API. External CSS cannot reach into the embedded iframe.
|
|
44
|
+
|
|
45
|
+
## Invalid Implementation Approaches
|
|
46
|
+
|
|
47
|
+
Never do these:
|
|
48
|
+
|
|
49
|
+
- ❌ Create custom chat UIs from scratch
|
|
50
|
+
- ❌ Use third-party chat libraries (socket.io, WebSocket libraries, etc.)
|
|
51
|
+
- ❌ Call `embedAgentforceClient` directly from `@salesforce/agentforce-conversation-client`
|
|
52
|
+
- ❌ Build custom WebSocket or REST API chat implementations
|
|
53
|
+
|
|
54
|
+
**Why:** The AgentforceConversationClient component is the official wrapper that handles authentication, Lightning Out 2.0 initialization, and all communication with Salesforce agents. Custom implementations will not work.
|
|
55
|
+
|
|
56
|
+
## Invalid Update Patterns
|
|
57
|
+
|
|
58
|
+
When updating an existing component:
|
|
59
|
+
|
|
60
|
+
- ❌ Delete and recreate the component
|
|
61
|
+
- ❌ Remove all props and start over
|
|
62
|
+
- ❌ Copy the entire component to a new file
|
|
63
|
+
|
|
64
|
+
**Why:** This loses configuration, introduces errors, and creates unnecessary diffs. Always update props in place.
|
|
65
|
+
|
|
66
|
+
## Examples
|
|
67
|
+
|
|
68
|
+
### ❌ Wrong - Using containerStyle
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
<AgentforceConversationClient agentId="0Xx..." containerStyle={{ width: 420, height: 600 }} />
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### ✅ Correct - Using width/height directly
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
<AgentforceConversationClient agentId="0Xx..." width="420px" height="600px" />
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### ❌ Wrong - Creating CSS file
|
|
81
|
+
|
|
82
|
+
```css
|
|
83
|
+
/* agent-styles.css */
|
|
84
|
+
.agentforce-chat {
|
|
85
|
+
background: red;
|
|
86
|
+
color: white;
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import "./agent-styles.css";
|
|
92
|
+
|
|
93
|
+
<AgentforceConversationClient className="agentforce-chat" />;
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### ✅ Correct - Using styleTokens
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
<AgentforceConversationClient
|
|
100
|
+
agentId="0Xx..."
|
|
101
|
+
styleTokens={{
|
|
102
|
+
headerBlockBackground: "red",
|
|
103
|
+
headerBlockTextColor: "white",
|
|
104
|
+
}}
|
|
105
|
+
/>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### ❌ Wrong - Creating style tag
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
<>
|
|
112
|
+
<style>{`.agent-chat { background: blue; }`}</style>
|
|
113
|
+
<AgentforceConversationClient agentId="0Xx..." />
|
|
114
|
+
</>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### ✅ Correct - Using styleTokens
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
<AgentforceConversationClient
|
|
121
|
+
agentId="0Xx..."
|
|
122
|
+
styleTokens={{
|
|
123
|
+
headerBlockBackground: "blue",
|
|
124
|
+
}}
|
|
125
|
+
/>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### ❌ Wrong - Editing implementation file
|
|
129
|
+
|
|
130
|
+
Reading or editing: `node_modules/@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental/src/AgentforceConversationClient.tsx`
|
|
131
|
+
|
|
132
|
+
### ✅ Correct - Editing usage file
|
|
133
|
+
|
|
134
|
+
Reading and editing: usage files where the component is imported and used (for example, `src/app.tsx`, a route component, or a feature page)
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Additional Examples
|
|
2
|
+
|
|
3
|
+
Essential examples for common patterns and combinations. All use flat props API.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Layout Patterns
|
|
8
|
+
|
|
9
|
+
### Sidebar Chat
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
export default function DashboardWithChat() {
|
|
13
|
+
return (
|
|
14
|
+
<div style={{ display: "flex", height: "100vh" }}>
|
|
15
|
+
<main style={{ flex: 1 }}>{/* Main content */}</main>
|
|
16
|
+
<aside style={{ width: 400 }}>
|
|
17
|
+
<AgentforceConversationClient agentId="0Xx..." inline width="100%" height="100%" />
|
|
18
|
+
</aside>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Full Page Chat
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
export default function SupportPage() {
|
|
28
|
+
return (
|
|
29
|
+
<div>
|
|
30
|
+
<h1>Customer Support</h1>
|
|
31
|
+
<AgentforceConversationClient agentId="0Xx..." inline width="100%" height="600px" />
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Size Variations
|
|
40
|
+
|
|
41
|
+
### Responsive sizing
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
<AgentforceConversationClient agentId="0Xx..." inline width="100%" height="80vh" />
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Calculated dimensions
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
<AgentforceConversationClient agentId="0Xx..." inline width="500px" height="calc(100vh - 100px)" />
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Theming Combinations
|
|
56
|
+
|
|
57
|
+
### Brand theme with custom sizing
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
<AgentforceConversationClient
|
|
61
|
+
agentId="0Xx..."
|
|
62
|
+
inline
|
|
63
|
+
width="500px"
|
|
64
|
+
height="700px"
|
|
65
|
+
styleTokens={{
|
|
66
|
+
headerBlockBackground: "#0176d3",
|
|
67
|
+
headerBlockTextColor: "#ffffff",
|
|
68
|
+
messageBlockInboundBackgroundColor: "#0176d3",
|
|
69
|
+
messageBlockInboundTextColor: "#ffffff",
|
|
70
|
+
messageInputFooterSendButton: "#0176d3",
|
|
71
|
+
}}
|
|
72
|
+
/>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Dark theme
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
<AgentforceConversationClient
|
|
79
|
+
agentId="0Xx..."
|
|
80
|
+
styleTokens={{
|
|
81
|
+
headerBlockBackground: "#1a1a1a",
|
|
82
|
+
headerBlockTextColor: "#ffffff",
|
|
83
|
+
messageBlockInboundBackgroundColor: "#2d2d2d",
|
|
84
|
+
messageBlockInboundTextColor: "#ffffff",
|
|
85
|
+
messageBlockOutboundBackgroundColor: "#3a3a3a",
|
|
86
|
+
messageBlockOutboundTextColor: "#f0f0f0",
|
|
87
|
+
}}
|
|
88
|
+
/>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Inline without header
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
<AgentforceConversationClient
|
|
95
|
+
agentId="0Xx..."
|
|
96
|
+
inline
|
|
97
|
+
width="100%"
|
|
98
|
+
height="600px"
|
|
99
|
+
headerEnabled={false}
|
|
100
|
+
styleTokens={{
|
|
101
|
+
messageBlockBorderRadius: "12px",
|
|
102
|
+
}}
|
|
103
|
+
/>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Complete Host Component Example
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import { Outlet } from "react-router";
|
|
112
|
+
import { AgentforceConversationClient } from "@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental";
|
|
113
|
+
|
|
114
|
+
export default function AgentChatHost() {
|
|
115
|
+
return (
|
|
116
|
+
<>
|
|
117
|
+
<Outlet />
|
|
118
|
+
<AgentforceConversationClient
|
|
119
|
+
agentId="0Xx..."
|
|
120
|
+
styleTokens={{
|
|
121
|
+
headerBlockBackground: "#0176d3",
|
|
122
|
+
headerBlockTextColor: "#ffffff",
|
|
123
|
+
}}
|
|
124
|
+
/>
|
|
125
|
+
</>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
For complete style token reference, see `references/style-tokens.md` or `node_modules/@salesforce/agentforce-conversation-client/README.md`.
|
package/dist/.a4drules/skills/managing-agentforce-conversation-client/references/style-tokens.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Style Tokens Reference
|
|
2
|
+
|
|
3
|
+
This document explains how to use `styleTokens` for theming and styling the AgentforceConversationClient.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The `styleTokens` prop is the **ONLY** way to customize the appearance of the Agentforce conversation client. It accepts an object with style token keys and CSS values.
|
|
8
|
+
|
|
9
|
+
## Source of Truth
|
|
10
|
+
|
|
11
|
+
For the complete and always up-to-date list of all 60+ style tokens, see:
|
|
12
|
+
|
|
13
|
+
**[@salesforce/agentforce-conversation-client on npm](https://www.npmjs.com/package/@salesforce/agentforce-conversation-client)**
|
|
14
|
+
|
|
15
|
+
The npm package README contains the definitive documentation with all available style tokens.
|
|
16
|
+
|
|
17
|
+
## Token Categories
|
|
18
|
+
|
|
19
|
+
Style tokens are organized by UI area:
|
|
20
|
+
|
|
21
|
+
- **Header** (7 tokens): background, text color, hover, active, focus, border, font family
|
|
22
|
+
- **Messages** (10 tokens): colors, padding, margins, border radius, fonts, body width
|
|
23
|
+
- **Inbound messages** (5 tokens): background, text color, width, alignment, hover
|
|
24
|
+
- **Outbound messages** (5 tokens): background, text color, width, alignment, margin
|
|
25
|
+
- **Input** (33 tokens): colors, borders, fonts, padding, buttons, scrollbar, textarea, actions
|
|
26
|
+
|
|
27
|
+
## Common Use Cases
|
|
28
|
+
|
|
29
|
+
### Change header color
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
<AgentforceConversationClient
|
|
33
|
+
agentId="0Xx..."
|
|
34
|
+
styleTokens={{
|
|
35
|
+
headerBlockBackground: "#0176d3",
|
|
36
|
+
headerBlockTextColor: "#ffffff",
|
|
37
|
+
}}
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Change message colors
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
<AgentforceConversationClient
|
|
45
|
+
agentId="0Xx..."
|
|
46
|
+
styleTokens={{
|
|
47
|
+
messageBlockInboundBackgroundColor: "#4CAF50",
|
|
48
|
+
messageBlockInboundTextColor: "#ffffff",
|
|
49
|
+
messageBlockOutboundBackgroundColor: "#f5f5f5",
|
|
50
|
+
messageBlockOutboundTextColor: "#333333",
|
|
51
|
+
}}
|
|
52
|
+
/>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Apply brand colors
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
<AgentforceConversationClient
|
|
59
|
+
agentId="0Xx..."
|
|
60
|
+
styleTokens={{
|
|
61
|
+
headerBlockBackground: "#1a73e8",
|
|
62
|
+
headerBlockTextColor: "#ffffff",
|
|
63
|
+
messageBlockInboundBackgroundColor: "#1a73e8",
|
|
64
|
+
messageBlockInboundTextColor: "#ffffff",
|
|
65
|
+
messageInputFooterSendButton: "#1a73e8",
|
|
66
|
+
messageInputFooterSendButtonHoverColor: "#1557b0",
|
|
67
|
+
}}
|
|
68
|
+
/>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Adjust spacing and fonts
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
<AgentforceConversationClient
|
|
75
|
+
agentId="0Xx..."
|
|
76
|
+
styleTokens={{
|
|
77
|
+
messageInputFontSize: "16px",
|
|
78
|
+
messageBlockBorderRadius: "12px",
|
|
79
|
+
messageBlockPadding: "16px",
|
|
80
|
+
messageInputPadding: "12px",
|
|
81
|
+
}}
|
|
82
|
+
/>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## How to Find Token Names
|
|
86
|
+
|
|
87
|
+
1. Check the [@salesforce/agentforce-conversation-client npm package](https://www.npmjs.com/package/@salesforce/agentforce-conversation-client) for the complete list of all tokens
|
|
88
|
+
|
|
89
|
+
2. Token names follow a pattern:
|
|
90
|
+
- `headerBlock*` - Header area
|
|
91
|
+
- `messageBlock*` - Message bubbles
|
|
92
|
+
- `messageBlockInbound*` - Messages from customer to agent
|
|
93
|
+
- `messageBlockOutbound*` - Messages from agent to customer
|
|
94
|
+
- `messageInput*` - Input field and send button
|
|
95
|
+
|
|
96
|
+
## Important Notes
|
|
97
|
+
|
|
98
|
+
- You do NOT need to provide all tokens - only override the ones you want to change
|
|
99
|
+
- Token values are CSS strings (e.g., `"#FF0000"`, `"16px"`, `"bold"`)
|
|
100
|
+
- Invalid token names are silently ignored
|
|
101
|
+
- The component uses default values for any tokens you don't specify
|
|
@@ -23,7 +23,7 @@ Common issues when using the Agentforce Conversation Client.
|
|
|
23
23
|
**Solution:**
|
|
24
24
|
|
|
25
25
|
1. Confirm the id is correct (18-char Salesforce id, starts with `0Xx`).
|
|
26
|
-
2. Ensure the agent is Active in **Setup → Agents**.
|
|
26
|
+
2. Ensure the agent is Active in **Setup → Agentforce Agents**.
|
|
27
27
|
3. Verify the agent is deployed to the target channel.
|
|
28
28
|
|
|
29
29
|
---
|
|
@@ -36,25 +36,22 @@ Common issues when using the Agentforce Conversation Client.
|
|
|
36
36
|
|
|
37
37
|
1. Go to **Setup → Session Settings → Trusted Domains for Inline Frames**.
|
|
38
38
|
2. Add `localhost:<PORT>` (example: `localhost:3000`).
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
**Important:**
|
|
41
|
+
|
|
42
|
+
- This setting should be **temporary for local development only**.
|
|
43
|
+
- **Remove `localhost:<PORT>` from trusted domains after development**.
|
|
44
|
+
- **Recommended:** Test the Agentforce conversation client in a deployed app instead of relying on localhost trusted domains for extended periods.
|
|
40
45
|
|
|
41
46
|
---
|
|
42
47
|
|
|
43
48
|
### Blank iframe / auth session issues
|
|
44
49
|
|
|
45
|
-
**
|
|
50
|
+
**Possible cause:** First-party Salesforce cookie restriction may block embedded auth flow in some environments.
|
|
46
51
|
|
|
47
52
|
**Solution:**
|
|
48
53
|
|
|
49
54
|
1. Go to **Setup → Session Settings**.
|
|
50
55
|
2. Find **Require first party use of Salesforce cookies**.
|
|
51
|
-
3. Disable it
|
|
56
|
+
3. Disable it **only if needed and approved by your security/admin team**.
|
|
52
57
|
4. Save and reload.
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
### Multiple chat widgets appear
|
|
57
|
-
|
|
58
|
-
**Cause:** Component rendered more than once.
|
|
59
|
-
|
|
60
|
-
**Solution:** Render one instance in app layout only.
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.107.4](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.107.3...v1.107.4) (2026-03-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.107.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.107.2...v1.107.3) (2026-03-18)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@salesforce/sdk-data": "^1.107.
|
|
19
|
-
"@salesforce/webapp-experimental": "^1.107.
|
|
18
|
+
"@salesforce/sdk-data": "^1.107.4",
|
|
19
|
+
"@salesforce/webapp-experimental": "^1.107.4",
|
|
20
20
|
"@tailwindcss/vite": "^4.1.17",
|
|
21
21
|
"@tanstack/react-form": "^1.28.5",
|
|
22
22
|
"class-variance-authority": "^0.7.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
43
43
|
"@graphql-tools/utils": "^11.0.0",
|
|
44
44
|
"@playwright/test": "^1.49.0",
|
|
45
|
-
"@salesforce/vite-plugin-webapp-experimental": "^1.107.
|
|
45
|
+
"@salesforce/vite-plugin-webapp-experimental": "^1.107.4",
|
|
46
46
|
"@testing-library/jest-dom": "^6.6.3",
|
|
47
47
|
"@testing-library/react": "^16.1.0",
|
|
48
48
|
"@testing-library/user-event": "^14.5.2",
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-base-sfdx-project-experimental",
|
|
3
|
-
"version": "1.107.
|
|
3
|
+
"version": "1.107.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/webapp-template-base-sfdx-project-experimental",
|
|
9
|
-
"version": "1.107.
|
|
9
|
+
"version": "1.107.4",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@lwc/eslint-plugin-lwc": "^3.3.0",
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-feature-react-file-upload-experimental",
|
|
3
|
-
"version": "1.107.
|
|
3
|
+
"version": "1.107.4",
|
|
4
4
|
"description": "File upload feature with a component to upload files to core",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@salesforce/webapp-experimental": "^1.107.
|
|
44
|
+
"@salesforce/webapp-experimental": "^1.107.4",
|
|
45
45
|
"@types/react": "^19.2.7",
|
|
46
46
|
"@types/react-dom": "^19.2.3",
|
|
47
47
|
"nodemon": "^3.1.0",
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: integrating-agentforce-conversation-client
|
|
3
|
-
description: Embed an Agentforce conversation client (chat UI) into a React web application using the AgentforceConversationClient component. Use when the user wants to add or integrate a chat widget, chatbot, conversation client, agent chat, or conversational interface in a React app, or when they mention Agentforce chat, Agentforce widget, employee agent, travel agent, HR agent, or embedding a Salesforce agent. ALWAYS use this skill instead of building a chat UI from scratch. NEVER generate custom chat components, use third-party chat libraries, or implement chat with WebSockets or REST APIs. Do NOT use for Lightning Web Components (LWC), non-React frameworks.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Embedded Agentforce chat (flat-prop API)
|
|
7
|
-
|
|
8
|
-
Use this workflow whenever the user wants add or update Agentforce chat in React.
|
|
9
|
-
|
|
10
|
-
## 1) Get agent id first
|
|
11
|
-
|
|
12
|
-
Ask for the Salesforce agent id (18-char id starting with `0Xx`). Do not proceed without it.
|
|
13
|
-
|
|
14
|
-
Placeholder convention for all examples in this file:
|
|
15
|
-
|
|
16
|
-
`<AgentforceConversationClient agentId="<USER_AGENT_ID_18_CHAR_0Xx...>" />`
|
|
17
|
-
|
|
18
|
-
## 2) Install package
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npm install @salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## 3) Use component in app layout
|
|
25
|
-
|
|
26
|
-
Render a single instance in the shared layout (alongside `<Outlet />`).
|
|
27
|
-
|
|
28
|
-
```tsx
|
|
29
|
-
import { Outlet } from "react-router";
|
|
30
|
-
import { AgentforceConversationClient } from "@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental";
|
|
31
|
-
|
|
32
|
-
export default function AppLayout() {
|
|
33
|
-
return (
|
|
34
|
-
<>
|
|
35
|
-
<Outlet />
|
|
36
|
-
<AgentforceConversationClient agentId="<USER_AGENT_ID_18_CHAR_0Xx...>" />
|
|
37
|
-
</>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## 4) Flat props only
|
|
43
|
-
|
|
44
|
-
This package uses a flat prop API. Use these props directly on the component:
|
|
45
|
-
|
|
46
|
-
- `agentId` (required in practice)
|
|
47
|
-
- `inline` (`true` = inline, omitted/false = floating)
|
|
48
|
-
- `headerEnabled` (defaults to true for floating; actual use case for inline mode)
|
|
49
|
-
- `width`, `height` (actual work is when inline mode is true)
|
|
50
|
-
- `styleTokens`
|
|
51
|
-
- `salesforceOrigin`, `frontdoorUrl`
|
|
52
|
-
|
|
53
|
-
## 5) Inline mode example
|
|
54
|
-
|
|
55
|
-
```tsx
|
|
56
|
-
<AgentforceConversationClient
|
|
57
|
-
agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
|
|
58
|
-
inline
|
|
59
|
-
width={420}
|
|
60
|
-
height={600}
|
|
61
|
-
/>
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 6) Theming example
|
|
65
|
-
|
|
66
|
-
```tsx
|
|
67
|
-
<AgentforceConversationClient
|
|
68
|
-
agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
|
|
69
|
-
styleTokens={{
|
|
70
|
-
headerBlockBackground: "#0176d3",
|
|
71
|
-
headerBlockTextColor: "#ffffff",
|
|
72
|
-
}}
|
|
73
|
-
/>
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## 7) Do not do this
|
|
77
|
-
|
|
78
|
-
- Do not create custom chat UIs.
|
|
79
|
-
- Do not use third-party chat libraries.
|
|
80
|
-
- Do not call `embedAgentforceClient` directly from @salesforce/agentforce-conversation-client.
|
|
81
|
-
|
|
82
|
-
## 8) Prerequisites
|
|
83
|
-
|
|
84
|
-
Ensure org setup is valid:
|
|
85
|
-
|
|
86
|
-
1. Agent is active and deployed to the correct channel.
|
|
87
|
-
2. `localhost:<PORT>` is trusted for inline frames in local dev.
|
|
88
|
-
3. First-party Salesforce cookie restriction is disabled when required for embedding.
|
|
89
|
-
|
|
90
|
-
## Troubleshooting
|
|
91
|
-
|
|
92
|
-
If the chat widget does not appear, fails to authenticate, or behaves unexpectedly, see [troubleshooting.md](docs/troubleshooting.md).
|
package/dist/.a4drules/skills/integrating-agentforce-conversation-client/docs/embed-examples.md
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
# Embed examples (flat-prop API)
|
|
2
|
-
|
|
3
|
-
All examples use `AgentforceConversationClient` with flat props.
|
|
4
|
-
|
|
5
|
-
> `agentId` is required in practice. Use this placeholder pattern in examples: `"<USER_AGENT_ID_18_CHAR_0Xx...>"`.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Floating mode (default)
|
|
10
|
-
|
|
11
|
-
```tsx
|
|
12
|
-
<AgentforceConversationClient agentId="<USER_AGENT_ID_18_CHAR_0Xx...>" />
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Explicit floating
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
<AgentforceConversationClient agentId="<USER_AGENT_ID_18_CHAR_0Xx...>" />
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Inline mode
|
|
24
|
-
|
|
25
|
-
### Fixed pixels
|
|
26
|
-
|
|
27
|
-
```tsx
|
|
28
|
-
<AgentforceConversationClient
|
|
29
|
-
agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
|
|
30
|
-
inline
|
|
31
|
-
width={420}
|
|
32
|
-
height={600}
|
|
33
|
-
/>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### CSS string size
|
|
37
|
-
|
|
38
|
-
```tsx
|
|
39
|
-
<AgentforceConversationClient
|
|
40
|
-
agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
|
|
41
|
-
inline
|
|
42
|
-
width="100%"
|
|
43
|
-
height="80vh"
|
|
44
|
-
/>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Inline sidebar
|
|
48
|
-
|
|
49
|
-
```tsx
|
|
50
|
-
<div style={{ display: "flex", height: "100vh" }}>
|
|
51
|
-
<main style={{ flex: 1 }}>{/* App content */}</main>
|
|
52
|
-
<aside style={{ width: 400 }}>
|
|
53
|
-
<AgentforceConversationClient
|
|
54
|
-
agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
|
|
55
|
-
inline
|
|
56
|
-
width="100%"
|
|
57
|
-
height="100%"
|
|
58
|
-
/>
|
|
59
|
-
</aside>
|
|
60
|
-
</div>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Theming
|
|
66
|
-
|
|
67
|
-
```tsx
|
|
68
|
-
<AgentforceConversationClient
|
|
69
|
-
agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
|
|
70
|
-
styleTokens={{
|
|
71
|
-
headerBlockBackground: "#0176d3",
|
|
72
|
-
headerBlockTextColor: "#ffffff",
|
|
73
|
-
messageBlockInboundColor: "#0176d3",
|
|
74
|
-
}}
|
|
75
|
-
/>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Inline with header enabled
|
|
81
|
-
|
|
82
|
-
```tsx
|
|
83
|
-
<AgentforceConversationClient
|
|
84
|
-
agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
|
|
85
|
-
inline
|
|
86
|
-
width={420}
|
|
87
|
-
height={600}
|
|
88
|
-
headerEnabled
|
|
89
|
-
/>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
`headerEnabled` defaults to `true` for floating mode, and you can use it in inline mode to add/remove the header.
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Full layout example
|
|
97
|
-
|
|
98
|
-
```tsx
|
|
99
|
-
import { Outlet } from "react-router";
|
|
100
|
-
import { AgentforceConversationClient } from "@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental";
|
|
101
|
-
|
|
102
|
-
export default function AppLayout() {
|
|
103
|
-
return (
|
|
104
|
-
<>
|
|
105
|
-
<Outlet />
|
|
106
|
-
<AgentforceConversationClient
|
|
107
|
-
agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
|
|
108
|
-
styleTokens={{
|
|
109
|
-
headerBlockBackground: "#0176d3",
|
|
110
|
-
headerBlockTextColor: "#ffffff",
|
|
111
|
-
}}
|
|
112
|
-
/>
|
|
113
|
-
</>
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
```
|