
Implementing Ui Bundle Agentforce Conversation Client
Embed Agentforce Employee Agent chat in your Salesforce UI by resolving agent IDs and wiring AgentforceConversationClient only in consumer React files.
Overview
implementing-ui-bundle-agentforce-conversation-client is an agent skill for the Build phase that embeds Agentforce conversation UI by resolving Employee Agent IDs and editing only consumer-side React usage.
Install
npx skills add https://github.com/forcedotcom/sf-skills --skill implementing-ui-bundle-agentforce-conversation-clientWhat is this skill?
- SOQL on BotVersion with AgentforceEmployeeAgent filter and Active/Inactive Status
- sf data query JSON recipe for BotDefinition Id, DeveloperName, and MasterLabel
- agentId validation regex ^0Xx[a-zA-Z0-9]{15}$
- Hard rule: edit only files that use the component—never implementation bundle sources
- Manual activation path via Setup → Agentforce Agents → Agent Builder
- agentId must match ^0Xx[a-zA-Z0-9]{15}$
- Queries BotVersion (not BotDefinition) for Status Active/Inactive
Adoption & trust: 631 installs on skills.sh; 513 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need Agentforce chat in your app but keep picking the wrong agent record, editing bundle internals, or using agents that are still inactive in Org Setup.
Who is it for?
Builders on Salesforce with sf CLI who embed Employee Agents in custom React or Lightning experiences.
Skip if: Non-Salesforce stacks, Service Agent-only scenarios without Employee Agent filter, or teams expecting fully programmatic agent activation.
When should I use this skill?
When embedding or fixing AgentforceConversationClient in your UI and you need Employee Agent ID resolution, validation, and edit-scope constraints.
What do I get? / Deliverables
You resolve a validated Employee Agent Id with SOQL, activate via documented Setup steps, and integrate AgentforceConversationClient only in your application files.
- Validated agentId wired into consumer components
- SOQL/query steps documented for the target Employee Agent
Recommended Skills
Journey fit
Implementing the conversation client is integration work during product build on Salesforce Agentforce apps. Salesforce CLI SOQL, BotVersion status, and UI bundle usage are backend-to-frontend integration concerns—not generic frontend polish alone.
How it compares
Salesforce-specific integration playbook—not a generic embeddable chat widget skill for arbitrary web apps.
Common Questions / FAQ
Who is implementing-ui-bundle-agentforce-conversation-client for?
Indie and small-team Salesforce developers integrating Agentforce Employee Agent chat into custom UI bundles while keeping vendor implementation files untouched.
When should I use implementing-ui-bundle-agentforce-conversation-client?
During Build integrations when you add or fix AgentforceConversationClient in React consumers, need SOQL-based agent ID lookup, or must validate Id format before go-live.
Is implementing-ui-bundle-agentforce-conversation-client safe to install?
Check Prism Security Audits for this listing; SOQL and sf CLI access your org—use least-privilege users and review queries before production.
SKILL.md
READMESKILL.md - Implementing Ui Bundle Agentforce Conversation Client
# Agent ID Resolution ## SOQL Query ```bash sf data query \ --query "SELECT BotDefinition.Id, BotDefinition.DeveloperName, BotDefinition.MasterLabel, Status FROM BotVersion WHERE BotDefinition.AgentType = 'AgentforceEmployeeAgent' ORDER BY BotDefinition.CreatedDate ASC" \ --json ``` - Queries `BotVersion` (not `BotDefinition`) because only `BotVersion` has the `Status` field (`Active` / `Inactive`) - Filters on `AgentType = 'AgentforceEmployeeAgent'` to return only Employee Agents (excludes Service Agents) ## Response Structure ```json { "status": 0, "result": { "records": [ { "BotDefinition": { "Id": "0Xxxx0000000001CAA", "DeveloperName": "Property_Manager_Agent", "MasterLabel": "Property Manager Agent" }, "Status": "Active" } ] } } ``` ## Activation Path Agents cannot be activated programmatically: > Setup → Agentforce Agents → click agent name → Agent Builder → Activate ## Manual Lookup (without sf CLI) > Setup → Agentforce Agents → click agent name → copy ID from URL ## Validation `agentId` must match: `^0Xx[a-zA-Z0-9]{15}$` # Constraints and Anti-Patterns This document lists all invalid approaches and patterns to avoid when working with AgentforceConversationClient. ## Never Edit Implementation Files **CRITICAL: Only edit files where the component is USED, never the component implementation itself.** - ✅ **DO edit**: Any React files that import and use `<AgentforceConversationClient />` (for example, shared shells, route components, or feature pages) - ❌ **DO NOT edit**: AgentforceConversationClient.tsx, AgentforceConversationClient.jsx, index.tsx, index.jsx, or any files inside: - `node_modules/@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client/src/` - `packages/template/feature/feature-react-agentforce-conversation-client/src/` - `src/components/AgentforceConversationClient.tsx` (patched templates) - Any path containing `/components/AgentforceConversationClient.` **If you're reading a file named `AgentforceConversationClient.tsx`, you're in the wrong place. Stop and search for the USAGE instead.** ## Invalid Props AgentforceConversationClient uses a flat prop API and does NOT accept these props: - ❌ `containerStyle` - Use `width` and `height` props directly instead - ❌ `style` - Use `styleTokens` for theming - ❌ `className` - Not supported - ❌ Any standard React div props - This wraps an embedded iframe, not a div **Why:** The component is a wrapper around an embedded iframe using Lightning Out 2.0. Standard React styling props don't apply. ## Invalid Styling Approaches **CRITICAL: For ALL styling, theming, branding, or color changes - ONLY use `styleTokens` prop.** Never use these approaches: - ❌ Creating CSS files (e.g., `agent-styles.css`, `theme.css`) - ❌ Creating `<style>` tags or internal stylesheets - ❌ Using `style` attribute on the component - ❌ Using `className` prop - ❌ Inline styles - ❌ CSS modules - ❌ Styled-components or any CSS-in-JS libraries **Why:** The component controls its own internal styling through the `styleTokens` API. External CSS cannot reach into the embedded iframe. ## Invalid Implementation Approaches Never do these: - ❌ Create custom chat UIs from scratch - ❌ Use third-party chat libraries (socket.io, WebSocket libraries, etc.) - ❌ Call `embedAgentforceClient` directly from `@salesforce/agentforce-conversation-client` - ❌ Build custom WebSocket or REST API chat implementations **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. ## Invalid Update Patterns When updating an existing component: - ❌ Delete and recreate the component - ❌ Remove all props and start over - ❌ Copy the entire component to a new file **Why:** This loses configuration, introduces errors, and creates