forcedotcom/sf-skills / plugins/builder/experience-react/skills/experience-ui-bundle-agentforce-client-generate
experience-ui-bundle-agentforce-client-generate
VerifiedUse 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 UI Bundle project (React or Angular). TRIGGER when: project contains a uiBundles/*/src/ directory and the task involves adding or modifying a chat widget, chatbot, or conversational AI; files under uiBundles/*/src/ import AgentforceConversationClient in React `.tsx`/`.jsx` files, or use the app-agentforce-conversation-client element in Angular `.html` templates and AgentforceConversationClientComponent in `.component.ts` files; user asks to add any chat or agent functionality to a page. DO NOT TRIGGER when: user wants to create a custom agent, chatbot, or chat widget component from scratch; the project has no uiBundles directory.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 18.7 KB |
| references/agent-id-resolution.md | markdown | 1.1 KB |
| references/constraints.md | markdown | 5.4 KB |
| references/examples.md | markdown | 5.1 KB |
| references/style-tokens.md | markdown | 14.7 KB |
| references/troubleshooting.md | markdown | 2.1 KB |
| scripts/detect-framework.shexecutable | script | 2.0 KB |
references/troubleshooting.md
View on GitHub# Troubleshooting
Common issues when using the Agentforce Conversation Client.
---
### Component throws "requires agentId"
**Cause:** `agentId` was not passed.
**Solution:** Pass `agentId` directly as a flat prop/input:
```tsx
// React
<AgentforceConversationClient agentId="0Xx000000000000AAA" />
```
```html
<!-- Angular -->
<app-agentforce-conversation-client agentId="0Xx000000000000AAA" />
```
---
### (Angular) Element renders nothing / no chat appears
**Cause:** `AgentforceConversationClientComponent` was not registered in the host component's `@Component({ imports: [...] })`, so Angular ignores the `<app-agentforce-conversation-client>` tag. A second common cause is passing a boolean/object as a bare string attribute (e.g. `inline` instead of `[inline]="true"`).
**Solution:** Add the component to the host `imports` array, and use `[prop]` binding for booleans/numbers/objects.
---
### Chat widget does not appear
**Cause:** Invalid `agentId` or inactive agent.
**Solution:**
1. Confirm the id is correct (18-char Salesforce id, starts with `0Xx`).
2. Ensure the agent is Active in **Setup → Agentforce Agents**.
3. Verify the agent is deployed to the target channel.
---
### Authentication error on localhost
**Cause:** `localhost:<PORT>` is not trusted for inline frames.
**Solution:**
1. Go to **Setup → Session Settings → Trusted Domains for Inline Frames**.
2. Add `localhost:<PORT>` (example: `localhost:3000`).
**Important:**
- This setting should be **temporary for local development only**.
- **Remove `localhost:<PORT>` from trusted domains after development**.
- **Recommended:** Test the Agentforce conversation client in a deployed app instead of relying on localhost trusted domains for extended periods.
---
### Blank iframe / auth session issues
**Possible cause:** First-party Salesforce cookie restriction may block embedded auth flow in some environments.
**Solution:**
1. Go to **Setup → Session Settings**.
2. Find **Require first party use of Salesforce cookies**.
3. Disable it **only if needed and approved by your security/admin team**.
4. Save and reload.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |